Job Submission
How do I submit a job to the P1 DTU Cluster?
Section titled “How do I submit a job to the P1 DTU Cluster?”This cluster uses the IBM Platform LSF (Load Sharing Facility) as its workload management platform and job scheduler.
#!/bin/bash#BSUB -J my_job_name#BSUB -q p1#BSUB -o %J.out#BSUB -e %J.err#BSUB -n 8#BSUB -gpu "num=2:mode=exclusive_process"#BSUB -R "rusage[mem=4GB]"#BSUB -R "span[hosts=1]"#BSUB -W 01:00
# Load the cuda modulemodule load cuda/11.6
# Check the GPU statusnvidia-smi
# Run the deviceQuery program/appl/cuda/11.6.0/samples/bin/x86_64/linux/release/deviceQuerybsub < static.sh#!/bin/bash
set -euo pipefail # safety flags
# Read scheduler configuration from environment variables (dynamic with sensible defaults): "${SCHEDULER_JOB_NAME:?Must provide SCHEDULER_JOB_NAME}": "${SCHEDULER_EMAIL:?Must provide SCHEDULER_EMAIL}": "${SCHEDULER_CORES:=4}": "${SCHEDULER_WALLTIME:=01:00}": "${SCHEDULER_QUEUE:=p1}": "${SCHEDULER_MEMORY:=4GB}": "${SCHEDULER_GPUS:=1}"
# Executed on node: Embedded job script using heredocJOB_SCRIPT=$(cat <<'EOF'#!/bin/bashset -euxo pipefail
# Load the cuda modulemodule load cuda/11.6
# Check the GPU statusnvidia-smi
# Run the deviceQuery program/appl/cuda/11.6.0/samples/bin/x86_64/linux/release/deviceQueryEOF)
# Executed on host: Submit the job using CLI argumentsbsub \ -J "${SCHEDULER_JOB_NAME}" \ -q "${SCHEDULER_QUEUE}" \ -o "%J.out" \ -e "%J.err" \ -n "${SCHEDULER_CORES}" \ -gpu "num=${SCHEDULER_GPUS}:mode=exclusive_process" \ -R "rusage[mem=${SCHEDULER_MEMORY}]" \ -R "span[hosts=1]" \ -W "${SCHEDULER_WALLTIME}" \ <<< "$JOB_SCRIPT"# Make the script executablechmod +x dynamic.sh
# Source the .env file (optional)source .env
# Or override explicitlyexport SCHEDULER_JOB_NAME="my_job_name"export SCHEDULER_CORES=8export SCHEDULER_MEMORY=8GBexport SCHEDULER_GPUS=2export SCHEDULER_WALLTIME=02:00export SCHEDULER_QUEUE=p1
# Execute the script./dynamic.shHow do I submit a job to the P1 NGC Cluster?
Section titled “How do I submit a job to the P1 NGC Cluster?”This cluster uses the PBS (Portable Batch System) as its workload management platform and job scheduler.
#!/bin/bash#PBS -A my_project_or_account_name#PBS -N my_job_name#PBS -l nodes=1:ppn=6:gpus=1#PBS -l mem=5gb#PBS -l walltime=3:00:00#PBS -o %J.log#PBS -j oe
cd $PBS_O_WORKDIR
# Load modulesmodule load cmake/3.22.2module load miniconda3/4.12.0
# Activate Conda environmentconda activate MyEnv
# Call main entrypoint/scriptpython3 myscript.pysbatch < static.job