Changes between Version 34 and Version 35 of Doc/Compile


Ignore:
Timestamp:
02/25/20 10:15:27 (4 years ago)
Author:
jgipsl
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Doc/Compile

    v34 v35  
    4747'''Note''' : for configurations IPSLCM, arch files for OASIS and NEMO are taken in `modipsl/config/IPSLCM*/SOURCE/OASIS` and  `modipsl/config/IPSLCM6/SOURCE/NEMO` 
    4848 
    49 # Compilation using Makefile for configurations _v6 and _v6.1.* # 
     49# Makefile for configurations _v6 and _v6.1.* # 
    5050## Creating the main makefile ## 
    5151 
     
    198198  
    199199 
    200 # Compilation using script for configurations _v6.2 and newer configurations # 
    201  
     200# Script for configurations _v6.2 and newer # 
     201 
     202## Compile using a main script ## 
    202203The compilation differs from what has been done so far. Now we use a script  '''compile_ConfigName.sh''' with several options ( resolution, level of optimization, full or partial recompilation ) to compile the model. 
    203204  * IPSLCM6.2 : '''compile_ipslcm6.sh''' 
     
    224225 
    225226 
    226  
    227 The configuration is not longer depending on the users environement, there is no need to ensure loading the correct modules before compilation. Instead, in the beginning of the compilation script, the environment will be loaded using a specific architecture depending file in `ARCH` directory.   
    228 {{{ 
    229 > ls IPSLCM6.2 
     227For machines where the configuration has been adapted, the configuration is not longer depending on the users environment, there is no need to ensure loading the correct modules before compilation. Instead, in the beginning of the compilation script, the environment will be loaded using a specific architecture dependent file in `ARCH` directory.   
     228{{{ 
     229> ls config/IPSLCM6 
    230230  ARCH/  compile_ipslcm6.sh*  EXPERIMENTS/  GENERAL/  README  SOURCES/ 
    231 > ls IPSLCM6.2/ARCH/ 
     231> ls config/IPSLCM6/ARCH/ 
    232232  arch-X64_IRENE.env arch-X64_JEANZAY.env 
    233233}}} 
    234 The script set a link to '''arch.env''' if '''arch-${FCM_ARCH}.env''' file exists for current FCM_ARCH. This link '''arch.env''' is also set in config.card and will be used by libIGCM to ensure the same running environment. 
     234The compilation script finds out which is the file to be used from ARCH folder and sets a link from '''arch-${FCM_ARCH}.env''' to '''arch.env'''. This is done only on machines where the configuration has been adapted.  
     235 
     236For a local machine, it is possible to add a file ARCH/arch-myarch.env and compile with argument: 
     237{{{ 
     238./compile_ConfigName.sh -arch myarch 
     239}}} 
     240 
     241 
     242At the end of the compilation the binaries will be store with a specific name : binary_${!ResolAtm}_${!OptMode}, where `ResolAtm` is the resolution of LMDZ model, and `OptMode` the level of optimization (prod, debug, dev) use during the compilation.  
     243 
     244## Link to the execution ## 
     245It is important to use the same modules during compilation and run time. The file '''arch.env''' linked by the compilation script is also set in config.card and will be used by libIGCM to ensure the same running environment. In the beginning of config.card, following is set: 
    235246{{{ 
    236247#-- Source following file with module settings, only if it exists 
    237248EnvFile=${SUBMIT_DIR}/../ARCH/arch.env 
    238249}}} 
    239  
    240  
    241 At the end of the compilation the binary will be store with a specific name : binary_${resol_atm}_${optmode}, where `resol_atm` is the resolution of LMDZ model, and `optmode` the level of optimization (prod, debug, dev) use during the compilation.  
     250If there is no ARCH/arch.env file, libIGCM will source a default file which corresponds to the one used for v6.1 configurations.  
     251 
     252Further down in config.card, following variables used to copy the right executables are specified, here for the IPSLCM6 configuration: 
     253{{{ 
     254#-- ResolAtm and ResolOce indicates the atmospheric and ocean resolution 
     255#   These variables are used in the executable name  
     256ResolAtm=144x142x79 
     257ResolOce=ORCA1 
     258#============================ 
     259# OptMode indicates the optimization mode chosen during compilation 
     260# This variable is used in the executable name 
     261OptMode=prod 
     262}}} 
     263They are used to copy the executables. If you compile in default mode, no changes are needed. But if you change the resolution or the optimization mode, change these variables accordingly.  
     264 
    242265[[NoteBox(warn, If you compile in debug or in dev mode you need to modify the parameter !OptMode in config.card before submitting the job. If you change the resolution at the compilation you need to modify the parameter !ResolAtm in config.card, 600px)]] 
    243266