Sign in to follow this  
Followers 0
kpolsen

How to run hundreds of small jobs in serial on different cores

1 post in this topic

Hi there,

I'm interested in running more than a thousand small programs, each taking up only about 300MB in memory and lasting maybe 20 min (as measured on my own laptop). The way I've done this in the past, has been to run reserve one node and use all cores at the same time. If the node has 12 cores, say, I would write my batch script such that 12 programs are always running at the same time. Now I need to know the best way of doing this with PBS!

I'm used to writing my batch scripts with the SLURM manager, where my batch script would look something like this:

#!/bin/bash

#SBATCH -J <jobname># Job name
#SBATCH -p serial                   # Send this job to the serial partition
#SBATCH -n 12                       # number of cores
#SBATCH -a <start>-<stop>%12
#SBATCH -t 0-12:00                  # wall time (D-HH:MM)
#SBATCH -o GMC_z6.%j.out             # STDOUT (%j = JobId)
##SBATCH -e GMC_z6.%j.err             # STDERR (%j = JobId)
##SBATCH --mail-type=begin,end        # notifications for job done & fail
##SBATCH --mail-user=kpolsen@asu.edu # send-to address

module load gcc/4.9.2

../../cloudy/source/cloudy.exe -p GMC_$((<SLURM_ARRAY_TASK_ID>))

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0