NERSCPowering Scientific Discovery Since 1974

CAF (Coarray Fortran)


CAF is a parallel programming extension of the Fortran syntax that allows a programmer to view a single shared partitioned address space.


CAF is available on Edison and Cori via the Cray compilers.

Using CAF

To compile a CAF source file you must first swap the Cray compiler with the default compiler.

% module swap PrgEnv-intel PrgEnv-cray

Then compile the code like this:

% ftn -h caf -o CAFProg CAFProg.f

The "-h caf" option is needed on the cc command line.


For questions about using CAF at NERSC contact the consultants at