Changeset 4043


Ignore:
Timestamp:
Dec 2, 2021, 10:29:46 AM (3 years ago)
Author:
Ehouarn Millour
Message:

Update install_lmdz.sh to also work on LMD local machines.
EM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BOL/script_install/install_lmdz.sh

    r4018 r4043  
    6464svn=""
    6565#version=trunk
    66 version=20210730.trunk
     66version=20211102.trunk
    6767getlmdzor=1
    6868netcdf=1   #  1 for automatic installation
     
    316316                  root_mpi="/usr"
    317317                fi
    318             # For Scientifique Linux with gfortran at LMD :
    319             elif [ -f /usr/lib64/openmpi/1.4.5-gfortran/bin/mpif90 -a $compiler = "gfortran" ] ; then
    320                 path_mpi=/usr/lib64/openmpi/1.4.5-gfortran/bin ;
    321                 root_mpi=/usr/lib64/openmpi/1.4.5-gfortran ;
    322                 export LD_LIBRARY_PATH=${root_mpi}/lib:$LD_LIBRARY_PATH
    323             # For Scientifique Linux with ifort at LMD :
    324             elif [ -f /usr/lib64/openmpi/1.4.5-ifort/bin/mpif90 -a $compiler = "ifort" ] ; then
    325                 path_mpi=/usr/lib64/openmpi/1.4.5-ifort/bin ;
    326                 root_mpi=/usr/lib64/openmpi/1.4.5-ifort ;
    327                 export LD_LIBRARY_PATH=${root_mpi}/lib:$LD_LIBRARY_PATH
    328             # For Scientifique Linux with pgf90 at LMD :
    329             elif [ -f /usr/lib64/openmpi/1.4.5-ifort/bin/mpif90 -a $compiler = "pgf90" ] ; then
    330                 path_mpi=/usr/lib64/openmpi/1.4.5-pgf/bin ;
    331                 root_mpi=/usr/lib64/openmpi/1.4.5-pgf ;
    332                 export LD_LIBRARY_PATH=${root_mpi}/lib:$LD_LIBRARY_PATH
    333318            else
    334319               echo "Cannot find mpif90" ;
    335320               if [ $parallel = none ] ; then exit ; fi ;
    336321            fi ;
     322            if [ $parallel != none ] ; then
     323              root_mpi=$(which mpif90 | sed -e s:/bin/mpif90::)
     324              path_mpi=$(which mpif90 | sed -e s:/mpif90::)
     325              export LD_LIBRARY_PATH=${root_mpi}/lib:$LD_LIBRARY_PATH
     326            fi
    337327            par_comp=${path_mpi}/mpif90 ;
    338328            mpirun=${path_mpi}/mpirun ;
     
    423413if [ "$compiler" = "$gfortran" ] ; then
    424414   OPTIM='-O3'
    425    OPTDEB="-g3 -Wall -fbounds-check -ffpe-trap=invalid,zero,overflow -O0 -fstack-protector-all -fbacktrace -finit-real=nan"
     415   OPTDEB="-g3 -Wall -fbounds-check -ffpe-trap=invalid,zero,overflow -O0 -fstack-protector-all -fbacktrace -finit-real=snan"
    426416   OPTDEV="-Wall -fbounds-check"
    427417   fmod='I '
     
    12791269./run.sh -rad $rad
    12801270fi
    1281 set -vx
     1271#set -vx
    12821272
    12831273#################################################################
     
    12851275#################################################################
    12861276cd $MODEL/modipsl/modeles
    1287 echo surface_env file created in $MODEL
     1277#echo surface_env file created in $MODEL
    12881278echo 'veget='$veget > surface_env
    12891279#opt_veget="-v $veget_version"
Note: See TracChangeset for help on using the changeset viewer.