Addition of FPM Support#176
Open
robin-dahl wants to merge 6 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds support for building ddX with the Fortran Package Manager. It includes changes required to build & compile the project with FPM, run the standalone executable, and use the test suite. The documentation has also been updated with instructions for using FPM with ddX.
Key Changes
Adding FPM support typically requires only limited changes, provided that the repository structure is broadly compatible with FPM's conventions.
fpm.tomlmanifest file, which enables compilation of the source code viafpm build.To avoid compilation issues,#ifdef BUILD_PYBIND11and#endifguards were added to non-Fortran source files in thesrcdirectory. Without these guards, FPM attempts to compile the C++ and Python-related files as part of the build, which leads to errors. These preprocessor guards, however, should not affect the behavior of these files in any other build configuration.fpm run [path/to/input].txt(for instance,fpm run tests/Input-example.txt). As usual for FPM, this command also compiles the project prior to execution, so an explicitfpm buildstep is optional.fpm test. For ddX, however, this is currently not possible because several tests require individual command-line arguments. While FPM allows arguments to be passed to specific target tests, for examplefpm test --target ddlpb_esolv -- tests/data/ddlpb_force.txt, a generalfpm testcommand would only work for test suites with a uniform execution structure. To address this, this PR adds a Python wrapper in thetestsdirectory. The wrapper runs all unit and standalone tests, analyzes the output, and provides a summary. The full test suite can therefore be run in one go withpython tests/fpm_tester.py.