Installation of FLAME

Although there is some installation guide given in the FLAME documentation, not everything was very clear to us. So, here is some information on how to install FLAME, gathered from around the web.

Downloads
First you need to download the FLAME-framework components as indicated on http://www.flame.ac.uk/docs/install.html. You will be linked to CCPforge.com where the files are stored.

Installation
Xparser

  1. Download Xparser
  2. Unzip the package to a folder of your choice (preferably a folder called FLAME in your personal folder)
  3. On the command line change to the xparser directory and run make

This creates the xparser executable

libmboard

  1. Download libmboard
  2. Untar the package to your FLAME-folder

You will now have to have a look into the readme-file in the libmboard-folder inside your FLAME-folder. Before you install the libmboard you need to make sure to have some other programes installed.
Mandatory:

  • a C compiler, e.g. GCC (should be already available on Ubuntu)
  • GNU Make (should also be already available on Ubuntu, otherwise
    sudo apt-get install make 
  • libtool
    sudo apt-get install libtool

Optional:

  • Doxygen from http://www.doxygen.org
     sudo apt-get install doxygen doxygen-doc doxygen-gui graphviz
  • An MPI Library to use parallel computation. We would recommend OpenMPI, as mpich2 seems to be done being supported
    sudo apt-get install libopenmpi-dev openmpi-bin libhdf5-openmpi-dev
  • Support for pthreads (http://en.wikipedia.org/wiki/POSIX_Threads)
    sudo apt-get install libpthread-stubs0-dev
  • CUnit, to compile unit tests (http://cunit.sourceforge.net/)
    sudo apt-get install libcunit1 libcunit1-doc libcunit1-dev

In our first installation we left out Doxygen and CUnit as they did not work on our system and had no effect on the functionality of FLAME. When you install the libraries/programes make sure no other or previous version is installed (e.g. mpich2 when you want to use OpenMPI). (The easiest way would be to search for the name in the software centre). If one of the above commands does not work, google ‘apt-get install’ plus the name of the programme.
At some point we needed to change the libmboard path in the xparser by hand. So if you renamed the libmboard-folder you might need to change the path to the libmboard in the xparsers c-file.

After all prerequisities are installed, got to the libmboard directory in your command line and enter, after you made sure the previous command executed succesfully.

./configure
make
make install

You might need to add the “–disable-tests” option after “./ configure”, depending on if you installed CUnit. The same can be done for the parallel processing with “–disable-paralle”. If you discover any problems you can call “–help” to see all options. You may need to sudo the ‘make install’ command.

Running the model
To run your first model you will need to create a model.xml to determine your model structure, a 0.xml to initiate your starting population and c-files to determine the communication and action of agents. Once you have created these 3 files, put them together in one folder. The running of your model is performed in three steps:

  1. Create model.xml and 0.xml
  2. First you need to run the Agent_Maker_GUI using the command “python3 Agent_maker_GUI_alpha_lxml.py alter_2012_test.csv” There you can enter or modify different parameters or modules of the model.

  3. Parsing your files
  4. First you need to run the xparser (from the xparser-directory) on your model.xml by entering “./xparser /home/path-to-your-model.xml

  5. Create the executable
  6. Go to the folder of your model-files and enter “make” into your command line. This will create an exectuable for your model.

  7. Running the model
  8. By entering “./main <No. of iterations> ./0.xml” the model will be run for as many iterations as indicated in the command line, using your predefined starting population.

You should now see your model running [depending on the print-commands in your c-files ;-)]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: