wiki:DevelopmentActivities/Branches/ORCHIDEE-MICT-IMBALANCE-P/Compile

Version 5 (modified by ajornet, 8 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.

Compilation

There is an implicit step which depends in your architecture. You need to make sure you have chosen the proper libraries (module load ...) to compile Orchidee.

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 -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.