Making Eco Lab

Once you have unpacked the gzipped tar file, you should be able to make Eco Lab by running “make” or “gmake” in the top level directory. Eco Lab needs GNU make (which available by default on Linux, Cygwin/Windows or MacOS, but can be installed from sources on most operating systems if needed). If you have a multiprocessor, or multicore computer, you can speed up the build time by spreading the compilation over multiple processors using the -j option to make. Currently Eco Lab has been developed against TCL/Tk 8.5 and gcc 4.5, but should build with other versions.

Eco Lab's Makefile searches for the software it needs, and sets Makefile flags appropriately depending on what it finds. The only software that is an absolute requirement is TCL, however it will also use Tk, BLT (version 2.4.z), Cairo, zlib, readline, XDR, UNURAN or GNUSL, Berkley DB or gdbm if available.

For the plotting widgets, EcoLab will use Cairo by preference - if you wish to use the older BLT-based widgets, specify BLT=1 on the makefile build line. If Cairo is not installed on the system, Ecolab will fall back to using BLT, and if that is not available either, will not provide the plotting widgets.

For parallel programming, it also uses MPI and ParMETIS. Eco Lab's Makefile searches for the software in $HOME/usr, then /usr/local and finally /usr. When installing 3rd party libraries, please install them in either $HOME/usr or /usr/local, usually by specify the --prefix option to the “configure” command of the package.

You can override the default settings by passing options to make. In the following table, you can define an option by specifying (eg MPI=1) on the make command line, or undefine it using (eg MPI=).

DEBUGGING Turns on -g, and assertions
MEMDEBUG replaces new and delete with a version that tracks and reports memory usage
PROFILING logs times executed by each TCL command
GCOV Prepares executable for test coverage analysis
VPROF Prepares executables for use by the vprof tool
MPI Enable distributed parallel version
OPENMP Enable the use of OpenMP shared memory parallel constructs
PARALLEL Enable the use of automatic parallelisation (Intel compiler)
XDR Enable use of XDR for checkpoints and client-server. On some systems, XDR needs to be disabled for correct compilation in MPI mode. This bug should be fixed in this version of Eco Lab.
GCC Force use of gcc compiler.
NOGUI Disables all GUI functionality.
BDB Use Berkley database from Sleepycat for the cachedDBM class.
UNURAN select UNURAN random number library
GNUSL select GNUSL random number library
PREFIX installation location for “make install”. Defaults to $HOME/usr/ecolab.

Eco Lab will use the UNURAN non-uniform random number library or the GNU Scientific Library if available. Note that the author uses UNURAN, so GNUSL is typically not tested. If neither library is available, a limited library based on the libc rand() function is used instead. The Make flags UNURAN and GNUSL can be used to override the defaults.

Please note the following point when installing unuran (tested against unuran 1.6.0):

The other options are relatively straight forward. Define MPI if you wish to run Eco Lab in parallel using the MPI message passing library. You will also need to install the ParMETIS library.

The standard build will also build in the example models directory. You may also do a make install, which will install the Eco Lab software into the directory given by the PREFIX variable in the top level Makefile. By default, this is /usr/ecolab. You can change this value to something else (eg /usr/local/ecolab) by giving the command make PREFIX=/usr/local/ecolab install. After that, you can compile the models directory completely independently of the rest of the distribution -- use the example Makefile in the models directory as a template. If you have installed Eco Lab in a non-standard location, you may need to modify the ECOLAB_HOME Makefile variable to point to the installed directory.