Skip to content

Commit

Permalink
Add render jobs, move scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
unkaktus committed Feb 16, 2023
1 parent ef505b3 commit 8f1d3ac
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
16 changes: 16 additions & 0 deletions render/job.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash -l
#SBATCH -J rose
#SBATCH -o /path/to/rose/states/rose.out
#SBATCH -e /path/to/rose/states/rose.err
#SBATCH --mail-type=ALL
#SBATCH [email protected]
#SBATCH --ntasks=21
#SBATCH --nodes=3
#SBATCH --ntasks-per-node=7
#SBATCH --time=48:00:00

source /home/SPACK2023/share/spack/setup-env.sh
module load apptainer-1.0.3-gcc-12.2.0-aojy6ca

cd /path/to/rose
srun -n 21 ./render.sh states/state.pvsm
15 changes: 15 additions & 0 deletions render/render.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash
# This script is to be called from the batch job,
# so that Slurm environment variables are set after scheduling.

STATE_NAME=${1%.*}
TOTAL_TASK_NUMBER=21
echo "State name: $STATE_NAME"
mkdir -p "$STATE_NAME"

apptainer exec --bind /scratch:/scratch \
/path/to/rose.sif render_state.py \
--state=$1 \
--total-task-number=$TOTAL_TASK_NUMBER \
--task-id=$(($SLURM_NODEID*$SLURM_NTASKS_PER_NODE + $SLURM_LOCALID)) \
--output-dir=$STATE_NAME
File renamed without changes.

0 comments on commit 8f1d3ac

Please sign in to comment.