| 11 | Compilation 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 | |
| 13 | Read 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 == |
| 16 | See 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 | |
| 23 | The script can be used as follow: |
| 24 | {{{ |
| 25 | cd 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 | |
| 31 | The 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 | |
| 33 | If 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 == |
| 36 | If 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 | |
| 38 | This 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. |
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 | | |