Changeset 3076


Ignore:
Timestamp:
Nov 16, 2017, 12:06:19 PM (7 years ago)
Author:
fhourdin
Message:

New version of the install_lmdz.sh script which uses the new repository paths (pub/*) framework.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BOL/script_install/install_lmdz.sh

    r3064 r3076  
    4343function myget { #1st and only argument should be file name
    4444  # Path on local computer where to look for the datafile
    45   LMDZ_HOME="/u/lmdz/WWW/Distrib"
    46   if [ -f $LMDZ_HOME/$1 ] ; then
    47     \cp -f -p $LMDZ_HOME/$1 .
     45  if [ -f /u/lmdz/WWW/LMDZ/pub/$1 ] ; then
     46    \cp -f -p /u/lmdz/WWW/LMDZ/pub/$1 .
     47  elif [ -f ~/LMDZ/pub/$1 ] ; then
     48    \cp -f -p ~/LMDZ/pub/$1 .
    4849  else
    49     wget http://www.lmd.jussieu.fr/~lmdz/Distrib/$1
     50    wget http://www.lmd.jussieu.fr/~lmdz/pub/$1
     51    #dir=~/LMDZ/pub/`dirname $1` ; mkdir -p $dir ; cp -r `basename $1` $dir
    5052  fi
    5153}
     
    6264#########################################################################
    6365svn=""
    64 version=testing
     66version=trunk
    6567getlmdzor=1
    6668netcdf=1   #  1 for automatic installation
     
    198200   *)       compilo="gfortran" ;
    199201            if [ $parallel = none -o -f /usr/bin/mpif90 ] ; then
    200                 path_mpi=`which mpif90 | sed -e 's:/mpif90::'` ;
     202                path_mpi=`which mpif90 | sed -e s:/mpif90::` ;
    201203                if [ -d /usr/lib64/openmpi ] ; then
    202204                  root_mpi="/usr/lib64/openmpi"
     
    280282BASE_LD="$OPT_GPROF"
    281283OPTPREC="$OPT_GPROF"
     284ARFLAGS="rs" ; if [ -f /etc/issue ] ; then if [ "`grep -i ubuntu /etc/issue`" != "" ] ; then if [ "`grep -i ubuntu /etc/issue | awk ' { print $2 } ' | cut -d. -f1`" -ge 16 ] ; then ARFLAGS="rU" ; fi ; fi ; fi
     285
     286
    282287
    283288if [ "$compilo" = "$gfortran" ] ; then
     
    419424echo '##########################################################'
    420425cd $MODEL
    421 #wget http://www.lmd.jussieu.fr/~lmdz/Distrib/modipsl.$version.tar.gz
    422 myget modipsl.$version.tar.gz
     426myget src/modipsl.$version.tar.gz
    423427echo install.sh wget_OK `date`
    424428gunzip modipsl.$version.tar.gz
     
    438442  # keep it simple
    439443  #wget http://www.lmd.jussieu.fr/~lmdz/Distrib/netcdf-4.0.1.tar.gz
    440   myget netcdf-4.0.1.tar.gz
     444  myget import/netcdf-4.0.1.tar.gz
    441445  gunzip netcdf-4.0.1.tar.gz
    442446  tar xvf netcdf-4.0.1.tar
     
    455459  # download and compile hdf5 and netcdf, etc. using the install_netcdf4_hdf5.bash script
    456460  #wget http://www.lmd.jussieu.fr/~lmdz/Distrib/install_netcdf4_hdf5.bash
    457   myget install_netcdf4_hdf5.bash
     461  myget import/install_netcdf4_hdf5.bash
    458462  chmod u=rwx install_netcdf4_hdf5.bash
    459463  if [ "$compilo" = "gfortran" ] ; then
     
    595599  cd $MODEL/modipsl/modeles
    596600  #wget http://www.lmd.jussieu.fr/~lmdz/Distrib/install_xios.bash
    597   myget install_xios.bash
     601  myget import/install_xios.bash
    598602  chmod u=rwx install_xios.bash
    599603  ./install_xios.bash -prefix $MODEL/modipsl/modeles \
     
    622626     -e s:"%BASE_FFLAGS     .*.$":"%BASE_FFLAGS         $OPTPREC":1 \
    623627     -e s:"%BASE_LD         .*.$":"%BASE_LD             $BASE_LD":1 \
     628     -e s:"%ARFLAGS         .*.$":"%ARFLAGS             $ARFLAGS":1 \
    624629     arch-gfortran.fcm > arch-local.fcm
    625630     echo "NETCDF_LIBDIR=\"-L${ncdfdir}/lib -lnetcdff -lnetcdf\"" > arch-local.path
     
    700705    -e s:"%FPP_DEF         .*.$":"%FPP_DEF             $FPP_DEF":1 \
    701706    -e s:"%BASE_LD         .*.$":"%BASE_LD             $BASE_LD":1 \
     707    -e s:"%ARFLAGS         .*.$":"%ARFLAGS             $ARFLAGS":1 \
    702708    arch-linux-32bit.fcm > arch-local.fcm
    703709
     
    790796    -e s:"%MPI_FFLAG.*.$":"%MPI_FFLAGS          $MPI_FLAGS":1 \
    791797    -e s:"%OMP_FFLAG.*.$":"%OMP_FFLAGS          $OMP_FLAGS":1 \
     798    -e s:"%ARFLAGS.*.$":"%ARFLAGS          $ARFLAGS":1 \
    792799    -e s@"%BASE_LD.*.$"@"%BASE_LD             -Wl,-rpath=${root_mpi}/lib:${ncdfdir}/lib"@1 \
    793800    -e s:"%MPI_LD.*.$":"%MPI_LD              $MPI_LD":1 \
     
    851858echo install.sh avant_chargement_bench  `date`
    852859#wget http://www.lmd.jussieu.fr/~lmdz/Distrib/$bench.tar.gz
    853 myget $bench.tar.gz
     860myget 3DBenchs/$bench.tar.gz
    854861echo install.sh after bench download  `date`
    855862tar xvf $bench.tar.gz
     
    904911fi
    905912echo EXECUTION DU BENCH
     913set +e
    906914date ; ./bench.sh > out.bench 2>&1 ; date
     915set -e
    907916tail listing
    908917
     
    935944cd $MODEL
    936945#wget http://www.lmd.jussieu.fr/~lmdz/Distrib/1D.tar.gz
    937 myget 1D.tar.gz
     946myget 1D/1D.tar.gz
    938947tar xvf 1D.tar.gz
    939948cd 1D
Note: See TracChangeset for help on using the changeset viewer.