Archive for June 2007

Compile LAPACK and BLAS as DLL on Windows

BLAS (Basic Linear Algebra Subprograms) is a library that provides standard routines for basic vector and matrix operations.

LAPACK is a library that provides functions for solving systems of linear equations, matrix factorizations, solving eigenvalue and singular value problems. LAPACK library have dependency to BLAS library because of the LAPACK functions using BLAS functions to work.

Both of those libraries are written in Fortran77 and no binaries provided for windows. The sources are downloadable from netlib site. So you can compile and use their libraries. However makefile and make solutions for compiling under windows are cumbersome.

So I recommend compiling directly from the sources using a FORTRAN compiler. There is a free and open source FORTRAN compiler for Windows which is the port of gnu FORTRAN compiler for Windows. You could also use Cygwin and tools in cygwin but your dynamic library loader will have dependency to cygwin dlls. MinGW is a collection of tools that allows you to produce native Windows programs. G77, make, gcc are the common tools provided by Mingw.

Here are the steps to go to compilation

  • Download most current version of LAPACK from Netlib and extract the sources
  • Download almost all of the Mingw tools and extract the tools
  • Copy dlamch.f and slamch.f from INSTALL directory SRC directory
  • Set path to have mingw binaries
    • set PATH=c:\mingw\bin\;%PATH%
  • Go to root directory of the extracted folder and compile using g77
  • First compile BLAS. –shared option is needed in order to functions to be exposed from the dll. -O generates optimised code. -o filename is the output file
    • g77 –shared -o blas.dll BLAS\SRC\*.f –O
  • Compile LAPACK with BLAS dependency
    • g77 –shared -o lapack.dll src\*.f blas.dll -O

Here is the output:

c:\\lapack-3.1.1\\copy INSTALL\\dlamch.f SRC\\dlamch.f
       1 file(s) copied.
c:\\lapack-3.1.1\\copy INSTALL\\slamch.f SRC\\slamch.f
       1 file(s) copied.
c:\\lapack-3.1.1\\set PATH=c:\\tools\\mingw\\bin\\;%PATH%

c:\\lapack-3.1.1\\g77 --shared -o blas.dll BLAS\\SRC\\*.f -O

c:\\lapack-3.1.1\\g77 --shared -o lapack.dll src\\*.f blas.dll -O

Hope this helps.

Seemless Wordpress Hosting Migration

I just changed my hosting service to GoDaddy. I hope everything works normally. I was using their services for a while and I was content, so I decided to move my blog to their servers. I tried to move everything I needed to my new server.

  1. I uploaded newest version of wordpress, created a new database and configured it on the temporary page.
  2. I copied the plug-ins, themes, and some other folders to my new server.
  3. I backed up the previous database and restored to the new server. This option works only if you are going to use the same domain name.
  4. Than I changed my domain name name servers to godaddy name servers
  5. After 2 hours, the site was up and running on the new server with a little problem. Permalinks was not working.

This was because of Godaddy 404 page behavior. To make it work

  • Go to Hosting Control Panel.
  • Click to Settings-> 404 Error Behavior
  • Instead of default Default Godaddy.com’s 404 page, select Make my 404 Page my Home Page.

Finally deactivate all the plugins and enable the one you need to make sure that every plug-in you use initialize correctly.

Software Agent Systems and their Applications

Introduction

Software agent is a program that handles the behaviour of a user or software with the aid of an agency. The software agents are not called by a user or by a process, they are acting themselves, they decide the next task to do. This drives the system to the concept of intelligent agents.

Agent system is a system composed of several software agents. It provides the collective environment for making the goals possible for individual agent. It helps the agents to communicate and delegate the task. Although software agents are considered as autonomous, all agents operate on a human supervision.

For agent systems, there are no currently implemented commercial applications; however there are a lot of ongoing research projects in the software agents and agent systems area. I have read a couple of research papers in software agent systems and software agents. One of the research papers is focussing on the different architectures behind the software agent systems. The other research paper is about different implications of the software agents for different scenarios.

