-
Notifications
You must be signed in to change notification settings - Fork 90
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
Merge v5 into next #2655
Merged
Merge v5 into next #2655
Conversation
This file contains 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
In older versions of git `submodule update --init --recursive` had to be run from the root of the repo. This commit replaces `CMAKE_CURRENT_SOURCE_DIR` with `PROJECT_SOURCE_DIR` in the cmake call to update the submodules to ensure that the update runs from the repo root, making it compatible with older git versions.
Make cmake submodule update work with older versions of git
The no-PETSc branch needs to forward-declare `SNES` to avoid error.
CMake 3.21 on MacOS needs `\\.` rather than `\.`
Making string lowercase before regex matching the version.
When compiled from the git repo, `ncxx4-config --version` may return something like `4.3.2-developer`. However, CMake's `find_dependency()` function does not recognize that as a valid version argument. Modifying the regex to remove anything trailing the `#.#.#` version number fixes the problem.
NCXX_BINARY_DIR is not defined in cmake/FindnetCDFCxx.cmake, so never exists.
These variables can be used (rather than netCDFCxx_ROOT and netCDF_ROOT) to find the netCDF and netCDF-cxx4 libraries. `set`'ing them if they exist means packages importing BOUT++ should link to the same libraries.
Fix bug in PetscLib that broke no-PETSc builds
Remove tests depending on UB
Now with explanation of why it is needed. Co-authored-by: Peter Hill <zed.three@gmail.com>
CMake fixes for netCDF
Also, set PVODE_DIR if PVODE_BINARY_DIR exists. When PVODE is built, it seems to set PVODE_BINARY_DIR and PVODE_SOURCE_DIR, but not PVODE_DIR, while when BOUT++ is imported in an external project, PVODE_DIR is needed to find/link PVODE.
Previously only the netCDF-cxx4 config was exported. This ensures that if a particular version of netCDF was specified, the same one is picked up by the external project.
If the user specifies NC_CONFIG and/or NCXX4_CONFIG in CMake, then these should be used in preference to a generic `find_package()`.
Means that if which Libuuid to use is set explicitly at configure time, it is exported to external packages that link to BOUT++.
Sometimes (e.g. when using conda) there can be multiple copies of libuuid.so in LD_LIBRARY_PATH. This commit provides a new CMake variable `SYMLINK_SYSTEM_UUID` - if this is set to ON then symlink the found system header/library into the build directory's include/ and lib/ subdirectories. By default, CMake adds an 'rpath' for linked libraries (at least when just building and not 'installing') so that at run time the system linker finds the exact same version that CMake configured with. However, as I understand it this cannot work with system libraries, e.g. in /usr/, because the rpath is only to a directory to search, not to the particular library, so it does not make sense to add generic system libraries (not sure how this is avoided, but it seems to be). 'rpath' is great because it avoids relying on LD_LIBRARY_PATH (which then has to be set up correctly at run-time), but for system libraries this breaks down. CMake does know (during the configure steps) what exact files it should link to though, so if we symlink those into the build directory (CMAKE_CURRENT_BINARY_DIR) then we can add the build directory to the rpath and have it take precedence over everything in LD_LIBRARY_PATH. Then we avoid any potential conflicts with different versions of libraries in LD_LIBRARY_PATH (that might be introduced by conda, etc.).
If BOUT_IGNORE_CONDA_ENV=ON, then ignore anything under $CONDA_PREFIX. This means that even if there is an active conda environment, no conda-installed packages will be detected/used/linked. Implementation is hack-y because CMake does not currently have a way to exclude a prefix, so we have to make a list including every sub-directory. This may be easier in future, see https://gitlab.kitware.com/cmake/cmake/-/merge_requests/6880.
This means it should appear in the table of contents on the left panel, at least when that is expanded, making the section more discoverable.
This reverts commit db70e58. The workaround implemented by the reverted commit is not necessary now that BOUT_IGNORE_CONDA_ENV exists. Also updates the manual to remove reference to `SYMLINK_SYSTEM_UUID`
CMake: option to ignore a conda environment; fix for PVODE
This reverts commit b0dcde2.
Add tool to move headers under `include/bout` and fix `#include`s
Fix use of removed `Datafile` in `Laplacian` constructor; update docs
One of the clang-format patches rearranged some headers... and it turns out PETSc helpfully clobbers some MPI functions with its own macros for reasons, and this interferes with our `MpiWrapper` class. Some files had `#undef` some of these macros, but rearranging headers left some exposed. This instead defines a macro in the `PetscLib` header that should stop PETSc defining the MPI macros in the first place. We just need to make sure that all PETSc headers are `#include`d _after_ our `PetscLib`
Workaround PETSc clobbering MPI functions with its macros
This avoids a warning in recent gcc
Provide overloaded virtual function also in derived class
BOUT++ v5.0.0 release candidate
Merge v5 into next - resolve conflicts
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.
No description provided.