• Announcements

    • admin

      PBS Forum Has Closed   06/12/17

      The PBS Works Support Forum is no longer active.  For PBS community-oriented questions and support, please join the discussion at http://community.pbspro.org.  Any new security advisories related to commercially-licensed products will be posted in the PBS User Area (https://secure.altair.com/UserArea/). 
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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  
Followers 0