wiki:Doc/ComputingCenters/LocalPC

Short guide to install a configuration on a local PC or other cluster

Compiling and running tools are set up by default for known IPSL computing centers. If you need to work on a local PC or another computing cluster, you need to adapt the compilation and running options.

1. Compiling

1.1. Test installation of XIOS

It is recommended to first make a test installation of XIOS following the guide here: http://forge.ipsl.fr/ioserver/wiki/documentation.
Then use the same libraries and compiler versions for all components as for XIOS.

Note: the netcdf4 library can be parallel or sequential, depending on the version. If the sequential netcdf4 library is used, some functionalities in XIOS can not be used such as using several servers. To link XIOS to the sequential library, the argument --netcdf_lib netcdf4_seq must be set when compiling XIOS. This is added in the main Makefile or the main script for compilaton just after ./make_xios --netcdf_lib netcdf4_seq ...

Only some configurations can be installed without XIOS.

1.2. Compilation with script for configurations _v6.2 and newer

Compilation of each component included in the configuration must be adapted. Each component has a arch folder containing 2 files specific for each machine: arch-NEW_ARCH.fcm and arch-NEW_ARCH.path. These files must be added in each arch folder. Use one of the existing target machines as example. For example for LMDZOR_v6.2 configuration, following files must be added:

 modipsl/modeles/IOIPSL/arch/arch-NEW_ARCH.fcm
 modipsl/modeles/IOIPSL/arch/arch-NEW_ARCH.path
 modipsl/modeles/XIOS/arch/arch-NEW_ARCH.fcm
 modipsl/modeles/XIOS/arch/arch-NEW_ARCH.path
 modipsl/modeles/ORCHIDEE/arch/arch-NEW_ARCH.fcm
 modipsl/modeles/ORCHIDEE/arch/arch-NEW_ARCH.path
 modipsl/modeles/LMDZ/arch/arch-NEW_ARCH.fcm
 modipsl/modeles/LMDZ/arch/arch-NEW_ARCH.path

Add also the file arch-NEW_ARCH.env containing modules in the config/ARCH folder. For LMDZOR_v6.2, add following file:

 modipsl/config/LMDZOR/ARCH/arch-NEW_ARCH.env

Launch the compilation by specifing -arch NEW_ARCH as argument to the compilation script. For LMDZOR_v6.2, launch as follow:

 cd modipsl/config/LMDZOR
 ./compile_lmdzor.sh -arch NEW_ARCH

1.3. Compilation with main Makefile for configurations _v6 and _v6.1.*

1.3.1. Choose a target in AA_make.gdef

The ins_make script from modipsl will not recognize your local PC to create makefiles. You must specify an existing target or create a new target in the util/AA_make.gdef file. Adapt this target to your computing environment (compiler, options, path to netcdf, etc), and create a new makefile specifying this target:

./ins_make -t new_target

One of the important variables given is FCM_ARCH. Set for example FCM_ARCH=NEW-ARCH. FCM_ARCH gives the name of the arch files used for the different models, see next section.

1.3.2. Adapt compilation for each model

Please refer to the model managers of your model configuration to learn more about how to compile the IPSL models on a local PC and which compilers can be used with the specific models you need. See some information here below.

Most of the IPSL models uses compilation based on fcm (for more informations on fcm) and the compiling options are set in arch files. Depending on the version of the models and between the models the file arch-target.path might have different syntaxes. For each model, take as example one existing target machine and adapt for your PC. The files are stored in the folder modipsl/modeles/MODEL/arch/arch-NEW_ARCH.fcm/.path/.env. The name NEW_ARCH can be changed but must be the same for all modeles and set in AA_make.gdef.

1.4. Example for ORCHIDEE_2_0 offline version

Note that this method is also valid for ORCHIDEE_2_2 until revision 7451. Later revision on ORCHIDEE_2_2 uses the method with a compilation script, see above.

Before installing ORCHIDEE, make a test installation of XIOS, see guide here: http://forge.ipsl.fr/ioserver/wiki/documentation . If this fails, it is still possible to install ORCHIDEE without XIOS, see notes below.

# 1. Install a new modipsl
svn co http://forge.ipsl.fr/igcmg/svn/modipsl/trunk modipsl

# 2. Install the configuration ORCHIDEE_2_0
cd modipsl/util
./model ORCHIDEE_2_0

# 3. Adapt and add compile options to your machine

# 3a. Compile options for component IOIPSL:
# Add a section NEW_ARCH in modipsl/util/AA_make.gdef 
# Do this by coping the section ifort_CICLAD for example and adapt all options according to your machine and your compiler.
# Make sur to have the variable FCM_ARCH correct as follow:
#-Q- NEW_ARCH FCM_ARCH = NEW_ARCH

