• Home
  • Accessing Our Facilities
    • Apply for Access
    • HPC Resource List
    • Our Staff
    • Our Research Projects
    • Our Research Software

    • Contributions & Costings
    • HPC Driving Test
  • Documentation
    • Documentation Home
    • Getting Started
    • Advanced Topics
    • Training & Workshops
    • FAQ
    • Policies & Procedures
    • Using the Wiki

    • Data & Report Terminology
    • About this website
  • My Account
    • My HPC Projects
HPC Support
Trace: • job_long

Long Running Slurm Job

This is a variant of the simple sequential Slurm job, but we move the submission of the job to the long partition which allows for jobs running more than 48 hours:

  • Uses the HPC Project group myhpcproject; change to use your real HPC Project name
  • Submitted to the free long_free partition (–partition=long_free)
  • Requests 1 CPU (–cpus-per-task=1)
  • Requests 1GB of RAM (–mem=1G)
  • Requests up to 7 days of runtime (–time=7-00:00:00), for a maximum possible total of 168 Compute Hours (cpus_per_task * time_in_hours)
  • Prints the time the job started to the log file
  • Prints the name of the compute node(s) it will run on
  • Prints the time the job finished to the log file

#!/bin/bash

#SBATCH --account=myhpcproject
#SBATCH --partition=long_free
#SBATCH --cpus-per-task=1
#SBATCH --mem=1G
#SBATCH --time=7-00:00:00

# Log when we started
echo "Job started at: `date`"

# Show which node(s) we are running on
HOSTNAMES=`scontrol show hostnames $SLURM_JOB_NODELIST`
echo "Job is running on: $HOSTNAMES"

# Add any 'module load' commands here

# Add your custom commands you want to run here

# Log when we finished
echo "Job finished at: `date`"


Back to Getting Started

Previous Next

HPC Support

Table of Contents

Main Content Sections

  • Documentation Home
  • Getting Started
  • Advanced Topics
  • Training & Workshops
  • FAQ
  • Policies & Procedures
  • Using the Wiki
  • Contact us & Get Help

Documentation Tools

  • Wiki Login
  • RSE-HPC Team Area
Developed and operated by
Research Software Engineering
Copyright © Newcastle University
Contact us @rseteam