source: LMDZ5/trunk/makelmdz @ 2168

Last change on this file since 2168 was 2112, checked in by jbmadeleine, 10 years ago

inclusion de l'option -full dans makelmdz qui permet de recompiler
entièrement le modèle (l'option était déjà disponible avec
makelmdz_fcm mais pas makelmdz)

added the -full option to makelmdz, which recompiles the model from
scratch (was already available with makelmdz_fcm but not with
makelmdz)

  • 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:executable set to *
File size: 19.1 KB
Line 
1#!/bin/bash
2#
3# $Id$
4#
5#
6########################################################################
7# for debug, uncomment line below
8#set -xv
9########################################################################
10# options par defaut pour la commande make
11########################################################################
12dim="96x72x19"
13physique=lmd
14code=gcm
15filtre=filtrez
16grille=reg
17couple=false
18veget=false
19chimie=false
20parallel=none
21paramem="par"
22compil_mod=prod
23io=ioipsl
24LIBPREFIX=""
25fcm_path=none
26cosp=false
27sisvat=false
28rrtm=false
29full=""
30
31# guess a default 'arch'
32arch="local" # start with assuming we're on a local machine with local arch file
33## try to recognise machine and infer arch from it
34machine=`hostname`
35if [[ "${machine:0:3}" == "ada" ]]
36then
37  arch="X64_ADA"
38fi
39if [[ "${machine:0:7}" == "platine" ]]
40then
41  arch="IA64_PLATINE"
42fi
43if [[ "${machine:0:6}" == "titane" ]]
44then
45  arch="X64_TITANE"
46fi
47if [[ "${machine:0:8}" == "mercure1" ]]
48then
49  arch="SX8_MERCURE"
50fi
51if [[ "${machine:0:8}" == "mercure2" ]]
52then
53  arch="SX9_MERCURE"
54fi
55
56LMDGCM=`pwd -P`
57LIBFGCM=$LMDGCM/libf
58LIBOGCM=$LMDGCM/libo
59if [[ ! -d $LIBOGCM ]]
60then
61  # create the directory
62  mkdir $LIBOGCM
63  if [[ ! $? ]]
64  then
65  echo "Failed to create directory $LIBOGCM"
66  exit
67  fi
68fi
69COSP_PATH=$LMDGCM/.void_dir
70
71
72
73localdir=`pwd -P`
74########################################################################
75#  Quelques initialisations de variables du shell.
76########################################################################
77
78CPP_KEY="" 
79INCLUDE='-I$(LIBF)/grid -I$(LIBF)/bibio -I$(LIBF)/filtrez -I. '
80LIB=""
81adjnt=""
82##COMPIL_FFLAGS="%PROD_FFLAGS"
83PARA_FFLAGS=""
84PARA_LD=""
85EXT_SRC=""
86
87########################################################################
88# lecture des options
89########################################################################
90
91while (($# > 0))
92  do
93  case $1 in
94      "-h") cat <<fin
95Usage :
96makelmdz [options] -arch nom_arch exec
97[-h]                       : brief help
98[-d [[IMx]JMx]LM]          : IM, JM, LM are the dimensions in x, y, z (default: $dim)
99[-p PHYS]                  : set of physical parametrizations (in libf/phyPHYS), (default: lmd)
100[-prod / -dev / -debug]    : compilation mode production (default) / developement / debug
101[-c false/MPI1/MPI2]       : coupling with ocean model : MPI1/MPI2/false (default: false)
102[-v false/orchidee2.0/orchidee1.9/true] : version of the vegetation model to include (default: false)
103          false       : no vegetation model
104          orchidee2.0 : compile using ORCHIDEE 2.0 (or more recent version)
105          orchidee1.9 : compile using ORCHIDEE up to the version including OpenMP in ORCHIDEE : tag 1.9-1.9.5(version AR5)-1.9.6
106          true        : (obsolete; for backward compatibility) use ORCHIDEE tag 1.9-1.9.6
107[-chimie INCA/false]       : with INCA chemistry model or without (default: false)
108[-parallel none/mpi/omp/mpi_omp] : parallelism (default: none) : mpi, openmp or mixted mpi_openmp
109[-g GRI]                   : grid configuration in dyn3d/GRI_xy.h  (default: reg, inclues a zoom)
110[-io ioipsl/mix/xios]                   : Input/Output library (default: ioipsl)
111[-include INCLUDES]        : extra include path to add
112[-cpp CPP_KEY]             : additional preprocessing definitions
113[-adjnt]                   : adjoint model, not operational ...
114[-mem]                     : reduced memory dynamics (if in parallel mode)
115[-filtre NOMFILTRE]        : use filtre from libf/NOMFILTRE (default: filtrez)
116[-full]                    : Full (re)compilation (from scratch)
117[-link LINKS]              : additional links with other libraries
118[-fcm_path path]           : path to the fcm tool (default: tools/fcm/bin)
119[-ext_src path]            : path to an additional set of routines to compile with the model
120 -arch nom_arch            : target architecture
121 exec                      : executable to build
122fin
123          exit;;
124      "-d")
125          dim=$2 ; shift ; shift ;;
126     
127      "-p")
128          physique="$2" ;  shift ; shift ;;
129
130      "-g")
131          grille="$2" ; shift ; shift ;;
132
133      "-c")
134          couple="$2" ; shift ; shift ;;
135
136      "-prod")
137          compil_mod="prod" ; shift ;;
138
139      "-dev")
140          compil_mod="dev" ; shift ;;
141
142      "-debug")
143          compil_mod="debug" ; shift ;;
144
145      "-io")
146          io="$2" ; shift ; shift ;;
147
148      "-v")
149          veget="$2" ; shift ; shift ;;
150
151      "-chimie")
152          chimie="$2" ; shift ; shift ;;
153
154      "-parallel")
155          parallel="$2" ; shift ; shift ;;
156     
157      "-include")
158          INCLUDE="$INCLUDE -I$2" ; shift ; shift ;;
159
160      "-cpp")
161          CPP_KEY="$CPP_KEY $2" ; shift ; shift ;;
162
163      "-cosp")
164          cosp="$2" ; shift ; shift ;;
165     
166      "-sisvat")
167          sisvat="$2" ; shift ; shift ;;
168     
169      "-rrtm")
170          rrtm="$2" ; shift ; shift ;;
171     
172      "-mem")
173          paramem="mem" ; shift ;;
174
175      "-filtre")
176          filtre=$2 ; shift ; shift ;;
177
178      "-full")
179      full="full" ; shift ;;
180
181      "-link")
182          LIB="$LIB $2" ; shift ; shift ;;
183
184      "-fcm_path")
185          fcm_path=$2 ; shift ; shift ;;
186
187      "-ext_src")
188          EXT_SRC=$2 ; shift ; shift ;;
189
190      "-arch")
191          arch=$2 ; shift ; shift ;;
192
193      *)
194          code="$1" ; shift ;;
195  esac
196done
197
198###############################################################
199# lecture des chemins propres \`a l'architecture de la machine #
200###############################################################
201rm -f .void_file
202echo > .void_file
203rm -rf .void_dir
204mkdir .void_dir
205rm -f arch.path
206if [[ -r arch/arch-${arch}.path ]]
207then
208  ln -s arch/arch-${arch}.path ./arch.path
209  source arch.path
210else
211  echo "Error: missing arch/arch-${arch}.path file !"
212  exit
213fi
214rm -f arch.fcm
215if [[ -r arch/arch-${arch}.fcm ]]
216then
217  ln -s arch/arch-${arch}.fcm arch.fcm
218else
219  echo "Error: missing arch/arch-${arch}.fcm file !"
220  exit
221fi
222########################################################################
223# Definition des clefs CPP, des chemins des includes et modules
224#  et des libraries
225########################################################################
226
227# basic compile flags from arch.fcm file
228archfileline=$( grep -i '^%BASE_FFLAGS' arch.fcm )
229COMPIL_FFLAGS=$( echo ${archfileline##%BASE_FFLAGS} )
230
231# other compile flags, depending on compilation mode
232if [[ "$compil_mod" == "prod" ]]
233then
234## read COMPIL_FFLAGS from arch.fcm file
235  archfileline=$( grep -i '^%PROD_FFLAGS' arch.fcm )
236  archfileopt=$( echo ${archfileline##%PROD_FFLAGS} )
237  COMPIL_FFLAGS="${COMPIL_FFLAGS} ${archfileopt}"
238elif [[ "$compil_mod" == "dev" ]]
239then
240## read %DEV_FFLAGS from arch.fcm file
241  archfileline=$( grep -i '^%DEV_FFLAGS' arch.fcm )
242  archfileopt=$( echo ${archfileline##%DEV_FFLAGS} )
243  COMPIL_FFLAGS="${COMPIL_FFLAGS} ${archfileopt}"
244elif [[ "$compil_mod" == "debug" ]]
245then
246## read %DEBUG_FFLAGS from arch.fcm file
247  archfileline=$( grep -i '^%DEBUG_FFLAGS' arch.fcm )
248  archfileopt=$( echo ${archfileline##%DEBUG_FFLAGS} )
249  COMPIL_FFLAGS="${COMPIL_FFLAGS} ${archfileopt}"
250fi
251
252# add CPP_KEY defined in arch.fcm file
253archfileline=$( grep -i '^%FPP_DEF' arch.fcm )
254archfileopt=$( echo ${archfileline##%FPP_DEF} )
255CPP_KEY="$CPP_KEY ${archfileopt}"
256
257# get compiler name from arch.fcm file
258archfileline=$( grep -i '^%COMPILER' arch.fcm )
259fcompiler=$( echo ${archfileline##%COMPILER} )
260
261# get linker name from arch.fcm file
262archfileline=$( grep -i '^%LINK' arch.fcm )
263linker=$( echo ${archfileline##%LINK} )
264
265# get ar command from arch.fcm file
266archfileline=$( grep -i '^%AR' arch.fcm )
267arcommand=$( echo ${archfileline##%AR} )
268
269# get make utility from arch.fcm file
270archfileline=$( grep -i '^%MAKE' arch.fcm )
271makecommand=$( echo ${archfileline##%MAKE} )
272
273# get basic libraries to link with arch.fcm file
274archfileline=$( grep -i '^%BASE_LD' arch.fcm )
275archfileopt=$( echo ${archfileline##%BASE_LD} )
276LIB="$LIB  ${archfileopt}"
277
278# add Include files defined in arch.fcm file for pre-processing
279archfileline=$( grep -i '^%FPP_FLAGS' arch.fcm )
280for inc in $archfileline ; do INCLUDE="$INCLUDE `echo $inc | grep '\-I'`" ; done
281
282if [[ "$physique" != "nophys" ]]
283then
284   #We'll use some physics
285   CPP_KEY="$CPP_KEY CPP_PHYS"
286   if [[ "${physique:0:3}" == "lmd" ]]
287   then
288   #For lmd physics, default planet type is Earth
289   CPP_KEY="$CPP_KEY CPP_EARTH"
290   fi
291fi
292
293if [[ "$chimie" == "INCA" ]]
294then
295   CPP_KEY="$CPP_KEY INCA"
296   INCLUDE="$INCLUDE -I${INCA_INCDIR}"
297   LIB="$LIB -L${INCA_LIBDIR} -lchimie"
298   libchimie=" -L${INCA_LIBDIR} -lchimie"
299fi
300
301if [[ "$couple" != "false" ]]
302then
303   CPP_KEY="$CPP_KEY CPP_COUPLE"
304   INCLUDE="$INCLUDE -I${OASIS_INCDIR}"
305   LIB="$LIB -L${OASIS_LIBDIR} -lpsmile.${couple} -lmpp_io"
306fi
307
308if [[ "$parallel" == "none" ]]
309then
310  FLAG_PARA=''
311else
312  FLAG_PARA="$paramem"
313fi
314
315if [[ "$parallel" == "mpi" ]]
316then
317   CPP_KEY="$CPP_KEY CPP_PARA CPP_MPI"
318  # MPI additional compilation options
319  archfileline=$( grep -i '^%MPI_FFLAGS' arch.fcm )
320  PARA_FFLAGS=$( echo ${archfileline##%MPI_FFLAGS} )
321  # MPI additional links
322  archfileline=$( grep -i '^%MPI_LD' arch.fcm )
323  PARA_LD=$( echo ${archfileline##%MPI_LD} )
324elif [[ "$parallel" == "omp" ]]
325then
326   CPP_KEY="$CPP_KEY CPP_PARA CPP_OMP"
327  # OMP additional compilation options
328  archfileline=$( grep -i '^%OMP_FFLAGS' arch.fcm )
329  PARA_FFLAGS=$( echo ${archfileline##%OMP_FFLAGS} )
330  # OMP additional links
331  archfileline=$( grep -i '^%OMP_LD' arch.fcm )
332  PARA_LD=$( echo ${archfileline##%OMP_LD} )
333elif [[ "$parallel" == "mpi_omp" ]]
334then
335   CPP_KEY="$CPP_KEY CPP_PARA CPP_MPI CPP_OMP"
336  # MPI additional compilation options
337  archfileline=$( grep -i '^%MPI_FFLAGS' arch.fcm )
338  PARA_FFLAGS=$( echo ${archfileline##%MPI_FFLAGS} )
339  # OMP additional compilation options
340  archfileline=$( grep -i '^%OMP_FFLAGS' arch.fcm )
341  PARA_FFLAGS="${PARA_FFLAGS} "$( echo $archfileopt ${archfileline##%OMP_FFLAGS} )
342  # MPI additional links
343  archfileline=$( grep -i '^%MPI_LD' arch.fcm )
344  PARA_LD=$( echo ${archfileline##%MPI_LD} )
345  # OMP additional links
346  archfileline=$( grep -i '^%OMP_LD' arch.fcm )
347  PARA_LD="${PARA_LD} "$( echo $archfileopt ${archfileline##%OMP_LD} )
348fi
349
350if [[ ( "$parallel" == "omp" || "$parallel" == "mpi_omp" ) \
351   && "$compil_mod" == "debug" ]]
352then
353    echo "Usually, parallelization with OpenMP requires some optimization."
354    echo "We suggest switching to \"-dev\"."
355fi
356
357
358#==============================================================================
359if [ "$veget" = "true" -o "$veget" = "orchidee1.9" -o "$veget" = "orchidee2.0" ]
360then
361
362   INCLUDE="${INCLUDE} -I${ORCH_INCDIR}"
363   CPP_KEY="$CPP_KEY CPP_VEGET"
364# temporary, for Orchidee versions 1.9.* (before openmp activation)
365   if [[ "$veget" == "orchidee1.9" ]] ; then
366      CPP_KEY="$CPP_KEY ORCHIDEE_NOOPENMP"
367   fi
368   if [[ "$veget" == "orchidee2.0" ]] ; then
369      orch_libs="sechiba parameters stomate parallel orglob orchidee"
370   else
371      orch_libs="sechiba parameters stomate parallel orglob"
372   fi
373   LIB="${LIB} -L${ORCH_LIBDIR}"
374   for lib in ${orch_libs} ; do
375      if [ -f ${ORCH_LIBDIR}/lib${LIBPREFIX}$lib.a ] ; then
376         LIB="${LIB} -l${LIBPREFIX}$lib "
377      fi
378   done
379elif [[ "$veget" != "false" ]] ; then
380   echo "Option -v $veget does not exist"
381   echo "Use ./makelmdz -h for more information"
382   exit 
383fi
384
385#===============================================================================
386if [[ $io == ioipsl ]]
387then
388   CPP_KEY="$CPP_KEY CPP_IOIPSL"
389   INCLUDE="$INCLUDE -I${IOIPSL_INCDIR}"
390   LIB="$LIB -L${IOIPSL_LIBDIR} -l${LIBPREFIX}ioipsl"
391elif [[ $io == mix ]]
392then
393   # For now, xios implies also using ioipsl
394   CPP_KEY="$CPP_KEY CPP_IOIPSL CPP_XIOS"
395   INCLUDE="$INCLUDE -I${IOIPSL_INCDIR} -I${XIOS_INCDIR}"
396   LIB="$LIB -L${IOIPSL_LIBDIR} -l${LIBPREFIX}ioipsl -L${XIOS_LIBDIR} -l${LIBPREFIX}stdc++ -l${LIBPREFIX}xios"
397elif [[ $io == xios ]]
398then
399   # For now, xios implies also using ioipsl
400   CPP_KEY="$CPP_KEY CPP_IOIPSL CPP_XIOS CPP_IOIPSL_NO_OUTPUT"
401   INCLUDE="$INCLUDE -I${IOIPSL_INCDIR} -I${XIOS_INCDIR}"
402   LIB="$LIB -L${IOIPSL_LIBDIR} -l${LIBPREFIX}ioipsl -L${XIOS_LIBDIR} -l${LIBPREFIX}stdc++ -l${LIBPREFIX}xios"
403fi
404
405if [[ "$cosp" == "true" ]]
406then
407   CPP_KEY="$CPP_KEY CPP_COSP"
408   COSP_PATH="$LIBFGCM/cosp"
409#   LIB="${LIB} -l${LIBPREFIX}cosp"
410   opt_dep="$opt_dep cosp"
411   lcosp="-l${LIBPREFIX}cosp"
412   INCLUDE="$INCLUDE"' -I$(LIBF)/cosp'
413fi
414
415if [[ "$sisvat" == "true" ]]
416then
417   CPP_KEY="$CPP_KEY CPP_SISVAT"
418fi
419
420if [[ "$rrtm" == "true" ]]
421then
422   CPP_KEY="$CPP_KEY CPP_RRTM"
423fi
424
425
426INCLUDE="$INCLUDE ${NETCDF_INCDIR}"
427LIB="$LIB ${NETCDF_LIBDIR}"
428
429########################################################################
430# calcul du nombre de dimensions
431########################################################################
432
433
434dim_full=$dim
435dim=`echo $dim | sed -e 's/[^0-9]/ /g'` 
436set $dim
437dimc=$#
438echo calcul de la dimension
439echo dim $dim
440echo dimc $dimc
441
442########################################################################
443# Gestion des dimensions du modele.
444# on cree ou remplace le fichier des dimensions
445########################################################################
446
447cd $LIBFGCM/grid
448if [[ -f dimensions.h ]]
449then
450  echo 'ATTENTION: vous etes sans doute en train de compiler le modele par ailleurs'
451  echo "Attendez que la premiere compilation soit terminee pour relancer la suivante."
452  echo "Si vous etes sur que vous ne compilez pas le modele par ailleurs,"
453  echo  vous pouvez continuer en repondant oui.
454  echo "Voulez-vous vraiment continuer?"
455  echo ""
456  echo "WARNING: you are probably already compiling the model somewhere else."
457  echo "Wait until the first compilation is finished before launching this one."
458  echo "If you are sure that you are not compiling elsewhere, just answer "
459  echo "yes (or 'oui') to the question below to proceed."
460  echo "Do you wish to continue?"
461  read reponse
462  if [[ $reponse == "oui" || $reponse == "yes" ]]
463  then
464    \rm -f $LIBFGCM/grid/dimensions.h
465  else
466    exit
467  fi
468fi
469
470cd $LIBFGCM/grid/dimension
471./makdim $dim
472cat $LIBFGCM/grid/dimensions.h
473cd $LMDGCM
474
475########################################################################
476# Differentes dynamiques (3d, 2d, 1d)
477########################################################################
478
479if (( $dimc == 3 )) ; then
480   cd $LIBFGCM/grid
481   \rm fxyprim.h
482   cp -p fxy_${grille}.h fxyprim.h
483   filtre="FILTRE=$filtre"
484   INCLUDE="$INCLUDE "'-I$(LIBF)/dyn3d${FLAG_PARA} -I$(LIBF)/dyn3d_common '
485elif (( $dimc == 2 )) ; then
486   filtre="FILTRE= L_FILTRE= "
487   INCLUDE="$INCLUDE "'-I$(LIBF)/dyn2d'
488elif (( $dimc == 1 )) ; then
489   CPP_KEY="$CPP_KEY CPP_1D"
490   filtre="L_DYN= DYN= FILTRE= L_FILTRE= DIRMAIN=phy$physique "
491   INCLUDE="$INCLUDE "'-I$(LIBF)/dyn3d -I$(LIBF)/dyn3d_common ' # Pas tres propre
492else
493   echo Dimension dimc=$dimc pas prevu ; exit
494fi
495
496cd $LMDGCM
497
498########################################################################
499# library directory name:
500########################################################################
501
502nomlib=`echo ${arch}_${physique}_${dim_full}_${grille}_${compil_mod}_parall${parallel}_${CPP_KEY}_${FLAG_PARA} | sed -e 's/ //g' -e 's/-//g ' | sed -e 's/CPP_//g'`
503echo "Path to library: "$nomlib
504
505########################################################################
506#  Cleanup for a full recompilation, if requested
507########################################################################
508
509if [[ $full == "full" ]]
510then
511# remove makefile and librairies
512  echo "-full option: recompiling from scratch"
513  \rm -f makefile
514  \rm -rf "${LIBOGCM}/${nomlib}"
515fi
516
517########################################################################
518#  Avant de lancer le make, on recree le makefile si necessaire
519########################################################################
520########################################################################
521# c'est a dire dans 3 cas:
522# 1. si la liste des fichiers .F et .h a ete modifiee depuis la
523#    derniere creation du makefile
524# 2. si le fichier contenant cette liste "liste_des_sources"
525#    n'existe pas.
526# 3. Si le makefile n'existe pas.
527########################################################################
528cd $LMDGCM
529
530find libf -name '*.[Fh]' -print > tmp77
531find libf -name '*.[Fh]' -exec egrep -i " *use *ioipsl" {} \; -print > tmp90
532find libf -name '*.F90' -print >> tmp90
533
534if [[ ! ( -r makefile ) || ! ( -r liste_des_sources_f90 ) || ! ( -r liste_des_sources_f77 ) || ` diff tmp77 liste_des_sources_f77 | wc -w ` -ne 0 || ` diff tmp90 liste_des_sources_f90 | wc -w ` -ne 0 ]]
535then
536  echo "les fichiers suivants ont ete crees ou detruits"
537  echo "ou les fichiers suivants sont passes ou ne sont plus en Fortran 90"
538  diff liste_des_sources_f77 tmp77
539  diff liste_des_sources_f90 tmp90
540  \cp -f tmp77 liste_des_sources_f77
541  \cp -f tmp90 liste_des_sources_f90
542  echo "on recree le makefile"
543  ./create_make_gcm > tmp
544  \mv -f tmp makefile
545  echo "Nouveau makefile cree"
546fi
547
548#################################################################
549# Preparation de l'execution de la comande make
550#################################################################
551
552source_code=${code}.F
553if [[ -r $LMDGCM/libf/dyn${dimc}d${FLAG_PARA}/${code}.F90 ]]
554then
555  source_code=${code}.F90
556elif [[ -r $LMDGCM/libf/phy$physique/${code}.F90 ]] ; then
557  source_code=${code}.F90
558fi
559
560if [[ ! -d "${LIBOGCM}/${nomlib}" ]]
561then
562  mkdir ${LIBOGCM}/${nomlib}
563  # check we indeed managed to create the directory
564  if [[ ! $? ]]
565  then
566    echo "Error: could not create directory ${LIBOGCM}/${nomlib}"
567    exit
568  fi
569fi
570
571# where module files are created
572mod_loc_dir=$localdir
573
574if [[ "$physique" != "nophys" ]]
575then
576  INCLUDE="$INCLUDE"' -I$(LIBF)/phy'"$physique"
577fi
578INCLUDE="$INCLUDE"' -I'${LIBOGCM}/${nomlib}
579
580# ranlib utility (check it exists or else default to ls)
581if [[ `which ranlib > /dev/null 2>&1 ; echo $?` -eq 0 ]]
582then
583  ranlib="ranlib"
584else
585  ranlib="ls"
586fi
587
588# add CPP keys to COMPIL_FLAGS
589# (but first add -D before all CPP_KEY items)
590cpp_definitions=`echo $CPP_KEY | sed -e 's/[A-Za-z_=0-9]*/-D&/g'`
591# (but add a -WF,-D before all CPP_KEY items) => for xlf on Vargas
592if [[ "${fcompiler:0:3}" == "xlf" ]]
593then
594cpp_definitions=`echo $CPP_KEY | sed -e 's/[A-Za-z_=0-9]*/-WF,-D&/g'`
595fi
596COMPIL_FFLAGS="${COMPIL_FFLAGS} ${cpp_definitions}"
597
598#################################################################
599# Execution du make
600#################################################################
601echo $makecommand RANLIB=$ranlib -f $LMDGCM/makefile \
602OPTION_DEP="$opt_dep" OPTION_LINK="$LIB ${PARA_LD}" \
603OPTIM90="${COMPIL_FFLAGS} ${PARA_FFLAGS}" \
604OPTIMTRU90="${COMPIL_FFLAGS} ${PARA_FFLAGS}" \
605OPTIM="${COMPIL_FFLAGS} ${PARA_FFLAGS}" \
606INCLUDE="$INCLUDE" \
607$filtre \
608LIBO=${LIBOGCM}/${nomlib} \
609"PHYS=$physique" \
610DIM=$dimc \
611FLAG_PARA=$FLAG_PARA \
612L_ADJNT=$adjnt \
613L_COSP="$lcosp" \
614L_CHIMIE="$libchimie" \
615LOCAL_DIR="$localdir"  \
616F77="$fcompiler" \
617F90="$fcompiler" \
618OPLINK="$LIB" \
619LINK="$linker" \
620GCM="$LMDGCM" \
621MOD_LOC_DIR=$mod_loc_dir \
622MOD_SUFFIX="mod" \
623AR=$arcommand \
624SOURCE=$source_code \
625PROG=$code
626
627$makecommand RANLIB=$ranlib -f $LMDGCM/makefile \
628OPTION_DEP="$opt_dep" OPTION_LINK="$LIB ${PARA_LD}" \
629OPTIM90="${COMPIL_FFLAGS} ${PARA_FFLAGS}" \
630OPTIMTRU90="${COMPIL_FFLAGS} ${PARA_FFLAGS}" \
631OPTIM="${COMPIL_FFLAGS} ${PARA_FFLAGS}" \
632INCLUDE="$INCLUDE" \
633$filtre \
634LIBO=${LIBOGCM}/${nomlib} \
635"PHYS=$physique" \
636DIM=$dimc \
637FLAG_PARA=$FLAG_PARA \
638L_ADJNT=$adjnt \
639L_COSP="$lcosp" \
640L_CHIMIE="$libchimie" \
641LOCAL_DIR="$localdir"  \
642F77="$fcompiler" \
643F90="$fcompiler" \
644OPLINK="$LIB" \
645LINK="$linker" \
646GCM="$LMDGCM" \
647MOD_LOC_DIR=$mod_loc_dir \
648MOD_SUFFIX="mod" \
649AR=$arcommand \
650SOURCE=$source_code \
651PROG=$code
652
653
654if [[ -r $LIBFGCM/grid/dimensions.h ]]
655then
656  # Cleanup: remove dimension.h file
657  \rm -f $LIBFGCM/grid/dimensions.h
658fi
Note: See TracBrowser for help on using the repository browser.