Unified Parallel C (UPC)
UPC is a PGAS (Partitioned Global Address Space) language that offers an alternative to MPI and OpenMP. Unified Parallel C is an extension of the C programming language designed for high performance computing on large-scale parallel machines. The language provides a uniform programming paradigm 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.
How to use UPC
UPC is available on Blue Waters using the Cray C compiler through Cray programming environment software modules. UPC is fully integrated into the Cray C compiler. The Cray Compiler takes advantage of the new functionality available with DMAPP on Gemini interconnect to support the UPC operations. DDT support is available for debugging UPC programs. Similar to other PGAS languages such as CAF, hugepage may be needed for UPC programs.
First, issue the following command to load the Cray Programming Environment (UPC is supported only with the Cray Programming Environment)
$ module load PrgEnv-cray
-h upc option should be added to compile
$ cc –h upc –o hello_upc hello_upc.c
Running an upc job:
$ aprun –n 16 –N 2 ./hello_upc