Goddard-Fortran-Ecosystem / pFUnit

Parallel Fortran Unit Testing Framework
Other
172 stars 45 forks source link

CMake: Add option to use MPI F08 module #356

Closed ZedThree closed 2 years ago

ZedThree commented 2 years ago

Closes #34

Rather than the pf_mpi_defines.fh header, we could instead use add all the definitions directly to the pf-mpi-defines target for the same effect. The differences is that with the header we keep the set of "exposed" preprocessor macros minimal.

Note that this also relies on the F2008 ability to do type (integer) so that we can do the slightly nicer type (PF_MPI_COMM_TYPE). It is possible to have the macro be PF_MPI_COMM_TYPE=type(MPI_Comm)/integer and use PF_MPI_COMM_TYPE directly in the code instead.

tclune commented 2 years ago

I'll try to look at this more closely over the weekend. Dealing with a vicious set of compiler workarounds for yaFyaml/gFTL layers. (Apparently some compilers don't like the deeply recursive structure necessary to represent a general YAML node.)

All of the compilers currently supported accept type(integer) so I think you suggestion is just fine.