Jump to content
  • 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  
metalac

Multiple single threaded jobs

Recommended Posts

Hi,

We have a cluster running PBS Pro and I'm trying to run a whole bunch of singlethreaded jobs. Basically we have a code that can only run on one CPU and I want to utilize the cluster to run a parametric suite. The problem is that everytime I request one node and one cpu from PBS Pro it gets put on a different node and as a result other folks don't have access to it. Since our nodes have 8 cpus each I'd like to be able to lunch 8 instances of this code on one node, that way I don't take up 8 nodes.

I tried running something like this:

cd /case1/

./run_code &

cd /case2/

./run_code &

.

.

.

But that doesn't work since it terminates the PBS Pro job. Is there a way for PBS to wait for these jobs to finish?

Thanks.

Share this post


Link to post
Share on other sites

Hi Metalac,

It looks like you are backgrounding '&' all of the processes, so the script will exit quickly while these processes are running in the background. You might want to take a look at the job arrays topic in the user guide, and take note in the $PBS_ARRAY_INDEX environment variable to use in your job script. Not knowing much about your script, I could imagine something like

> cat job_script

#!/bin/sh

cd /case${PBS_ARRAY_INDEX}

./run_code

qsub -J 1-8 -lselect=1:ncpus=1 job_script

If you want to make sure that all of these jobs execute on the same machine, you can specify

qsub -J 1-8 -lselect=1:ncpus=1:host=$YOUR_FAV_HOST job_script

WRT your execution nodes... I am assuming that PBS does acknowledge that each node has 8 cpus. I am hoping that you can see the output of pbsnodes -av has something like

resources_available.ncpus=8

Scott

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  

×