Unified Parallel C (UPC) is an extension of the C programming language designed for high performance computing on large-scale parallel machines.The language provides a uniform programming model for both shared and distributed memory hardware. The programmer is presented with a single shared, partitioned address space, where variables may be directly read and written by any processor, but each variable is physically associated with a single processor. UPC uses a Single Program Multiple Data (SPMD) model of computation in which the amount of parallelism is fixed at program startup time, typically with a single thread of execution per processor.

Installed on blacklight and salk.

Blacklight version

SGI UPC is installed on blacklight.

To use UPC:

  1. Load the UPC module.
    module load sgi-upc-devel
  2. Compile your code with sgiupc
    sgiupc prog.c -o prog
  3. Create a batch job to do the following things:
    1. Set up the module command.
    2. Load the UPC module
      module load sgi-upc-devel
    3. Run the job with mpirun
      mpirun -np $PBS_NCPUS ./prog
  4. Submit the job with the qsub command. See the qsub documentation on blacklight for more information.

Salk version

The version installed is Berkeley Unified Parallel C compiler 2.6.0.

The upcc executables are in /usr/local/packages/bupc-2.6.0/bin.

The number of threads can be specified at compilation or at run time.

At compilation:

/usr/local/packages/bupc-2.6.0/bin/upcc -pthreads=2 prog.upc
/usr/local/packages/bupc-2.6.0/bin/upcrun prog 

At run time:

/usr/local/packages/bupc-2.6.0/bin/upcc -pthreads prog.upc
/usr/local/packages/bupc-2.6.0/bin/upcrun -n 2 prog
Last Updated on Friday, 27 April 2012 15:38  

More on UPC

Sample jobs

For blacklight

For salk

See also

The UPC website at LBNL, which includes a description of UPC, user documentation, and demos, among other things.

User Information

PSC Passwords

Connect to PSC systems:

PSC Policies

For technical questions:
Call the PSC hotline: 412-268-6350 / 800-221-1641 or mail to remarks@psc.edu.

Other services PSC provides:

Advanced Networking: High-speed network design, testing and tuning

3ROX: High-speed network access

Biomedical Applications: Computational biomedical research and training