NCSA Home
Contact Us | Intranet | Search

ncsa

Previous: Scheduler_Change
Next: UniTree
View by Date; View by Name

Setting Threads

Setting the number of threads:

Note: Please use the BSUB -n option in your batch jobs in addition to 
the appropriate option listed below.

UPDATE: 7/15/98 
In batch jobs, the environment variable $BSUB_NUMTHREADS is set to the 
number specified in the BSUB -n option, so can be used for setting the 
number of threads for your program.  For example:

    setenv MP_SET_NUMTHREADS $BSUB_NUMTHREADS

    mpirun -np $BSUB_NUMTHREADS a.out


1. For a parallel job that uses SGI native parallelism through the compiler 
(options -pfa, -pca, -mp), set the following environment variable:

        setenv MP_SET_NUMTHREADS n

where n is the number of threads you want.

By default, n is set to 1.


2. For an MPI job, use the -np or -p option to mpirun. See the
mpirun man page for details.


3. For a PGHPF (Portland Group High Performance Fortran) job:

Using command line options: 

     a.out -pghpf -np n 

Using environment variables: 

     setenv PGHPF_NP n

or

     setenv PGHPF_OPTS "-np n"

(PGHPF_OPTS can also be used to set other PGHPF environment variables)

By default, n is set to 1.

Command line options over-ride environment variables and individual 
environment variables over-ride the PGHPF_OPTS environment variable. 
See the PGHPF User's Guide, available off:

    http://mithril.ncsa.uiuc.edu/Systems/doc/pghpf/

4. For SHMEM jobs:

      setenv NPES n

where n is the number of threads you want.

Silicon Graphics Origin2000:usr/news/Setting_Threads
Last Modified: July 15, 1998