Software agents and agent systems will be the key elements in information technology. They will solve many problems of information overload and this will change the human computer interaction. It will also change the way we develop software for large systems.

It is possible to use modern agent platforms to implement large scale agent systems. They are some working applications of software agents in an e-commerce system and software agents as a resource broker in the grid. I will try to investigate on different types of software agents and their implications.

There are different types of agent systems. Intelligent agents are capable of modifying their behaviour based on their learning and reasoning. Distributed agents are executed physically in distinct machines. Multi-agent systems are basically distributed agents that are not capable of doing alone the objective. They need to talk and communicate. Mobile agents are the agents that can execute on different processors.

Software Agents and Agent Systems

In real life, agents are expert people on some areas. For example a travel agent has the information needed for you to travel. They have the information and they have the connections to make the travel for us. Another example is the insurance agent, they have a deep knowledge in their fields and they provide this information for us.

These are the characteristics of software agents as well. They are specialised and provide only the needed knowledge. It is possible to find, filter or customise the interaction with software agents. Software agents will affect relatively the software evolution. We have some technologies used in software development like object orientation, and multi-threaded objects. The main concept is the execution in threads and communication between threads. Next thing will be the software agents. The agent based approach will be the revolution for building complex software systems. They are some implications of software agents. For instance Bio-agents work on a cellular automaton. They have a simple behaviour and they don’t have any intelligence.

Software agents are designed with dynamic transportations. In dynamic transportation the parts are changing, the environment does not build thousand parts. It works with real-time scheduling and it chooses the best scenario based on the real-life conditions.

A tool called JADE can be used as a software agent system. In JADE, agents communicate with messages. They send and receive ACL messages. JADE also provides queue for the agents.

Some real world examples exist for software agents. Agents can operate in an e-shop application. They can go to e-shop; buy some things and can kill themselves can be a simple usage of the software agents. There exist also agent systems for large distributed area like GRID systems. Agents can travel in the grid for resource broking.

There are some assumptions of the agents in the grid. The agents work in teams, and each agent has a team leader. Incoming agents can join any team based on the criteria they have been created. Teams can accept or reject the incoming agents based on their criteria of acceptance. There exists different type of architectures. One of the approaches is the usage of thread pool. Task-per-thread paradigm is being used in that architecture. Another approach is the use of databases. Database agents are located on remote machines contributing additional computational power.

Developing high-quality industry ready is difficult to achieve. It is one of the complex construction tasks to build software in telecommunication or other big industrial areas because of the size of the data and because of the rules to implement.

I think complex software systems can be built and designed by the use of autonomous agents. It can give some advantages to the software engineers especially for some areas. GRID computing is the most complex system that can be handled with software agents.

Computers are becoming more important for everyday activities of every business and every people. The speed of access to the information is less than seconds and the information is increasing exponentionally every single hour. Current software implementations are enough to handle that huge request for the moment; however without an autonomous system this task is getting harder to accomplish with the technological developments. The human driven mechanism for handling the information will collapse soon or later. This metaphor has to change from the software systems perspective. Software agents can help in organising the data without human interaction and make the data ready for people’s use.

Conclusion

Agent-oriented techniques are used in many big areas. There are some experiments on the GRID computing which makes this work very important. GRID computing is very important especially in the research area. However it will be more relevant for the industry as well.

JADE is one of the great multi-agent development tools that support different architectures. None of the architectures can be good for a particular solution. Each problem has different situations and each might have a different architecture. As the research and development continues in that area, every problem will be investigated and will have a particular solution.

Software agents can be applied to many different areas. Software engineers will accept the agent-based approach soon or later to make their system autonomous and intelligent. We might see a combination of paradigms in the future. Agent-oriented concepts and techniques are well suited to developing complex and distributed systems as an extension to the current paradigms.

Software engineering started to be like a car manufacturing company. Many things are getting automated and many software paradigms are becoming de facto standard for a particular problem. It is sometimes make the process easier; on the other hand it makes difficult to implement for some scenarios.