Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documenting changes to the source file references to local files in the PMFE build directory #25

Open
maxieds opened this issue Nov 4, 2020 · 0 comments

Comments

@maxieds
Copy link

maxieds commented Nov 4, 2020

With all of the re-configuration to add Cmake functionality, and to refactor the wrapper scripts used on math-mulberry, it became easy and seemed pragmatic to me to make a minor pair of changes to the source. Recall that in issue #20, concerns were raised about why we had to change the working directory from the user's path back to the PMFE build directory to run the wrapper script.

The response to this is basically note that some of the generated PMFE binaries rely on relative paths (local, and with respect to the build time PMFE working directory). As noted by @ceheitsch, the tests only need to be run after each recompilation. This means that that binary run case can be effectively excluded from the wrapper script.

After looking around the sources more, I found some concerns that yet other local, relative references to files are used to load the Turner99 thermodynamic parameters data at runtime. This means that without a change to where the PMFE utilities are looking for those files, it might still be necessary to change the working directory to ensure correct behavior.

My solution is to hardcode the absolute paths to the test sequences files and the local PMFE thermo params directories into a new configure header (include/pmfe_build_config.h.in) that can be referenced at runtime. Since this config header is automatically regenerated every time we recompile, the PMFE source path does not need to be fixed. Moreover, the absolute path references to these dependent files remove the need to change the CWD in the wrapper script to handle the previous relative references to these files.

The changes I made are fairly small and self contained. They can be reviewed in the first commit to the new cmake-build branch as seen here, and then in the references specified as here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant