source: LMDZ5/trunk/makelmdz @ 2016

Last change on this file since 2016 was 2016, checked in by fhourdin, 10 years ago

Modification de create_make_gcm et makelmdz pour la compilation 1D.

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