The GUPC compiler can be used to compile UPC programs which are linked the GASNet based UPC runtime (called UPCR) developed by Berkeley (LBNL). The GUPC and Berkeley (UPCR) runtime combination is available on all platforms supported by GUPC. Use of the UPCR runtime increases the range of communication methods that can be used to implement UPC remote access and synchronization primitives. More information on the Berkeley UPCR project site.

Follow these steps to build GUPC with the Berkeley UPCR runtime support.

  • Download the latest GUPC release and follow the installation instructions
  • Download the latest Berkeley UPCR runtime and follow the instructions on building UPCR with GUPC support. Please consult the INSTALL.txt document on specifics of the port.

This small example demonstrates the process of integrating the GUPC compiler and the Berkeley runtime. For simplicity, a hypothetical directory structure under '/upc' will be used for building both the GUPC compiler and the Berkley UPCR runtime.

Source release tar files for both the GUPC and the Berkeley runtime unpack in their respective top level directories (e.g. gnu-upc-4.8.0.3). Please replace "unpacked-gupc-dir" and "unpacked-upcr-dir" with the correct directory names in the example bellow.

  • Configure and build the GUPC compiler.
    % mkdir /upc/gupc
    % cd /upc/gupc
    % mkdir src bld rls
    % cd src
    % tar xfz gupc-source-tar-file.tar.gz
    % cd ../bld
    % ../src/unpacked-gupc-dir/configure --enable-languages=c,c++,upc --prefix=/upc/gupc/rls
    % make -j 8
    % make install
    
  • Verify that the GUPC compiler is operational.
    % /upc/gupc/rls/bin/upc --version
    [...]
    upc (GCC) 4.8.0 20130311 (GNU UPC 4.8.0-3)
    [...]
    
  • Configure and build the Berkeley UPCR toolset and runtime.
    % mkdir /upc/upcr
    % cd /usr/upcr
    % mkdir src bld rls
    % cd src
    % tar xfz upcr-source-tar-file.tar.gz
    % cd ../bld
    % ../src/unpacked-upcr-dir/configure GUPC_TRANS=/upc/gupc/rls/bin/upc \
            --prefix=/upc/upcr/rls \
            --with-multiconf=+dbg_gupc,+opt_gupc
    % make -j 8
    % make install
    
  • Verify that the Berkeley UPCR toolset is operational by checking that line "Translator location" of the compiler output contains the GUPC compiler specified during the configuration step.
    % /upc/upcr/rls/bin/upcc -gupc -V
    [...]
    ----------------------+---------------------------------------------------------
     UPC-to-C translator  | 4.8.0-3, built on Mar 14 2013 at 00:17:27
    ----------------------+---------------------------------------------------------
     Translator location  | /upc/gupc/rls/bin/upc
    ----------------------+---------------------------------------------------------
    [...]
    
Go to top