Changeset 3375 for BOL/script_install


Ignore:
Timestamp:
Jul 18, 2018, 11:33:58 AM (6 years ago)
Author:
fhourdin
Message:

Commit recent updates in the install_lmdz.sh script

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BOL/script_install/install_lmdz.sh

    r3093 r3375  
    4848    \cp -f -p ~/LMDZ/pub/$1 .
    4949  else
    50     wget http://www.lmd.jussieu.fr/~lmdz/pub/$1
     50    wget -nv http://www.lmd.jussieu.fr/~lmdz/pub/$1
    5151    #dir=~/LMDZ/pub/`dirname $1` ; mkdir -p $dir ; cp -r `basename $1` $dir
    5252  fi
     
    7373ioipsl=1
    7474veget=1
     75orchidee_rev=""  # ORCHIDEE revision (empty means use the provided version)
    7576bench=1
    7677pclinux=1
     78pcmac=0 # default: not on a Mac
    7779compiler=gfortran
    7880SCM=0
     
    9597with_xios="n"
    9698opt_makelmdz_xios=""
     99## compile_with_fcm=1 : use makelmdz_fcm (1) or makelmdz (0)
     100compile_with_fcm=1
     101cosp=0 ; opt_cosp=""
     102
     103# Check if on a Mac
     104if [ `uname` = "Darwin" ]
     105then
     106    pcmac=1
     107    export MAKE=make
     108fi
     109#echo "pcmac="$pcmac
    97110
    98111#########################################################################
     
    133146
    134147    -gprof     to compile with -pg to enable profiling with gprof
     148
     149    -orchidee_rev "svn_release" : upgrade included ORCHIDEE model to
     150               given svn release number (ORCHIDEE svn password required!)
     151               (only valid for orchidee2.0 and later)
     152
     153    -cosp      to compile with cosp
     154
     155    -nofcm     to compile without fcm
    135156
    136157    -SCM        install 1D version automatically
     
    148169     "-d") grid_resolution=$2 ; shift ; shift ;;
    149170     "-gprof") OPT_GPROF="-pg" ; shift ;;
     171     "-cosp") cosp=1 ; opt_cosp="-cosp true" ; shift ;;
     172     "-orchidee_rev") orchidee_rev=$2 ; shift ; shift ;;
     173     "-nofcm") compile_with_fcm=0 ; shift ;;
    150174     "-SCM") SCM=1 ; shift ;;
    151175     "-opt_makelmdz") OPT_MAKELMDZ="$2" ; shift ; shift ;;
     
    169193
    170194
    171 ## compile_with_fcm=1 : use makelmdz_fcm (1) or makelmdz (0)
    172 compile_with_fcm=1
    173195arch=local
    174196
     
    189211            o_ins_make="-t ada" ;
    190212            make=gmake ;
    191 #            module load intel/2013.0 ;
     213            module load intel/2013.0 ;
    192214            arch=X64_ADA ;;
    193215
    194    cicla)   compiler="gfortran" ;
     216   cicla|camel)   compiler="gfortran" ;
    195217            if [ $parallel != none ] ; then
    196               module load openmpi/1.4.5-gfortran ;
     218              module load openmpi/1.6.5-gfortran ;
    197219              root_mpi=$MPI_HOME ;
    198220              path_mpi=$root_mpi/bin ;
     
    212234                fi
    213235            # For Scientifique Linux with gfortran at LMD :
    214             elif [ -f /usr/lib64/openmpi/1.4.5-gfortran/bin/mpif90 -a compiler = "gfortran" ] ; then
     236            elif [ -f /usr/lib64/openmpi/1.4.5-gfortran/bin/mpif90 -a $compiler = "gfortran" ] ; then
    215237                path_mpi=/usr/lib64/openmpi/1.4.5-gfortran/bin ;
    216238                root_mpi=/usr/lib64/openmpi/1.4.5-gfortran ;
    217239                export LD_LIBRARY_PATH=${root_mpi}/lib:$LD_LIBRARY_PATH
    218240            # For Scientifique Linux with ifort at LMD :
    219             elif [ -f /usr/lib64/openmpi/1.4.5-ifort/bin/mpif90 -a compiler = "ifort" ] ; then
     241            elif [ -f /usr/lib64/openmpi/1.4.5-ifort/bin/mpif90 -a $compiler = "ifort" ] ; then
    220242                path_mpi=/usr/lib64/openmpi/1.4.5-ifort/bin ;
    221243                root_mpi=/usr/lib64/openmpi/1.4.5-ifort ;
    222244                export LD_LIBRARY_PATH=${root_mpi}/lib:$LD_LIBRARY_PATH
    223245            # For Scientifique Linux with pgf90 at LMD :
    224             elif [ -f /usr/lib64/openmpi/1.4.5-ifort/bin/mpif90 -a compiler = "pgf90" ] ; then
     246            elif [ -f /usr/lib64/openmpi/1.4.5-ifort/bin/mpif90 -a $compiler = "pgf90" ] ; then
    225247                path_mpi=/usr/lib64/openmpi/1.4.5-pgf/bin ;
    226248                root_mpi=/usr/lib64/openmpi/1.4.5-pgf ;
     
    363385   export CXX=icpc
    364386   export CXXFLAGS="-O2 -ip -fpic -mcmodel=large"
     387   export fpp_flags="-P -traditional"
    365388   compile_with_fcm=1
    366389
     
    537560  tmp >| AA_make.gdef
    538561
     562  if [ $pcmac == 1 ]
     563  then
     564      cp AA_make.gdef tmp
     565      sed -e 's/rpath=/rpath,/g' tmp > AA_make.gdef
     566  fi
     567 
    539568
    540569# We use lines for g95 even for the other compilers to run ins_make
     
    546575        \cp -f ~rdzt401/bin/AA_make.gdef .
    547576    fi
     577   
    548578    chmod u=rwx ins_make.bash
    549579    ./ins_make.bash $o_ins_make
     
    625655  echo '##########################################################'
    626656  cd $MODEL/modipsl/modeles
     657  xioslog=`pwd`/xios.log
     658  echo "log file: $xioslog"
    627659  #wget http://www.lmd.jussieu.fr/~lmdz/Distrib/install_xios.bash
    628660  myget import/install_xios.bash
    629661  chmod u=rwx install_xios.bash
    630   ./install_xios.bash -prefix $MODEL/modipsl/modeles \
     662  if [ ${hostname:0:5} = ada33 ] ; then
     663    ./install_xios.bash \
     664    -prefix /workgpfs/rech/gzi/rgzi027/LMDZ20180221.trunk/modipsl/modeles \
     665    -netcdf /smplocal/pub/NetCDF/4.1.3/mpi -hdf5 /smplocal/pub/HDF5/1.8.9/par \
     666    -MPI /smplocal/intel/compilers_and_libraries_2017.2.174/linux/mpi/intel64/ \
     667    -arch X64_ADA > xios.log 2>&1
     668   else
     669     ./install_xios.bash -prefix $MODEL/modipsl/modeles \
    631670                      -netcdf ${ncdfdir} -hdf5 ${ncdfdir} \
    632                       -MPI $root_mpi -arch $arch
     671                      -MPI $root_mpi -arch $arch > xios.log 2>&1
     672   fi
     673   if [ -f XIOS/lib/libxios.a ] ; then
     674     echo "OK, XIOS library successfully generated"
     675   fi
    633676fi
    634677
     
    644687  export ORCHPATH=`pwd`
    645688  if [ -d tools ] ; then
    646      orchidee_rev=2247
     689     if [ "$orchidee_rev" != "" ] ; then
     690       set +e ; svn upgrade ; svn update -r $orchidee_rev ; set -e
     691     fi
    647692     veget_version=orchidee2.0
    648693      cd arch
     
    661706     echo "IOIPSL_INCDIR=$ORCHPATH/../../lib" >> arch-local.path
    662707     echo "IOIPSL_LIBDIR=$ORCHPATH/../../lib" >> arch-local.path
     708     echo 'XIOS_INCDIR=${ORCHDIR}/../XIOS/inc' >> arch-local.path
     709     echo 'XIOS_LIBDIR="${ORCHDIR}/../XIOS/lib -lxios"' >> arch-local.path
    663710     cd ../
    664711# compiling ORCHIDEE sequential mode
     
    722769echo 'ORCH_LIBDIR=$LMDGCM/../../lib' >> arch-local.path
    723770
    724 BASE_LD="$BASE_LD -Wl,-rpath=${ncdfdir}/lib"
    725 # arch-local.fcm file (adapted from arch-linux-32bit.fcm)
     771if [ $pcmac == 1 ] ; then
     772    BASE_LD="$BASE_LD -Wl,-rpath,${ncdfdir}/lib"
     773else
     774    BASE_LD="$BASE_LD -Wl,-rpath=${ncdfdir}/lib"
     775fi
     776# Arch-local.fcm file (adapted from arch-linux-32bit.fcm)
    726777
    727778if [ $real = r8 ] ; then FPP_DEF=NC_DOUBLE ; else FPP_DEF="" ; fi
     
    770821# sequential compilation and bench
    771822if [ "$sequential" = 1 ] ; then
    772 echo "./$makelmdz $OPT_MAKELMDZ -rrtm true -d ${grid_resolution} -v $veget_version gcm " >> compile.sh
    773 chmod +x ./compile.sh ; ./compile.sh > $lmdzlog 2>&1
     823echo "./$makelmdz $OPT_MAKELMDZ -rrtm true $opt_cosp -d ${grid_resolution} -v $veget_version gcm " >> compile.sh
     824chmod +x ./compile.sh
     825if [ $bench != 0 ] ; then ./compile.sh > $lmdzlog 2>&1 ; fi
    774826echo install.sh apres_compilation `date`
    775827
     
    838890  if [ ${hostname:0:5} = ada33 ] ; then echo "module load intel/2013.0" > compile.sh ; fi
    839891  echo resol=${grid_resolution} >> compile.sh
    840   echo ./$makelmdz $OPT_MAKELMDZ -rrtm true $opt_makelmdz_xios -d \$resol -v $veget_version -mem -parallel $parallel gcm >> compile.sh
    841   chmod +x ./compile.sh ; ./compile.sh > $lmdzlog 2>&1
     892  echo ./$makelmdz $OPT_MAKELMDZ -rrtm true $opt_cosp $opt_makelmdz_xios -d \$resol -v $veget_version -mem -parallel $parallel gcm >> compile.sh
     893  chmod +x ./compile.sh
     894  if [ $bench != 0 ] ; then ./compile.sh > $lmdzlog 2>&1 ; fi
    842895
    843896  echo "Compilation finished"
Note: See TracChangeset for help on using the changeset viewer.