Changeset 5462


Ignore:
Timestamp:
Dec 31, 2024, 5:52:32 PM (5 days ago)
Author:
fhourdin
Message:

Automatisation gfortran<10

Location:
BOL/LMDZ_Setup
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • BOL/LMDZ_Setup/lmdz_env.sh

    r5438 r5462  
    99
    1010# <root_dir> will be set by sed by setup.sh here
    11 root_dir=/home/hourdin/TMP/TestI
     11root_dir=/data/hourdin/TESTS/SPLA
    1212pub_store=1
     13PARALLEL=1
    1314
    1415function get_hostname {
     
    129130    *)  # Local machine.
    130131#-------------------------------------------------------------------------
    131       ARCH="local-gfortran-parallel"  # The arch file to use
    132132      SIMRUNBASEDIR="$root_dir/SCRATCH/"  # Where the simulations will be executed ($SIMRUNBASEDIR/LMDZ_Setup/...)
    133133      LMDZD="$root_dir/../LMDZD"  # Where the sources will be downloaded and compiled
    134134      if [[ $pub_store ]] ; then LMDZ_INIT="$HOME/LMDZ/pub" ; else LMDZ_INIT="$root_dir/LMDZ/pub" ; fi
    135       NB_MPI_MAX=2  # Max number of MPI cores (only for running simulations)
    136       NB_OMP_MAX=2  # Max number of OMP threads (only for running simulations)
     135      # Old fortran versions
     136      if [ $( gfortran --version | head -1  | awk ' { print $NF } ' | cut -d. -f1 ) -le 9 ] ; then
     137          gfortranv=gfortran9 ; archdir="-arch_dir arch"
     138          if [ ! -d $LMDZD/arch ] ; then mkdir -p $LMDZD ; cd $LMDZD ;
     139            wget http://lmdz.lmd.jussieu.fr/pub/src_archives/misc/arch/LMDZ/arch-local-gfortran9.tar
     140            tar xvf arch-local-gfortran9.tar
     141            cd -
     142          fi
     143      else
     144          gfortranv=gfortran ; archdir=
     145      fi
     146      if [[ $PARALLEL = 0 ]] ; then
     147         ARCH="local-${gfortranv} $archdir"  # The arch file to use
     148         NB_MPI_MAX=1  # Max number of MPI cores (only for running simulations)
     149         NB_OMP_MAX=1  # Max number of OMP threads (only for running simulations)
     150         MPICMD="" # command to run an mpi executable, as $MPICMD <nprocs> <script>
     151      else
     152         ARCH="local-${gfortranv}-parallel $archdir"  # The arch file to use
     153         NB_MPI_MAX=2  # Max number of MPI cores (only for running simulations)
     154         NB_OMP_MAX=2  # Max number of OMP threads (only for running simulations)
     155         MPICMD="mpirun -np" # command to run an mpi executable, as $MPICMD <nprocs> <script>
     156      fi
     157
    137158      NB_CORE_PER_NODE_MAX=0  # Max number of cores per node (real cores, not hyperthreading - only for running simulations, cluster-specific)
    138159      N_HYPERTHREADING=1  # How many hyperthreading threads per physical core
    139       MPICMD="mpirun -np" # command to run an mpi executable, as $MPICMD <nprocs> <script>
    140160      RUNBASHCMD="bash" # command to run a bash job, as $runbashcmd (nthreads) <script> [nthreads only supplied if =/="bash"]
    141161      #SUBMITCMD="."  # command to sumbit a job, as $submitcmd <script>
  • BOL/LMDZ_Setup/setup.sh

    r5439 r5462  
    276276     jobcmd="bash"
    277277  fi
    278   echo "./install_lmdz.sh -noclean $optim -v $version $svnopt -d $resol -rad $rad -bench 0 -parallel mpi_omp $ins_cosp $ins_xios $ins_aero $ins_inlandsis -name $LMDZname -veget $veget -netcdf $netcdf -arch $ARCH -make_j $make_j -jobcmd $jobcmd" >> install_lmdz_options.$$.sh
     278  if [[ $PARALLEL == 0 ]] ; then parallel= ; else parallel="-parallel mpi_omp" ; fi
     279  echo "./install_lmdz.sh -noclean $optim -v $version $svnopt -d $resol -rad $rad -bench 0 $parallel $ins_cosp $ins_xios $ins_aero $ins_inlandsis -name $LMDZname -veget $veget -netcdf $netcdf -arch $ARCH -make_j $make_j -jobcmd $jobcmd" >> install_lmdz_options.$$.sh
    279280  chmod +x install_lmdz_options.$$.sh
    280281  echo "Running install_lmdz_options.$$.sh"
Note: See TracChangeset for help on using the changeset viewer.