source: LMDZ5/trunk/makelmdz @ 2005

Last change on this file since 2005 was 1990, checked in by Laurent Fairhead, 11 years ago

Corrections à la version r1989 pour permettre la compilation avec RRTM
Inclusion de la licence CeCILL_V2 pour RRTM


Changes to revision r1989 to enable RRTM code compilation
RRTM part put under CeCILL_V2 licence

  • 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)/dyn3d_common -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      "-adjnt")
170          echo "not operational ... work to be done here ";exit
171          opt_dep="$opt_dep adjnt" ; adjnt="-ladjnt -ldyn3d "
172          optim="$optim -Dadj" ; shift ;;
173
174      "-cosp")
175          cosp="$2" ; shift ; shift ;;
176     
177      "-sisvat")
178          sisvat="$2" ; shift ; shift ;;
179     
180      "-rrtm")
181          rrtm="$2" ; shift ; shift ;;
182     
183      "-mem")
184          paramem="mem" ; shift ;;
185
186      "-filtre")
187          filtre=$2 ; shift ; shift ;;
188
189      "-link")
190          LIB="$LIB $2" ; shift ; shift ;;
191
192      "-fcm_path")
193          fcm_path=$2 ; shift ; shift ;;
194
195      "-ext_src")
196          EXT_SRC=$2 ; shift ; shift ;;
197
198      "-arch")
199          arch=$2 ; shift ; shift ;;
200
201      *)
202          code="$1" ; shift ;;
203  esac
204done
205
206###############################################################
207# lecture des chemins propres à l'architecture de la machine #
208###############################################################
209rm -f .void_file
210echo > .void_file
211rm -rf .void_dir
212mkdir .void_dir
213rm -f arch.path
214if [[ -r arch/arch-${arch}.path ]]
215then
216  ln -s arch/arch-${arch}.path ./arch.path
217  source arch.path
218else
219  echo "Error: missing arch/arch-${arch}.path file !"
220  exit
221fi
222rm -f arch.fcm
223if [[ -r arch/arch-${arch}.fcm ]]
224then
225  ln -s arch/arch-${arch}.fcm arch.fcm
226else
227  echo "Error: missing arch/arch-${arch}.fcm file !"
228  exit
229fi
230########################################################################
231# Definition des clefs CPP, des chemins des includes et modules
232#  et des libraries
233########################################################################
234
235# basic compile flags from arch.fcm file
236archfileline=$( grep -i '^%BASE_FFLAGS' arch.fcm )
237COMPIL_FFLAGS=$( echo ${archfileline##%BASE_FFLAGS} )
238
239# other compile flags, depending on compilation mode
240if [[ "$compil_mod" == "prod" ]]
241then
242## read COMPIL_FFLAGS from arch.fcm file
243  archfileline=$( grep -i '^%PROD_FFLAGS' arch.fcm )
244  archfileopt=$( echo ${archfileline##%PROD_FFLAGS} )
245  COMPIL_FFLAGS="${COMPIL_FFLAGS} ${archfileopt}"
246elif [[ "$compil_mod" == "dev" ]]
247then
248## read %DEV_FFLAGS from arch.fcm file
249  archfileline=$( grep -i '^%DEV_FFLAGS' arch.fcm )
250  archfileopt=$( echo ${archfileline##%DEV_FFLAGS} )
251  COMPIL_FFLAGS="${COMPIL_FFLAGS} ${archfileopt}"
252elif [[ "$compil_mod" == "debug" ]]
253then
254## read %DEBUG_FFLAGS from arch.fcm file
255  archfileline=$( grep -i '^%DEBUG_FFLAGS' arch.fcm )
256  archfileopt=$( echo ${archfileline##%DEBUG_FFLAGS} )
257  COMPIL_FFLAGS="${COMPIL_FFLAGS} ${archfileopt}"
258fi
259
260# add CPP_KEY defined in arch.fcm file
261archfileline=$( grep -i '^%FPP_DEF' arch.fcm )
262archfileopt=$( echo ${archfileline##%FPP_DEF} )
263CPP_KEY="$CPP_KEY ${archfileopt}"
264
265# get compiler name from arch.fcm file
266archfileline=$( grep -i '^%COMPILER' arch.fcm )
267fcompiler=$( echo ${archfileline##%COMPILER} )
268
269# get linker name from arch.fcm file
270archfileline=$( grep -i '^%LINK' arch.fcm )
271linker=$( echo ${archfileline##%LINK} )
272
273# get ar command from arch.fcm file
274archfileline=$( grep -i '^%AR' arch.fcm )
275arcommand=$( echo ${archfileline##%AR} )
276
277# get make utility from arch.fcm file
278archfileline=$( grep -i '^%MAKE' arch.fcm )
279makecommand=$( echo ${archfileline##%MAKE} )
280
281# get basic libraries to link with arch.fcm file
282archfileline=$( grep -i '^%BASE_LD' arch.fcm )
283archfileopt=$( echo ${archfileline##%BASE_LD} )
284LIB="$LIB  ${archfileopt}"
285
286# add Include files defined in arch.fcm file for pre-processing
287archfileline=$( grep -i '^%FPP_FLAGS' arch.fcm )
288for inc in $archfileline ; do INCLUDE="$INCLUDE `echo $inc | grep '\-I'`" ; done
289
290if [[ "$physique" != "nophys" ]]
291then
292   #We'll use some physics
293   CPP_KEY="$CPP_KEY CPP_PHYS"
294   if [[ "${physique:0:3}" == "lmd" ]]
295   then
296   #For lmd physics, default planet type is Earth
297   CPP_KEY="$CPP_KEY CPP_EARTH"
298   fi
299fi
300
301if [[ "$chimie" == "INCA" ]]
302then
303   CPP_KEY="$CPP_KEY INCA"
304   INCLUDE="$INCLUDE -I${INCA_INCDIR}"
305   LIB="$LIB -L${INCA_LIBDIR} -lchimie"
306   libchimie=" -L${INCA_LIBDIR} -lchimie"
307fi
308
309if [[ "$couple" != "false" ]]
310then
311   CPP_KEY="$CPP_KEY CPP_COUPLE"
312   INCLUDE="$INCLUDE -I${OASIS_INCDIR}"
313   LIB="$LIB -L${OASIS_LIBDIR} -lpsmile.${couple} -lmpp_io"
314fi
315
316if [[ "$parallel" == "none" ]]
317then
318  FLAG_PARA=''
319else
320  FLAG_PARA="$paramem"
321fi
322
323if [[ "$parallel" == "mpi" ]]
324then
325   CPP_KEY="$CPP_KEY CPP_PARA CPP_MPI"
326  # MPI additional compilation options
327  archfileline=$( grep -i '^%MPI_FFLAGS' arch.fcm )
328  PARA_FFLAGS=$( echo ${archfileline##%MPI_FFLAGS} )
329  # MPI additional links
330  archfileline=$( grep -i '^%MPI_LD' arch.fcm )
331  PARA_LD=$( echo ${archfileline##%MPI_LD} )
332elif [[ "$parallel" == "omp" ]]
333then
334   CPP_KEY="$CPP_KEY CPP_PARA CPP_OMP"
335  # OMP additional compilation options
336  archfileline=$( grep -i '^%OMP_FFLAGS' arch.fcm )
337  PARA_FFLAGS=$( echo ${archfileline##%OMP_FFLAGS} )
338  # OMP additional links
339  archfileline=$( grep -i '^%OMP_LD' arch.fcm )
340  PARA_LD=$( echo ${archfileline##%OMP_LD} )
341elif [[ "$parallel" == "mpi_omp" ]]
342then
343   CPP_KEY="$CPP_KEY CPP_PARA CPP_MPI CPP_OMP"
344  # MPI additional compilation options
345  archfileline=$( grep -i '^%MPI_FFLAGS' arch.fcm )
346  PARA_FFLAGS=$( echo ${archfileline##%MPI_FFLAGS} )
347  # OMP additional compilation options
348  archfileline=$( grep -i '^%OMP_FFLAGS' arch.fcm )
349  PARA_FFLAGS="${PARA_FFLAGS} "$( echo $archfileopt ${archfileline##%OMP_FFLAGS} )
350  # MPI additional links
351  archfileline=$( grep -i '^%MPI_LD' arch.fcm )
352  PARA_LD=$( echo ${archfileline##%MPI_LD} )
353  # OMP additional links
354  archfileline=$( grep -i '^%OMP_LD' arch.fcm )
355  PARA_LD="${PARA_LD} "$( echo $archfileopt ${archfileline##%OMP_LD} )
356fi
357
358if [[ ( "$parallel" == "omp" || "$parallel" == "mpi_omp" ) \
359   && "$compil_mod" == "debug" ]]
360then
361    echo "Usually, parallelization with OpenMP requires some optimization."
362    echo "We suggest switching to \"-dev\"."
363fi
364
365
366#==============================================================================
367if [ "$veget" = "true" -o "$veget" = "orchidee1.9" -o "$veget" = "orchidee2.0" ]
368then
369
370   INCLUDE="${INCLUDE} -I${ORCH_INCDIR}"
371   CPP_KEY="$CPP_KEY CPP_VEGET"
372# temporary, for Orchidee versions 1.9.* (before openmp activation)
373   if [[ "$veget" == "orchidee1.9" ]] ; then
374      CPP_KEY="$CPP_KEY ORCHIDEE_NOOPENMP"
375   fi
376   if [[ "$veget" == "orchidee2.0" ]] ; then
377      orch_libs="sechiba parameters stomate parallel orglob orchidee"
378   else
379      orch_libs="sechiba parameters stomate parallel orglob"
380   fi
381   LIB="${LIB} -L${ORCH_LIBDIR}"
382   for lib in ${orch_libs} ; do
383      if [ -f ${ORCH_LIBDIR}/lib${LIBPREFIX}$lib.a ] ; then
384         LIB="${LIB} -l${LIBPREFIX}$lib "
385      fi
386   done
387elif [[ "$veget" != "false" ]] ; then
388   echo "Option -v $veget does not exist"
389   echo "Use ./makelmdz -h for more information"
390   exit 
391fi
392
393#===============================================================================
394if [[ $io == ioipsl ]]
395then
396   CPP_KEY="$CPP_KEY CPP_IOIPSL"
397   INCLUDE="$INCLUDE -I${IOIPSL_INCDIR}"
398   LIB="$LIB -L${IOIPSL_LIBDIR} -l${LIBPREFIX}ioipsl"
399elif [[ $io == xios ]]
400then
401   # For now, xios implies also using ioipsl
402   CPP_KEY="$CPP_KEY CPP_IOIPSL CPP_XIOS"
403   INCLUDE="$INCLUDE -I${IOIPSL_INCDIR} -I${XIOS_INCDIR}"
404   LIB="$LIB -L${IOIPSL_LIBDIR} -l${LIBPREFIX}ioipsl -L${XIOS_LIBDIR} -l${LIBPREFIX}stdc++ -l${LIBPREFIX}xios"
405fi
406
407if [[ "$cosp" == "true" ]]
408then
409   CPP_KEY="$CPP_KEY CPP_COSP"
410   COSP_PATH="$LIBFGCM/cosp"
411#   LIB="${LIB} -l${LIBPREFIX}cosp"
412   opt_dep="$opt_dep cosp"
413   lcosp="-l${LIBPREFIX}cosp"
414   INCLUDE="$INCLUDE"' -I$(LIBF)/cosp'
415fi
416
417if [[ "$sisvat" == "true" ]]
418then
419   CPP_KEY="$CPP_KEY CPP_SISVAT"
420fi
421
422if [[ "$rrtm" == "true" ]]
423then
424   CPP_KEY="$CPP_KEY CPP_RRTM"
425fi
426
427
428INCLUDE="$INCLUDE ${NETCDF_INCDIR}"
429LIB="$LIB ${NETCDF_LIBDIR}"
430
431########################################################################
432# calcul du nombre de dimensions
433########################################################################
434
435
436dim_full=$dim
437dim=`echo $dim | sed -e 's/[^0-9]/ /g'` 
438set $dim
439dimc=$#
440echo calcul de la dimension
441echo dim $dim
442echo dimc $dimc
443
444
445########################################################################
446# Gestion des dimensions du modele.
447# on cree ou remplace le fichier des dimensions
448########################################################################
449
450cd $LIBFGCM/grid
451if [[ -f dimensions.h ]]
452then
453  echo 'ATTENTION: vous etes sans doute en train de compiler le modele par ailleurs'
454  echo "Attendez que la premiere compilation soit terminee pour relancer la suivante."
455  echo "Si vous etes sur que vous ne compilez pas le modele par ailleurs,"
456  echo  vous pouvez continuer en repondant oui.
457  echo "Voulez-vous vraiment continuer?"
458  echo ""
459  echo "WARNING: you are probably already compiling the model somewhere else."
460  echo "Wait until the first compilation is finished before launching this one."
461  echo "If you are sure that you are not compiling elsewhere, just answer "
462  echo "yes (or 'oui') to the question below to proceed."
463  echo "Do you wish to continue?"
464  read reponse
465  if [[ $reponse == "oui" || $reponse == "yes" ]]
466  then
467    \rm -f $LIBFGCM/grid/dimensions.h
468  else
469    exit
470  fi
471fi
472
473
474cd $LIBFGCM/grid/dimension
475./makdim $dim
476cat $LIBFGCM/grid/dimensions.h
477cd $LMDGCM
478
479
480########################################################################
481# Differentes dynamiques (3d, 2d, 1d)
482########################################################################
483
484if (( $dimc == 3 )) ; then
485   cd $LIBFGCM/grid
486   \rm fxyprim.h
487   cp -p fxy_${grille}.h fxyprim.h
488   filtre="FILTRE=$filtre"
489   INCLUDE="$INCLUDE "'-I$(LIBF)/dyn3d${FLAG_PARA} '
490elif (( $dimc == 2 )) ; then
491   filtre="FILTRE= L_FILTRE= "
492   INCLUDE="$INCLUDE "'-I$(LIBF)/dyn2d'
493elif (( $dimc == 1 )) ; then
494   filtre="L_DYN= DYN= FILTRE= L_FILTRE= DIRMAIN=phy$physique "
495   INCLUDE="$INCLUDE "'-I$(LIBF)/dyn3d' # Pas tres propre
496else
497   echo Dimension dimc=$dimc pas prevu ; exit
498fi
499
500######################################################################
501# Creation du suffixe de la configuration
502######################################################################
503
504SUFF_NAME=_${dim_full}
505SUFF_NAME=${SUFF_NAME}_phy${physique}
506
507if [[ "$parallel" != "none" ]]
508then
509  SUFF_NAME=${SUFF_NAME}_para
510  DYN=dyn${dimc}d${paramem}
511  if [[ "$paramem" == "mem" ]]
512  then
513   SUFF_NAME=${SUFF_NAME}_${paramem}
514  fi
515else
516  SUFF_NAME=${SUFF_NAME}_seq
517  DYN=dyn${dimc}d
518fi
519
520if [[ $veget != "false" ]]
521then
522  SUFF_NAME=${SUFF_NAME}_orch
523fi
524
525if [[ $couple != "false" ]]
526then
527  SUFF_NAME=${SUFF_NAME}_couple
528fi
529
530if [[ $chimie == "INCA" ]]
531then
532  SUFF_NAME=${SUFF_NAME}_inca
533fi
534
535cd $LMDGCM
536
537
538########################################################################
539#  Avant de lancer le make, on recree le makefile si necessaire
540########################################################################
541########################################################################
542# c'est a dire dans 3 cas:
543# 1. si la liste des fichiers .F et .h a ete modifiee depuis la
544#    derniere creation du makefile
545# 2. si le fichier contenant cette liste "liste_des_sources"
546#    n'existe pas.
547# 3. Si le makefile n'existe pas.
548########################################################################
549cd $LMDGCM
550
551find libf -name '*.[Fh]' -print > tmp77
552find libf -name '*.[Fh]' -exec egrep -i " *use *ioipsl" {} \; -print > tmp90
553find libf -name '*.F90' -print >> tmp90
554
555if [[ ! ( -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 ]]
556then
557  echo "les fichiers suivants ont ete crees ou detruits"
558  echo "ou les fichiers suivants sont passes ou ne sont plus en Fortran 90"
559  diff liste_des_sources_f77 tmp77
560  diff liste_des_sources_f90 tmp90
561  \cp -f tmp77 liste_des_sources_f77
562  \cp -f tmp90 liste_des_sources_f90
563  echo "on recree le makefile"
564  ./create_make_gcm > tmp
565  \mv -f tmp makefile
566  echo "Nouveau makefile cree"
567fi
568
569#################################################################
570# Preparation de l'execution de la comande make
571#################################################################
572
573source_code=${code}.F
574if [[ -r $LMDGCM/libf/dyn${dimc}d${FLAG_PARA}/${code}.F90 ]]
575then
576  source_code=${code}.F90
577fi
578
579# library directory name:
580nomlib=`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'`
581echo $nomlib
582
583if [[ ! -d "${LIBOGCM}/${nomlib}" ]]
584then
585  mkdir ${LIBOGCM}/${nomlib}
586  # check we indeed managed to create the directory
587  if [[ ! $? ]]
588  then
589    echo "Error: could not create directory ${LIBOGCM}/${nomlib}"
590    exit
591  fi
592fi
593
594# where module files are created
595mod_loc_dir=$localdir
596
597if [[ "$physique" != "nophys" ]]
598then
599  INCLUDE="$INCLUDE"' -I$(LIBF)/phy'"$physique"
600fi
601INCLUDE="$INCLUDE"' -I'${LIBOGCM}/${nomlib}
602
603# ranlib utility (check it exists or else default to ls)
604if [[ `which ranlib > /dev/null 2>&1 ; echo $?` -eq 0 ]]
605then
606  ranlib="ranlib"
607else
608  ranlib="ls"
609fi
610
611# add CPP keys to COMPIL_FLAGS
612# (but first add -D before all CPP_KEY items)
613cpp_definitions=`echo $CPP_KEY | sed -e 's/[A-Za-z_=0-9]*/-D&/g'`
614# (but add a -WF,-D before all CPP_KEY items) => for xlf on Vargas
615if [[ "${fcompiler:0:3}" == "xlf" ]]
616then
617cpp_definitions=`echo $CPP_KEY | sed -e 's/[A-Za-z_=0-9]*/-WF,-D&/g'`
618fi
619COMPIL_FFLAGS="${COMPIL_FFLAGS} ${cpp_definitions}"
620
621#################################################################
622# Execution du make
623#################################################################
624echo $makecommand RANLIB=$ranlib -f $LMDGCM/makefile \
625OPTION_DEP="$opt_dep" OPTION_LINK="$LIB ${PARA_LD}" \
626OPTIM90="${COMPIL_FFLAGS} ${PARA_FFLAGS}" \
627OPTIMTRU90="${COMPIL_FFLAGS} ${PARA_FFLAGS}" \
628OPTIM="${COMPIL_FFLAGS} ${PARA_FFLAGS}" \
629INCLUDE="$INCLUDE" \
630$filtre \
631LIBO=${LIBOGCM}/${nomlib} \
632"PHYS=$physique" \
633DIM=$dimc \
634FLAG_PARA=$FLAG_PARA \
635L_ADJNT=$adjnt \
636L_COSP="$lcosp" \
637L_CHIMIE="$libchimie" \
638LOCAL_DIR="$localdir"  \
639F77="$fcompiler" \
640F90="$fcompiler" \
641OPLINK="$LIB" \
642LINK="$linker" \
643GCM="$LMDGCM" \
644MOD_LOC_DIR=$mod_loc_dir \
645MOD_SUFFIX="mod" \
646AR=$arcommand \
647SOURCE=$source_code \
648PROG=$code
649
650$makecommand RANLIB=$ranlib -f $LMDGCM/makefile \
651OPTION_DEP="$opt_dep" OPTION_LINK="$LIB ${PARA_LD}" \
652OPTIM90="${COMPIL_FFLAGS} ${PARA_FFLAGS}" \
653OPTIMTRU90="${COMPIL_FFLAGS} ${PARA_FFLAGS}" \
654OPTIM="${COMPIL_FFLAGS} ${PARA_FFLAGS}" \
655INCLUDE="$INCLUDE" \
656$filtre \
657LIBO=${LIBOGCM}/${nomlib} \
658"PHYS=$physique" \
659DIM=$dimc \
660FLAG_PARA=$FLAG_PARA \
661L_ADJNT=$adjnt \
662L_COSP="$lcosp" \
663L_CHIMIE="$libchimie" \
664LOCAL_DIR="$localdir"  \
665F77="$fcompiler" \
666F90="$fcompiler" \
667OPLINK="$LIB" \
668LINK="$linker" \
669GCM="$LMDGCM" \
670MOD_LOC_DIR=$mod_loc_dir \
671MOD_SUFFIX="mod" \
672AR=$arcommand \
673SOURCE=$source_code \
674PROG=$code
675
676
677if [[ -r $LIBFGCM/grid/dimensions.h ]]
678then
679  # Cleanup: remove dimension.h file
680  \rm -f $LIBFGCM/grid/dimensions.h
681fi
Note: See TracBrowser for help on using the repository browser.