Skip to content

RFC: Hard code full paths and more precisely specify linker/compiler flags & MPI flags in caf and cafrun scripts #268

Closed
@zbeekman

Description

@zbeekman

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:

  1. Use CMake's native configure_file capabilities to store a caf.in and a cafrun.in file and use CMake's `@variable@ expansion to substitute the correct values into this file.
  2. Specify explicitly the full paths to the GCC (or, perhaps in the future, a different) Fortran compiler, rather than using the MPI wrapper script.
  3. Specify explicitly the compiler and linker flags needed for MPI via the FindMPI cmake module
  4. 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.
  5. 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?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions