source: LMDZ5/branches/testing/makelmdz_fcm @ 2380

Last change on this file since 2380 was 2298, checked in by Laurent Fairhead, 9 years ago

Merged trunk changes -r2237:2291 into testing branch

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