Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F78367352
occupy_one_node.sh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Aug 20, 07:14
Size
537 B
Mime Type
text/x-shellscript
Expires
Thu, Aug 22, 07:14 (2 d)
Engine
blob
Format
Raw Data
Handle
20033665
Attached To
rSCEXAMPLES SCITAS examples on how to run on the clusters
occupy_one_node.sh
View Options
#!/bin/bash -l
#SBATCH --nodes 1
#SBATCH --time 00:10:00
#SBATCH --ntasks-per-node 16
for i in $(seq 1 ${SLURM_TASKS_PER_NODE})
do
echo "${i} ${SLURM_JOBID} -> $TASK_ID"
#determine a new output file for the fake_task
OUTPUT_FILE=${SLURM_SUBMIT_DIR}/slurm-${SLURM_JOBID}_${i}.out
### Add you script here with ${TASK_ID} as an argument
### the & at the end is important !!!
./my_test_script.sh ${i} > ${OUTPUT_FILE} 2>&1 &
#stores the pids for the wait at the end
PIDs[$i]=$!
done
wait ${PIDs[*]}
Event Timeline
Log In to Comment