source: BOL/script_install/install.sh @ 1590

Last change on this file since 1590 was 1590, checked in by Ehouarn Millour, 13 years ago

Added possibility to compile with ifort.
EM

File size: 19.1 KB
Line 
1#!/bin/bash
2
3###########################################################################
4# Auteur : Frédéric Hourdin/LMD/hourdin@lmd.jussieu.fr
5# Usage  : install.sh
6#
7# Script bash d'installation du modele LMDZ sur un ordinateur PC/Linux
8# en utilisant le compilateur g95.
9# Le modele est récupéré dans une arborescence
10# $MODEL/modipsl/modeles/...
11# en utilisant l'infrastructure "modipsl" mise au point à l'"IPSL" pour
12#les besoins de la modélisation couplée du climat
13#(atmosphere/ocean/vegetation/chimie)
14# On ne récupère ici que les composantes atmosphériques (LMDZ4)
15# et végétation (ORCHIDEE).
16#
17# Sous le répertoire "modeles", on trouve en fait les sources de différents
18# modèles. Ici, LMDZ4, ORCHIDEEet IOIPSL, ensemble de programmes
19# d'entrée/sortie faisant appel à la librairie netcdf.
20#
21# Le script récupères les différents jeux de sources (y compris une
22# version de netcdf) et utilitaires, compile le modèle, et lance une
23# simulation de test dans une configuration très légère sur
24# $MODEL/modipsl/modeles/LMDZ4/INI
25#
26# Pré-requis : g95/pgf90/gfortran, ksh, wget , gunzip, tar, ... (à compléter)
27#
28# Modif 18/11/2011
29#    changement pour l'option real 8.
30#      On compile avec -r8 (ou équivalent) et -DNC_DOUBLE pour le GCM
31#      mais avec -r4 netcdf. La variable real est initialisée à
32#      r4 ou r8 en début de script.
33#
34###########################################################################
35
36echo '################################################################'
37echo  Choix des options d installation
38echo '################################################################'
39
40
41#real=r4
42real=r8
43
44# ATTENTION !!!! Pour des versions anterieures a octobre 2009, utiliser
45# install.v2.sh au lieu de install.sh
46
47version=20110921.trunk
48#Chemin pour placer le modele
49MODEL=./LMDZ$version
50
51getlmdzor=1
52netcdf=1   #  1 for automatic installation
53           #  0 for no installation
54           #  /.../../netcdf-4.0.1 if wanting to link with an already
55           #  compiled netcdf library (implies to check option compatibility)
56check_linux=1
57ioipsl=1
58veget=0
59bench=1
60## compilo=pgf90 ou g95 ou gfortran ou ifort sur PC linux
61compilo=gfortran
62pclinux=1
63
64## compile_with_fcm=1 : utilise makelmdz_fcm, possible a partir de la version 20111103.trunk (LMDZ5/trunk rev 1578)
65## compile_with_fcm=0 : utilise makegcm (default)
66compile_with_fcm=0
67
68OPTPREC=""
69echo '################################################################'
70echo  Choix des options de compilation
71echo '################################################################'
72
73if [ $compilo = g95 ] ; then
74   if [ $real = r8 ] ; then OPTPREC="-r8 -DNC_DOUBLE" ; fi
75   OPTIM='-i4 -O3'
76elif [ $compilo = gfortran ] ; then
77   if [ $real = r8 ] ; then OPTPREC="-fdefault-real-8 -DNC_DOUBLE" ; fi
78   OPTIM='-O3'
79elif [ $compilo = pgf90 ] ; then
80   if [ $real = r8 ] ; then OPTPREC="-r8 -DNC_DOUBLE" ; fi
81   OPTIM='-O2 -Munroll -Mnoframe -Mautoinline -Mcache_align'
82   # with pgf90, compile with fcm
83   compile_with_fcm=1
84else 
85   # ifort
86   if [ $real = r8 ] ; then OPTPREC="-real-size 64 -DNC_DOUBLE" ; fi
87   OPTIM="-O2 -ip -mkl=sequential -align all -static "
88   # with ifort, compile with fcm
89   compile_with_fcm=1
90fi
91OPTIMGCM="$OPTIM $OPTPREC"
92
93# choix de la resolution pour le bench
94# grid_resolution= 32x24x11 for test (test without ORCHIDEE)
95#                  96x71x19  standard configuration
96grid_resolution=48x36x19
97
98hostname=`hostname`
99
100##########################################################################
101# Dans le cas où on installe sur des machines connues comme la NEC
102# brodie
103# de l'IDRIS, on ne verifie pas les logiciels existants et on n'installe
104# pas netcdf.
105if [ $hostname = brodie ] ; then
106netcdf=0
107check_linux=0
108pclinux=0
109fi
110##########################################################################
111
112
113mkdir -p $MODEL
114echo $MODEL
115MODEL=`( cd $MODEL ; pwd )` # transformation en chemin absolu si necessaire
116
117
118
119# Le -fendian=big n'est à utiliser vraiment utile que pour ARPEGE1D.
120# Le -r8 doit sans doute être éviter si on veut tourner rapidement sur
121# des machines 32 bits.
122# L'option r8 n'est pas forcement indispensable et elle produit
123# des executables plus gros.
124# Elles est indispensable cependant pour ARPEGE1D
125# On doit pouvoir aussi utiliser des optimisations plus fortes (-O3 par
126# exemple).
127
128
129echo '################################################################'
130if [ "$check_linux" = 1 ] ; then
131echo   Test sur les logiciels requis
132echo '################################################################'
133
134#### Ehouarn: test if ksh and/or bash are available
135use_shell="ksh" # default: use ksh
136if [ "`which ksh`" = "" ] ; then
137  echo "pas de ksh ... on va utiliser bash"
138  use_shell="bash"
139  if [ "`which bash`" = "" ] ; then
140    echo "Il faut d\'abord installer ksh (ou bash)"
141  fi
142fi
143
144
145for logiciel in csh wget tar gzip make $compilo gcc ; do
146if [ "`which $logiciel`" = "" ] ; then
147echo Il faut installer d\'abord $logiciel
148exit
149fi
150done
151
152if [ $pclinux = 1 ] ; then
153cd $MODEL
154cat <<eod> tt.f90
155print*,'coucou'
156end
157eod
158$compilo tt.f90
159./a.out >| tt
160if [ "`cat tt | sed -e 's/ //g' `" != "coucou" ] ; then
161echo probleme avec installation de $compilo ; exit ; fi
162\rm tt a.out tt.f90
163fi
164fi
165
166###########################################################################
167
168
169
170if [ $getlmdzor = 1 ] ; then
171echo '##########################################################'
172echo  On recupere une version un peu modifiee de LMDZ
173echo '##########################################################'
174cd $MODEL
175wget http://www.lmd.jussieu.fr/~lmdz/DistribG95/modipsl.$version.tar.gz
176gunzip modipsl.$version.tar.gz
177tar xvf modipsl.$version.tar
178\rm modipsl.$version.tar
179
180# On recupere en fait une version du 01 10 2006 obtenue
181# Par un cvs get
182# Puis modifiees pour etre compatible avec la compilation $compilo.
183# et pour betoner ORCHIDEE
184# Cette version est recuperable avec le script
185# wget http://www.lmd.jussieu.fr/~lmdz/DistribG95/getlmdzor.x
186fi
187
188echo OK1
189
190if [ $netcdf = 1 ] ; then
191echo '##########################################################'
192echo Compilation de netcdf
193echo '##########################################################'
194cd $MODEL
195wget http://www.lmd.jussieu.fr/~lmdz/DistribG95/netcdf-4.0.1.tar.gz
196gunzip netcdf-4.0.1.tar.gz
197tar xvf netcdf-4.0.1.tar
198\rm -f netcdf-4.0.1.tar
199
200cd netcdf-4.0.1
201
202OPTIMNC=$OPTIM
203if [ $compilo = g95 ] ; then
204# On modifie les options de compilation
205   export FC=g95
206   export F90=g95
207   export F90FLAGS=" -cpp -ffree-form $OPTIMNC"
208   export FFLAGS=" -cpp $OPTIMNC"
209   export CPPFLAGS=-Df2cFortran
210   export CC=gcc
211   export CXX=g++
212elif [ $compilo = gfortran ] ; then
213   export FC=gfortran
214   export F90=gfortran
215   export F90FLAGS=" -ffree-form $OPTIMNC"
216   export FFLAGS=" $OPTIMNC"
217   export CPPFLAGS=
218   export CC=gcc
219   export CXX=g++
220elif [ $compilo = pgf90 ] ; then
221   export CPPFLAGS="-DNDEBUG -DpgiFortran"
222   export CC=pgcc
223   export CFLAGS="-Msignextend"
224   export CXX=pgCC
225   export CXXFLAGS="-Msignextend"
226   export FC=pgf90
227   export FFLAGS="$OPTIMNC"
228   export F90=pgf90
229   export F90FLAGS="$OPTIMNC"
230elif [ $compilo = ifort ] ; then
231   export CPP="icc -E"
232   export F77=ifort
233   export FFLAGS="-O2 -ip -fpic -mcmodel=large"
234   export F90=ifort
235   export FCFLAGS="-O2 -ip -fpic -mcmodel=large"
236   export CC=icc
237   export CFLAGS="-O2 -ip -fpic -mcmodel=large"
238   export CXX=icpc
239   export CXXFLAGS="-O2 -ip -fpic -mcmodel=large"
240else
241   echo Le compilateur $compilo pas prevu ; exit
242fi
243## end of if [ $netcdf = 1 ]
244cd src
245
246### Correction d'un petit probleme de netcdf
247##sed -e '83s/^$/\#define f2cFortran/' cfortran.h >| tmp ; \mv tmp cfortran.h
248
249# Compilation
250# Modif du 6 juillet 2009. Plantage quand on essaie de compiler netcdf avec
251# gcc plutôt que c++
252##sed -e 's/ c++/ gcc/g' configure >| tmp ; mv -f tmp configure ; chmod +x configure
253localdir=`pwd -P`
254./configure --prefix=$localdir
255make check
256make install
257fi
258
259echo OK2 ioipsl=$ioipsl
260echo '##########################################################'
261echo Installation de MODIPSL, la procedure d\'installation des
262echo modeles de l\'IPSL
263echo '##########################################################'
264
265if [ $netcdf = 0 -o $netcdf = 1 ] ; then
266ncdfdir=$MODEL/netcdf-4.0.1
267else
268ncdfdir=$netcdf
269fi
270
271if [ $ioipsl = 1 ] ; then
272cd $MODEL/modipsl
273\rm -r lib/*
274
275cd util
276
277if [ $compilo = pgf90 ] ; then 
278  fmod='module '
279elif [ $compilo = g95 ] ; then
280  fmod='fmod='
281elif [ $compilo = ifort ] ; then
282  fmod='module '
283else # gfortran
284  fmod='I '
285fi
286cp AA_make.gdef AA_make.orig
287sed -e 's/^\#.*.g95.*.\#.*.$/\#/' AA_make.gdef > tmp
288sed -e "s:F_L = g95:F_L = $compilo:" -e "s:F_C = g95 -c:F_C = $compilo -c": \
289-e 's/g95.*.w_w.*.(F_D)/g95      w_w = '"$OPTIMGCM"'/' \
290-e 's:g95.*.NCDF_INC.*.$:g95      NCDF_INC='"$ncdfdir"'/include:' \
291-e 's:g95.*.NCDF_LIB.*.$:g95      NCDF_LIB='"$ncdfdir"'/lib:' \
292-e "s:-fmod=:-$fmod:" -e 's/-fno-second-underscore//' \
293-e 's:#-Q- g95      M_K = gmake:#-Q- g95      M_K = make:' \
294tmp >| AA_make.gdef
295
296
297if [ "$use_shell" = "ksh" ] ; then
298  if [ "$pclinux" = 1 ] ; then
299     ./ins_make -t g95 # On utilise les lignes g95 meme pour les autres compilo
300  fi
301else # bash
302  sed -e s:/bin/ksh:/bin/bash:g ins_make > ins_make.bash
303  chmod u=rwx ins_make.bash
304  if [ "$pclinux" = 1 ] ; then
305  ./ins_make.bash -t g95 # On utilise les lignes g95 meme pour les autres compilo
306  else
307  ./ins_make.bash
308  fi
309fi
310
311echo '##########################################################'
312echo Compilation de IOIPSL, bibliotheque d\'interface avec Netcd
313echo '##########################################################'
314
315cd $MODEL/modipsl/modeles/IOIPSL/src
316if [ "$use_shell" = "bash" ] ; then
317  cp Makefile Makefile.ksh
318  sed -e s:/bin/ksh:/bin/bash:g Makefile.ksh > Makefile
319fi
320if [ "$pclinux" = 1 ] ; then
321  make clean
322  make
323  if [ $compilo = gfortran ] ; then # copy module files to lib
324    cp -f *.mod ../../../lib
325  fi
326else
327  # we're on brodie
328  sxgmake clean
329  sxgmake
330fi
331
332if [ "$veget" = 1 ] ; then
333echo '########################################################'
334echo Compilation de ORCHIDEE, modele des surface continentales
335echo '########################################################'
336cd $MODEL/modipsl/modeles/ORCHIDEE
337cd src_parameters
338# Une petite astuce pour ORCHIDEE suivant qu'on est en real*4 ou real*8
339
340
341\cp reqdprec.$real reqdprec.f90
342make
343if [ $compilo = gfortran ] ; then # copy module files to lib
344  cp -f *.mod ../../../lib
345fi
346cd ../src_stomate
347make
348if [ $compilo = gfortran ] ; then # copy module files to lib
349  cp -f *.mod ../../../lib
350fi
351cd ../src_sechiba
352make
353if [ $compilo = gfortran ] ; then # copy module files to lib
354  cp -f *.mod ../../../lib
355fi
356fi
357fi
358
359
360# Ehouarn: it may be directory LMDZ4 or LMDZ5 depending on tar file...
361if [[ -d $MODEL/modipsl/modeles/LMDZ4 ]] ; then
362  echo '##########################################################'
363  echo 'Compilation de LMDZ4'
364  echo '##########################################################'
365  cd $MODEL/modipsl/modeles/LMDZ4
366else
367  if [[ -d $MODEL/modipsl/modeles/LMDZ5 ]] ; then
368    echo '##########################################################'
369    echo 'Compilation de LMDZ5'
370    echo '##########################################################'
371    cd $MODEL/modipsl/modeles/LMDZ5
372  else
373    echo "ERROR: No LMDZ4 (or LMDZ5) directory !!!"
374    exit
375  fi
376fi
377
378if [ "$pclinux" = 1 ] ; then
379  if [ $compilo = gfortran ] ; then
380sed \
381-e 's:\#setenv NCDFINC.*.$:setenv NCDFINC '"$ncdfdir"'/include:' \
382-e 's:\#setenv NCDFLIB.*.$:setenv NCDFLIB '"$ncdfdir"'/lib:' \
383-e 's:setenv NCDFINC.*.$:setenv NCDFINC '"$ncdfdir"'/include:' \
384-e 's:setenv NCDFLIB.*.$:setenv NCDFLIB '"$ncdfdir"'/lib:' \
385-e 's/set FC_LINUX.*.$/set FC_LINUX='$compilo'/' \
386-e 's/g95/gfortran/g' \
387-e 's/-fmod=/-I/g' \
388-e 's/-fno-second-underscore//' -e 's/-fstatic//' \
389-e 's/-lparallel//' \
390-e 's/-lorglob//' \
391-e 's/-ffixed-form//' -e 's/-ffree-form//' \
392-e 's/set OPT_LINUX.*.$/set OPT_LINUX=\"'"$OPTIMGCM"\"'/' makegcm.orig >| makegcm
393  elif [ $compilo = ifort ] ; then
394sed \
395-e 's:\#setenv NCDFINC.*.$:setenv NCDFINC '"$ncdfdir"'/include:' \
396-e 's:\#setenv NCDFLIB.*.$:setenv NCDFLIB '"$ncdfdir"'/lib:' \
397-e 's:setenv NCDFINC.*.$:setenv NCDFINC '"$ncdfdir"'/include:' \
398-e 's:setenv NCDFLIB.*.$:setenv NCDFLIB '"$ncdfdir"'/lib:' \
399-e 's/set FC_LINUX.*.$/set FC_LINUX='$compilo'/' \
400-e 's/g95/ifort/g' \
401-e 's/-fmod=/-module /g' \
402-e 's/-fno-second-underscore//' -e 's/-fstatic//' \
403-e 's/-lparallel//' \
404-e 's/-lorglob//' \
405-e 's/-ffixed-form//' -e 's/-ffree-form//' \
406-e 's/set OPT_LINUX.*.$/set OPT_LINUX=\"'"$OPTIMGCM"\"'/' makegcm.orig >| makegcm
407  else # g95 or pgf90
408sed \
409-e 's:\#setenv NCDFINC.*.$:setenv NCDFINC '"$ncdfdir"'/include:' \
410-e 's:\#setenv NCDFLIB.*.$:setenv NCDFLIB '"$ncdfdir"'/lib:' \
411-e 's:setenv NCDFINC.*.$:setenv NCDFINC '"$ncdfdir"'/include:' \
412-e 's:setenv NCDFLIB.*.$:setenv NCDFLIB '"$ncdfdir"'/lib:' \
413-e 's/set FC_LINUX.*.$/set FC_LINUX='$compilo'/' \
414-e 's/-fno-second-underscore//' -e 's/-fstatic//' \
415-e 's/-lparallel//' \
416-e 's/-lorglob//' \
417-e 's/-ffixed-form//' -e 's/-ffree-form//' \
418-e 's/set OPT_LINUX.*.$/set OPT_LINUX=\"'"$OPTIMGCM"\"'/' makegcm.orig >| makegcm
419  fi
420else
421sed \
422-e 's/-lparallel//' \
423-e 's/-lorglob//' \
424-e 's/-lsxorglob//' \
425-e 's/-lsxparallel//' \
426-e 's/-lsxioipsl/-lioipsl/g' \
427makegcm.orig >| makegcm
428fi
429
430chmod +x makegcm
431
432###########################################################
433# Pour ceux qui voudraient utiliser fcm et pouvoir faire :
434#  makelmdz_fcm -arch local .....
435############################################################
436
437if [ "$pclinux" = 1 ] ; then
438# creation de fichiers 'arch' locaux (si sur PC Linx):
439cd arch
440# fichier arch-local.path
441echo "NETCDF_LIBDIR=\"-L${ncdfdir}/lib -lnetcdf\"" > arch-local.path
442echo "NETCDF_INCDIR=-I${ncdfdir}/include" >> arch-local.path
443echo 'IOIPSL_INCDIR=$LMDGCM/../../lib' >> arch-local.path
444echo 'IOIPSL_LIBDIR=$LMDGCM/../../lib' >> arch-local.path
445echo 'ORCH_INCDIR=$LMDGCM/../../lib' >> arch-local.path
446echo 'ORCH_LIBDIR=$LMDGCM/../../lib' >> arch-local.path
447# fichier arch-local.fcm (adaptation de arch-linux-32bit.fcm)
448if [ $compilo = g95 ] ; then
449sed -e s:"%COMPILER            pgf95":"%COMPILER            g95":1 \
450    -e s:"%LINK                pgf95":"%LINK                g95":1 \
451    -e s:"%PROD_FFLAGS         -fast":"%PROD_FFLAGS         $OPTIM":1 \
452    -e s:"%BASE_FFLAGS         ":"%BASE_FFLAGS         $OPTPREC":1 \
453   arch-linux-32bit.fcm > arch-local.fcm
454   if [ $real = r8 ] ; then
455     sed -e s:"%FPP_DEF             ":"%FPP_DEF             NC_DOUBLE":1 \
456     arch-local.fcm > arch-local.fcm.new
457     mv -f arch-local.fcm.new arch-local.fcm
458   fi
459elif [ $compilo = gfortran ] ; then
460sed -e s:"%COMPILER            pgf95":"%COMPILER            gfortran":1 \
461    -e s:"%LINK                pgf95":"%LINK                gfortran":1 \
462    -e s:"%PROD_FFLAGS         -fast":"%PROD_FFLAGS         $OPTIM":1 \
463    -e s:"%BASE_FFLAGS         ":"%BASE_FFLAGS         $OPTPREC":1 \
464   arch-linux-32bit.fcm > arch-local.fcm
465   if [ $real = r8 ] ; then
466     sed -e s:"%FPP_DEF             ":"%FPP_DEF             NC_DOUBLE":1 \
467     arch-local.fcm > arch-local.fcm.new
468     mv -f arch-local.fcm.new arch-local.fcm
469   fi
470elif [ $compilo = pgf90 ] ; then
471sed -e s:"-Wl,-Bstatic -L/usr/lib/gcc-lib/i386-linux/2.95.2":" ":1 \
472    -e s:"%PROD_FFLAGS         -fast":"%PROD_FFLAGS         $OPTIM":1 \
473    -e s:"%BASE_FFLAGS         ":"%BASE_FFLAGS         $OPTPREC":1 \
474   arch-linux-32bit.fcm > arch-local.fcm
475   if [ $real = r8 ] ; then
476     sed -e s:"%FPP_DEF             ":"%FPP_DEF             NC_DOUBLE":1 \
477     arch-local.fcm > arch-local.fcm.new
478     mv -f arch-local.fcm.new arch-local.fcm
479   fi
480elif [ $compilo = ifort ] ; then
481sed -e s:"%COMPILER            pgf95":"%COMPILER            ifort":1 \
482    -e s:"%LINK                pgf95":"%LINK                ifort":1 \
483    -e s:"-Wl,-Bstatic -L/usr/lib/gcc-lib/i386-linux/2.95.2":" ":1 \
484    -e s:"%PROD_FFLAGS         -fast":"%PROD_FFLAGS         $OPTIM":1 \
485    -e s:"%BASE_FFLAGS         ":"%BASE_FFLAGS         $OPTPREC":1 \
486    -e s:"%DEBUG_FFLAGS        -g -O0 -Kieee -Ktrap=fp -Mbounds":"%DEBUG_FFLAGS        -g -no-ftz -traceback -ftrapuv -fp-stack-check -check":1 \
487   arch-linux-32bit.fcm > arch-local.fcm
488   if [ $real = r8 ] ; then
489     sed -e s:"%FPP_DEF             ":"%FPP_DEF             NC_DOUBLE":1 \
490     arch-local.fcm > arch-local.fcm.new
491     mv -f arch-local.fcm.new arch-local.fcm
492   fi
493else
494   echo Le compilateur $compilo pas prevu ; exit
495fi # of if [ $compilo = g95 ] elif [ $compilo = pgf90 ]
496cd ..
497### Adaptation de "bld.cfg" (ajout du shell):
498whereisthatshell=$(which ${use_shell})
499echo "bld::tool::SHELL   $whereisthatshell" >> bld.cfg
500
501### Modification de makelmdz_fcm pour utilisation de ORCHIDEE dans cette bench:
502### on enleve liborglob.a et libparallel.a
503cp makelmdz_fcm makelmdz_fcm.orig
504sed -e "s/-l\${LIBPREFIX}parallel//" \
505sed -e "s/-l\${LIBPREFIX}orglob//" \
506    makelmdz_fcm.orig > makelmdz_fcm
507
508fi # of if [ "$pclinux" = 1 ]
509
510##################################################################
511# Lance compilation de LMDZ
512##################################################################
513ok_veget=false
514if [ "$veget" = 1 ] ; then ok_veget = true; fi
515if [ $compile_with_fcm = 1 ] ; then
516# Compilation avec makelmdz_fcm
517        ./makelmdz_fcm -d ${grid_resolution} -arch local -v $ok_veget gcm
518else
519# Compilation avec makegcm:
520#       3 times! because some dependecies are not well resolved with makegcm
521        ./makegcm -d ${grid_resolution} -v $ok_veget gcm
522        ./makegcm -d ${grid_resolution} -v $ok_veget gcm
523        ./makegcm -d ${grid_resolution} -v $ok_veget gcm
524fi
525
526if [ -f gcm.e ] || [ -f bin/gcm_${grid_resolution}_phylmd_seq_orch.e ] || [ -f bin/gcm_${grid_resolution}_phylmd_seq.e ]  ; then
527echo '##########################################################'
528echo Compilation reussie
529echo '##########################################################'
530else
531echo Probleme de compilation
532exit
533fi
534
535##################################################################
536# Ci dessous le lancement eventuel d'un cas test (si bench=0)
537##################################################################
538if [ $bench = 0 ] ; then
539                exit
540fi
541
542echo '##########################################################'
543echo Lancement d\'une simulation de test
544echo '##########################################################'
545
546\rm -r BENCH${grid_resolution}
547bench=bench_lmdz_${grid_resolution}
548wget http://www.lmd.jussieu.fr/~lmdz/DistribG95/$bench.tar.gz
549gunzip $bench.tar.gz
550tar xvf $bench.tar
551
552if [ -f gcm.e ] ; then 
553    cp gcm.e BENCH${grid_resolution}/
554elif [ -f bin/gcm_${grid_resolution}_phylmd_seq_orch.e ] ; then
555    cp bin/gcm_${grid_resolution}_phylmd_seq_orch.e  BENCH${grid_resolution}/gcm.e
556elif [ -f bin/gcm_${grid_resolution}_phylmd_seq.e ] ; then
557    cp bin/gcm_${grid_resolution}_phylmd_seq.e  BENCH${grid_resolution}/gcm.e
558else
559    echo "No gcm.e found"
560    exit
561fi
562
563if [ $hostname = brodie ] ; then
564echo POUR LANCER LE BENCH, IL FAUT SE LOGUER SUR BRODIE01
565echo puis aller sur `pwd`/BENCH${grid_resolution}
566echo et lancer le gcm
567exit
568fi
569
570cd BENCH${grid_resolution}
571./bench.sh > bench.out  2>&1
572
573echo '##########################################################'
574echo ' Resultat du bench '
575echo '##########################################################'
576
577cat ./bench.out
578
579echo '##########################################################'
580echo 'La simulation test est terminee sur' `pwd`
581echo 'vous pouvez la relancer : cd ' `pwd` ' ; gcm.e'
582echo 'ou ./bench.sh'
583echo '##########################################################'
584
Note: See TracBrowser for help on using the repository browser.