Project

General

Profile

Very old versions of gfortran compiler

If you want to use the official V8.1 version (master) with a very old version of gfortran compiler (this is the case on CEN servers),
you need to edit Rules.LXgfortran.mk and to replace the line

OPT_CHECK = -fcheck=bounds,do,mem,pointer,recursion -finit-real=nan
by :
OPT_CHECK = -fbounds-check -finit-real=nan

This is not required in the following CEN branches : V8_lafaysse, lafaysse_fromV8trunk, lafaysse_fromV8trunk_withmeb or dumont_atmotartes.

Specific installation for SOPRANO environment

Version 8.1 can not been compiled on SOPRANO (unsolved issue during the compilation of netcdf4)

For previous versions :
Define environment variables running :

 . /home/mrns/lafaysse/LIB/SURFEX/V8_lafaysse/src/config-soprano

or you can define directly the variables :

export OPTLEVEL=O2
export VER_MPI=NOMPI
export ARCH=LXifort
export VER_CDF=CDFSOPRANO
export VER_GRIBAPI=SOPRANO

Then, as in the standard procedure :
• initialize environment variables needed for surfex: go into src directory and run
./configure. 

Then, execute the profile file for this master version of surfex:
 . ../conf/profile_surfex-LXifort-SFX-V7-3-0-NOMPI-O2 (or equivalent name)

DON'T FORGET THE FIRST POINT

Then, you need to comment CC and CCFLAGS definitions in the files src/Rules.LXifort.mk and /src/LIB/drhook_CY31R2.032/odb/scripts/make.LXifort_nompi because SURFEX standard makefiles does not support ifort with gcc instead of icc.

Now you can finish the installation with the standard procedure :

• compile the master version of the code:
in the src directory, run

make

and then
make installmaster.

Master executables are created in directory exe. If everything goes well until this step, then surfex has been successfully installed on you computer.

Setting specifically the SURFEX binaries to be used by s2m is done by exporting the variable EXESURFEX pointing to the directory containing the PGD, PREP and OFFLINE binaries.
After SURFEX compilation, binaries have their complete names (with compiler name, surfex version, mpi option and optimization level) so you need to create manually symbolic links with these short names as s2m work with the short names. Example :

ln -s $EXESURFEX/OFFLINE-LXgfortran-SFX-V7-3-0-NOMPI-O2 $EXESURFEX/OFFLINE
ln -s $EXESURFEX/PREP-LXgfortran-SFX-V7-3-0-NOMPI-O2 $EXESURFEX/PREP
ln -s $EXESURFEX/PGD-LXgfortran-SFX-V7-3-0-NOMPI-O2 $EXESURFEX/PGD