Closed nchaimov closed 6 years ago
caf
is a Fortran compiler wrapper for OpenCoarrays, just like mpif90
is an MPI implementation's wrapper for the Fortran compiler.
Right now caf
and OpenCoarrays uses MPI as the back-end for the communication layer. The larger difficulty will be updating tau itself to perform the mapping of constructs correctly between coarray Fortran and the underlying implementation of the parallel runtime library, and syntax parsing etc.
For OpenCoarrays, to start, we could just have taucmdr recognize caf
and cafrun
as scripts akin to mpif90
and mpiexec
. caf
should be fairly straight forward to get basic functionality, but mpiexec is usually a compiled program, no? So we will need to direct tau/taucmdr to the mpiexec/mpirun app.
This may actually not be too, hard, in theory, we could pass the --show flag to cafrun
(or caf
even) which, when combined with additional arguments will print the command line that it would have otherwise executed. i.e. tau caf -c foo.f90
will cause tau to execute caf --show -c foo.f90
which will return something like
/path/to/gfortran -I /path/to/mpi/fortran/include/loc -I /path/to/OpenCoarrays/include/loc -c foo.f90 -l/path/to/mpi/libmpi.so
which we can then handle in the normal way that TAU commander handles MPI applications.
For tau cafrun -n 4 ./a.out
to can execute cafrun --show -n 4 ./a.out
which will return something like:
/path/to/mpiexec -np 4 ./a.out
I have been needing/wanting to fix the janky argument parsing in caf
and cafrun
for a while so we can make adjustments to accommodate TAU/TAU Commander needs, assuming they make design sense.
Done in db895b1f7d112a1d7359975a7c3a931d38dec395 for OpenCoarrays.
Per Sameer, users at a tutorial he gave requested support for Coarray Fortran in TAU Commander: