GCC UPC

... Unified Parallel C

  • Increase font size
  • Default font size
  • Decrease font size

GCC UPC Configuration

E-mail Print PDF
Article Index
GCC UPC Configuration
Installing from a binary release
All Pages
GCC UPC is developed and released under GPL license. The source, as well as some pre-built binary packages, are released for each version of GCC UPC. Although, configuring and building GCC UPC is similar to configuragin GCC itself, this document provides some guidance and help in building and installing GCC UPC, as well as descibing options that are GCC UPC specific.

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.3.2.5.src.tar.gz
  2. Configure source release
    cd /upc/wrk
    /upc/src/upc-4.3.2.5/configure --prefix=/upc/rls [...]

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

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

    --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.

    --with-upc-packed-bits=phase,thread,addr
    Packed shared pointer layout. Allows the user to specify number of bits allocated for each filed of the shared pointer. Sum of the specified fields must be 64. Default values are: addr=36 thread=12 phase=16.

    --upc-pts-vaddr-order=[first,last]
    Define if vaddr goes first or last in the shared pointer representation. Applys to both packed and struct. Default is first.

    --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. Link script is enabled for GNU linker only.
    --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.


    NOTE: GCC/UPC 4.3 and higher requires GMP and MPFR libraries to build and install. If those libraries are installed in non-standard areas (e.g. /usr/include, /usr/lib), their position must be specified on the configuration line with "--with-gmp" and "--with-mpfr" configuration switches.

    NOTE: SGI and Mac ports do not use GNU linker for creating executable programs and an option "--without-gnu-ld" is used on the configuration command line.
  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.


SAMPLE CONFIGURATIONS:
Linux hosts
/upc/src/configure --prefix=/usr/local/upc
Mac OS X (Leopard)
/upc/src/configure --prefix=/usr/local/upc --without-gnu-ld \
--with-gmp=/opt/local --with-mpfr=/opt/local
Mac OS X (Snow Leopard) 64 bit compiler
/usr/src/configure --prefix=/usr/local/upc --without-gnu-ld \
--build=x86_64-apple-darwin10 \
--with-gmp=/opt/local --with-mpfr=/opt/local
SGI Irix 6.5 with 64 bit ABI by default
/upc/src/configure --prefix=/usr/local/upc \
--with-gnu-as --with-as=/usr/local/bin/gas \
--without-gnu-ld --with-ld=/bin/ld \
--with-gmp=/usr/local --with-mpfr=/usr/local \
--with-abi=64
Cray XT3/4/5
/upc/src/configure --prefix=/upcdir_release_path  \
--build=x86_64-[catamount,cnl]-linux-gnu
Cray T3E (GCC UPC Version 3.4.4.1)
/upc/src/configure --prefix=/usr/local/upc  \
--with-as=/opt/ctl/bin/cam \
--with-ld=/opt/ctl/bin/cld \
--enable-languages="upc"
Then build and install the compiler.
make LD="/opt/ctl/bin/cld" CFLAGS_FOR_TARGET=\
"-g -O2" CFLAGS="-g -h tolerant"

Review the log file for any changes and install the compiler if no errors were reported.

make LD=/opt/ctl/bin/cld CFLAGS_FOR_TARGET=\
"-g -O2" CFLAGS="-g -h tolerant" install


Last Updated on Monday, 22 February 2010 09:02  

Downloads

download
latest version

4.3.2.5

search gccupc