Compile SURFEX on Belenos¶
To use the last stable release of SURFEX-Crocus, you do not need to compile SURFEX on Belenos.
The following instructions only concern model developers:
You first need to load the compilers :
module load intel module load intelmpi module load curl
The next step of the configuration depends on your application:
- For MPI parallel applications (big domains, deterministic application) : let VER_MPI and VER_CDF options to default.
- For sequential ensemble applications associed with a ParaBlindRun AlgoComponent (one member per core through vortex), and only in this case, export the following variables:
export VER_MPI=NOMPI export VER_CDF=CDF2020
At this step, it is also possible to modify the optimization level by :
By default, the optimization level is “O2”, which is recommended in the general case (significant decrease of running time). In case of bugs, the optimization level must be changed to "DEBUG" to generate better error messages.
Long runs must never be run in DEBUG mode.
You can then follow the install procedure given below:
• initialize environment variables needed for surfex: go into src directory and run
Then, execute the profile file for this version of surfex by replacing XXXXX by MPIAUTO or NOMPI, or using an equivalent name depending on compiler, SURFEX version and compilation options:
DON'T FORGET THE FIRST POINT
• compile the master version of the code:
in the src directory and in the same terminal, run
and then, again in the same terminal,
Master executables are created in directory exe. If everything goes well until this step, then surfex has been successfully installed on the supercomputer.
Setting specifically the SURFEX binaries to be used by s2m can be done by exporting the variable EXESURFEX pointing to the directory containing the PGD, PREP and OFFLINE binaries.
If you want to always use the same binaries, add a line to your .bash_profile adapted from this example :
Otherwise, it is also possible to refer to this directory by using -s option in s2m command (see https://opensource.umr-cnrm.fr/projects/snowtools_git/wiki/Run_a_SURFEX-Crocus_experiment_with_vortex).
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.
Please check carefully the full names of your binaries (depending on SURFEX version, compiler and compilation options) to build the symbolic links. Example :
ln -s $EXESURFEX/OFFLINE-LXifort-SFX-V8-1-1-MPIAUTO-O2 $EXESURFEX/OFFLINE ln -s $EXESURFEX/PREP-LXifort-SFX-V8-1-1-MPIAUTO-O2 $EXESURFEX/PREP ln -s $EXESURFEX/PGD-LXifort-SFX-V8-1-1-MPIAUTO-O2 $EXESURFEX/PGD ln -s $EXESURFEX/SODA-LXifort-SFX-V8-1-1-MPIAUTO-O2 $EXESURFEX/SODA