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.
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:
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/gzstream/gzstream
-L/home/username/zlib/zlib-1.2.5 -lgzstream -lz
EMIM is written in Fortran 77. One of the following (or similar) should compile the program under Unix or Linux:
g77 emim.f maxfun.f -o emim
gfortran emim.f maxfun.f -o emim
fort77 emim.f maxfun.f -o emim
f77 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 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.