Changeset 4980 for BOL


Ignore:
Timestamp:
Jun 13, 2024, 2:39:53 PM (5 months ago)
Author:
abarral
Message:

(WIP) update spirit arch
update script_SIMU env
fix setup.sh, add netcdf option
fix aerosols detection

Location:
BOL/LMDZ_Setup_amaury
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • BOL/LMDZ_Setup_amaury/lmdz_env.sh

    r4978 r4980  
    5151    module load gcc/11.2.0
    5252    module load openmpi/4.0.7
     53    module load cdo/2.3.0
    5354
    5455    root_dir=~/"LMDZ_SETUP_ROOT/LMDZ_Setup";
     
    5960    NB_MPI_MAX=20
    6061    NB_OMP_MAX=1
    61     RUNCMD="srun --label -n"
     62    RUNCMD="mpirun -n"  # on spirit, we can't run MPI using srun from within sbatch
    6263    SUBMITCMD="sbatch"
    6364    ;;
     
    7980    SUBMITCMD="sbatch --account=$account"
    8081    ;;
    81   *) echo "WARNING: RUNNING THIS SCRIPT ON A LOCAL COMPUTER IS DISCOURAGED (lacklusted cpus and memory)"
     82  *) echo "WARNING: RUNNING THIS SCRIPT ON A LOCAL COMPUTER IS DISCOURAGED (lackluster cpus and memory)"
    8283    root_dir="/home/abarral/PycharmProjects/installLMDZ/LMDZ_Setup"; # Where LMDZ_Setup is extracted. Can't use $(pwd) since this script gets copied and ran from several locations
    8384    ARCH="local-gfortran-parallel"
  • BOL/LMDZ_Setup_amaury/main.sh

    r4954 r4980  
    4848# Grid number of points IMxJMxLM
    4949resol="144x142x79"
     50resol="32x32x39"  # TODO TEMP
    5051
    5152# Using XIOS for IOs: "-xios" for enabled, else ""
  • BOL/LMDZ_Setup_amaury/script_SIMU

    r4978 r4980  
    2323#@SP#SBATCH --time=00:30:00
    2424#@SP#SBATCH --output=outNOM_SIMU%j
    25 #@SP#SBATCH --error=outNOM_SIMU%j#@SP#Spirit
    26 #@SP#SBATCH --job-name=NOM_SIMU
    27 #@SP#SBATCH --ntasks=8
    28 #@SP#SBATCH --cpus-per-task=8
    29 #@SP#SBATCH --hint=nomultithread
    30 #@SP#SBATCH --time=00:30:00
    31 #@SP#SBATCH --output=outNOM_SIMU%j
    3225#@SP#SBATCH --error=outNOM_SIMU%j
    3326#@ADS#Adastra
     
    4033#@ADS#SBATCH --error=outNOM_SIMU%j
    4134
    42 set -ex
    43 set +u  # Amaury 06/24: for local use (no $SLURM_CPUS_PER_TASK) - should be removed if we ever rewrite this whole legacy script properly...
     35set -eux
    4436
    4537# Number of MPI processes :
     
    4840nthreads=8
    4941export OMP_NUM_THREADS=$nthreads
    50 
    51 # For Jean-Zay (replacing the next 3 lines, commented out)
    52 #export OMP_NUM_THREADS=$SLURM_CPUS_PER_TASK
    53 
     42#@JZ#export OMP_NUM_THREADS=$SLURM_CPUS_PER_TASK  # For Jean-Zay (replacing the next 3 lines, commented out)
    5443# private memory for each thread
    5544export OMP_STACKSIZE=800M
    56 # Binding
    57 export OMP_PLACES=cores
     45
     46
     47#@JZ#export OMP_PLACES=cores  # "binding" present in old script_SIMU, but terribly reduces performance on Spirit...
     48ulimit -s unlimited
     49#@SP ulimit -Ss 8192
    5850
    5951simul=NOM_SIMU
    60 ulimit -s unlimited
    61 #### reste ada  : export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/smplocal/pub/NetCDF/4.1.3/lib:/smplocal/pub/HDF5/1.8.9/seq/lib
    62 
    6352
    6453reseau_local=0
     
    403392      if [ $num -le 250 ] ; then
    404393         sed -e 's/^simul=.*.$/simul='$simul_new'/' -e 's/^\# @ job_nam.*.=.*.$/\# @ job_name = '$simul_new'/' tmp_$simul >| tmp_$simul_new
    405          sbatch tmp_$simul_new
     394         $SUBMITCMD tmp_$simul_new
    406395      fi
    407396   fi
     
    417406
    418407cd $SCRIPTDIR
    419 sbatch tmp_$simul
     408$SUBMITCMD tmp_$simul
  • BOL/LMDZ_Setup_amaury/setup.sh

    r4978 r4980  
    1313  #   add "-debug" to the compilation options in the compile.sh script created in the present folder, and run it (./compile.sh gcm)
    1414  #   ALTERNATIVELY : you can remove $optim in the definition of "LMDZname" below
    15   optim=""
    16   #optim="-debug"
     15  #optim=""
     16  optim="-debug"  # TODO temp
    1717
    1818  #NOTE : "testmode=y" is for running in test mode :
     
    4141  # - number: orchidee version number : only rev 7983 on branch _2_2, and 7994 on trunk, are available
    4242  veget="CMIP6"
     43  veget="none"  # TODO temp
    4344  #AS : If you have installed the model with a given "veget" option, and you want to change it :
    4445  #   --> RECOMMENDED : re-install the model from scratch in a new TEST_PROD folder
     
    6465  #          For aerosols=n, the corresponding flags will automatically be set to "n".
    6566  #   With XIOS : adjust DEF/XMLfiles*/file*xml
     67
     68  netcdf=0  # TODO set back to 0
    6669}
    6770
     
    209212  # (Temporary) Constraints for aerosols=spla :
    210213  # --> resolution 128x88x79 and rad=rrtm
    211   if [[ $aerosols = 1 && $resol != "128x88x79" ]]; then
     214  if [[ $aerosols = "spla" && $resol != "128x88x79" ]]; then
    212215    echo 'STOP: For now, <aerosols=spla> requires <resol=128x88x79>, and uses the zoomed grid from gcm.def_zNAfrica_BiJe, for which forcing & initial files are available'
    213216    echo "Right now resol=<$resol>"
     
    235238  cp "$local/install_lmdz.sh" .
    236239  chmod +x install_lmdz.sh
    237   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 0 -arch $ARCH" >> install_lmdz_options.$$.sh
     240  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" >> install_lmdz_options.$$.sh
    238241  chmod +x install_lmdz_options.$$.sh
    239242  echo "Running install_lmdz_options.$$.sh"
     
    286289  # TEMPORAIREMENT pour spla on force l'utilisation de gcm.def_zNAfrica_BiJe (avec resolution 128x88x79)
    287290  #----------------------------------------------------------------------
    288   if [[ $aerosols = spla ]]; then cp DEF/gcm.def_zNAfrica_BiJe DEF/gcm.def; fi
     291  if [[ $aerosols = "spla" ]]; then cp DEF/gcm.def_zNAfrica_BiJe DEF/gcm.def; fi
    289292
    290293  # Inscription du choix ok_guide dans DEF/guide.def
     
    302305  #   cf options veget, aerosols, cosp, xios
    303306  #---------------------------------------------------------------------
    304   if [[ $veget = none ]]; then  VEGET="n"; else VEGET="y"; fi
     307  if [[ $veget = "none" ]]; then  VEGET="n"; else VEGET="y"; fi
    305308  sed -i'' -e 's/VEGET=.*.$/VEGET='$VEGET'/' DEF/config.def
    306309
     
    603606#@JZ#SBATCH --job-name=Init         # nom du job
    604607#@JZ#SBATCH --ntasks=1              # Nombre de processus MPI
    605 #@JZ#SBATCH --cpus-per-task=16      # nombre de threads OpenMP
     608#@JZ#SBATCH --cpus-per-task=1      # nombre de threads OpenMP
    606609#@JZ# /!\ Attention, la ligne suivante est trompeuse mais dans le vocabulaire
    607610#@JZ# de Slurm "multithread" fait bien référence à l'hyperthreading.
     
    615618#@SP#SBATCH --job-name=Init
    616619#@SP#SBATCH --ntasks=1
    617 #@SP#SBATCH --cpus-per-task=16
     620#@SP#SBATCH --cpus-per-task=1
    618621#@SP#SBATCH --hint=nomultithread
    619622#@SP#SBATCH --time=00:10:00
     
    623626#@ADS#SBATCH --job-name=Init
    624627#@ADS#SBATCH --ntasks=1
    625 #@ADS#SBATCH --cpus-per-task=16
     628#@ADS#SBATCH --cpus-per-task=1
    626629#@ADS#SBATCH --hint=nomultithread
    627630#@ADS#SBATCH --time=00:10:00
     
    636639. lmdz_env.sh
    637640ulimit -s unlimited
    638 export OMP_STACKSIZE=800M
    639 export OMP_NUM_THREADS=1
    640641cd $SIMRUNDIR/$INIT
    641642echo "Executable : $ce0l"
Note: See TracChangeset for help on using the changeset viewer.