Changeset 4958 for BOL/LMDZ_Setup_amaury
- Timestamp:
- Jun 3, 2024, 2:30:11 PM (6 months ago)
- Location:
- BOL/LMDZ_Setup_amaury
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
BOL/LMDZ_Setup_amaury/lmdz_env.sh
r4956 r4958 4 4 ############################################################## 5 5 6 hostname=$(hostname) 6 if grep -q "Adastra" /etc/motd; then 7 hostname="adastra" 8 else 9 hostname=$(hostname) 10 fi 7 11 echo "Setting up lmdz_env on $hostname" 8 12 … … 28 32 # idrproj -d newproj redefinit "newproj" en tant que projet actif, 29 33 # alors $STORE, $WORK etc vont designer les espaces de "newproj") 30 GROUPE=$(idrproj | grep active | awk '{ print $1}')31 SUBMITCMD="sbatch -A $ GROUPE@cpu "34 account=$(idrproj | grep active | awk '{ print $1}') 35 SUBMITCMD="sbatch -A $account@cpu " 32 36 RUNCMD="srun --label -n" 33 37 # Espaces suivants definis par defaut en fonction du groupe actif, … … 41 45 #LMDZ_Init sur le $STORE du $groupe 42 46 LMDZ_INIT=$STORE/LMDZ_Init 47 ;; 48 adast) 49 # module purge 50 # module load PrgEnv-gnu 51 # module load cray-hdf5-parallel 52 # module load netcdf-hdf5parallel/gnu/10.3 43 53 44 JOB_HEADER="#SBATCH -A $groupe@cpu 45 #@TESTQ#SBATCH --qos=qos_cpu-dev" 46 54 account=$(/usr/sbin/my_project.py -l 2>&1 | head -1 | cut -d " " -f 3- | cut -c 5-) 55 root_dir="$WORKDIR/LMDZ_Setup"; 56 ARCH="X64_ADASTRA-GNU" 57 SIMRUNBASEDIR="$SCRATCHDIR/" 58 LMDZD="$root_dir/LMDZD" 59 LMDZ_INIT="$root_dir/LMDZ_Init" 60 NB_MPI_MAX=2000 61 NB_OMP_MAX=20 62 RUNCMD="srun --label --account=$account -n" 63 SUBMITCMD="sbatch --account=$account" 47 64 ;; 48 65 *) echo "WARNING: RUNNING THIS SCRIPT ON A LOCAL COMPUTER IS DISCOURAGED (lacklusted cpus and memory)" 49 local_env_dir="/home/abarral/PycharmProjects/installLMDZ/LMDZ_Setup"; if [[ ! -d $local_env_dir ]]; then echo "STOP: local_env_dir $local_env_dir not found, either you are running on an unsupported cluster, or you haven't edited lmdz_env.sh properly"; exit 1; fi #Can't use $(pwd) since this script gets copied and ran from several locations66 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 50 67 ARCH="local-gfortran-parallel" 51 68 SIMRUNBASEDIR="/tmp/SCRATCH/" # Where the simulations will be executed ($SIMRUNBASEDIR/LMDZ_Setup/...) 52 LMDZD="$ local_env_dir/LMDZD" # Where the sources will be downloaded and compiled53 LMDZ_INIT="$ local_env_dir/LMDZ_Init" # Where to store shared files used for initialisation69 LMDZD="$root_dir/LMDZD" # Where the sources will be downloaded and compiled 70 LMDZ_INIT="$root_dir/LMDZ_Init" # Where to store shared files used for initialisation 54 71 NB_MPI_MAX=2 # Max number of MPI cores 55 72 NB_OMP_MAX=1 # Max number of OMP threads 56 GROUPE="" # the group to execute the job as57 73 RUNCMD="mpirun -np" # command to run a job, as $runcmd <nprocs> <script> 58 74 SUBMITCMD="." # command to sumbit a job, as $submitcmd <script> 59 75 ;; 60 76 esac 77 78 if [[ ! (-d $root_dir && -f $root_dir/lmdz_env.sh) ]]; then 79 echo "STOP: root_dir $root_dir not found, either you are running on an unsupported cluster, or you haven't edited lmdz_env.sh properly"; exit 1 80 fi -
BOL/LMDZ_Setup_amaury/reb.sh
r4955 r4958 25 25 ## Headers managed by sed 26 26 #@JZ#JeanZay 27 #@JZ#SBATCH -A @@groupe@cpu28 27 #@JZ#SBATCH --job-name=Seq # nom du job 29 28 #@JZ#SBATCH --nodes=1 # nombre de noeuds … … 54 53 55 54 echo "Submitting the rebuild job $job" 56 sbatch"$job"55 $RUNCMD "$job" 57 56 done -
BOL/LMDZ_Setup_amaury/script_SIMU
r4956 r4958 3 3 #@JZ#JeanZay 4 4 #@JZ#SBATCH --job-name=NOM_SIMU # nom du job 5 #@JZ#SBATCH -A @@groupe@cpu6 5 #@JZ# Nombre de processus MPI : 7 6 #@JZ#SBATCH --ntasks=8 -
BOL/LMDZ_Setup_amaury/setup.sh
r4956 r4958 389 389 # Edit reb.sh 390 390 cp reb.sh "$local/$SIM/reb.sh"; chmod +x "$local/$SIM/reb.sh" 391 sed -i'' -e "s:^rebuild=.*.$:rebuild=$LMDZD/$LMDZname/modipsl/bin/rebuild:" \ 392 -e "s/@@groupe/$GROUPE/" "$local/$SIM/reb.sh" 391 sed -i'' -e "s:^rebuild=.*.$:rebuild=$LMDZD/$LMDZname/modipsl/bin/rebuild:" "$local/$SIM/reb.sh" 393 392 enable_groupe "$local/$SIM/reb.sh" 394 393 … … 432 431 local isotopes="n" 433 432 if [[ $phylmd = "lmdiso" ]]; then isotopes="y"; fi 434 sed -e "s/@@groupe/$GROUPE/" \ 435 -e "s/NOM_SIMU/$SIM/" \ 433 sed -e "s/NOM_SIMU/$SIM/" \ 436 434 -e "s/time=.*.$/time=$cput/" \ 437 435 -e "s/ntasks=.*.$/ntasks=$mpi/" \ … … 601 599 #@JZ#JeanZay 602 600 #@JZ#SBATCH --job-name=Init # nom du job 603 #@JZ#SBATCH -A "$GROUPE"@cpu604 601 #@JZ#SBATCH --ntasks=1 # Nombre de processus MPI 605 602 #@JZ#SBATCH --cpus-per-task=16 # nombre de threads OpenMP
Note: See TracChangeset
for help on using the changeset viewer.