Changeset 2404 for BOL/script_install


Ignore:
Timestamp:
Dec 2, 2015, 4:28:21 PM (9 years ago)
Author:
fhourdin
Message:

Updated install.sh, for LMDZ 2015 tutorial session.
EM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BOL/script_install/install.sh

    r2203 r2404  
    4848
    4949version=trunk
    50 version=20141127.trunk
    5150version=testing
     51version=20151130.trunk
    5252
    5353compilo=gfortran # compilo=pgf90 or g95 or gfortran or ifort sur PC linux
     
    6969
    7070# choose the resolution for the bench runs
    71 # grid_resolution= 32x24x11 or 48x36x19 for tests (test without ORCHIDEE)
    72 #                  96x71x19  standard configuration
    73 grid_resolution=48x36x19
     71# grid_resolution= 32x24x11, 32x32x39 or 48x36x19 for tests
     72grid_resolution=32x32x39
    7473
    7574## compile_with_fcm=1 : use makelmdz_fcm, possible a of version 20111103.trunk (LMDZ5/trunk rev 1578)
    7675## compile_with_fcm=0 : use makelmdz
    7776compile_with_fcm=1
     77
     78
     79
     80if [ -d /u/lmdz/WWW/Distrib ] ; then
     81  dirget=/u/lmdz/WWW/Distrib
     82elif [ -d ~/LMDZ/Distrib ] ; then
     83  dirget=~/LMDZ/Distrib
     84else
     85  dirget=NONE
     86fi
     87wget='wget http://www.lmd.jussieu.fr/~lmdz/Distrib'
    7888
    7989
     
    133143elif [ $compilo = $gfortran ] ; then
    134144   OPTIM='-O3'
    135    OPTDEB="-g3 -Wall -fbounds-check -ffpe-trap=invalid,zero,overflow -O0 -fstack-protector-all"
     145   OPTDEB="-g3 -Wall -fbounds-check -ffpe-trap=invalid,zero,overflow -O0 -fstack-protector-all -finit-real=nan -fbacktrace"
    136146   OPTDEV="-Wall -fbounds-check"
    137147   fmod='I '
     
    143153elif [ $compilo = mpif90 ] ; then
    144154   OPTIM='-O3'
    145    OPTDEB="-g3 -Wall -fbounds-check -ffpe-trap=invalid,zero,overflow -O0 -fstack-protector-all"
     155   OPTDEB="-g3 -Wall -fbounds-check -ffpe-trap=invalid,zero,overflow -O0 -fstack-protector-all -finit-real=nan -fbacktrace"
    146156   OPTDEV="-Wall -fbounds-check"
    147157   BASE_LD="-lblas"
     
    235245
    236246
    237 for logiciel in csh wget tar gzip make $compilo gcc ; do
     247for logiciel in wget tar gzip make $compilo gcc ; do
    238248if [ "`which $logiciel`" = "" ] ; then
    239249echo You must first install $logiciel on your system
     
    262272echo '##########################################################'
    263273cd $MODEL
    264 wget http://www.lmd.jussieu.fr/~lmdz/DistribG95/modipsl.$version.tar.gz
    265 echo install.sh wget_OK `date`
    266 gunzip modipsl.$version.tar.gz
    267 tar xvf modipsl.$version.tar
    268 \rm modipsl.$version.tar
     274if [ -f $dirget/modipsl.$version.tar.gz ] ; then
     275   tar xvf $dirget/modipsl.$version.tar.gz
     276else
     277   $wget/modipsl.$version.tar.gz
     278   tar xvf modipsl.$version.tar.gz
     279   \rm modipsl.$version.tar.gz
     280fi
    269281
    270282# We download LMDZ and make some modifications to make it
     
    282294echo '##########################################################'
    283295cd $MODEL
    284 wget http://www.lmd.jussieu.fr/~lmdz/DistribG95/netcdf-4.0.1.tar.gz
    285 gunzip netcdf-4.0.1.tar.gz
    286 tar xvf netcdf-4.0.1.tar
    287 \rm -f netcdf-4.0.1.tar
     296if [ -f $dirget/netcdf-4.0.1.tar.gz ] ; then
     297   tar xvf $dirget/netcdf-4.0.1.tar.gz
     298else
     299   $wget/netcdf-4.0.1.tar.gz
     300   tar xvf netcdf-4.0.1.tar.gz
     301   \rm -f netcdf-4.0.1.tar.gz
     302fi
    288303
    289304cd netcdf-4.0.1
     
    500515##################################################################
    501516echo install.sh avant_compilation `date`
    502 if [ $compile_with_fcm = 1 ] ; then makelmdz="makelmdz_fcm -arch local" ; else makelmdz=makelmdz ; fi
     517if [ $compile_with_fcm = 1 ] ; then makelmdz="makelmdz_fcm -j 8 -arch local" ; else makelmdz=makelmdz ; fi
    503518
    504519./$makelmdz -d ${grid_resolution} -v $veget_version gcm
     
    529544bench=bench_lmdz_${grid_resolution}
    530545echo install.sh avant_chargement_bench  `date`
    531 wget http://www.lmd.jussieu.fr/~lmdz/DistribG95/$bench.tar.gz
    532 echo install.sh apres_chargement_bench  `date`
    533 gunzip $bench.tar.gz
    534 tar xvf $bench.tar
     546if [ -f $dirget/$bench.tar.gz ] ; then
     547   tar xvf $dirget/$bench.tar.gz
     548else
     549   $wget/$bench.tar.gz
     550   echo install.sh apres_chargement_bench  `date`
     551   tar xvf $bench.tar.gz
     552fi
    535553
    536554if [ -f gcm.e ] ; then
Note: See TracChangeset for help on using the changeset viewer.