source: LMDZ5/trunk/makelmdz @ 1972

Last change on this file since 1972 was 1964, checked in by fhourdin, 11 years ago

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