1CAF(1) caf compiler wrapper manual CAF(1)
2
3
4
6 caf - OpenCoarrays compiler wrapper to compile and link coarray Fortran
7 source files and programs
8
10 caf [compiler-options] [linker-options] <fortran-source-file>
11 [object-files] [libraries]
12
14 caf is a compiler wrapper script which is generated when the OpenCoar‐
15 rays library ⟨https://github.com/sourceryinstitute/OpenCoarrays#readme⟩
16 that ensures coarray fortran programs are compiled with the same for‐
17 tran compiler OpenCoarrays was built for, gfortran(1) by default, and
18 that the linker links against the appropriate parallel runtime, MPI by
19 default. The caf compiler wrapper serves a similar purpose to the MPI
20 fortran wrapper compiler, mpifort(1). caf embeds the full path to the
21 Fortran compiler it was built for, and to the parallel runtime
22 libraries it links against, and a relative path, based on the install
23 location of caf itself, to the OpenCoarrays library. This ensures that
24 the API and ABI of OpenCoarrays is always consistent with the Fortran
25 compiler it was built for, and the parallel runtime it uses. To upgrade
26 the parallel runtime, e.g., MPI, or the Fortran compiler, you will need
27 to rebuild and install OpenCoarrays, which will regenerate and rein‐
28 stall the caf wrapper script.
29
30 caf tries to be smart about how it calls the underlying compiler and
31 linker. Any user specified libraries will be inserted before the Open‐
32 Coarrays library, libcaf_mpi, and before the parallel runtime
33 libraries. This ensures that the linker will be able to resolve any
34 references to the OpenCoarrays library and the parallel runtime library
35 made by user supplied libraries. In addition any options not recognized
36 by caf itself, as outlined below in the OPTIONS section. To see the
37 default command caf will invoke, run caf --show. To see how caf would
38 execute a specific command, i.e., perform a dry-run, pass the full com‐
39 mand you wish to run, with the additional --show option as the very
40 first option or argument after caf. (e.g., caf --show -c foo.f90 -o
41 foo.f90.o or caf --show foo.f90.o bar.f90.o -lblas -o a.out)
42
44 --help, -h
45 Print a brief help/usage message and return without performing
46 any substantive action.
47
48 --show, -s
49 Print the default invocation of the underlying compiler, includ‐
50 ing what flags are passed, etc. This also functions as a dry-run
51 for executing a specific command, showing the user how the com‐
52 piler would be called with the additional files and arguments
53 passed by the user.
54
55 --version, -V, -v
56 Print OpenCoarrays version and copyright information and exit.
57
58 --wrapping, --wraps, -w
59 Report the name and version of the Fortran compiler caf is wrap‐
60 ping and exit.
61
63 For a list of bugs currently affecting OpenCoarrays, or to report a new
64 one, please report any bugs to the OpenCoarrays project at
65 ⟨https://github.com/sourceryinstitute/OpenCoarrays/issues⟩
66
68 Izaak Beekman ⟨izaak@izaakbeekman.com⟩
69
71 cafrun(1), gfortran(1), mpifort(1), OpenCoarrays project page
72 ⟨https://github.com/sourceryinstitute/OpenCoarrays#readme⟩, OpenCoar‐
73 rays website ⟨http://www.opencoarrays.org⟩
74
75
76
77OpenCoarrays-1.9.1 2017-09-12 CAF(1)