MetOffice / MetOffice/ngmo-environments

pFUnit support

Open
#46 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
12
Forks
8
PR merge metrics
No merged PRs in 30d

Description

While pFUnit support is included in the LFRic environment, it and its dependencies are not installed in the normal view. In detail:
1. pFUnit provides its location using `$PFUNIT`. This is required since LFRic needs `driver.F90` file from pfunit to create the unit tests. But pFUnit's `.mod` files are not installed in the include directory of the view, and the library not in the lib directory. Still, because of `$PFUNIT`, this can be handled portably by the build system
2. pFUnit's dependencies (fargparse, gftl) are not part of the standard lib directory (nor of the include directory, but since no application code uses them directly, only pfunit does, the latter is not a problem). While the libs could be added easily by the build system, I am not aware of any way to add them in a portable way (atm they are called `FARGPARSE-1.7` and `GFTL_SHARED-1.8`, though I also have an incomplete(?) `GFTL-1.13`, which has only include, no lib). It would be better if we could either:
1. Have the libs included in the standard `view/lib` directory (at this stage there is no immediate need to be able to use them at compile time, but it might be preferable for consistency?
2. Have a portable way of querying for the location (`pkg_config`?), which would cover both compile and link time.
3. At least have environment variables that could be used to get the root locations

Contributor guide

No contributing guide indexed for this repository

Research direction

Inspect how the normal view populates its view/lib and include directories, then trace the build system's handling of the PFUNIT location and driver.F90. Compare the requested options for exposing pFUnit, fargparse, and gftl, including portable querying or environment variables. Done means the chosen approach makes pFUnit unit tests build from the normal view without hard-coded dependency locations.

Written by the indexing model from the issue text.

Assessment

Tech stack
fortran
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.