1 | #!/bin/bash |
---|
2 | # $Id: makelmdz_fcm 1910 2013-11-29 08:40:25Z musat $ |
---|
3 | # This is a script in Bash. |
---|
4 | |
---|
5 | # FH : on ne crée plus le fichier arch.mk qui est supposé exister par |
---|
6 | # FH : ailleurs. |
---|
7 | # FH : ulterieurement, ce fichier sera pré-existant pour une série |
---|
8 | # FH : de configurations en versions optimisées et debug qui seront |
---|
9 | # FH : liés (ln -s) avec arch.mk en fonction de l'architecture. |
---|
10 | # FH : Pour le moment, cette version est en test et on peut créer les |
---|
11 | # FH : arch.mk en lançant une première fois makegcm. |
---|
12 | # |
---|
13 | ##set -x |
---|
14 | ######################################################################## |
---|
15 | # options par defaut pour la commande make |
---|
16 | ######################################################################## |
---|
17 | |
---|
18 | dim="96x72x19" |
---|
19 | physique=lmd |
---|
20 | filtre=filtrez |
---|
21 | grille=reg |
---|
22 | couple=false |
---|
23 | veget=false |
---|
24 | sisvat=false |
---|
25 | chimie=false |
---|
26 | parallel=none |
---|
27 | paramem="par" |
---|
28 | compil_mod=prod |
---|
29 | io=ioipsl |
---|
30 | LIBPREFIX="" |
---|
31 | cosp=false |
---|
32 | job=1 |
---|
33 | full='' |
---|
34 | |
---|
35 | LMDGCM=`/bin/pwd` |
---|
36 | LIBOGCM=$LMDGCM/libo |
---|
37 | LIBFGCM=$LMDGCM/libf |
---|
38 | COSP_PATH=$LMDGCM/.void_dir |
---|
39 | fcm_path=$LMDGCM/tools/fcm/bin |
---|
40 | |
---|
41 | ######################################################################## |
---|
42 | # Quelques initialisations de variables du shell. |
---|
43 | ######################################################################## |
---|
44 | |
---|
45 | CPP_KEY="" |
---|
46 | INCLUDE="" |
---|
47 | LIB="" |
---|
48 | adjnt="" |
---|
49 | COMPIL_FFLAGS="%PROD_FFLAGS" |
---|
50 | PARA_FFLAGS="" |
---|
51 | PARA_LD="" |
---|
52 | EXT_SRC="" |
---|
53 | |
---|
54 | ######################################################################## |
---|
55 | # lecture des options de mymake |
---|
56 | ######################################################################## |
---|
57 | |
---|
58 | while (($# > 0)) |
---|
59 | do |
---|
60 | case $1 in |
---|
61 | "-h") cat <<fin |
---|
62 | Usage : |
---|
63 | makelmdz_fcm [options] -arch nom_arch exec |
---|
64 | [-h] : brief help |
---|
65 | [-d [[IMx]JMx]LM] : IM, JM, LM are the dimensions in x, y, z (default: $dim) |
---|
66 | [-p PHYS] : set of physical parametrizations (in libf/phyPHYS), (default: lmd) |
---|
67 | [-prod / -dev / -debug] : compilation mode production (default) / developement / debug |
---|
68 | [-c false/MPI1/MPI2] : coupling with ocean model : MPI1/MPI2/false (default: false) |
---|
69 | [-v false/orchidee2.0/orchidee1.9/true] : version of the vegetation model to include (default: false) |
---|
70 | false : no vegetation model |
---|
71 | orchidee2.0 : compile using ORCHIDEE 2.0 (or more recent version) |
---|
72 | orchidee1.9 : compile using ORCHIDEE up to the version including OpenMP in ORCHIDEE : tag 1.9-1.9.5(version AR5)-1.9.6 |
---|
73 | true : (obsolete; for backward compatibility) use ORCHIDEE tag 1.9-1.9.6 |
---|
74 | [-chimie INCA/false] : with INCA chemistry model or without (default: false) |
---|
75 | [-parallel none/mpi/omp/mpi_omp] : parallelism (default: none) : mpi, openmp or mixted mpi_openmp |
---|
76 | [-g GRI] : grid configuration in dyn3d/GRI_xy.h (default: reg, inclues a zoom) |
---|
77 | [-io IO] : Input/Output library (default: ioipsl) |
---|
78 | [-include INCLUDES] : extra include path to add |
---|
79 | [-cpp CPP_KEY] : additional preprocessing definitions |
---|
80 | [-adjnt] : adjoint model, not operational ... |
---|
81 | [-mem] : reduced memory dynamics (if in parallel mode) |
---|
82 | [-filtre NOMFILTRE] : use filtre from libf/NOMFILTRE (default: filtrez) |
---|
83 | [-link LINKS] : additional links with other libraries |
---|
84 | [-j n] : active parallel compiling on ntask |
---|
85 | [-full] : full recompiling |
---|
86 | [-fcm_path path] : path to the fcm tool (default: tools/fcm/bin) |
---|
87 | [-ext_src path] : path to an additional set of routines to compile with the model |
---|
88 | -arch nom_arch : target architecture |
---|
89 | exec : executable to build |
---|
90 | fin |
---|
91 | exit;; |
---|
92 | |
---|
93 | "-d") |
---|
94 | dim=$2 ; shift ; shift ;; |
---|
95 | |
---|
96 | "-p") |
---|
97 | physique="$2" ; shift ; shift ;; |
---|
98 | |
---|
99 | "-g") |
---|
100 | grille="$2" ; shift ; shift ;; |
---|
101 | |
---|
102 | "-c") |
---|
103 | couple="$2" ; shift ; shift ;; |
---|
104 | |
---|
105 | "-prod") |
---|
106 | compil_mod="prod" ; shift ;; |
---|
107 | |
---|
108 | "-dev") |
---|
109 | compil_mod="dev" ; shift ;; |
---|
110 | |
---|
111 | "-debug") |
---|
112 | compil_mod="debug" ; shift ;; |
---|
113 | |
---|
114 | "-io") |
---|
115 | io="$2" ; shift ; shift ;; |
---|
116 | |
---|
117 | "-v") |
---|
118 | veget="$2" ; shift ; shift ;; |
---|
119 | |
---|
120 | "-sisvat") |
---|
121 | sisvat="$2" ; shift ; shift ;; |
---|
122 | |
---|
123 | "-chimie") |
---|
124 | chimie="$2" ; shift ; shift ;; |
---|
125 | |
---|
126 | "-parallel") |
---|
127 | parallel="$2" ; shift ; shift ;; |
---|
128 | |
---|
129 | "-include") |
---|
130 | INCLUDE="$INCLUDE -I$2" ; shift ; shift ;; |
---|
131 | |
---|
132 | "-cpp") |
---|
133 | CPP_KEY="$CPP_KEY $2" ; shift ; shift ;; |
---|
134 | |
---|
135 | "-adjnt") |
---|
136 | echo "not operational ... work to be done here ";exit |
---|
137 | opt_dep="$opt_dep adjnt" ; adjnt="-ladjnt -ldyn3d " |
---|
138 | optim="$optim -Dadj" ; shift ;; |
---|
139 | |
---|
140 | "-cosp") |
---|
141 | cosp="$2" ; shift ; shift ;; |
---|
142 | |
---|
143 | "-mem") |
---|
144 | paramem="mem" ; shift ;; |
---|
145 | |
---|
146 | "-filtre") |
---|
147 | filtre=$2 ; shift ; shift ;; |
---|
148 | |
---|
149 | "-link") |
---|
150 | LIB="$LIB $2" ; shift ; shift ;; |
---|
151 | |
---|
152 | "-fcm_path") |
---|
153 | fcm_path=$2 ; shift ; shift ;; |
---|
154 | |
---|
155 | "-ext_src") |
---|
156 | EXT_SRC=$2 ; shift ; shift ;; |
---|
157 | "-j") |
---|
158 | job=$2 ; shift ; shift ;; |
---|
159 | "-full") |
---|
160 | full="-full" ; shift ;; |
---|
161 | |
---|
162 | "-arch") |
---|
163 | arch=$2 ; shift ; shift ;; |
---|
164 | |
---|
165 | *) |
---|
166 | code="$1" ; shift ;; |
---|
167 | esac |
---|
168 | done |
---|
169 | |
---|
170 | ############################################################### |
---|
171 | # path to fcm |
---|
172 | ############################################################### |
---|
173 | # handle case when provided path to fcm was given as a relative |
---|
174 | # path (from makelmdz_fcm script directory) and not an absolute path |
---|
175 | if [[ ${fcm_path:0:1} != "/" ]] ; then |
---|
176 | # prepend with makelmdz_fcm location |
---|
177 | fcm_path=$(cd $(dirname $0) ; pwd)"/"${fcm_path} |
---|
178 | fi |
---|
179 | |
---|
180 | # add fcm_path to PATH |
---|
181 | export PATH=${fcm_path}:${PATH} |
---|
182 | |
---|
183 | echo "Path to fcm:" |
---|
184 | echo ${fcm_path} |
---|
185 | |
---|
186 | ############################################################### |
---|
187 | # lecture des chemins propres à l'architecture de la machine # |
---|
188 | ############################################################### |
---|
189 | rm -f .void_file |
---|
190 | echo > .void_file |
---|
191 | rm -rf .void_dir |
---|
192 | mkdir .void_dir |
---|
193 | rm -f arch.path |
---|
194 | ln -s arch/arch-${arch}.path ./arch.path |
---|
195 | source arch.path |
---|
196 | |
---|
197 | ######################################################################## |
---|
198 | # Definition des clefs CPP, des chemins des includes et modules |
---|
199 | # et des libraries |
---|
200 | ######################################################################## |
---|
201 | |
---|
202 | if [[ "$compil_mod" == "prod" ]] |
---|
203 | then |
---|
204 | COMPIL_FFLAGS="%PROD_FFLAGS" |
---|
205 | elif [[ "$compil_mod" == "dev" ]] |
---|
206 | then |
---|
207 | COMPIL_FFLAGS="%DEV_FFLAGS" |
---|
208 | elif [[ "$compil_mod" == "debug" ]] |
---|
209 | then |
---|
210 | COMPIL_FFLAGS="%DEBUG_FFLAGS" |
---|
211 | fi |
---|
212 | |
---|
213 | if [[ "$physique" != "nophys" ]] |
---|
214 | then |
---|
215 | #We'll use some physics |
---|
216 | CPP_KEY="$CPP_KEY CPP_PHYS" |
---|
217 | if [[ "${physique:0:3}" == "lmd" ]] |
---|
218 | then |
---|
219 | #For lmd physics, default planet type is Earth |
---|
220 | CPP_KEY="$CPP_KEY CPP_EARTH" |
---|
221 | fi |
---|
222 | fi |
---|
223 | |
---|
224 | if [[ "$chimie" == "INCA" ]] |
---|
225 | then |
---|
226 | CPP_KEY="$CPP_KEY INCA" |
---|
227 | INCLUDE="$INCLUDE -I${INCA_INCDIR}" |
---|
228 | LIB="$LIB -L${INCA_LIBDIR} -lchimie" |
---|
229 | fi |
---|
230 | |
---|
231 | if [[ "$couple" != "false" ]] |
---|
232 | then |
---|
233 | CPP_KEY="$CPP_KEY CPP_COUPLE" |
---|
234 | INCLUDE="$INCLUDE -I${OASIS_INCDIR}" |
---|
235 | LIB="$LIB -L${OASIS_LIBDIR} -lpsmile.${couple} -lmpp_io" |
---|
236 | fi |
---|
237 | |
---|
238 | if [[ "$parallel" == "mpi" ]] |
---|
239 | then |
---|
240 | CPP_KEY="$CPP_KEY CPP_PARA CPP_MPI" |
---|
241 | PARA_FFLAGS="%MPI_FFLAGS" |
---|
242 | PARA_LD="%MPI_LD" |
---|
243 | elif [[ "$parallel" == "omp" ]] |
---|
244 | then |
---|
245 | CPP_KEY="$CPP_KEY CPP_PARA CPP_OMP" |
---|
246 | PARA_FFLAGS="%OMP_FFLAGS" |
---|
247 | PARA_LD="%OMP_LD" |
---|
248 | elif [[ "$parallel" == "mpi_omp" ]] |
---|
249 | then |
---|
250 | CPP_KEY="$CPP_KEY CPP_PARA CPP_MPI CPP_OMP" |
---|
251 | PARA_FFLAGS="%MPI_FFLAGS %OMP_FFLAGS" |
---|
252 | PARA_LD="%MPI_LD %OMP_LD" |
---|
253 | fi |
---|
254 | |
---|
255 | if [[ ( "$parallel" == "omp" || "$parallel" == "mpi_omp" ) \ |
---|
256 | && "$compil_mod" == "debug" ]] |
---|
257 | then |
---|
258 | echo "Usually, parallelization with OpenMP requires some optimization." |
---|
259 | echo "We suggest switching to \"-dev\"." |
---|
260 | fi |
---|
261 | |
---|
262 | if [ "$veget" = "true" -o "$veget" = "orchidee1.9" -o "$veget" = "orchidee2.0" ] |
---|
263 | then |
---|
264 | #NB: option 'true': for backward compatibility. To be used with ORCHIDEE tag 1.9-1.9.6 |
---|
265 | # For this case, cpp flag ORCHIDEE_NOOPENMP must be added to the makelmdz_fcm arguments |
---|
266 | # option orchidee1.9 : Compile with ORCHIDEE version up to the inclusion of OpenMP in ORCHIDEE : tag 1.9-1.9.5(version AR5)-1.9.6 |
---|
267 | INCLUDE="${INCLUDE} -I${ORCH_INCDIR}" |
---|
268 | CPP_KEY="$CPP_KEY CPP_VEGET" |
---|
269 | # temporary, for Orchidee versions 1.9.* (before openmp activation) |
---|
270 | if [[ "$veget" == "orchidee1.9" ]] ; then |
---|
271 | CPP_KEY="$CPP_KEY ORCHIDEE_NOOPENMP" |
---|
272 | fi |
---|
273 | if [[ "$veget" == "orchidee2.0" ]] ; then |
---|
274 | orch_libs="sechiba parameters stomate parallel orglob orchidee" |
---|
275 | else |
---|
276 | orch_libs="sechiba parameters stomate parallel orglob" |
---|
277 | fi |
---|
278 | LIB="${LIB} -L${ORCH_LIBDIR}" |
---|
279 | for lib in ${orch_libs} ; do |
---|
280 | if [ -f ${ORCH_LIBDIR}/lib${LIBPREFIX}$lib.a ] ; then |
---|
281 | LIB="${LIB} -l${LIBPREFIX}$lib " |
---|
282 | fi |
---|
283 | done |
---|
284 | elif [[ "$veget" != "false" ]] ; then |
---|
285 | echo "Option -v $veget does not exist" |
---|
286 | echo "Use ./makelmdz_fcm -h for more information" |
---|
287 | exit |
---|
288 | fi |
---|
289 | |
---|
290 | if [[ "$sisvat" == "true" ]] |
---|
291 | then |
---|
292 | CPP_KEY="$CPP_KEY CPP_SISVAT" |
---|
293 | sed -e 's/^#src::sisvat/src::sisvat/' bld.cfg > bld.tmp |
---|
294 | mv bld.tmp bld.cfg |
---|
295 | fi |
---|
296 | |
---|
297 | if [[ $io == ioipsl ]] |
---|
298 | then |
---|
299 | CPP_KEY="$CPP_KEY CPP_IOIPSL" |
---|
300 | INCLUDE="$INCLUDE -I${IOIPSL_INCDIR}" |
---|
301 | LIB="$LIB -L${IOIPSL_LIBDIR} -l${LIBPREFIX}ioipsl" |
---|
302 | elif [[ $io == xios ]] |
---|
303 | then |
---|
304 | # For now, xios implies also using ioipsl |
---|
305 | CPP_KEY="$CPP_KEY CPP_IOIPSL CPP_XIOS" |
---|
306 | INCLUDE="$INCLUDE -I${IOIPSL_INCDIR} -I${XIOS_INCDIR}" |
---|
307 | LIB="$LIB -L${IOIPSL_LIBDIR} -l${LIBPREFIX}ioipsl -L${XIOS_LIBDIR} -l${LIBPREFIX}stdc++ -l${LIBPREFIX}xios" |
---|
308 | fi |
---|
309 | |
---|
310 | if [[ "$cosp" == "true" ]] |
---|
311 | then |
---|
312 | CPP_KEY="$CPP_KEY CPP_COSP" |
---|
313 | COSP_PATH="$LIBFGCM/cosp" |
---|
314 | # LIB="${LIB} -l${LIBPREFIX}cosp" |
---|
315 | fi |
---|
316 | |
---|
317 | INCLUDE="$INCLUDE ${NETCDF_INCDIR}" |
---|
318 | LIB="$LIB ${NETCDF_LIBDIR}" |
---|
319 | |
---|
320 | ######################################################################## |
---|
321 | # calcul du nombre de dimensions |
---|
322 | ######################################################################## |
---|
323 | |
---|
324 | |
---|
325 | dim_full=$dim |
---|
326 | dim=`echo $dim | sed -e 's/[^0-9]/ /g'` |
---|
327 | set $dim |
---|
328 | dimc=$# |
---|
329 | echo calcul de la dimension |
---|
330 | echo dim $dim |
---|
331 | echo dimc $dimc |
---|
332 | |
---|
333 | |
---|
334 | ######################################################################## |
---|
335 | # Gestion des dimensions du modele. |
---|
336 | # on cree ou remplace le fichier des dimensions |
---|
337 | ######################################################################## |
---|
338 | |
---|
339 | cd $LIBFGCM/grid |
---|
340 | if [[ -f dimensions.h ]] |
---|
341 | then |
---|
342 | echo 'ATTENTION: vous etes sans doute en train de compiler le modele par ailleurs' |
---|
343 | echo "Attendez que la premiere compilation soit terminee pour relancer la suivante." |
---|
344 | echo "Si vous etes sur que vous ne compilez pas le modele par ailleurs," |
---|
345 | echo vous pouvez continuer en repondant oui. |
---|
346 | echo "Voulez-vous vraiment continuer?" |
---|
347 | echo "" |
---|
348 | echo "WARNING: you are probably already compiling the model somewhere else." |
---|
349 | echo "Wait until the first compilation is finished before launching this one." |
---|
350 | echo "If you are sure that you are not compiling elsewhere, just answer " |
---|
351 | echo "yes (or 'oui') to the question below to proceed." |
---|
352 | echo "Do you wish to continue?" |
---|
353 | read reponse |
---|
354 | if [[ $reponse == "oui" || $reponse == "yes" ]] |
---|
355 | then |
---|
356 | \rm -f $LIBFGCM/grid/dimensions.h |
---|
357 | else |
---|
358 | exit |
---|
359 | fi |
---|
360 | fi |
---|
361 | |
---|
362 | |
---|
363 | cd $LIBFGCM/grid/dimension |
---|
364 | ./makdim $dim |
---|
365 | cat $LIBFGCM/grid/dimensions.h |
---|
366 | cd $LMDGCM |
---|
367 | |
---|
368 | |
---|
369 | ######################################################################## |
---|
370 | # Differentes dynamiques (3d, 2d, 1d) |
---|
371 | ######################################################################## |
---|
372 | |
---|
373 | dimension=`echo $dim | wc -w` |
---|
374 | echo dimension $dimension |
---|
375 | |
---|
376 | if (( $dimension == 3 )) |
---|
377 | then |
---|
378 | cd $LIBFGCM/grid |
---|
379 | \rm fxyprim.h |
---|
380 | cp -p fxy_${grille}.h fxyprim.h |
---|
381 | else |
---|
382 | echo "Probleme dans les dimensions de la dynamique !!" |
---|
383 | echo "Non reactive pour l'instant !!!" |
---|
384 | fi |
---|
385 | |
---|
386 | ###################################################################### |
---|
387 | # Traitement special pour le nouveau rayonnement de Laurent Li. |
---|
388 | # ---> YM desactive pour le traitemement en parallele |
---|
389 | ###################################################################### |
---|
390 | |
---|
391 | #if [[ -f $libf/phy$physique/raddim.h ]] |
---|
392 | #then |
---|
393 | # if [[ -f $libf/phy$physique/raddim.$dimh.h ]] |
---|
394 | #then |
---|
395 | # \rm -f $libf/phy$physique/raddim.h |
---|
396 | # cp -p $libf/phy$physique/raddim.$dimh.h $libf/phy$physique/raddim.h |
---|
397 | # echo $libf/phy$physique/raddim.$dimh.h |
---|
398 | # cat $libf/phy$physique/raddim.h |
---|
399 | # else |
---|
400 | # echo On peut diminuer la taille de l executable en creant |
---|
401 | # echo le fichier $libf/phy$physique/raddim.$dimh.h |
---|
402 | # \cp -p $libf/phy$physique/raddim.defaut.h $libf/phy$physique/raddim.h |
---|
403 | # fi |
---|
404 | #fi |
---|
405 | |
---|
406 | ###################################################################### |
---|
407 | # Gestion du filtre qui n'existe qu'en 3d. |
---|
408 | ###################################################################### |
---|
409 | |
---|
410 | if (( `expr $dimc \> 2` == 1 )) |
---|
411 | then |
---|
412 | filtre="FILTRE=$filtre" |
---|
413 | else |
---|
414 | filtre="FILTRE= L_FILTRE= " |
---|
415 | fi |
---|
416 | echo MACRO FILTRE $filtre |
---|
417 | |
---|
418 | echo $dimc |
---|
419 | |
---|
420 | |
---|
421 | |
---|
422 | ###################################################################### |
---|
423 | # Creation du suffixe de la configuration |
---|
424 | ###################################################################### |
---|
425 | |
---|
426 | |
---|
427 | SUFF_NAME=_${dim_full} |
---|
428 | SUFF_NAME=${SUFF_NAME}_phy${physique} |
---|
429 | |
---|
430 | if [[ "$parallel" != "none" ]] |
---|
431 | then |
---|
432 | SUFF_NAME=${SUFF_NAME}_para |
---|
433 | DYN=dyn${dimc}d${paramem} |
---|
434 | if [[ "$paramem" == "mem" ]] |
---|
435 | then |
---|
436 | SUFF_NAME=${SUFF_NAME}_${paramem} |
---|
437 | fi |
---|
438 | else |
---|
439 | SUFF_NAME=${SUFF_NAME}_seq |
---|
440 | DYN=dyn${dimc}d |
---|
441 | fi |
---|
442 | |
---|
443 | if [[ $veget != "false" ]] |
---|
444 | then |
---|
445 | SUFF_NAME=${SUFF_NAME}_orch |
---|
446 | fi |
---|
447 | |
---|
448 | if [[ $couple != "false" ]] |
---|
449 | then |
---|
450 | SUFF_NAME=${SUFF_NAME}_couple |
---|
451 | fi |
---|
452 | |
---|
453 | if [[ $chimie == "INCA" ]] |
---|
454 | then |
---|
455 | SUFF_NAME=${SUFF_NAME}_inca |
---|
456 | fi |
---|
457 | |
---|
458 | cd $LMDGCM |
---|
459 | config_fcm="config.fcm" |
---|
460 | rm -f $config_fcm |
---|
461 | touch $config_fcm |
---|
462 | rm -f bin/${code}${SUFF_NAME}.e |
---|
463 | rm -f arch.fcm |
---|
464 | rm -f arch.opt |
---|
465 | |
---|
466 | echo "%ARCH $arch" >> $config_fcm |
---|
467 | echo "%INCDIR $INCLUDE" >> $config_fcm |
---|
468 | echo "%LIB $LIB" >> $config_fcm |
---|
469 | echo "%ROOT_PATH $PWD" >> $config_fcm |
---|
470 | echo "%LIBF $LIBFGCM" >> $config_fcm |
---|
471 | echo "%LIBO $LIBOGCM" >> $config_fcm |
---|
472 | echo "%DYN $DYN" >> $config_fcm |
---|
473 | echo "%PHYS phy${physique}" >> $config_fcm |
---|
474 | echo "%COSP $COSP_PATH" >> $config_fcm |
---|
475 | echo "%CPP_KEY $CPP_KEY" >> $config_fcm |
---|
476 | echo "%EXEC $code" >> $config_fcm |
---|
477 | echo "%SUFF_NAME $SUFF_NAME" >> $config_fcm |
---|
478 | echo "%COMPIL_FFLAGS $COMPIL_FFLAGS" >> $config_fcm |
---|
479 | echo "%PARA_FFLAGS $PARA_FFLAGS" >> $config_fcm |
---|
480 | echo "%PARA_LD $PARA_LD" >> $config_fcm |
---|
481 | echo "%EXT_SRC $EXT_SRC" >> $config_fcm |
---|
482 | |
---|
483 | |
---|
484 | |
---|
485 | ln -s arch/arch-${arch}.fcm arch.fcm |
---|
486 | if test -f arch/arch-${arch}.opt && [ $compil_mod = "prod" ] |
---|
487 | then |
---|
488 | ln -s arch/arch-${arch}.opt arch.opt |
---|
489 | else |
---|
490 | ln -s .void_file arch.opt |
---|
491 | fi |
---|
492 | |
---|
493 | |
---|
494 | rm -f $LIBOGCM/${arch}${SUFF_NAME}/.config/fcm.bld.lock |
---|
495 | ./build_gcm ${fcm_path} -j $job $full |
---|
496 | |
---|
497 | rm -rf tmp_src |
---|
498 | rm -rf config |
---|
499 | ln -s $LIBOGCM/${arch}${SUFF_NAME}/.config config |
---|
500 | ln -s $LIBOGCM/${arch}${SUFF_NAME}/.config/tmp tmp_src |
---|
501 | |
---|
502 | #eventual cleanup for SISVAT |
---|
503 | sed -e 's/^src::sisvat/#src::sisvat/' bld.cfg > bld.tmp |
---|
504 | mv bld.tmp bld.cfg |
---|
505 | |
---|
506 | |
---|
507 | if [[ -r $LIBFGCM/grid/dimensions.h ]] |
---|
508 | then |
---|
509 | # Cleanup: remove dimension.h file |
---|
510 | \rm -f $LIBFGCM/grid/dimensions.h |
---|
511 | fi |
---|