• eResearch
    • Collaborative Technologies
      • ARDC (Australian Research Data Commons)
      • ARDC Nectar Research Cloud
      • Australian Access Federation
      • QRIScloud
      • Video Collaboration
    • Data Management
      • Research Data Management Plans
    • Data Services
      • Australian and International Data Portals
      • CQUni Research Data Storage Options
      • CQUniversity Research Data Storage
      • GEOSCIENCE DATA PORTALS
    • eResearch and Security: MFA and CyberSafety
      • Encrypting Data on Portable Devices
    • High Performance Computing
      • The History of CQU’s HPC Facilities
        • Ada Lovelace Cluster (Current)
        • Marie Curie Cluster (Decommissioning)
        • Einstein Cluster (Decommissioned)
        • Isaac Newton HPC Facility (Decommissioned)
      • HPC User Guides and FAQs
        • Basics of working on the HPC
        • Getting started on CQUniversity’s Ada Lovelace HPC System
        • Compiling Programs (and using the optimization flags)
        • Creating a Conda Enviroment
        • Finding Installed Software
        • Frequently Asked Questions
        • Graphical connection HPC via Open On Demand
        • HPC Trouble Shooting
        • LLM’s on Ada Cluster
        • Machine and Deep Learning modules on Ada
        • PBS to Slurm Command tables (HPC Scheduler)
        • Running Python on Ada
        • Simple Unix Commands
        • Slurm Commands
        • Software Module Information
        • Transferring Files to the HPC System (Ada)
        • Using Abaqus
        • Using ANSYS (Fluent) on the HPC System
        • Using APSIM
        • Using HPC Scheduler on Ada Lovelace Cluster
        • Using MATLAB
        • Using R
        • Virtualisation and Containers
      • HPC Community
      • HPC Related Links
      • HPC Sample Code Scripts
        • Multiple Job Submission – Slurm
        • Parameter sweep multiple job – Slurm
        • R Sample Scripts – Slurm
        • Sample Slurm Submission Script
      • HPC Software
    • Research Software
    • Scholarly Communication
    • Survey Tools
    • Training
      • QCIF – Queensland Cyber Infrastructure Foundation
      • Teaching Lab Skills for Scientific Computing

eResearch

MULTIPLE JOB SUBMISSION

There are many times when users may need to execute their programs multiple times, particularly when random number generation is being used.

Some general notes:

  • The variable $SLURM_SUBMIT_DIR indicates the directory where the Slurm script file is located and launched from.
  • The program executable hello.exe is a simple “Hello World” program and can be replaced with your own executable files.
  • The “email user” section within the Slurm submission has been purposely removed – as you don’t want to have 10 emails sent to you each time you run this script.
  • You can change the number of times you would like the program to execute by simple changing the “for ((i=1; i<=10; i+=1))” and replacing the 10 value with a value of your choice.
  • The “jobname” will be set to Multi-Job_[$1], where $1 is the job number.  You may wish to change the jobname to something different.

The details for this script can be found below:

multi-submit.slurm


#!/bin/bash

for ((i=1; i<=10; i+=1))
do
    jobname=Multi-Job_$i
    cat << EOF | sbatch

###### Select resources #####
#SBATCH -J $jobname
#SBATCH -c 1
#SBATCH -mem=1g
#
##### Queue #####
#SBATCH -q workq
#
########## Output File ##########
#SBATCH -o \$SLURM_SUBMIT_DIR/$jobname.txt
#
########## Error File ##########
#SBATCH -e \$SLURM_SUBMIT_DIR/$jobname.err
#
##### Change to current working directory #####
cd \$SLURM_SUBMIT_DIR
#
##### Execute Program #####
./hello.exe
#
EOF
#
done

Support

eresearch@cqu.edu.au

tasac@cqu.edu.au OR 1300 666 620

Hacky Hour (3pm – 4pm every Tuesday)

High Performance Computing Teams site