Use PCP to bundle multiple serial jobs to run in parallel on Big Red II at IU

On this page:

Note:

Big Red II will be retired from service on November 12, 2019. After that date, you will no longer be able to log into Big Red II; however, the data in your Big Red II home directory will remain accessible from your home directory on any of the other IU research supercomputers. Following the October 13, 2019, maintenance window, UITS will no longer accept requests for new software installations on Big Red II. An expanded Big Red II+ will be made available to IU graduate students, faculty, and staff in October of 2019; Big Red 200 will be available for use by IU graduate students, faculty, and staff in January of 2020. Undergraduate students and affiliates will be able to get Big Red II+ and Big Red 200 accounts if they are sponsored by full-time IU faculty or staff members. For more, see Upcoming changes to research supercomputers at IU.


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.

Add 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 Use Modules to manage your software environment on IU's research computing systems.

Back to top

Run 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 (for example, 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 (for example, pbs_script.sh); for details, see Run batch jobs on Big Red II 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 (for example, 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 (for example, 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.

Get help

Support for IU research computing systems, software, and services is provided by various teams within the Research Technologies division of UITS.

For general questions about research computing at IU, contact UITS Research Technologies.

For more options, see Research computing support at IU.

Back to top

This is document bdka in the Knowledge Base.
Last modified on 2019-08-01 13:02:40.

Contact us

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