source: trunk/LMDZ.COMMON/makelmdz @ 972

Last change on this file since 972 was 957, checked in by emillour, 12 years ago

Common dynamics:

  • Add possibility to read a traceur.def with a different format; ie: traceur.def file with lines such as "name hadv vadv" where hadv and vadv are advection scheme number , or even just "name" on each line (advections shceme then defaults to 10, the standard VanLeer? scheme)
  • Add the "-s" (number of radiatively active scatterres) and "-b" (number of bands in the IR and visible) options to scripts makelmdz and makelmdz_fcm. Using these options only makes sense if compiling with generic physics.

EM

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