source: BOL/script_install/install.sh @ 2045

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

Simplification

File size: 19.0 KB
RevLine 
[1588]1#!/bin/bash
2
3###########################################################################
[1708]4# Author : Frédéric Hourdin/LMD/hourdin@lmd.jussieu.fr
[1588]5# Usage  : install.sh
6#
[1708]7# bash installation script of the LMDZ model on a Linux PC.
8# the model is downloaded in the following direcory tree
[1588]9# $MODEL/modipsl/modeles/...
[1708]10# using the "modipsl" infrastructure created by the "IPSL"
11# for coupled (atmosphere/ocean/vegetation/chemistry) climate modeling
12# activities.
13# Here we only download atmospheric (LMDZ) and vegetation (ORCHIDEE)
14# components.
[1588]15#
[1708]16# The sources of the models can be found in the "modeles" directory.
17# In the present case, LMDZ5, ORCHIDEE and IOIPSL (handling of input-outputs
18# using the NetCDF library.
[1588]19#
[1708]20# The script downloads various source files (including a version of NetCDF)
21# and utilities, compiles the model, and runs a test simulation in a
22# munimal configuration.
[1588]23#
[1708]24# Prerequisites : g95/pgf90/gfortran, ksh, wget , gunzip, tar, ...
[1588]25#
[1589]26# Modif 18/11/2011
[1708]27#    changes for option real 8.
28#      We comopile with -r8 (or equivalent) and -DNC_DOUBLE for the GCM
29#      but with -r4 for netcdf. Variable real must be set to
30#      r4 or r8 at the beginning of the script below.
[1589]31#
[1588]32###########################################################################
33
[2030]34echo install.sh DEBUT `date`
[2031]35
[1911]36set -e
37
[1588]38echo '################################################################'
[1708]39echo  Choice of installation options
[1588]40echo '################################################################'
41
42
[1590]43#real=r4
[1589]44real=r8
45
[1708]46# WARNING !!!! For versions before october 2009, use
47# install.v2.sh instead of install.sh
[1588]48
[1800]49version=20130716.trunk
[1693]50version=testing
[2031]51compilo=gfortran # compilo=pgf90 or g95 or gfortran or ifort sur PC linux
[1693]52
[1588]53#Chemin pour placer le modele
54MODEL=./LMDZ$version
55
[2031]56
[1588]57getlmdzor=1
58netcdf=1   #  1 for automatic installation
59           #  0 for no installation
60           #  /.../../netcdf-4.0.1 if wanting to link with an already
61           #  compiled netcdf library (implies to check option compatibility)
62check_linux=1
63ioipsl=1
[1693]64veget=1
[1588]65bench=1
66pclinux=1
67
[2031]68# choose the resolution for the bench runs
69# grid_resolution= 32x24x11 or 48x36x19 for tests (test without ORCHIDEE)
70#                  96x71x19  standard configuration
71grid_resolution=48x36x19
[1693]72
[2031]73## compile_with_fcm=1 : use makelmdz_fcm, possible a of version 20111103.trunk (LMDZ5/trunk rev 1578)
74## compile_with_fcm=0 : use makelmdz
75compile_with_fcm=0
76
77
[1693]78#####################################################################
79# Test for old gfortran compilers
[2030]80# If the compiler is too old (older than 4.3.x) we test if the
81# temporary gfortran44 patch is available on the computer in which
82# case the compiler is changed from gfortran to gfortran44
83# Must be aware than parallelism can not be activated in this case
84#####################################################################
85
[1693]86if [ $compilo = gfortran ] ; then
[2030]87   gfortran=gfortran
[1693]88   gfortranv=`gfortran --version | \
89   head -1 | awk ' { print $NF } ' | awk -F. ' { print $1 * 10 + $2 } '`
90   if [ $gfortranv -le 43 ] ; then
[1708]91       echo ERROR : Your gfortran compiler is too old
[1693]92       echo 'Please choose a new one (g95, ifort) and change the line'
93       echo compilo=xxx
94       echo in the install.sh script and rerun it
[2030]95       if [ `which gfortran44 | wc -w` -ne 0 ] ; then
96          gfortran=gfortran44
97       else
98          echo gfotran trop vieux ; exit
99       fi
[1693]100   fi
[2030]101   compilo=$gfortran
[1693]102fi
103#####################################################################
104
105
106
[1589]107OPTPREC=""
[1588]108echo '################################################################'
109echo  Choix des options de compilation
110echo '################################################################'
[1589]111
[2031]112OPTIMNC=$OPTIM
113export FC=$compilo
114export F90=$compilo
115export F77=$compilo
116export CPPFLAGS=
117BASE_LD=
[1588]118if [ $compilo = g95 ] ; then
[2031]119# Set the appropriate compilation options
120   OPTIM='-i4 -O3'
121   OPTDEB="-g -O0 -Wall -ftrace=full -fbounds-check -freal=nan"
122   OPTDEV="-g -O1 -Wall"
123   fmod='fmod='
124   BASE_LD=""
[1589]125   if [ $real = r8 ] ; then OPTPREC="-r8 -DNC_DOUBLE" ; fi
[2031]126   export F90FLAGS=" -cpp -ffree-form $OPTIMNC"
127   export FFLAGS=" -cpp $OPTIMNC"
128   export CPPFLAGS=-Df2cFortran
129   export CC=gcc
130   export CXX=g++
[2030]131elif [ $compilo = $gfortran ] ; then
[2031]132   OPTIM='-O3'
133   OPTDEB="-g3 -Wall -fbounds-check -ffpe-trap=invalid,zero,overflow -O0 -fstack-protector-all"
134   OPTDEV="-Wall -fbounds-check"
135   fmod='I '
[1589]136   if [ $real = r8 ] ; then OPTPREC="-fdefault-real-8 -DNC_DOUBLE" ; fi
[2031]137   export F90FLAGS=" -ffree-form $OPTIMNC"
138   export FFLAGS=" $OPTIMNC"
139   export CC=gcc
140   export CXX=g++
141elif [ $compilo = mpif90 ] ; then
[1589]142   OPTIM='-O3'
[2031]143   OPTDEB="-g3 -Wall -fbounds-check -ffpe-trap=invalid,zero,overflow -O0 -fstack-protector-all"
144   OPTDEV="-Wall -fbounds-check"
145   BASE_LD="-lblas"
146   fmod='I '
147   if [ $real = r8 ] ; then OPTPREC="-fdefault-real-8 -DNC_DOUBLE -fcray-pointer" ; fi
148   export F90FLAGS=" -ffree-form $OPTIMNC"
149   export FFLAGS=" $OPTIMNC"
150   export CC=gcc
151   export CXX=g++
[1590]152elif [ $compilo = pgf90 ] ; then
[2031]153   OPTIM='-O2 -Munroll -Mnoframe -Mautoinline -Mcache_align'
154   fmod='module '
[1590]155   if [ $real = r8 ] ; then OPTPREC="-r8 -DNC_DOUBLE" ; fi
[2031]156   export CPPFLAGS="-DNDEBUG -DpgiFortran"
157   export CC=pgcc
158   export CFLAGS="-Msignextend"
159   export CXX=pgCC
160   export CXXFLAGS="-Msignextend"
161   export FFLAGS="$OPTIMNC"
162   export F90FLAGS="$OPTIMNC"
[1590]163   compile_with_fcm=1
[2031]164elif [ $compilo = ifort ] ; then
165   OPTIM="-O2 -fp-model strict -ip -align all "
166   OPTDEV="-p -g -O2 -traceback -fp-stack-check -ftrapuv -check"
167   OPTDEB="-g -no-ftz -traceback -ftrapuv -fp-stack-check -check"
168   fmod='module '
[1590]169   if [ $real = r8 ] ; then OPTPREC="-real-size 64 -DNC_DOUBLE" ; fi
[2031]170   export CPP="icc -E"
171   export FFLAGS="-O2 -ip -fpic -mcmodel=large"
172   export FCFLAGS="-O2 -ip -fpic -mcmodel=large"
173   export CC=icc
174   export CFLAGS="-O2 -ip -fpic -mcmodel=large"
175   export CXX=icpc
176   export CXXFLAGS="-O2 -ip -fpic -mcmodel=large"
[1590]177   compile_with_fcm=1
[2031]178else
179   echo unexpected compiler $compilo ; exit
[1588]180fi
[2031]181
[1589]182OPTIMGCM="$OPTIM $OPTPREC"
[1588]183
184hostname=`hostname`
185
186##########################################################################
[1731]187# If installing on know machines such as IBM x3750 (Ada)
[1708]188# at IDRIS, don't check for available software and don"t install netcdf
[1777]189if [ ${hostname:0:5} = ada33 ] ; then
[1731]190  netcdf=0 # no need to recompile netcdf, alreday available
191  check_linux=0
192  pclinux=0
193  ioipsl=0 # no need to recompile ioipsl, already available
194  #netcdf="/smplocal/pub/NetCDF/4.1.3"
195  compilo="ifort"
196  fmod='module '
197  if [ $real = r8 ] ; then OPTPREC="-real-size 64 -DNC_DOUBLE" ; fi
198  OPTIM="-O2 -fp-model strict -ip -axAVX,SSE4.2 -align all "
199  OPTIMGCM="$OPTIM $OPTPREC"
[1588]200fi
201##########################################################################
202
203
204mkdir -p $MODEL
205echo $MODEL
[1708]206MODEL=`( cd $MODEL ; pwd )` # to get absolute path, if necessary
[1588]207
208
209
[1708]210# Option -fendian=big is only to be used with ARPEGE1D.
211# The -r8 should probably be avoided if running on 32 bit machines
212# Option r8 is not mandatory and generates larger executables.
213# It is however mandatory if using ARPEGE1D
214# Better optimization options might be a better choice (e.g. -O3)
[1588]215
216
217echo '################################################################'
218if [ "$check_linux" = 1 ] ; then
[1708]219echo   Check if required software is available
[1588]220echo '################################################################'
221
222#### Ehouarn: test if ksh and/or bash are available
223use_shell="ksh" # default: use ksh
224if [ "`which ksh`" = "" ] ; then
[1708]225  echo "no ksh ... we will use bash"
[1588]226  use_shell="bash"
227  if [ "`which bash`" = "" ] ; then
[1708]228    echo "ksh (or bash) needed!! Install it!"
[1588]229  fi
230fi
231
232
233for logiciel in csh wget tar gzip make $compilo gcc ; do
234if [ "`which $logiciel`" = "" ] ; then
[1708]235echo You must first install $logiciel on your system
[1588]236exit
237fi
238done
239
240if [ $pclinux = 1 ] ; then
241cd $MODEL
[2030]242cat <<eod > tt.f90
[1588]243print*,'coucou'
244end
245eod
[1708]246$compilo tt.f90 -o a.out
[1588]247./a.out >| tt
248if [ "`cat tt | sed -e 's/ //g' `" != "coucou" ] ; then
[1708]249echo problem installing with compiler $compilo ; exit ; fi
[1588]250\rm tt a.out tt.f90
251fi
252fi
253
254###########################################################################
255if [ $getlmdzor = 1 ] ; then
256echo '##########################################################'
[1708]257echo  Download a slightly modified version of  LMDZ
[1588]258echo '##########################################################'
259cd $MODEL
260wget http://www.lmd.jussieu.fr/~lmdz/DistribG95/modipsl.$version.tar.gz
[2030]261echo install.sh wget_OK `date`
[1588]262gunzip modipsl.$version.tar.gz
263tar xvf modipsl.$version.tar
264\rm modipsl.$version.tar
265
[1708]266# We download LMDZ and make some modifications to make it
267#compatible with $compilo
268# and we use an old stable but robust and well tested version of ORCHIDEE
269# That version of ORCHIDEE can be obtained using
[1588]270# wget http://www.lmd.jussieu.fr/~lmdz/DistribG95/getlmdzor.x
271fi
272
273echo OK1
274
275if [ $netcdf = 1 ] ; then
276echo '##########################################################'
[1708]277echo Compiling the Netcdf library
[1588]278echo '##########################################################'
279cd $MODEL
280wget http://www.lmd.jussieu.fr/~lmdz/DistribG95/netcdf-4.0.1.tar.gz
281gunzip netcdf-4.0.1.tar.gz
282tar xvf netcdf-4.0.1.tar
283\rm -f netcdf-4.0.1.tar
284
285cd netcdf-4.0.1
286
[2030]287sed -e 's/gfortran/'$gfortran'/g' configure >| tmp ; mv -f tmp configure ; chmod +x configure
[1588]288localdir=`pwd -P`
289./configure --prefix=$localdir
[2030]290sed -e 's/gfortran/'$gfortran'/g' Makefile >| tmp ; mv -f tmp Makefile
[1588]291make check
292make install
[2030]293echo install.sh netcdf_OK `date`
[1731]294fi # of if [ $netcdf = 1 ]
[1588]295
[2030]296
[1800]297#=======================================================================================
[1588]298echo OK2 ioipsl=$ioipsl
299echo '##########################################################'
[1731]300echo 'Installing MODIPSL, the installation package manager for the '
301echo 'IPSL models and tools'
[1588]302echo '##########################################################'
303
304if [ $netcdf = 0 -o $netcdf = 1 ] ; then
305ncdfdir=$MODEL/netcdf-4.0.1
306else
307ncdfdir=$netcdf
308fi
309
310if [ $ioipsl = 1 ] ; then
[1731]311  cd $MODEL/modipsl
[2030]312  \rm -rf lib/*
[2031]313
[1731]314  cd util
[1588]315
[1731]316  cp AA_make.gdef AA_make.orig
[2031]317  F_C="$compilo -c " ; if [ "$compilo" = "$gfortran" -o "$compilo" = "mpif90" ] ; then F_C="$compilo -c -cpp " ; fi
[1731]318  sed -e 's/^\#.*.g95.*.\#.*.$/\#/' AA_make.gdef > tmp
[1800]319  sed -e "s:F_L = g95:F_L = $compilo:" -e "s:F_C = g95 -c:F_C = $F_C": \
[1731]320  -e 's/g95.*.w_w.*.(F_D)/g95      w_w = '"$OPTIMGCM"'/' \
321  -e 's:g95.*.NCDF_INC.*.$:g95      NCDF_INC= '"$ncdfdir"'/include:' \
322  -e 's:g95.*.NCDF_LIB.*.$:g95      NCDF_LIB= -L'"$ncdfdir"'/lib -lnetcdf:' \
323  -e "s:-fmod=:-$fmod:" -e 's/-fno-second-underscore//' \
324  -e 's:#-Q- g95      M_K = gmake:#-Q- g95      M_K = make:' \
325  tmp >| AA_make.gdef
[1588]326
327
[1731]328  if [ "$use_shell" = "ksh" ] ; then
329    if [ "$pclinux" = 1 ] ; then
330       ./ins_make -t g95 # We use lines for g95 even for the other compilers
331    fi
332  else # bash
333    sed -e s:/bin/ksh:/bin/bash:g ins_make > ins_make.bash
334    chmod u=rwx ins_make.bash
335    if [ "$pclinux" = 1 ] ; then
336    ./ins_make.bash -t g95 # We use lines for g95 even for the other compilers
337    else
338    ./ins_make.bash
339    fi
340  fi # of if [ "$use_shell" = "ksh" ]
341
[2031]342#=======================================================================================
[1731]343  echo '##########################################################'
344  echo 'Compiling IOIPSL, the interface library with Netcdf'
345  echo '##########################################################'
346
347  cd $MODEL/modipsl/modeles/IOIPSL/src
348  if [ "$use_shell" = "bash" ] ; then
349    cp Makefile Makefile.ksh
350    sed -e s:/bin/ksh:/bin/bash:g Makefile.ksh > Makefile
[1588]351  fi
352  if [ "$pclinux" = 1 ] ; then
[1731]353    # Build IOIPSL modules and library
[1800]354    if [ $compilo = g95 ] ; then
355       cp restcom.f90 restcom.f90.orig
356       sed -e 's:cmode=or(NF90_NOCLOBBER,NF90_64BIT_OFFSET):cmode=NF90_NOCLOBBER:' restcom.f90.orig > restcom.f90 
357    fi
[1731]358    make clean
359    make
[2031]360    if [ "$compilo" = "$gfortran" -o "$compilo" = "mpif90" ] ; then # copy module files to lib
[1731]361      cp -f *.mod ../../../lib
362    fi
363    # Build IOIPSL tools (ie: "rebuild", if present)
364    if [ -f $MODEL/modipsl/modeles/IOIPSL/tools/rebuild ] ; then
365      cd $MODEL/modipsl/modeles/IOIPSL/tools
366      # adapt Makefile & rebuild script if in bash
367      if [ "$use_shell" = "bash" ] ; then
368        cp Makefile Makefile.ksh
369        sed -e s:/bin/ksh:/bin/bash:g Makefile.ksh > Makefile
370        cp rebuild rebuild.ksh
371        sed -e 's:/bin/ksh:/bin/bash:g' \
372            -e 's:print -u2:echo:g' \
373            -e 's:print:echo:g' rebuild.ksh > rebuild
374      fi
375      make clean
376      make
377    fi
378  fi # of if [ "$pclinux" = 1 ]
[1588]379
[1731]380else # of if [ $ioipsl = 1 ]
[1777]381  if [ ${hostname:0:5} = ada33 ] ; then
[1731]382    cd $MODEL/modipsl
383    cd util
[1588]384
[1731]385    cp AA_make.gdef AA_make.orig
386    sed -e 's/^\#.*.g95.*.\#.*.$/\#/' AA_make.gdef > tmp
387    sed -e "s:F_L = g95:F_L = $compilo:" -e "s:F_C = g95 -c:F_C = $compilo -c": \
388    -e 's/g95.*.w_w.*.(F_D)/g95      w_w = '"$OPTIMGCM"'/' \
389    -e 's:g95.*.NCDF_INC.*.$:g95      NCDF_INC= -I/smplocal/pub/HDF5/1.8.9/seq/include -I/smplocal/pub/NetCDF/4.1.3/include:' \
390    -e 's:g95.*.NCDF_LIB.*.$:g95      NCDF_LIB= -L/smplocal/pub/NetCDF/4.1.3/lib -lnetcdff -lnetcdf:' \
391    -e "s:-fmod=:-$fmod:" -e 's/-fno-second-underscore//' \
392    -e 's:#-Q- g95      M_K = gmake:#-Q- g95      M_K = make:' \
393    tmp >| AA_make.gdef
394
395    ./ins_make -t g95 # We use lines for g95 even for the other compilers
396
397    # on Ada, IOIPSL is already installed in ~rpsl035/IOIPSL_PLUS
398    # so link it to current settings
399    cd $MODEL/modipsl/modeles/
400    \rm -r -f IOIPSL
401    ln -s ~rpsl035/IOIPSL_PLUS IOIPSL
402    cd ..
403    ln -s ~rpsl035/IOIPSL_PLUS/modipsl/bin/* bin/
404    ln -s ~rpsl035/IOIPSL_PLUS/modipsl/lib/* lib/
405
[1777]406  fi # of if [ ${hostname:0:5} = ada33 ]
[2030]407  echo install.sh ioipsl_OK `date`
[1731]408fi # of if [ $ioipsl = 1 ]
409
[2030]410
[1800]411#============================================================================
[1837]412veget_version=false
[1731]413if [ "$veget" = 1 ] ; then
414  echo '########################################################'
415  echo 'Compiling ORCHIDEE, the continental surfaces model '
416  echo '########################################################'
417  cd $MODEL/modipsl/modeles/ORCHIDEE
[1800]418  echo OKpwd ; pwd
419  if [ -d src_parallel ] ; then
420     liste_src="parallel parameters global stomate sechiba driver"
[1837]421     veget_version=orchidee2.0
[1800]422  else
423     # Obsolete, for ORCHIDEE_beton only
424     liste_src="parameters stomate sechiba "
425     # A trick to compile ORCHIDEE depending on if we are using real*4 or real*8
426     cd src_parameters ; \cp reqdprec.$real reqdprec.f90 ; cd ..
[1837]427     veget_version=orchidee1.9
[1800]428  fi
429  echo liste_strc $liste_src
[1731]430
[1800]431  for d in $liste_src ; do src_d=src_$d
432      echo src_d $src_d
433      echo ls ; ls
434      if [ ! -d $src_d ] ; then echo Problem orchidee : no $src_d ; exit ; fi
435      cd $src_d ; \rm -f *.mod make ; make clean
[2031]436      make ; if [ "$compilo" = "$gfortran" -o "$compilo" = "mpif90" ] ; then cp -f *.mod ../../../lib ; fi
[1800]437      cd ..
438  done
[2030]439  echo install.sh orchidee_OK `date`
[1731]440fi # of if [ "$veget" = 1 ]
[1588]441
[2030]442
[1800]443#============================================================================
[1588]444# Ehouarn: it may be directory LMDZ4 or LMDZ5 depending on tar file...
[1800]445if [ -d $MODEL/modipsl/modeles/LMDZ[45] ] ; then
[1588]446  echo '##########################################################'
[1800]447  echo 'Compiling LMDZ'
[1588]448  echo '##########################################################'
[1800]449  cd $MODEL/modipsl/modeles/LMDZ[45]
[1588]450else
[1800]451  echo "ERROR: No LMDZ4 (or LMDZ5) directory !!!"
452  exit
[1588]453fi
454
455###########################################################
[1708]456# For those who want to use fcm to compile via :
[1588]457#  makelmdz_fcm -arch local .....
458############################################################
459
[2031]460if [ "$pclinux" = "1" ] ; then
461
[1708]462# create local 'arch' files (if on Linux PC):
[1588]463cd arch
[1708]464# arch-local.path file
[1590]465echo "NETCDF_LIBDIR=\"-L${ncdfdir}/lib -lnetcdf\"" > arch-local.path
[2031]466echo OK3
[1590]467echo "NETCDF_INCDIR=-I${ncdfdir}/include" >> arch-local.path
[1588]468echo 'IOIPSL_INCDIR=$LMDGCM/../../lib' >> arch-local.path
469echo 'IOIPSL_LIBDIR=$LMDGCM/../../lib' >> arch-local.path
470echo 'ORCH_INCDIR=$LMDGCM/../../lib' >> arch-local.path
471echo 'ORCH_LIBDIR=$LMDGCM/../../lib' >> arch-local.path
[1708]472# arch-local.fcm file (adapted from arch-linux-32bit.fcm)
[2031]473
474if [ $real = r8 ] ; then FPP_DEF=NC_DOUBLE ; else FPP_DEF="" ; fi
475sed -e s:"%COMPILER        .*.$":"%COMPILER            $compilo":1 \
476    -e s:"%LINK            .*.$":"%LINK                $compilo":1 \
477    -e s:"%PROD_FFLAGS     .*.$":"%PROD_FFLAGS         $OPTIM":1 \
478    -e s:"%DEV_FFLAGS      .*.$":"%DEV_FFLAGS          $OPTDEV":1 \
479    -e s:"%DEBUG_FFLAGS    .*.$":"%DEBUG_FFLAGS        $OPTDEB":1 \
480    -e s:"%BASE_FFLAGS     .*.$":"%BASE_FFLAGS         $OPTPREC":1 \
481    arch-linux-32bit.fcm > arch-local.fcm
482
[1588]483cd ..
[1708]484### Adapt "bld.cfg" (add the shell):
[1588]485whereisthatshell=$(which ${use_shell})
486echo "bld::tool::SHELL   $whereisthatshell" >> bld.cfg
487
[1731]488fi # of if [ "$pclinux" = 1 ]
489
490
491cd $MODEL/modipsl/modeles/LMDZ?
492
[1588]493##################################################################
[1708]494# Compile LMDZ
[1588]495##################################################################
[2030]496echo install.sh avant_compilation `date`
[1800]497if [ $compile_with_fcm = 1 ] ; then makelmdz=makelmdz_fcm ; else makelmdz=makelmdz ; fi
[2031]498
499./$makelmdz -d ${grid_resolution} -v $veget_version gcm
[2030]500echo install.sh apres_compilation `date`
[1588]501
[2030]502
[1731]503if [ -f gcm.e ] || [ -f bin/gcm_${grid_resolution}_phylmd_seq_orch.e ] || [ -f bin/gcm_${grid_resolution}_phylmd_seq.e ] ; then
[1588]504echo '##########################################################'
[1731]505echo 'Compilation successfull !! '
[1588]506echo '##########################################################'
507else
[1731]508echo 'Compilation failed !!'
[1588]509exit
510fi
511
512##################################################################
[1708]513# Below, we run a benchmark test (if bench=0)
[1588]514##################################################################
515if [ $bench = 0 ] ; then
516                exit
517fi
518
519echo '##########################################################'
[1731]520echo ' Running a test run '
[1588]521echo '##########################################################'
522
[2030]523\rm -rf BENCH${grid_resolution}
[1588]524bench=bench_lmdz_${grid_resolution}
[2030]525echo install.sh avant_chargement_bench  `date`
[1588]526wget http://www.lmd.jussieu.fr/~lmdz/DistribG95/$bench.tar.gz
[2030]527echo install.sh apres_chargement_bench  `date`
[1588]528gunzip $bench.tar.gz
529tar xvf $bench.tar
530
531if [ -f gcm.e ] ; then 
532    cp gcm.e BENCH${grid_resolution}/
533elif [ -f bin/gcm_${grid_resolution}_phylmd_seq_orch.e ] ; then
534    cp bin/gcm_${grid_resolution}_phylmd_seq_orch.e  BENCH${grid_resolution}/gcm.e
535elif [ -f bin/gcm_${grid_resolution}_phylmd_seq.e ] ; then
536    cp bin/gcm_${grid_resolution}_phylmd_seq.e  BENCH${grid_resolution}/gcm.e
537else
538    echo "No gcm.e found"
539    exit
540fi
541
[2030]542
[1588]543cd BENCH${grid_resolution}
544./bench.sh > bench.out  2>&1
545
[2030]546
[1588]547echo '##########################################################'
[1708]548echo ' Bench results '
[1588]549echo '##########################################################'
550
551cat ./bench.out
[2030]552echo install.sh FIN_du_BENCH  `date`
[1588]553
554echo '##########################################################'
[1708]555echo 'Simulation finished in' `pwd`
556echo 'You may re-run it with : cd ' `pwd` ' ; gcm.e'
557echo 'or ./bench.sh'
[1588]558echo '##########################################################'
[2030]559
[2031]560if [ "$gfortran" = "gfortran44" ] ; then
[2030]561    echo Your gfortran compiler was too old so that the model was automatically
562    echo compiled with gfortran44 instead. It can not be used in parallel mode.
563    echo You can change the compiler at the begining of the install.sh
564    echo script and reinstall.
565fi
Note: See TracBrowser for help on using the repository browser.