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

GCC UPC Configuration and Installation

Installing GCC UPC from the source

The gzip'ed source tar file contains the source code that can be configured and installed on any of the supported systems.

To configure and install from the source release use the following steps:

  1. Download and unpack the source gzip'ed tar file (assume that source, build, and release directory are located under /upc/)
    mkdir /upc
    mkdir /upc/src
    mkdir /upc/wrk
    mkdir /upc/rls
    cd /upc/src
    tar xpzf /upc/download/upc-4.2.3.4 .src.tar.gz

  2. Configure source release
    cd /upc/wrk
    /upc/src/upc-4.2.3.4 /configure --prefix=/upc/rls [...]

    GCC UPC 4.2.3.3 accepts various configuration options that affect code size and execution efficiency:

    --with-upc-pts=packed
    Packed shared pointer representation (default). More efficient, but limits the maximum layout specifier (block size) to 65536, number of threads to 4096.

    --with-upc-pts=struct
    Structure shared pointer representation. Compatible with previous implementations of GCC UPC. Supports a large layout specifier and maximum number of threads.

    --disable-boostrap
    By default, GCC/UPC will be built in three stages, where in the last stage the built compiler compiles itself. Bootstrapping is a useful method of verifying that the compiler is operational, but it takes three times as long to build the compiler. Specifying --disable-bootstrap reduces build time to 1/3 of the default build time.

    --disable-upc-affinity
    When supported by the underlying OS, take advantage of cpu affinity support (default). Specifying --disable-upc-affinity will build the GCC/UPC runtime without cpu affinity support.

    --disable-upc-numa
    When supported by the underlying OS, the GCC/UPC runtime will take advantage of NUMA support. This is enabled by default. Specifying --disable-upc-numa will build the GCC/UPC runtime without NUMA support.

    --disable-upc-link-script
    When supported by the underlying OS, the GCC/UPC compiler will create linkage sections for shared variables that are tagged as "no load" sections. The --disable-upc-link-script configuration switch disables the use of the custom linker script that is used to implement the "no load" section.

    --enable-checking
    Primarily intended as an aid to developers, the --enable-checking enables various internal checks within the GCC/UPC compiler. Compilations will be slower, but the checking can help catch bugs in the compiler's internal logic.

  3. Build binary release and install

    make
    make install

  4. Place /usr/local/upc/bin in your shell's path variable, and the GCC/UPC compiler is ready to use. The 'upc' command invokes the compiler.

Installing from a binary release

The gzip'ed tar files contain an installable binary release of the UPC compiler, built for their respective target platforms.

All the binary releases are built with the following configuration options:

The binary release is built to install under /usr/local/upc. However, the release can be installed in any convenient location - the 'upc' command finds the programs it requires, relative to its location.


The tar file contains paths which do not begin with "/". They are relative to the root directory. To install in /usr/local/upc, issue the following commands (the Linux Intel 686 release is illustrated below):

cd /
tar xpf upc-4.2.3.4 -PLATFORM.tar.gz

The commands above, must be issued from a sysadmin account that has write access to /usr/local. A /usr/local/upc directory will be created.

If you want to install and run the compiler somewhere else, then you'll need to set the UPC_EXEC_PREFIX environment variable (note: the directory name must end with a "/"). Here's an example, where the compiler was installed in /upc/test/usr/local/upc:

cd /upc/test
rm -rf usr/local/upc
gunzip -c < /upc/upc_bin_rls/upc-4.2.3.4 -PLATFORM.tar.gz | tar xpf -
setenv UPC_EXEC_PREFIX /upc/test/usr/local/upc/bin/
/upc/test/usr/local/upc/bin/upc count.upc
a.out -fupc-threads-5
1 2 3 4 5

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