
The steps for the compilation of EMAC can be found below:
1. Unzip the source code
{code}
unzip messy_2.52_src.zip
{code}
2. Before compiling the code make sure that netCDF-Fortran (version 4.2 or later) and flex are installed on the system.
The above software packages are the dependencies of the code.
3. Change host specific compiler options and switches in the config/mh-linux-64 file.
The variables that are set inside mh-linux-64 and are used by configure are:
{code}
CC : C Compiler
F90 : F90 compiler
F90R8= -autodouble (F90 real 8 option)
CFLAGS : C compiler flags
FFLAGS : Fortran compiler flags
F90FLAGS : Fortran90 compiler flags
DEFOPT : -D
MODOPT : -I
MPIROOT : (mpi installation root path)
SPEC_NETCDF_INC : (netcdf include dir)
SPEC_NETCDF_LIB : (netcdf lib dir for libnetcdf and libnetdff)
{code}
You can either use the default options or add a section specifically for your host and declare the above variables.
In the config/mh-linux-64 you can find examples of other hosts and options. Note that the host is matched using regular expressions as you can see in the other examples in config/mh-linux-64
4. Build the code:
{code}
./configure
make
{code}
h5. How to run the EMAC Benchmark
The input data for the benchmark can be found in the below link:
[http://oc.cytera.cyi.ac.cy/index.php/s/KH4c0Nuc9BOVRX4]
1. Once you download the benchmark you need to untar it:
{code}
tar xzvf EMAC2p52_T255_basic_set_up_test.tar.gz
{code}
2. Copy the bin/echam5.exe binary (that was created when EMAC was compiled) to the run work directory.
3. Run *script_run_EMAC.sh* and give as input the NPY and NPX variables. Note that the product of NPY and NPX should be equal to the number of cores with NPY > NPX e.g if number of cores is 12 then NPY=4 and NPX=3. The script was tested on Cy-Tera HPC machine which uses the Environment modules for handling the installed software. You need to modify the script accordingly so that your environment includes all dependencies.