Version 30 (modified by ajornet, 7 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.
modipsl/libIGCM
Despite of having all files inside the modipsl/libIGCM structure. This guide does not guarantee it will work with this framework. For this purpose, go to the appropiate guide.
Libraries
Since MICT V7.2, XIOS 2 is enabled on MICT. This is a new library to manage the 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
- IOIPSL unbalances Orchidee computation time. All processors except for the last one (always) need to wait. Because it deals with more data (due to sea gridcells).
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.
On curie: module load intel/16.0.3.210 module load netcdf/4.3.3.1_hdf5_parallel module load hdf5/1.8.9_parallel
On obelix: module load netcdf/4p
IOIPSL
This library takes care different IO features:
- Read/write restart files
- Read/write history files
- Read configuration file (run.def)
- Calendar options
After 8.4.0 (rev 4057)
Starting at this version (also included), MICT is using a modification of IOIPSL. Restart subroutines to Read/Write? allows more than 3 dimensions. It allows an increase of performance for the restart files. For such purpose, follow the instructions below in order to install it properly:
1- Go to the modeles folder. All source code is located here.
cd YOURPATH/modipsl/modeles/
2- Remove the current IOIPSL. This one is the IOIPSL trunk version.
rm -rf IOIPSL
3- Download the modified IOISPL-MICT.
svn co -r4720 svn://forge.ipsl.jussieu.fr/orchidee/branches/ORCHIDEE-MICT/IOIPSL IOIPSL
4- Go to the IOIPSL folder
cd IOIPSL/src
5- Install all makefiles required to compile this library:
../../../util/ins_make
6- Modify the line inside the Makefile
For obelix:
F_O = -DCPP_PARA -O3 -align all $(F_D) $(F_P) -I$(MODDIR) -module $(MODDIR) -fp-model precise
For curie/ADA:
F_O = -DCPP_PARA -O3 -xAVX -align all -align array32byte $(F_D) $(F_P) -I$(MODDIR) -module $(MODDIR) -fp-model precise
7- Compile IOIPSL
gmake
Before 8.4.0 (rev 4057)
Go to IOIPSL source code folder
cd YOURPATH/modipsl/modeles/IOIPSL/src
Install all makefiles.
../../util/ins_make
Go to the IOIPSL folder
cd ../IOIPSL/src
Modify the files shown below:
Index: histcom.f90 =================================================================== --- histcom.f90 (revision 2705) +++ histcom.f90 (working copy) @@ -73,7 +73,7 @@ !- ! Fixed parameter !- - INTEGER,PARAMETER :: nb_files_max=20,nb_var_max=600, & + INTEGER,PARAMETER :: nb_files_max=20,nb_var_max=1400, & & nb_hax_max=5,nb_zax_max=10,nbopp_max=10 REAL,PARAMETER :: missing_val=nf90_fill_real INTEGER,PARAMETER,PUBLIC :: & Index: restcom.f90 =================================================================== --- restcom.f90 (revision 2705) +++ restcom.f90 (working copy) @@ -39,7 +39,7 @@ ! the out file. !- INTEGER,PARAMETER :: & - & max_var=500, max_file=50, max_dim=NF90_MAX_VAR_DIMS + & max_var=1000, max_file=50, max_dim=NF90_MAX_VAR_DIMS !- CHARACTER(LEN=9),SAVE :: calend_str='unknown' !-
Orchidee-MICT is using lots of variables. So it is necessary to tell IOIPSL increase the maximum allowed.
Compile IOIPSL
gmake
At this point, chose one of those options:
- MICT + XIOS 2
- latest versions
- XIOS included
- MICT :
- If you use MICT v7.2 or before you need to stick to this method.
- You do not want to use XIOS
MICT + XIOS 2 (preferred since MICT v7.2)
More implicit steps: if you are moving for the first time XIOS. Make sure you update modipsl and libIGCM to the latest. Download XIOS again to make sure you are using the proper version.
XIOS is a new Input/Output? library aimed to replace IOIPSL at some point. Currently, it only replaces the write of history files. This means IOIPSL is still required and must be always compiled.
In order to compile Orchidee MICT + XIOS2 + IOPSL, go to XIOS 2 folder:
cd YOURPATH/modipsl/modeles/XIOS
Update to a specific revision (previous version raise some issues on MICT):
svn up -r 1043
Compile XIOS 2
./make_xios --prod --arch SUPPORTED_MACHINE --full --j 8
Go to the main model folder:
cd YOURPATH/modipsl/modeles
Remove Orchidee trunk
rm -rf ORCHIDEE
Download MICT from svn (under development)
svn co svn://forge.ipsl.jussieu.fr/orchidee/branches/ORCHIDEE-MICT/ORCHIDEE ORCHIDEE
Move to Orchidee-MICT
cd YOURPATH/modipsl/modeles/ORCHIDEE
Compile Orchidee
./makeorchidee_fcm -parallel mpi -arch SUPPORTED_MACHINE -xios2 -driver -prod -full -otherexec -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 -otherexec -j 8
In some cases it might be necessary to recompile from zero.
MICT (mandatory before MICT v7.2)
In order to compile Orchidee MICT + IOIPSL:
Go to the main model folder:
cd YOURPATH/modipsl/modeles/
Remove Orchidee trunk
rm -rf ORCHIDEE
Download MICT from svn (under development)
svn co svn://forge.ipsl.jussieu.fr/orchidee/branches/ORCHIDEE-MICT/ORCHIDEE ORCHIDEE
Move to Orchidee-MICT
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 (-otherexec) 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.
- There is a new option for makeorchidee_fcm called otherexec. It creates forcesoil.exe
Errors
Please, report any error to albert.jornet-puig@…