Changes between Version 34 and Version 35 of Doc/Compile
- Timestamp:
- 02/25/20 10:15:27 (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Doc/Compile
v34 v35 47 47 '''Note''' : for configurations IPSLCM, arch files for OASIS and NEMO are taken in `modipsl/config/IPSLCM*/SOURCE/OASIS` and `modipsl/config/IPSLCM6/SOURCE/NEMO` 48 48 49 # Compilation usingMakefile for configurations _v6 and _v6.1.* #49 # Makefile for configurations _v6 and _v6.1.* # 50 50 ## Creating the main makefile ## 51 51 … … 198 198 199 199 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 ## 202 203 The 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. 203 204 * IPSLCM6.2 : '''compile_ipslcm6.sh''' … … 224 225 225 226 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 227 For 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 230 230 ARCH/ compile_ipslcm6.sh* EXPERIMENTS/ GENERAL/ README SOURCES/ 231 > ls IPSLCM6.2/ARCH/231 > ls config/IPSLCM6/ARCH/ 232 232 arch-X64_IRENE.env arch-X64_JEANZAY.env 233 233 }}} 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. 234 The 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 236 For 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 242 At 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 ## 245 It 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: 235 246 {{{ 236 247 #-- Source following file with module settings, only if it exists 237 248 EnvFile=${SUBMIT_DIR}/../ARCH/arch.env 238 249 }}} 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. 250 If there is no ARCH/arch.env file, libIGCM will source a default file which corresponds to the one used for v6.1 configurations. 251 252 Further 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 256 ResolAtm=144x142x79 257 ResolOce=ORCA1 258 #============================ 259 # OptMode indicates the optimization mode chosen during compilation 260 # This variable is used in the executable name 261 OptMode=prod 262 }}} 263 They 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 242 265 [[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)]] 243 266