source: LMDZ5/trunk/makelmdz_fcm @ 2631

Last change on this file since 2631 was 2631, checked in by fhourdin, 8 years ago

Modification de makelmdz et makelmdz_fcm pour les aerosols

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