3 Slow Start

If you have successfully downloaded executable files for PREMIM and EMIM that work on your system then you may skip this section. However, if you need to compile the source code  for your system then please follow the instructions below.

3.1 Compilation of PREMIM source code

The source code for PREMIM is written in C++ and can be compiled on any system with a C++ compiler installed. The code can be compiled by typing something similar to:

g++ *.cpp -o premim 

Also, if you are using the GNU compiler it is often a good idea to use the -O3 option to optimize the code for faster execution:

g++ -O3 *.cpp -o premim 

If you wish to use gzipped files with PREMIM then you may do so by installing the following two libraries:

Library Website
zlib http://www.zlib.net/
gzstream http://www.cs.unc.edu/Research/compgeom/gzstream/

Then it is necessary to uncomment the following line in the main.h file:

//#define USING_GZIP 

to become

#define USING_GZIP 

Once the libraries are installed and the above line uncommented PREMIM can be compiled by typing something similar to:

g++ -O3 *.cpp -o premim -I/home/username/gzstream/gzstream
 -L/home/username/zlib/zlib-1.2.5 -lgzstream -lz

3.2 Compilation of EMIM source code

EMIM is written in Fortran 77 with some Fortran 90 features. Compile the program under Unix, Linux or Windows using:

gfortran emim.f maxfun.f -o emim

This should produce an executable that can by run by typing ./emim (or else by giving the full pathname e.g. /home/username/EMIM-v2.05/emim)

Some compilers may produce a number of warning messages when compiling EMIM. Provided that an executable file emim has been created, we do not anticipate that you need to be too concerned about these warnings.

A set of example input files is included in the EMIM distribution. These example files are not intended to be particularly realistic but simply can be used to check that the program runs.