Published on intrepid.com (http://www.intrepid.com)

Cray XT3 GCC UPC Compiler

Cray logoGCC UPC  supports the Catamount and CNL  computing nodes and is designed to work with Berkeley UPCR runtime.

The current version of GCC UPC for Cray XT3 systems is 4.0.3.3.

NOTE 1: GCC UPC is not available in traditional software module form.

Build the GCC UPC Compiler

The procedure for building the GCC UPC compiler is detailed bellow. Basic system tools available on the service node are used to build GCC UPC. 

You are now ready to use the GCC UPC compiler.

Installing Berkeley's runtime for XT

Download the latest release of the Berkeley UPC runtime [2]. Please review the INSTALL document for an overall description of the installation process. Check the section "GCC UPC BINARY COMPILER SUPPORT" for particulars in choosing the GCC UPC compiler as a back-end UPCR compiler.

Please review README.CrayXT3 [2] that comes with the latest Berkeley's runtime for Cray XT3.

Compile and Run a simple UPC test program

The following example is for the system where GCC UPC is used as a back-end compiler for Berkeley's UPC runtime.

Once the compiler has been built and installed (both GCC UPC and UPCR), make sure that upcc command (from UPCR) is on your path (and gcc upc is NOT) and try running the following simple test program:

$ mkdir ~/upctest
$ CD ~/upctest
$ cat > hello.upc << EOF
#include <upc.h>
#include <stdio.h>
int main (int argc, char *argv[])
{
int i;
for (i = 0; i < THREADS; ++i)
{
upc_barrier;
if (i == MYTHREAD)
printf ("Hello world from thread: %d\n", MYTHREAD);
}
return 0;
}
EOF
> upcc -o hello hello.upc
> qsub -I -l -size 2
> upcrun -n 2 ./hello
UPCR: UPC thread 0 of 2 on guppy (process 0 of 2, pid=5)
UPCR: UPC thread 1 of 2 on guppy (process 1 of 2, pid=6)
Hello world from thread: 0
Hello world from thread: 1


Reporting Problems and Issues

To report problems or get the latest news concerning bug fixes, subscribe or send email to the GCC UPC mailing list [3].


Limitations

The maximum number of threads is limited to number of available processors.


Source URL:
http://www.intrepid.com/upc/cray_xt3_upc.html