Closed
Description
Request for comment: wrapper script re-engineering
caf
is to mpif90
as cafrun
is to mpirun
: they are wrapper scripts for compiling and launching OpenCoarrays enabled coarray fortran programs. Currently the scripts use a bit of an ad-hoc sandwich technique to get written: Some static content exists in a "head" file, some static content exists in a "foot" file and then some content is echoed during the build process to get inserted into the middle.
My proposal is:
- Use CMake's native
configure_file
capabilities to store acaf.in
and acafrun.in
file and use CMake's `@variable@ expansion to substitute the correct values into this file. - Specify explicitly the full paths to the GCC (or, perhaps in the future, a different) Fortran compiler, rather than using the MPI wrapper script.
- Specify explicitly the compiler and linker flags needed for MPI via the FindMPI cmake module
- Allow backwards compatibility fallback to the compiler wrapper scripts when the build detects the user has explicitly passed the MPI wrappers as the C and Fortran compilers.
- This behavior of passing
FC=mpif90
etc. will be deprecated (but temporarily, unofficially supported for the medium term) to ease package maintainers and users jobs who have become accustomed to this behavior.
Thoughts, @rouson, @jerryd, @afanfa, @vehre, and anyone else?