cc_staff
1,857
edits
(Marked this version for translation) |
mNo edit summary |
||
Line 614: | Line 614: | ||
#SBATCH --account=def-group # Specify account | #SBATCH --account=def-group # Specify account | ||
#SBATCH --time=07-00:00 # Specify time limit dd-hh:mm | #SBATCH --time=07-00:00 # Specify time limit dd-hh:mm | ||
#SBATCH --nodes=1 # Specify number of compute nodes | #SBATCH --nodes=1 # Specify number of compute nodes (narval 1 node max) | ||
#SBATCH --ntasks-per-node=32 # Specify number of cores per node (graham 32 or 44, cedar 48, beluga 40, narval 64, or less) | #SBATCH --ntasks-per-node=32 # Specify number of cores per node (graham 32 or 44, cedar 48, beluga 40, narval 64, or less) | ||
#SBATCH --mem=0 # Do not change (allocates all memory per compute node) | #SBATCH --mem=0 # Do not change (allocates all memory per compute node) | ||
Line 620: | Line 620: | ||
#SBATCH --array=1-5%1 # Specify number of solution restarts (2 or more, 5 is shown) | #SBATCH --array=1-5%1 # Specify number of solution restarts (2 or more, 5 is shown) | ||
<!--T: | <!--T:2406--> | ||
module load StdEnv/2023 # Do not change | |||
module load ansys/2023R2 # Specify version (beluga, cedar, graham, narval) | |||
<!--T: | <!--T:2405--> | ||
#module load StdEnv/2020 | #module load StdEnv/2020 # no longer supported (uayor) | ||
#module load ansys/2019R3 # or newer versions (narval only) | #module load ansys/2019R3 # or newer versions (narval only) | ||
#module load ansys/2021R2 # or newer versions (beluga, cedar, graham) | #module load ansys/2021R2 # or newer versions (beluga, cedar, graham) | ||
<!--T: | <!--T:4403--> | ||
MYVERSION=3d # Specify 2d, 2ddp, 3d or 3ddp | |||
MYJOUFILE=sample.jou # Specify your journal filename | |||
MYJOUFILERES=sample-restart.jou # Specify journal restart filename | |||
MYCASFILERES=sample-restart.cas.h5 # Specify cas restart filename | |||
MYDATFILERES=sample-restart.dat.h5 # Specify dat restart filename | |||
# ------- do not change any lines below -------- | |||
<!--T:4745--> | <!--T:4745--> | ||
Line 654: | Line 660: | ||
if [ "$SLURM_NNODES" == 1 ]; then | if [ "$SLURM_NNODES" == 1 ]; then | ||
if [ "$SLURM_ARRAY_TASK_ID" == 1 ]; then | if [ "$SLURM_ARRAY_TASK_ID" == 1 ]; then | ||
fluent -g 2ddp -t $NCORES -affinity=0 -i | fluent -g 2ddp -t $NCORES -affinity=0 -i $MYJOUFILE | ||
else | else | ||
fluent -g 2ddp -t $NCORES -affinity=0 -i | fluent -g 2ddp -t $NCORES -affinity=0 -i $MYJOUFILERES | ||
fi | fi | ||
else | else | ||
if [ "$SLURM_ARRAY_TASK_ID" == 1 ]; then | if [ "$SLURM_ARRAY_TASK_ID" == 1 ]; then | ||
fluent -g 2ddp -t $NCORES -affinity=0 -cnf=/tmp/machinefile-$SLURM_JOB_ID -mpi=intel -ssh -i | fluent -g 2ddp -t $NCORES -affinity=0 -cnf=/tmp/machinefile-$SLURM_JOB_ID -mpi=intel -ssh -i $MYJOUFILE | ||
else | else | ||
fluent -g 2ddp -t $NCORES -affinity=0 -cnf=/tmp/machinefile-$SLURM_JOB_ID -mpi=intel -ssh -i | fluent -g 2ddp -t $NCORES -affinity=0 -cnf=/tmp/machinefile-$SLURM_JOB_ID -mpi=intel -ssh -i $MYJOUFILERES | ||
fi | fi | ||
fi | fi | ||
Line 672: | Line 678: | ||
if [ $SLURM_ARRAY_TASK_ID -lt $SLURM_ARRAY_TASK_COUNT ]; then | if [ $SLURM_ARRAY_TASK_ID -lt $SLURM_ARRAY_TASK_COUNT ]; then | ||
echo "Restarting job with the most recent output dat file …" | echo "Restarting job with the most recent output dat file …" | ||
ln -sfv output/$(ls -ltr output {{!}} grep .cas {{!}} tail -n1 {{!}} awk '{print $9}') | ln -sfv output/$(ls -ltr output {{!}} grep .cas {{!}} tail -n1 {{!}} awk '{print $9}') $MYCASFILERES | ||
ln -sfv output/$(ls -ltr output {{!}} grep .dat {{!}} tail -n1 {{!}} awk '{print $9}') | ln -sfv output/$(ls -ltr output {{!}} grep .dat {{!}} tail -n1 {{!}} awk '{print $9}') $MYDATFILERES | ||
ls -lh cavity* output/* | ls -lh cavity* output/* | ||
else | else | ||
Line 696: | Line 702: | ||
#SBATCH --account=def-group # Specify account | #SBATCH --account=def-group # Specify account | ||
#SBATCH --time=00-03:00 # Specify time limit dd-hh:mm | #SBATCH --time=00-03:00 # Specify time limit dd-hh:mm | ||
##SBATCH --nodes=1 # Uncomment to specify | ##SBATCH --nodes=1 # Uncomment to specify (narval 1 node max) | ||
#SBATCH --ntasks=16 # Specify total number of cores | #SBATCH --ntasks=16 # Specify total number of cores | ||
#SBATCH --mem-per-cpu=4G # Specify memory per core | #SBATCH --mem-per-cpu=4G # Specify memory per core | ||
Line 702: | Line 708: | ||
#SBATCH --array=1-5%1 # Specify number of restart aka time steps (2 or more, 5 is shown) | #SBATCH --array=1-5%1 # Specify number of restart aka time steps (2 or more, 5 is shown) | ||
<!--T: | <!--T:3906--> | ||
module load StdEnv/2023 # Do not change | |||
module load ansys/2023R2 # Specify version (beluga, cedar, graham, narval) | |||
<!--T:3905--> | <!--T:3905--> | ||
#module load StdEnv/2020 | #module load StdEnv/2020 # no longer supported | ||
#module load ansys/2019R3 # or newer versions (narval only) | #module load ansys/2019R3 # or newer versions (narval only) | ||
#module load ansys/2021R2 # or newer versions (beluga, cedar, graham) | #module load ansys/2021R2 # or newer versions (beluga, cedar, graham) | ||
<!--T: | <!--T:4747--> | ||
MYVERSION=3d # Specify 2d, 2ddp, 3d or 3ddp | |||
MYJOUFILE=sample.jou # Specify your journal filename | |||
MYJOUFILERES=sample-restart.jou # Specify journal restart filename | |||
MYCASFILERES=sample-restart.cas.h5 # Specify cas restart filename | |||
MYDATFILERES=sample-restart.dat.h5 # Specify dat restart filename | |||
# ------- do not change any lines below -------- | |||
<!--T:4748--> | <!--T:4748--> | ||
Line 733: | Line 745: | ||
<!--T:3910--> | <!--T:3910--> | ||
if [ "$SLURM_NNODES" == 1 ]; then | if [ "$SLURM_NNODES" == 1 ]; then | ||
if [ "$SLURM_ARRAY_TASK_ID" == 1 ]; then | if [ "$SLURM_ARRAY_TASK_ID" == 1 ]; then | ||
fluent -g | fluent -g $MYVERSION -t $NCORES -affinity=0 -mpi=intel -pshmem -I $MYFILEJOU | ||
else | else | ||
fluent -g | fluent -g $MYVERSION -t $NCORES -affinity=0 -mpi=intel -pshmem -I $MYFILEJOURES | ||
fi | fi | ||
else | else | ||
if [ "$SLURM_ARRAY_TASK_ID" == 1 ]; then | if [ "$SLURM_ARRAY_TASK_ID" == 1 ]; then | ||
fluent -g | fluent -g $MYVERSION -t $NCORES -affinity=0 -mpi=intelmpi -pib -cnf=/tmp/machinefile-$SLURM_JOB_ID -i $MYJOUFILE | ||
else | else | ||
fluent -g | fluent -g $MYVERSION -t $NCORES -affinity=0 -mpi=intelmpi -pib -cnf=/tmp/machinefile-$SLURM_JOB_ID -i $MYJOUFILERES | ||
fi | fi | ||
fi | fi | ||
Line 753: | Line 764: | ||
echo | echo | ||
if [ $SLURM_ARRAY_TASK_ID -lt $SLURM_ARRAY_TASK_COUNT ]; then | if [ $SLURM_ARRAY_TASK_ID -lt $SLURM_ARRAY_TASK_COUNT ]; then | ||
echo "Restarting job with the most recent output dat file | echo "Restarting job with the most recent output dat file" | ||
ln -sfv output/$(ls -ltr output {{!}} grep .cas {{!}} tail -n1 {{!}} awk '{print $9}') | ln -sfv output/$(ls -ltr output {{!}} grep .cas {{!}} tail -n1 {{!}} awk '{print $9}') $MYCASFILERES | ||
ln -sfv output/$(ls -ltr output {{!}} grep .dat {{!}} tail -n1 {{!}} awk '{print $9}') | ln -sfv output/$(ls -ltr output {{!}} grep .dat {{!}} tail -n1 {{!}} awk '{print $9}') $MYDATFILERES | ||
ls -lh cavity* output/* | ls -lh cavity* output/* | ||
else | else | ||
Line 762: | Line 773: | ||
fi | fi | ||
else | else | ||
echo "Simulation failed. Exiting | echo "Simulation failed. Exiting now." | ||
fi | fi | ||
}} | }} |