UPC

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 pople, salk, and Big Ben.

Pople and 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

Also see the example job.

Big Ben version

The version installed is 2.3.16, beta release, from Berkeley UPC - a joint project of LBNL and UC Berkeley.

To use UPC, prepare a job script containing commands to:

  • Unload the PrgEnv-pgi module, which is loaded for you by default, and load the PrgEnv-gnu and upc modules.
    module unload PrgEnv-pgi
    module load PrgEnv-gnu
    module load upc
    
  • Compile with
    upcc [-T=num-threads] -o prog prog.upc
  • Execute the program with:
    pbsyod ./prog 

Submit the job script with a qsub command.

Also see the example job.

See also

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