| 1 | #!/bin/bash |
|---|
| 2 | # $Id: makelmdz_fcm 1752 2013-04-30 06:34:06Z emillour $ |
|---|
| 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 | chimie=false |
|---|
| 25 | parallel=none |
|---|
| 26 | paramem="par" |
|---|
| 27 | compil_mod=prod |
|---|
| 28 | io=ioipsl |
|---|
| 29 | LIBPREFIX="" |
|---|
| 30 | cosp=false |
|---|
| 31 | |
|---|
| 32 | LMDGCM=`/bin/pwd` |
|---|
| 33 | LIBOGCM=$LMDGCM/libo |
|---|
| 34 | LIBFGCM=$LMDGCM/libf |
|---|
| 35 | COSP_PATH=$LMDGCM/.void_dir |
|---|
| 36 | fcm_path=$LMDGCM/tools/fcm/bin |
|---|
| 37 | |
|---|
| 38 | ######################################################################## |
|---|
| 39 | # Quelques initialisations de variables du shell. |
|---|
| 40 | ######################################################################## |
|---|
| 41 | |
|---|
| 42 | CPP_KEY="" |
|---|
| 43 | INCLUDE="" |
|---|
| 44 | LIB="" |
|---|
| 45 | adjnt="" |
|---|
| 46 | COMPIL_FFLAGS="%PROD_FFLAGS" |
|---|
| 47 | PARA_FFLAGS="" |
|---|
| 48 | PARA_LD="" |
|---|
| 49 | EXT_SRC="" |
|---|
| 50 | |
|---|
| 51 | ######################################################################## |
|---|
| 52 | # lecture des options de mymake |
|---|
| 53 | ######################################################################## |
|---|
| 54 | |
|---|
| 55 | while (($# > 0)) |
|---|
| 56 | do |
|---|
| 57 | case $1 in |
|---|
| 58 | "-h") cat <<fin |
|---|
| 59 | manuel complet sur http://... |
|---|
| 60 | Usage : |
|---|
| 61 | makegcm [options] -m arch exec |
|---|
| 62 | [-h] : manuel abrégé |
|---|
| 63 | [-d [[IMx]JMx]LM] : IM, JM, LM sont les dims en x, y, z (def: $dim) |
|---|
| 64 | [-p PHYS] : compilation avec la physique libf/phyPHYS, (def: lmd) |
|---|
| 65 | [-prod / -dev / -debug] : compilation en mode production (default) / developpement / debug . |
|---|
| 66 | [-c false/MPI1/MPI2] : couplé océan : MPI1/MPI2/false (def: false) |
|---|
| 67 | [-v false/true] : avec ou sans végétation (def: false) |
|---|
| 68 | [-chimie INCA/false] : avec ou sans model de chimie INCA (def: false) |
|---|
| 69 | [-parallel none/mpi/omp/mpi_omp] : parallelisation (default: none) : mpi, openmp ou mixte mpi_openmp |
|---|
| 70 | [-g GRI] : conf. grille dans dyn3d/GRI_xy.h (def: reg inclue un zoom) |
|---|
| 71 | [-io IO] : choix d'une librairie I/O, experts (def: ioipsl) |
|---|
| 72 | [-include INCLUDES] : variables supplementaires pour include |
|---|
| 73 | [-cpp CPP_KEY] : cle cpp supplementaires |
|---|
| 74 | [-adjnt] : adjoint, a remettre en route ... |
|---|
| 75 | [-mem] : version memoire reduite (si en mode parallele) |
|---|
| 76 | [-filtre NOMFILTRE] : prend le filtre dans libf/NOMFILTRE (def: filtrez) |
|---|
| 77 | [-link LINKS] : liens optionels avec d'autres librairies |
|---|
| 78 | [-fcm_path path] : chemin pour fcm (def: tools/fcm/bin) |
|---|
| 79 | [-ext_src path] : chemin d'un repertoire source avec des sources externe a compiler avec le modele |
|---|
| 80 | -arch nom_arch : nom de l'architecture cible |
|---|
| 81 | exec : exécutable généré |
|---|
| 82 | fin |
|---|
| 83 | exit;; |
|---|
| 84 | |
|---|
| 85 | "-d") |
|---|
| 86 | dim=$2 ; shift ; shift ;; |
|---|
| 87 | |
|---|
| 88 | "-O") |
|---|
| 89 | echo "option obsolete dans cette version intermediaire de makegcm" |
|---|
| 90 | exit;; |
|---|
| 91 | |
|---|
| 92 | "-p") |
|---|
| 93 | physique="$2" ; shift ; shift ;; |
|---|
| 94 | |
|---|
| 95 | "-g") |
|---|
| 96 | grille="$2" ; shift ; shift ;; |
|---|
| 97 | |
|---|
| 98 | "-c") |
|---|
| 99 | couple="$2" ; shift ; shift ;; |
|---|
| 100 | |
|---|
| 101 | "-prod") |
|---|
| 102 | compil_mod="prod" ; shift ;; |
|---|
| 103 | |
|---|
| 104 | "-dev") |
|---|
| 105 | compil_mod="dev" ; shift ;; |
|---|
| 106 | |
|---|
| 107 | "-debug") |
|---|
| 108 | compil_mod="debug" ; shift ;; |
|---|
| 109 | |
|---|
| 110 | "-io") |
|---|
| 111 | io="$2" ; shift ; shift ;; |
|---|
| 112 | |
|---|
| 113 | "-v") |
|---|
| 114 | veget="$2" ; shift ; shift ;; |
|---|
| 115 | |
|---|
| 116 | "-chimie") |
|---|
| 117 | chimie="$2" ; shift ; shift ;; |
|---|
| 118 | |
|---|
| 119 | "-parallel") |
|---|
| 120 | parallel="$2" ; shift ; shift ;; |
|---|
| 121 | |
|---|
| 122 | "-include") |
|---|
| 123 | INCLUDE="$INCLUDE -I$2" ; shift ; shift ;; |
|---|
| 124 | |
|---|
| 125 | "-cpp") |
|---|
| 126 | CPP_KEY="$CPP_KEY $2" ; shift ; shift ;; |
|---|
| 127 | |
|---|
| 128 | "-adjnt") |
|---|
| 129 | echo "option a reactiver ";exit |
|---|
| 130 | opt_dep="$opt_dep adjnt" ; adjnt="-ladjnt -ldyn3d " |
|---|
| 131 | optim="$optim -Dadj" ; shift ;; |
|---|
| 132 | |
|---|
| 133 | "-cosp") |
|---|
| 134 | cosp="$2" ; shift ; shift ;; |
|---|
| 135 | |
|---|
| 136 | "-mem") |
|---|
| 137 | paramem="mem" ; shift ;; |
|---|
| 138 | |
|---|
| 139 | "-filtre") |
|---|
| 140 | filtre=$2 ; shift ; shift ;; |
|---|
| 141 | |
|---|
| 142 | "-link") |
|---|
| 143 | LIB="$LIB $2" ; shift ; shift ;; |
|---|
| 144 | |
|---|
| 145 | "-fcm_path") |
|---|
| 146 | fcm_path=$2 ; shift ; shift ;; |
|---|
| 147 | |
|---|
| 148 | "-ext_src") |
|---|
| 149 | EXT_SRC=$2 ; shift ; shift ;; |
|---|
| 150 | |
|---|
| 151 | "-arch") |
|---|
| 152 | arch=$2 ; shift ; shift ;; |
|---|
| 153 | |
|---|
| 154 | *) |
|---|
| 155 | code="$1" ; shift ;; |
|---|
| 156 | esac |
|---|
| 157 | done |
|---|
| 158 | |
|---|
| 159 | ############################################################### |
|---|
| 160 | # path to fcm |
|---|
| 161 | ############################################################### |
|---|
| 162 | # handle case when provided path to fcm was given as a relative |
|---|
| 163 | # path (from makelmdz_fcm script directory) and not an absolute path |
|---|
| 164 | if [[ ${fcm_path:0:1} != "/" ]] ; then |
|---|
| 165 | # prepend with makelmdz_fcm location |
|---|
| 166 | fcm_path=$(cd $(dirname $0) ; pwd)"/"${fcm_path} |
|---|
| 167 | fi |
|---|
| 168 | |
|---|
| 169 | echo "Path to fcm:" |
|---|
| 170 | echo ${fcm_path} |
|---|
| 171 | |
|---|
| 172 | ############################################################### |
|---|
| 173 | # lecture des chemins propres à l'architecture de la machine # |
|---|
| 174 | ############################################################### |
|---|
| 175 | rm -f .void_file |
|---|
| 176 | echo > .void_file |
|---|
| 177 | rm -rf .void_dir |
|---|
| 178 | mkdir .void_dir |
|---|
| 179 | rm -f arch.path |
|---|
| 180 | ln -s arch/arch-${arch}.path ./arch.path |
|---|
| 181 | source arch.path |
|---|
| 182 | |
|---|
| 183 | ######################################################################## |
|---|
| 184 | # Definition des clefs CPP, des chemins des includes et modules |
|---|
| 185 | # et des libraries |
|---|
| 186 | ######################################################################## |
|---|
| 187 | |
|---|
| 188 | if [[ "$compil_mod" == "prod" ]] |
|---|
| 189 | then |
|---|
| 190 | COMPIL_FFLAGS="%PROD_FFLAGS" |
|---|
| 191 | elif [[ "$compil_mod" == "dev" ]] |
|---|
| 192 | then |
|---|
| 193 | COMPIL_FFLAGS="%DEV_FFLAGS" |
|---|
| 194 | elif [[ "$compil_mod" == "debug" ]] |
|---|
| 195 | then |
|---|
| 196 | COMPIL_FFLAGS="%DEBUG_FFLAGS" |
|---|
| 197 | fi |
|---|
| 198 | |
|---|
| 199 | if [[ "$physique" != "nophys" ]] |
|---|
| 200 | then |
|---|
| 201 | #We'll use some physics |
|---|
| 202 | CPP_KEY="$CPP_KEY CPP_PHYS" |
|---|
| 203 | if [[ "${physique:0:3}" == "lmd" ]] |
|---|
| 204 | then |
|---|
| 205 | #For lmd physics, default planet type is Earth |
|---|
| 206 | CPP_KEY="$CPP_KEY CPP_EARTH" |
|---|
| 207 | fi |
|---|
| 208 | fi |
|---|
| 209 | |
|---|
| 210 | if [[ "$chimie" == "INCA" ]] |
|---|
| 211 | then |
|---|
| 212 | CPP_KEY="$CPP_KEY INCA" |
|---|
| 213 | INCLUDE="$INCLUDE -I${INCA_INCDIR}" |
|---|
| 214 | LIB="$LIB -L${INCA_LIBDIR} -lchimie" |
|---|
| 215 | fi |
|---|
| 216 | |
|---|
| 217 | if [[ "$couple" != "false" ]] |
|---|
| 218 | then |
|---|
| 219 | CPP_KEY="$CPP_KEY CPP_COUPLE" |
|---|
| 220 | INCLUDE="$INCLUDE -I${OASIS_INCDIR}" |
|---|
| 221 | LIB="$LIB -L${OASIS_LIBDIR} -lpsmile.${couple} -lmpp_io" |
|---|
| 222 | fi |
|---|
| 223 | |
|---|
| 224 | if [[ "$parallel" == "mpi" ]] |
|---|
| 225 | then |
|---|
| 226 | CPP_KEY="$CPP_KEY CPP_PARA CPP_MPI" |
|---|
| 227 | PARA_FFLAGS="%MPI_FFLAGS" |
|---|
| 228 | PARA_LD="%MPI_LD" |
|---|
| 229 | elif [[ "$parallel" == "omp" ]] |
|---|
| 230 | then |
|---|
| 231 | CPP_KEY="$CPP_KEY CPP_PARA CPP_OMP" |
|---|
| 232 | PARA_FFLAGS="%OMP_FFLAGS" |
|---|
| 233 | PARA_LD="%OMP_LD" |
|---|
| 234 | elif [[ "$parallel" == "mpi_omp" ]] |
|---|
| 235 | then |
|---|
| 236 | CPP_KEY="$CPP_KEY CPP_PARA CPP_MPI CPP_OMP" |
|---|
| 237 | PARA_FFLAGS="%MPI_FFLAGS %OMP_FFLAGS" |
|---|
| 238 | PARA_LD="%MPI_LD %OMP_LD" |
|---|
| 239 | fi |
|---|
| 240 | |
|---|
| 241 | if [[ ( "$parallel" == "omp" || "$parallel" == "mpi_omp" ) \ |
|---|
| 242 | && "$compil_mod" == "debug" ]] |
|---|
| 243 | then |
|---|
| 244 | echo "Usually, parallelization with OpenMP requires some optimization." |
|---|
| 245 | echo "We suggest switching to \"-dev\"." |
|---|
| 246 | fi |
|---|
| 247 | |
|---|
| 248 | if [[ "$veget" == "true" ]] |
|---|
| 249 | then |
|---|
| 250 | CPP_KEY="$CPP_KEY CPP_VEGET" |
|---|
| 251 | INCLUDE="${INCLUDE} -I${ORCH_INCDIR}" |
|---|
| 252 | LIB="${LIB} -L${ORCH_LIBDIR} -l${LIBPREFIX}sechiba -l${LIBPREFIX}parameters -l${LIBPREFIX}stomate -l${LIBPREFIX}parallel -l${LIBPREFIX}orglob" |
|---|
| 253 | fi |
|---|
| 254 | |
|---|
| 255 | if [[ $io == ioipsl ]] |
|---|
| 256 | then |
|---|
| 257 | CPP_KEY="$CPP_KEY CPP_IOIPSL" |
|---|
| 258 | INCLUDE="$INCLUDE -I${IOIPSL_INCDIR}" |
|---|
| 259 | LIB="$LIB -L${IOIPSL_LIBDIR} -l${LIBPREFIX}ioipsl" |
|---|
| 260 | fi |
|---|
| 261 | if [[ "$cosp" == "true" ]] |
|---|
| 262 | then |
|---|
| 263 | CPP_KEY="$CPP_KEY CPP_COSP" |
|---|
| 264 | COSP_PATH="$LIBFGCM/cosp" |
|---|
| 265 | # LIB="${LIB} -l${LIBPREFIX}cosp" |
|---|
| 266 | fi |
|---|
| 267 | |
|---|
| 268 | INCLUDE="$INCLUDE ${NETCDF_INCDIR}" |
|---|
| 269 | LIB="$LIB ${NETCDF_LIBDIR}" |
|---|
| 270 | |
|---|
| 271 | ######################################################################## |
|---|
| 272 | # calcul du nombre de dimensions |
|---|
| 273 | ######################################################################## |
|---|
| 274 | |
|---|
| 275 | |
|---|
| 276 | dim_full=$dim |
|---|
| 277 | dim=`echo $dim | sed -e 's/[^0-9]/ /g'` |
|---|
| 278 | set $dim |
|---|
| 279 | dimc=$# |
|---|
| 280 | echo calcul de la dimension |
|---|
| 281 | echo dim $dim |
|---|
| 282 | echo dimc $dimc |
|---|
| 283 | |
|---|
| 284 | |
|---|
| 285 | ######################################################################## |
|---|
| 286 | # Gestion des dimensions du modele. |
|---|
| 287 | # on cree ou remplace le fichier des dimensions |
|---|
| 288 | ######################################################################## |
|---|
| 289 | |
|---|
| 290 | cd $LIBFGCM/grid |
|---|
| 291 | if [[ -f dimensions.h ]] |
|---|
| 292 | then |
|---|
| 293 | echo 'ATTENTION: vous etes sans doute en train de compiler le modele par ailleurs' |
|---|
| 294 | echo "Attendez que la premiere compilation soit terminee pour relancer la suivante." |
|---|
| 295 | echo "Si vous etes sur que vous ne compilez pas le modele par ailleurs," |
|---|
| 296 | echo vous pouvez continuer en repondant oui. |
|---|
| 297 | echo "Voulez-vous vraiment continuer?" |
|---|
| 298 | echo "" |
|---|
| 299 | echo "WARNING: you are probably already compiling the model somewhere else." |
|---|
| 300 | echo "Wait until the first compilation is finished before launching this one." |
|---|
| 301 | echo "If you are sure that you are not compiling elsewhere, just answer " |
|---|
| 302 | echo "yes (or 'oui') to the question below to proceed." |
|---|
| 303 | echo "Do you wish to continue?" |
|---|
| 304 | read reponse |
|---|
| 305 | if [[ $reponse == "oui" || $reponse == "yes" ]] |
|---|
| 306 | then |
|---|
| 307 | \rm -f $LIBFGCM/grid/dimensions.h |
|---|
| 308 | else |
|---|
| 309 | exit |
|---|
| 310 | fi |
|---|
| 311 | fi |
|---|
| 312 | |
|---|
| 313 | |
|---|
| 314 | cd $LIBFGCM/grid/dimension |
|---|
| 315 | ./makdim $dim |
|---|
| 316 | cat $LIBFGCM/grid/dimensions.h |
|---|
| 317 | cd $LMDGCM |
|---|
| 318 | |
|---|
| 319 | |
|---|
| 320 | ######################################################################## |
|---|
| 321 | # Differentes dynamiques (3d, 2d, 1d) |
|---|
| 322 | ######################################################################## |
|---|
| 323 | |
|---|
| 324 | dimension=`echo $dim | wc -w` |
|---|
| 325 | echo dimension $dimension |
|---|
| 326 | |
|---|
| 327 | if (( $dimension == 3 )) |
|---|
| 328 | then |
|---|
| 329 | cd $LIBFGCM/grid |
|---|
| 330 | \rm fxyprim.h |
|---|
| 331 | cp -p fxy_${grille}.h fxyprim.h |
|---|
| 332 | else |
|---|
| 333 | echo "Probleme dans les dimensions de la dynamique !!" |
|---|
| 334 | echo "Non reactive pour l'instant !!!" |
|---|
| 335 | fi |
|---|
| 336 | |
|---|
| 337 | ###################################################################### |
|---|
| 338 | # Traitement special pour le nouveau rayonnement de Laurent Li. |
|---|
| 339 | # ---> YM desactive pour le traitemement en parallele |
|---|
| 340 | ###################################################################### |
|---|
| 341 | |
|---|
| 342 | #if [[ -f $libf/phy$physique/raddim.h ]] |
|---|
| 343 | #then |
|---|
| 344 | # if [[ -f $libf/phy$physique/raddim.$dimh.h ]] |
|---|
| 345 | #then |
|---|
| 346 | # \rm -f $libf/phy$physique/raddim.h |
|---|
| 347 | # cp -p $libf/phy$physique/raddim.$dimh.h $libf/phy$physique/raddim.h |
|---|
| 348 | # echo $libf/phy$physique/raddim.$dimh.h |
|---|
| 349 | # cat $libf/phy$physique/raddim.h |
|---|
| 350 | # else |
|---|
| 351 | # echo On peut diminuer la taille de l executable en creant |
|---|
| 352 | # echo le fichier $libf/phy$physique/raddim.$dimh.h |
|---|
| 353 | # \cp -p $libf/phy$physique/raddim.defaut.h $libf/phy$physique/raddim.h |
|---|
| 354 | # fi |
|---|
| 355 | #fi |
|---|
| 356 | |
|---|
| 357 | ###################################################################### |
|---|
| 358 | # Gestion du filtre qui n'existe qu'en 3d. |
|---|
| 359 | ###################################################################### |
|---|
| 360 | |
|---|
| 361 | if (( `expr $dimc \> 2` == 1 )) |
|---|
| 362 | then |
|---|
| 363 | filtre="FILTRE=$filtre" |
|---|
| 364 | else |
|---|
| 365 | filtre="FILTRE= L_FILTRE= " |
|---|
| 366 | fi |
|---|
| 367 | echo MACRO FILTRE $filtre |
|---|
| 368 | |
|---|
| 369 | echo $dimc |
|---|
| 370 | |
|---|
| 371 | |
|---|
| 372 | |
|---|
| 373 | ###################################################################### |
|---|
| 374 | # Creation du suffixe de la configuration |
|---|
| 375 | ###################################################################### |
|---|
| 376 | |
|---|
| 377 | |
|---|
| 378 | SUFF_NAME=_${dim_full} |
|---|
| 379 | SUFF_NAME=${SUFF_NAME}_phy${physique} |
|---|
| 380 | |
|---|
| 381 | if [[ "$parallel" != "none" ]] |
|---|
| 382 | then |
|---|
| 383 | SUFF_NAME=${SUFF_NAME}_para |
|---|
| 384 | DYN=dyn${dimc}d${paramem} |
|---|
| 385 | if [[ "$paramem" == "mem" ]] |
|---|
| 386 | then |
|---|
| 387 | SUFF_NAME=${SUFF_NAME}_${paramem} |
|---|
| 388 | fi |
|---|
| 389 | else |
|---|
| 390 | SUFF_NAME=${SUFF_NAME}_seq |
|---|
| 391 | DYN=dyn${dimc}d |
|---|
| 392 | fi |
|---|
| 393 | |
|---|
| 394 | if [[ $veget == "true" ]] |
|---|
| 395 | then |
|---|
| 396 | SUFF_NAME=${SUFF_NAME}_orch |
|---|
| 397 | fi |
|---|
| 398 | |
|---|
| 399 | if [[ $couple != "false" ]] |
|---|
| 400 | then |
|---|
| 401 | SUFF_NAME=${SUFF_NAME}_couple |
|---|
| 402 | fi |
|---|
| 403 | |
|---|
| 404 | if [[ $chimie == "INCA" ]] |
|---|
| 405 | then |
|---|
| 406 | SUFF_NAME=${SUFF_NAME}_inca |
|---|
| 407 | fi |
|---|
| 408 | |
|---|
| 409 | cd $LMDGCM |
|---|
| 410 | config_fcm="config.fcm" |
|---|
| 411 | rm -f $config_fcm |
|---|
| 412 | touch $config_fcm |
|---|
| 413 | rm -f bin/${code}${SUFF_NAME}.e |
|---|
| 414 | rm -f arch.fcm |
|---|
| 415 | rm -f arch.opt |
|---|
| 416 | |
|---|
| 417 | echo "%ARCH $arch" >> $config_fcm |
|---|
| 418 | echo "%INCDIR $INCLUDE" >> $config_fcm |
|---|
| 419 | echo "%LIB $LIB" >> $config_fcm |
|---|
| 420 | echo "%ROOT_PATH $PWD" >> $config_fcm |
|---|
| 421 | echo "%LIBF $LIBFGCM" >> $config_fcm |
|---|
| 422 | echo "%LIBO $LIBOGCM" >> $config_fcm |
|---|
| 423 | echo "%DYN $DYN" >> $config_fcm |
|---|
| 424 | echo "%PHYS phy${physique}" >> $config_fcm |
|---|
| 425 | echo "%COSP $COSP_PATH" >> $config_fcm |
|---|
| 426 | echo "%CPP_KEY $CPP_KEY" >> $config_fcm |
|---|
| 427 | echo "%EXEC $code" >> $config_fcm |
|---|
| 428 | echo "%SUFF_NAME $SUFF_NAME" >> $config_fcm |
|---|
| 429 | echo "%COMPIL_FFLAGS $COMPIL_FFLAGS" >> $config_fcm |
|---|
| 430 | echo "%PARA_FFLAGS $PARA_FFLAGS" >> $config_fcm |
|---|
| 431 | echo "%PARA_LD $PARA_LD" >> $config_fcm |
|---|
| 432 | echo "%EXT_SRC $EXT_SRC" >> $config_fcm |
|---|
| 433 | |
|---|
| 434 | |
|---|
| 435 | |
|---|
| 436 | ln -s arch/arch-${arch}.fcm arch.fcm |
|---|
| 437 | if test -f arch/arch-${arch}.opt && [ $compil_mod = "prod" ] |
|---|
| 438 | then |
|---|
| 439 | ln -s arch/arch-${arch}.opt arch.opt |
|---|
| 440 | else |
|---|
| 441 | ln -s .void_file arch.opt |
|---|
| 442 | fi |
|---|
| 443 | |
|---|
| 444 | |
|---|
| 445 | rm -f $LIBOGCM/${arch}${SUFF_NAME}/.config/fcm.bld.lock |
|---|
| 446 | ./build_gcm ${fcm_path} |
|---|
| 447 | |
|---|
| 448 | rm -rf tmp_src |
|---|
| 449 | rm -rf config |
|---|
| 450 | ln -s $LIBOGCM/${arch}${SUFF_NAME}/.config config |
|---|
| 451 | ln -s $LIBOGCM/${arch}${SUFF_NAME}/.config/tmp tmp_src |
|---|
| 452 | |
|---|
| 453 | if [[ -r $LIBFGCM/grid/dimensions.h ]] |
|---|
| 454 | then |
|---|
| 455 | # Cleanup: remove dimension.h file |
|---|
| 456 | \rm -f $LIBFGCM/grid/dimensions.h |
|---|
| 457 | fi |
|---|