Changes between Version 15 and Version 16 of Documentation/UserGuide/CompileMethods


Ignore:
Timestamp:
2020-02-26T16:57:59+01:00 (4 years ago)
Author:
jgipsl
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Documentation/UserGuide/CompileMethods

    v15 v16  
     1= More about compile methods =  
    12[[PageOutline]]  
     3Author: J. Ghattas[[BR]] 
     4Last revision: 2020/02/26, J. Ghattas  
    25 
    3 There are 2 methods for compiling ORCHIDEE.  
    4  * '''''Current default method:'' A main makefile in config directory which will launch the script makeorchidee_fcm based on the tool FCM.'''  
    5   - Full compiling is done from modipsl/config/ORCHIDEE_OL directory 
    6   - Specific platform dependent compile options are set in modipsl/modeles/ORCHIDEE/arch directory 
    7  * '''''Old obsolete method:'' Standard makefiles created based on AA_make and AA_make.gdef.'''  
    8   - Full compiling is done from modipsl/modeles/ORCHIDEE directory 
    9   - Specific platform dependent compile options are set in modipsl/util/AA_make.gdef 
    106 
    11 ---- 
     7To compile ORCHIDEE offline model, first the components IOIPSL and XIOS need to be compiled and then ORCHIDEE source code can be compiled and the driver executable created. All these compilations are launched from one single script, or in older version from a Makefile. 
    128 
    13 = Compile using the method with FCM (default method) = 
    14 == Main makefile in modipsl/config/ORCHIDEE_OL == 
    15 A main makefile is found in modipsl/config/ORCHIDEE_OL directory or in modipsl/config/LMDZOR_v5.2 directory. This makefile will first compile IOIPSL and then ORCHIDEE using the script makeorchidee_fcm.  
     9The full compilation is done from directory modipsl/config/ORCHIDEE_OL. For newer versions(ORCHIDEE/trunk rev 6572 or later), the script compile_orchidee_ol.sh is used. For older versions (all tags ORCHIDEE_2), a Makefile exist and should be used.  
    1610 
     11Compilation of the coupled models such as LMDZOR and IPSLCM uses the same principle as ORCHIDEE offline configurations. For newer versions such as LMDZOR_v6.2 and later, IPSLCM6.2 and ICOLMDZOR_v7, a script ''compile_config.sh'' is found in ''modipsl/config/config'' folder. These scripts have a very close structure to the compile_orchidee_ol.sh script described below. For older versions including v6.1, a main Makefile is found in ''modipsl/config/config'' folder and compilation is done using gmake.  
     12 
     13Read also the documentation about compilation of IPSL-CMC configurations: https://forge.ipsl.jussieu.fr/igcmg_doc/wiki/Doc/Compile 
     14 
     15== Compilation script in modipsl/config/ORCHIDEE_OL == 
     16See here the compilation script on the trunk: [browser:trunk/ORCHIDEE_OL/compile_orchidee_ol.sh compile_orchidee_ol.sh]. The compilation script does following steps: 
     17 - 1) Read and set options from argument list 
     18 - 2) Load default environment if installation on irene/TGCC, jeanzay/IDRIS, obelix/LSCE or ciclad/climserv/IPSL 
     19 - 3) Compile IOIPSL using ./makeioipsl_fcm 
     20 - 4) Compile XIOS using ./makexios_fcm 
     21 - 5) Compile ORCHIDEE using ./makeorchidee_fcm 
     22 
     23The script can be used as follow: 
     24{{{ 
     25cd modipsl/config/ORCHIDEE_OL 
     26./compile_orchidee_ol.sh -h       # To see a help about the script and its options 
     27./compile_orchidee_ol.sh          # Default compilation 
     28./compile_orchidee_ol.sh -debug   # Compilation with debug options 
     29}}} 
     30 
     31The compile script can be used as default at the machines that are maintained at IPSL: irene/TGCC, jeanzay/IDRIS, obelix/LSCE and ciclad/climserv/IPSL. The compilation script loads all modules needed for compilation and is therefor independent of personal environment on the machine.  
     32 
     33If you install on a local PC or a cluster not maintained by IPSL-CMC, then you need to add compile options for your system. See here how to proceed: ​http://forge.ipsl.jussieu.fr/igcmg_doc/wiki/Doc/ComputingCenters/LocalPC 
     34 
     35== Makefile in modipsl/config/ORCHIDEE_OL == 
     36If a Makefile is found in modipsl/config/ORCHIDEE_OL directory, this should be used to compile the model and the components. This is the case for all ORCHIDEE_2 versions and the trunk until revision 6572. 
     37 
     38This makefile will first compile IOIPSL and XIOS and then compile ORCHIDEE. ORCHIDEE is always compiled using the script makeorchidee_fcm found in modeles/ORCHIDEE directory.  
    1739 
    1840The default set up compiles ORCHIDEE for MPI parallel run mode. The default options for compiling ORCHIDEE can be changed in AA_make in the following section(regenerate makefiles using the script ins_make in modipsl/util after modification) :  
     
    4466 
    4567 
    46 == makeorchidee_fcm ==  
     68== More about makeorchidee_fcm == 
    4769The script [https://forge.ipsl.jussieu.fr/orchidee/browser/trunk/ORCHIDEE/makeorchidee_fcm makeorchidee_fcm] compiles ORCHIDEE using the FCM, a software developed by the Hadley Centre. 
    4870While using this script the dependencies between fortran modules do not need to be set in advance. Fcm determines the dependencies. Fcm is stored in tools/ directory. 
    4971 
    50 makeorchidee_fcm is launched by the main makefile in config directory but it can also be launched manually from modeles directory. In the later case, '''IOIPSL must have been compiled previously'''.  
     72makeorchidee_fcm is launched by the main script or the main makefile in config directory but it can also be launched manually from modeles directory. In the later case, '''IOIPSL and XIOS must have been compiled previously''', this is not recommended. 
    5173 
    5274Compile 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 [[BR]] 
     
    120142}}} 
    121143 
    122 = Compatibility = 
    123 Compiling using makeorchidee_fcm is possible using the trunk ORCHIDEE at least since rev 1369. A detailed comparison between the 2 methods has been done using the trunk rev 2149 after updating compile options to have the same as in AA_make.gdef. 
    124144 
    125  
    126 = Remove compilation of teststomate and/or forcesoil = 
    127  
    128 Contributed by Ferenc Pasztor with input from Josfine Ghattas & Betrand Guenet 
    129  
    130 The compilation scripts compile orchidee libraries, and the three executables orchidee_ol, forcesoil and teststomate at the same time. Although forcesoil and teststomate are still required for some branches to speed up the simulation time, for several other branches they became obsolete. If you want to compile your changes to orchidee without compiling teststomate you can change the compilation script. If using makeorchidee_fcm, remove teststomate.exe to have 
    131  
    132 {{{ 
    133 TARGET="liborchidee_ol.a dim2_driver.exe forcesoil.exe" 
    134 }}} 
    135 or if you want to remove also forcesoil.exe :  
    136 {{{ 
    137 TARGET="liborchidee_ol.a dim2_driver.exe" 
    138 }}} 
    139  
    140 Then remove the corresponding copy command further down : 
    141 {{{ 
    142 cp bin/teststomate.exe ../../bin/teststomate 
    143 cp bin/forcesoil.exe ../../bin/forcesoil 
    144 }}} 
    145  
    146 If you are using the old compilation method you should instead change in src_driver/Makefile, change the line: 
    147  
    148 {{{ 
    149 all : orchidee_ol teststomate forcesoil 
    150 }}} 
    151 to  
    152 {{{ 
    153 all : orchidee_ol 
    154 }}} 
    155  
    156 You can now compile as before. 
    157  
    158  
    159  
    160 = Compile using standard makefiles (old method) = 
    161 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: 
    162  
    163  
    164 {{{ 
    165 cd modipsl/util 
    166 ./ins_make [-t target] 
    167 cd ../modeles/ORCHIDEE 
    168 gmake driver 
    169 }}} 
    170  
    171  
    172