On Big Red II at IU, how do I use PCP to bundle multiple serial jobs to run them in parallel?

On this page:


Overview

Parallel Command Processor (PCP), developed by the Ohio Supercomputer Center (OSC) and the National Institute for Computational Sciences (NICS), is an application that lets you bundle multiple serial jobs and run them concurrently.

Using PCP to bundle and run your serial jobs in parallel lets you make efficient use of all the cores on a compute node. Conversely, running one serial job at a time can waste more than 90% of a node's computational power. PCP also lets you request multiple nodes for your jobs.

PCP is especially useful for running parametric studies and Monte Carlo simulations.

Adding PCP to your Big Red II user environment

At Indiana University, PCP is available on Big Red II. To add PCP to your user environment on Big Red II, load the pcp/2008 module; on the command line, enter:

  module load pcp/2008

To make permanent changes to your environment, edit your ~/.modules file. For more, see Use a .modules file in your home directory to save your user environment on an IU research supercomputer.

For more about using Modules to configure your user environment, see On the research computing systems at IU, how do I use Modules to manage my software environment?

Back to top

Running multiple serial jobs in parallel with PCP

For a parallel job with N processors allocated, the PCP manager process will read the first N-1 commands in the command stream and distribute them to the other N-1 processors. As processes complete, the PCP manager reads the next process in the stream and runs it on an idle core.

For example, to run 31 serial jobs in parallel on Big Red II:

  1. Create a text file (e.g., list.txt), listing each job, one per line:
      ./a.out > o1.txt 
      ./a.out > o2.txt
      ./a.out > o3.txt
    
      .......
    
      ./a.out > o30.txt
      ./a.out > o31.txt
  2. Create a TORQUE job script (e.g., pbs_script.sh); for details, see How do I run batch jobs on Big Red II at IU? In your script:
    • Request the number of cores needed to run all the jobs and the PCP manager process (for this example, you'd need to request 32 cores to run the 31 jobs in list.txt plus the PCP manager process).
    • Launch PCP with aprun to execute the jobs listed in your text file (e.g., list.txt).

    For example:

      #!/bin/bash
      #PBS -l nodes=1:ppn=32
      #PBS -l walltime=00:10:00
      #PBS -N my_job
      #PBS -q cpu
      #PBS -V
      aprun -n 32 pcp list.txt
  3. Submit the script (e.g., pbs_script.sh) from the command line using qsub:
      qsub pbs_script.sh

As a result, the 31 serial jobs in list.txt will run in parallel on Big Red II. When the PCP manager runs out of commands to run, it will wait for any remaining running processes to complete, and then shut itself down.

Getting help

Support for IU research computing systems, software, and services is provided by the Research Technologies division of UITS. To ask a question or get help, contact UITS Research Technologies.

Back to top

This is document bdka in the Knowledge Base.
Last modified on 2018-10-10 18:25:37.

Contact us

For help or to comment, email the UITS Support Center.