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

Linux Fedora Core amd64-based UPC compiler

The current version of GCC UPC for AMD 64 is 4.2.3.3.

AMD64 OPTERON

To configure, build, and install AMD 64 GCC UPC please follow instructions on the configuration page [0].

Compile and Run a simple UPC test program

Once the compiler has been built and installed, 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
$ upc -fupc-threads-4 hello.upc -o hello
$ ./hello

The output should appear as follows:

Hello world from thread: 0
Hello world from thread: 1
Hello world from thread: 2
Hello world from thread: 3


Known Problems and Issues

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


Limitations

The following limitations apply to number of threads and maximum layout specifier (block size) based on the shared pointer layout (packed or structure):

 

packed

structure
number of threads  2^12 (12 bits)
 2^16 (16 bits)
block size  2^16-1 (16 bits)  2^48-1 (48 bits)

An operating system process is created for each UPC thread. Therefore, the maximum number of supported threads is further constrained by system capacity limitations, such as available swap space and process load. Typically, a UPC program will fail with the diagnostic "UPC initialization failed. Reason: Resource temporarily unavailable, if there are insufficient system resources to create the requested number of threads.

On Linux platforms, the user's main program is renamed to upc_main to work around a restriction in the linker. The actual main program entry is in the UPC runtime library.


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