-
Notifications
You must be signed in to change notification settings - Fork 6
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
Additional CMake changes #215
Comments
SeanBryan51
added a commit
that referenced
this issue
Mar 15, 2024
This pull request should follow after the CMake implementation (see #200). This change adds the following build system changes: - List source files in alphabetical order in CMakeLists.txt. The order of source files was previously chosen so that we could demonstrate binary equivalence in executables between the CMake build and the Makefile build. - Use [`find_package(MPI REQUIRED)`](https://cmake.org/cmake/help/latest/module/FindMPI.html) instead of specifying `mpif90` when invoking `cmake` for MPI case. This is done so that 1. We can create separate targets for the serial and MPI executable and only link against the MPI libraries when needed without relying on the MPI compiler wrapper. This lets us compile all executables (serial and parallel) with a single invocation of CMake. 2. We can use object libraries to compile the object files common to both serial and MPI builds. This saves compiling these object files for each executable (serial and MPI), reducing compilation time. - Portability fixes and improvements to build.bash. - Add `--compiler` flag to build.bash and GNU compiler support. - Add Matthias's configuration for example. Regression tests using [benchcab](https://github.com/CABLE-LSM/benchcab)* (bitwise comparison of model output via nccmp) show that model output is bitwise identical between the current branch and the main branch for serial and MPI model runs. *executables were built manually as benchcab does not yet support the recent build system changes (see related issue: CABLE-LSM/benchcab#258). Fixes #215 <!-- readthedocs-preview cable start --> ---- 📚 Documentation preview 📚: https://cable--216.org.readthedocs.build/en/216/ <!-- readthedocs-preview cable end -->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See #200 for the initial implementation of a CMake based build system. This issue documents changes that should follow after this pull request:
find_package(MPI REQUIRED)
instead of specifyingmpif90
when invokingcmake
for MPI case. This is done so thatboth serial and MPI builds. This saves compiling these object files for
each executable (serial and MPI), reducing compilation time.
--target cable-mpi
when invoking CMake.Originally posted by @SeanBryan51 in #200 (comment)
The text was updated successfully, but these errors were encountered: