| Article Index |
|---|
| GCC UPC Configuration |
| Installing from a binary release |
| All Pages |
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:
- 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 - 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. - Build binary release and install
make
make install - 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/upcMac OS X (Leopard)
/upc/src/configure --prefix=/usr/local/upc --without-gnu-ld \Mac OS X (Snow Leopard) 64 bit compiler
--with-gmp=/opt/local --with-mpfr=/opt/local
/usr/src/configure --prefix=/usr/local/upc --without-gnu-ld \SGI Irix 6.5 with 64 bit ABI by default
--build=x86_64-apple-darwin10 \
--with-gmp=/opt/local --with-mpfr=/opt/local
/upc/src/configure --prefix=/usr/local/upc \Cray XT3/4/5
--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
/upc/src/configure --prefix=/upcdir_release_path \Cray T3E (GCC UPC Version 3.4.4.1)
--build=x86_64-[catamount,cnl]-linux-gnu
/upc/src/configure --prefix=/usr/local/upc \Then build and install the compiler.
--with-as=/opt/ctl/bin/cam \
--with-ld=/opt/ctl/bin/cld \
--enable-languages="upc"
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





