You are here: Home Resources Software Installed Software Compilers and Languages UPC

UPC

how to compile and run a UPC code on Lindgren

UPC is available on Lindgren via the Cray Compilation Environment (CCE). To load the CCE:

module swap PrgEnv-pgi PrgEnv-cray

To compile your UPC code:

cc -h upc -o UPCexec UPCcode.c

Note that "-h upc" flag for the cc compiler.

To run the UPC code, use the aprun command. This batch script is an example for running the UPC code on 4 cores of 1 node:

#PBS -l mppwidth=4
#PBS -l mppnppn=4
#PBS -l walltime=00:10:00
#PBS -j eo
#PBS -V
cd $PBS_O_WORKDIR
aprun -n 4 ./UPCexec > output_upc

You can also read more general information about PDC's research on PGAS languages on our research web.