wiki:Documentation/UserGuide/CompileMethods

Version 1 (modified by jgipsl, 7 years ago) (diff)

--

Compile methods

It is possible to compile ORCHIDEE using standard makefiles created based on AA_make and AA_make.gdef. This is the standard methode until now. It is also possible to compile using the script makeorchidee_fcm based on the tool FCM.

How to compile using standard makefiles

The compile options are set in modipsl/util/AA_make.gdef for all predefined environements. Using the script modipsl/util/ins_make the main makefile is created in modipsl/modeles/ORCHIDEE/Makefile. To change a compile option, it is necessary to change in AA_make.gdef and relaunch ins_make. The target machine is determined automatically by ins_make if the machine is in a predefined list. It is also possible to specify the target using the optional argument -t. Create makefiles and compile as follow:

cd modipsl/util
./ins_make [-t target]
cd ../modeles/ORCHIDEE
gmake driver

How to compile ORCHIDEE using with FCM methode

makeorchidee_fcm

The script makeorchidee_fcm compiles ORCHIDEE using the FCM, a software developed by the Hadley Centre. makeorchidee_fcm determines the dependencies between fortran source files.

Compile options for different target machines or compilers are defined in the directory arch/. For each target machine two files must exist : archname.fcm and archname.path. Use ./makeorchidee_fcm -h to get information about available arguments. See here the main arguments are

./makeorchidee_fcm -h

########################################################################
# Manuel en ligne
########################################################################
more <<eod


makeorchidee_fcm [Options] 

[ -parallel|-p PARALLEL_TYPE ] : activate parallelization with 3 options : 
    PARALLEL_TYPE =
    ( mpi | MPI )  : use Message Passing Interface standard
    ( omp | OMP )  : use OpenMP standard
    ( mpi_omp | MPI_OMP ) : use both MPI and OpenMP
    ( none | NONE | seq ) : sequential mode (default)
[ -driver ] : compilation of ORCHIDEE driver if equal TRUE
[ -arch ARCHitecture ] : if TRUE, change architecture for ARCHitecture
[ -xios ] : compilation with XIOS
[ -noxios ] : compilation without XIOS
[ -prod ] : compilation for production (all optimization)
[ -dev ] : compilation for development (low optimization and -g)
[ -d|-debug ] : compilation for debugging (no optmization and all debug options)
| -full ] : activate full recompiling 
| -clean ] : delete all files produceed during previous compilation
[ -j x ] : activate parallel compiling on x task, default 1 task
[ -ext_src path] : path to an additional set of routines to compile with the model

Using fcm, the dependencies between the modules are not predefined. fcm will determine the correct order to compile. makeorchidee_fcm to not compile IOIPSL. This must be done in advance. Example 1 : compile at curie for MPI parallel run mode

./makeorchidee_fcm -parallel mpi -arch X64_CURIE -driver

Example 2 : compile at ada for MPI-OpenMP parallel run mode

./makeorchidee_fcm -parallel mpi_omp -arch X64_CURIE -driver

Example 3 : compile using gfortran compiler for sequential run mode (make sure that the files arch/gfortran.fcm and arch/gfortran.path are suitable for the environement)

./makeorchidee_fcm -parallel seq -arch gfortran -driver

Compile configuration ORCHIDEE_OL

Compiling is done from the directory modipsl/config/ORCHIDEE_OL using the main Makefile.

cd modipsl/config/ORCHIDEE_OL
gmake

The main makefile will first compile IOIPSL. Then it'ill launch the script makeorchidee_fcm (see description below). The default options for makeorchidee_fcm are set to

The script makeorchidee_fcm compiles ORCHIDEE using the FCM, a software developed by the Hadley Centre.

makeorchidee_fcm

Test done : gfortran at local PC obelix in queue