# 3b. Add compile options for component XIOS
# Add following files (by coping and adapting one of the existing targets closest to your machine)
 modipsl/modeles/XIOS/arch/arch-NEW_ARCH.fcm
 modipsl/modeles/XIOS/arch/arch-NEW_ARCH.path
 modipsl/modeles/XIOS/arch/arch-NEW_ARCH.env

# Note: the netcdf4 library can be parallel or sequential, depending on the version. If the sequential netcdf4 library is used,
#       some functionalities in XIOS can not be used such us using several servers. To link XIOS to the sequantial library, the 
#       argument --netcdf_lib netcdf4_seq when compiling XIOS. This should be added in modipsl/config/ORCHIDEE_OL/AA_make just 
#       after ./make_xios --netcdf_lib netcdf4_seq ...


# 3b. Add compile options for component ORCHIDEE
# Add following files (by coping and adapting one of the existing targets closest to your machine)
 modipsl/modeles/ORCHIDEE/arch/arch-NEW_ARCH.fcm
 modipsl/modeles/ORCHIDEE/arch/arch-NEW_ARCH.path
 modipsl/modeles/ORCHIDEE/arch/arch-NEW_ARCH.env

# 4. Create makefiles with target NEW_ARCH
cd modipsl/util
./ins_make -t NEW_ARCH

# 5. Compile
cd modipsl/config/ORCHIDEE_OL
gmake

Notes:

  • The name NEW_ARCH can be changed to another name but needs to be same everywhere
  • All arch_NEW_ARCH.* files and AA_make.gdef must be coherent for the libraries and options choosen
  • It is still possible to install without XIOS. For that case, you do not need to do 3b above and the compilation is done using gmake without_xios

1.5. Example for LMDZOR_v5.2 sequential mode with gfortran

# 1. Install configuration LMDZOR_v5.2 in a new modipsl
svn co http://forge.ipsl.fr/igcmg/svn/modipsl/trunk modipsl
cd modipsl/util; ./model LMDZOR_v5.2

# 2. Adapt the path to your netcdf which must also be compiled with gfortran, in 3 files:
 modipsl/modeles/LMDZ/arch/arch-gfortran.path
 modipsl/modeles/ORCHIDEE/arch/arch-gfortran.path
 modipsl/util/AA_make.gdef (section gfortran)

# 3. Change default compiling to sequential run mode in main makefile. 
In modipsl/config/LMDZOR_v5.2/AA_make
change "-parallel mpi" into "-parallel none" at 3 places. 
The name of the executables changes also, therefore change "_phylmd_para_orch.e" into "_phylmd_seq_orch.e" at 2 places

# 4. Recreate makefiles with target gfortran
cd modipsl/util
./ins_make -t gfortran

# 5. Compile as usual
cd modipsl/config/LMDZOR_v5.2; gmake

Note 1: for installing in parallel mode with MPI, do as above but adapt the files arch-gfortran.path, arch-gfortran.fcm and AA_make.gef with suitable compile options. You can use target gfortran_CICLAD in AA_make.gdef as example. Do not do point 3 above.

Note 2: for older version of ORCHIDEE, such as in LMDZOR_v5, the files in modeles/ORCHIDEE/arch do not exist. Compile options in AA_make.gdef is used for ORCHIDEE in this case.

The v6 configurations cannot be compiled in sequential mode because XIOS do not compile or run without the MPI library.

2. Simulation with libIGCM

When using libIGCM on a local PC, the parameters of the default system described in the libIGCM_sys/libIGCM_sys_default.ksh file will be used. You may have to change this file to match your system.

A minimum subset of files located on the shared IGCM account must be downloaded and installed. This directory is called R_IN in libIGCM_sys_default.ksh and it has the default path /home/${LOGIN}/IGCM.

3. Installing rebuild

The output of old version of the models (ORCHIDEE, LMDZ, INCA, REPROBUS) must be recombined to the total horizontal domain when simulation is done in parallel mode.

The tool for this is called rebuild. The rebuild tool is called in the post-processing phase by libIGCM. Rebuild is a Fortran code included in IOIPSL. rebuild must be installed and compiled on the local machine. The rebuild can then be used interactively outside libIGCM or in the post-processing phase.

Installation

cd modipsl/util
./model IOIPSL_PLUS
# Modify AA_make.gdef for the compiling as above
./ins_make -t new_target
cd ../modeles/IOIPSL/tools
gmake

For use with libIGCM, add the path to your rebuild in libIGCM_sys/libIGCM_sys_default.ksh.

Use in interactive mode

rebuild can also be used interactively. For example create the global file sechiba_history.nc as following :

./rebuild -h
./rebuild -o sechiba_history.nc sechiba_history_00*
Last modified 10 months ago Last modified on 03/13/24 16:38:45