---
name: "caf"
section: "1"
platform: "linux"
package: "open-coarrays-bin"
version: "1.7.4-4"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/caf"
---

# caf(1)

Fortran compiler wrapper for OpenCoarrays

## NAME

caf - Fortran compiler wrapper for OpenCoarrays

## SYNOPSIS

caf \<fortran-source-file\> \[options\] ...

## OPTIONS

- **--help, -h**

  Show this help message **--version, -v, -V** Report version and copyright information **--wrapping, -w, --wraps** Report the name of the wrapped compiler

## EXAMPLES

   caf foo.f90 -o foo\
    caf -v\
    caf --help

## DESCRIPTION

As of OpenCoarrays 1.6.0, caf supports three categories of compilers with the following restrictions for each use case:

 1\. With an OpenCoarrays-Aware (OCA) compiler (GNU 5.1.0 or later),\
    a. If any of the options listed above appear, any remaining arguments are ignored.\
    b. If present, \<fortran-source-file\> must\
       \* be a Fortran source file,\
       \* appear before all other arguments,\
       \* be the only Fortran source file in the argument list,\
       \* have a name of the form \*.f90, \*.F90, \*.f, or \*.F.\
    c. The environment variable 'CAFC' must be empty or point to a Fortran compiler/linker.\
    d. If 'CAFC' is empty, a default value of 'mpif90' is used.

 2\. With non-OCA CAF compilers (Intel or Cray),\
    a. Observe restrictions 1a-d above.\
    b. Access OpenCoarrays collective subroutines via use association with an only clause,\
       e.g., 'use opencoarrays, only : co\_sum,co\_broadcast'

 3\. With non-CAF compilers (all compilers not named above),\
    a. Observe restrictions 1a-d above.\
    b. Access OpenCoarrays capabilities via use association ('use opencoarrays').\
    c. The only CAF statements or expressions allowed are the following:\
       \* 'num\_images()'\
       \* 'this\_image()' with or without arguments\
       \* 'sync all' with or without arguments.\
       \* 'sync images' with or without arguments.\
       \* 'error stop' without arguments.\
       \* 'co\_sum', 'co\_broadcast', 'co\_max', 'co\_min', or 'co\_reduce'

 The caf wrapper will append -L, -l, and other required arguments as necessary\
  using values that get set during the OpenCoarrays build and installation.

## SEE ALSO

[cafrun(1)](/cafrun/1.md)

## AUTHOR

caf is part of the OpenCoarrays package from Sourcery, Inc. This manual page was written by Alastair McKinstry
