When we try to build and link test executables for Haero (and mam4xx, which uses Haero's configuration to build/link programs) in EAMxx (an environment with a pre-installed version of Kokkos and with MPI enabled), the linker can't find MPI symbols.
This could be related to how we assume Kokkos should be configured to build these programs, but it could also be related to how EAMxx configures Kokkos. EAMxx favors in-tree builds of third-party libraries, and Haero and mam4xx are configured in EAMxx as dependencies that use CMake's ExternalProject system. Personally, I'm a fan of this ExternalProject approach because it keeps the build systems separate from one another so that it's easier for developers to understand what's going on. EAMxx's approach pass information freely between parent and subdirectories being built, making things "seamless" but much harder to analyze.
For now, we're avoiding these issues by disabling the linking of test executables in Haero and mam4xx when EAMxx builds them. A long-term solution to this issue needs to be reached via discussion with the EAMxx team.
When we try to build and link test executables for Haero (and mam4xx, which uses Haero's configuration to build/link programs) in EAMxx (an environment with a pre-installed version of Kokkos and with MPI enabled), the linker can't find MPI symbols.
This could be related to how we assume Kokkos should be configured to build these programs, but it could also be related to how EAMxx configures Kokkos. EAMxx favors in-tree builds of third-party libraries, and Haero and mam4xx are configured in EAMxx as dependencies that use CMake's ExternalProject system. Personally, I'm a fan of this ExternalProject approach because it keeps the build systems separate from one another so that it's easier for developers to understand what's going on. EAMxx's approach pass information freely between parent and subdirectories being built, making things "seamless" but much harder to analyze.
For now, we're avoiding these issues by disabling the linking of test executables in Haero and mam4xx when EAMxx builds them. A long-term solution to this issue needs to be reached via discussion with the EAMxx team.