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

Fix variable change check in CMake #207

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

tim-griesbach
Copy link
Collaborator

@tim-griesbach tim-griesbach commented Nov 11, 2024

Fix variable change check in CMake

Problem description

Reconfiguring with enabled MPI after starting from a CMake configuration with MPI disabled results in a setup with enabled MPI but deactivated MPI I/O, which is deprecated. The expected behavior is that MPI I/O is enabled if MPI is enabled.

Proposed changes

The issue arises because $CACHE{SC_ENABLE_MPI} reflects the current MPI setting rather than the previous one. As a result, the condition

NOT "${SC_ENABLE_MPI}" STREQUAL "$CACHE{SC_ENABLE_MPI}"

evaluates to false, preventing the check for MPI I/O when MPI was previously disabled. To address this, I introduced a new variable, CACHED_SC_ENABLE_MPI, to track the last MPI setting, ensuring that the last used value of SC_ENABLE_MPI is preserved.

$CACHE{SC_ENABLE_MPI} does not give the previous setting.
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

Successfully merging this pull request may close these issues.

1 participant