Version 6 (modified by ajornet, 9 years ago) (diff) |
---|
How to compile MICT
Be aware there other ways to compile Orchidee. All of them are valid. But the use of makeorchidee_fcm should make things easier:
- It enables the compilation with multiple cores at the same time.
- No need to modify any file to change the compilation mode (prod/dev/debug).
- Automatically manages all dependencies between files.
Libraries
Since MICT V7.2, XIOS 2 is enabled on MICT. This is a new library to manage input/output for history files. It is recommended to use over the old one: IOIPSL. For several reason:
- It is much faster (https://forge.ipsl.jussieu.fr/orchidee/wiki/DevelopmentActivities/Branches/ORCHIDEE-MICT-IMBALANCE-P/SimulationTimes#TrunkvsMICTComparision18022016)
- No need for output history rebuild
Compilation
There is an implicit step which depends in your architecture (computer). You need to make sure you have chosen the proper libraries (module load ...) to compile Orchidee.
XIOS 2 (preferred)
In order to compile orchidee, go to the model source code:
cd YOURPATH/modipsl/modeles/ORCHIDEE
Install all makefiles
../../util/ins_make
Go to the IOIPSL folder
cd ../IOIPSL/src
Note: despite of XIOS, IOISPL is still used for other tasks: read run.def file, restarts files management, ...
Compile IOIPSL
gmake
Go to XIOS 2 folder
cd ../../XIOS
Compile XIOS 2
./make_xios --prod --arch SUPPORTED_MACHINE --full --j 8
Go to the models source code folder again
cd ../ORCHIDEE
Compile Orchidee
./makeorchidee_fcm -parallel mpi -arch SUPPORTED_MACHINE -xios2 -driver -prod -full -j 8
Replace -arch MACHINE with the machine you are working with. Find more information in makeorchidee_fcm -h command.
After that, when you do a modification you can simply run the command line below. So you avoid the whole recompilation from the code:
./makeorchidee_fcm -parallel mpi -arch SUPPORTED_MACHINE -xios2 -driver -prod -j 8
In some cases it might be necessary to recompile from zero.
IOIPSL (old)
In order to compile orchidee, go to the model source code:
cd YOURPATH/modipsl/modeles/ORCHIDEE
Install all makefiles
../../util/ins_make
Go to the IOIPSL folder
cd ../IOIPSL/src
Compile IOIPSL
gmake
Go to the models source code folder again
cd ../../ORCHIDEE
Compile Orchidee
./makeorchidee_fcm -parallel mpi -arch SUPPORTED_MACHINE -driver -prod -full -j 8
Replace -arch MACHINE with the machine you are working with. Find more information in makeorchidee_fcm -h command.
After that, when you do a modification you can simply run the command line below. So you avoid the whole recompilation from the code:
./makeorchidee_fcm -parallel mpi -arch SUPPORTED_MACHINE -driver -prod -j 8
In some cases it might be necessary to recompile from zero.
Debug
If you need to debug use:
./makeorchidee_fcm -parallel mpi -arch SUPPORTED_MACHINE (-xios2) -driver -debug -full -j 8
Notes
- the use of gmake produces an error due to dependencies. For this reason, it is only required to compile orchidee libraries (ioipsl, ...).
- This guide expects you have selected the proper module libraries in the HPC you are working with.