Co-Array Fortran at Rice

CAF Home | Documentation | Examples | Publications | Performance | Links | Project Contacts


Last Updated 08/07/05

Co-Array Fortran Sample Programs

Downloading the Sources

To reduce the effort needed to distribute the Co-Array Fortran Sample Programs (caf-programs), we have opted to distribute it in source form only. Source files for the programs are distributed via anonymous CVS checkout.

  1. To retrieve the source files from CVS, you will need to download hipersoft-anonssh an ssh script that contains a key that will grant you read-only access to the Hipersoft CVS repositories at Rice University. Save this script in ${HOME}/bin/hipersoft-anonssh and change permissions to make it executable.

  2. Set up the required CVS environment variables to enable you to access the caf-programs repository.

    (csh variants)
    setenv CVS_RSH ${HOME}/bin/hipersoft-anonssh
    setenv CVSROOT :ext:anoncvs@koolkat2.cs.rice.edu:/Volumes/cvsrep/developer

    (sh variants)
    export CVS_RSH=${HOME}/bin/hipersoft-anonssh
    export CVSROOT=:ext:anoncvs@koolkat2.cs.rice.edu:/Volumes/cvsrep/developer

  3. Use CVS to check out the cafc sources using the command

    cvs co caf-programs

External Packages

caf-programs need the following external packages: the Rice Co-Array Fortran Compiler (cafc), MPI and possibly other vendor-specific communication libraries, such as GM and Quadrics.

cafc Notes:
Review the instructions on downloading and installing cafc.

MPI Notes:
Review the information about downloading and building MPICH, the open-source implementation of MPI. Information about vendor MPI implementations can be obtained from vendors' web sites.


Building caf-programs

  1. Change to the caf-programs directory
    cd caf-programs
  2. Run the configure script. Use configure --help for all available options. The most important options are

    --with-cafc CAF compiler
    --with-mpi MPI root
    --with-gm Myrinet GM root (if necessary)
    --with-VendorCXX vendor C++ compiler
    --with-VendorF90 vendor Fortran 90 compiler (/usr/local/bin/f90)
    --with-bindest destination directory for NPB binaries (default caf-programs/bin)
    The configure script will try to infer the vendor C, C++ and Fortran 90 compilers. The default values are:

    - Linux (IA32): gcc, g++, ifort
    - Linux (IA64): gcc, g++, ifort
    - Alpha : cc, cxx, f90
    - IRIX64 : cc, CC, f90
  3. Build the unit tests:
    cd TestSuite
    cd barrier; make; cd -
    cd cafsum; make; cd -
    cd ccafsum; make; cd -
    cd dcafsum; make; cd -
    cd synchteam;make; cd -
    cd ..
  4. Build the CAF implementation of the NAS benchmarks (based on version 2.3) MG, CG, BT, SP and LU. The most efficient implementations of the benchmarks are in the directories MG-CAF, CG-CAF, BT-CAF, SP-CAF and LU-CAF, using the Makefile.procsplit makefiles that enable the procedure splitting transformation. This file describes the various NPB MPI and CAF versions present in the NPB-2.3 directory.

    cd NPB-2.3
    cd MG-CAF; make CLASS= NPROCS= -f Makefile.procsplit ; cd -
    cd CG-CAF; make CLASS= NPROCS= -f Makefile.procsplit ; cd -
    cd BT-CAF; make CLASS= NPROCS= -f Makefile.procsplit ; cd -
    cd SP-CAF; make CLASS= NPROCS= -f Makefile.procsplit ; cd -
    cd LU-CAF; make CLASS= NPROCS= ; cd -
    cd -

  5. Build the MPI implementation of the NAS benchmarks 2.3 MG, CG, BT and SP:

    cd NPB-2.3
    cd MG; make CLASS= NPROCS= ; cd -
    cd CG; make CLASS= NPROCS= ; cd -
    cd BT; make CLASS= NPROCS= ; cd -
    cd SP; make CLASS= NPROCS= ; cd -
    cd LU; make CLASS= NPROCS= ; cd -
    cd -

  6. Build the sequential implementation of the NAS benchmarks 2.3 MG, CG, BT and SP:

    cd NPB-2.3-SER
    cd MG; make CLASS= ; cd -
    cd CG; make CLASS= ; cd -
    cd BT; make CLASS= ; cd -
    cd SP; make CLASS= ; cd -
    cd LU; make CLASS= ; cd -
    cd -

All NPB executables will be created in the binaries destination directory (specified with the option --with-bindest).

We would welcome any advice on the compilation/linking flags for various vendor compilers that lead to the highest performance of these codes.


Hipersoft | LACSI | GrADS | Compaq | NCSA | NPACI © 2003 Rice University