Fix build without Zoltan when MPI is enabled#6956
Open
hakonhagland wants to merge 1 commit into
Open
Conversation
Move general MPI includes (DeferredLogger, DeferredLoggingErrorHelpers, gatherDeferredLogger, MPISerializer, Well headers) from These are used by partitionCellsFromFileMPI() which is in a Move ParallelNLDDPartitioningZoltan.cpp from the MPI source list to a nested if(ZOLTAN_FOUND) block in CMakeLists_files.cmake, since it directly includes <zoltan.h>.
This was referenced Mar 20, 2026
Contributor
Author
|
jenkins build this please |
This file contains hidden or 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
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.
Depends on OPM/opm-grid#1013.
I encountered this issue when trying to test reservoir coupling against mpich on Ubuntu 25.10, see #6951.
DeferredLogger.hpp,DeferredLoggingErrorHelpers.hpp,gatherDeferredLogger.hpp,MPISerializer.hpp, Well headers) from#if HAVE_MPI && HAVE_ZOLTANto#if HAVE_MPIinpartitionCells.cpp, since they are used bypartitionCellsFromFileMPI()which is in a#if HAVE_MPIblock and does not require ZoltanParallelNLDDPartitioningZoltan.hpp,SetupPartitioningParams.hpp) under#if HAVE_MPI && HAVE_ZOLTANParallelNLDDPartitioningZoltan.cppfrom the unconditionalif(MPI_FOUND)source list to a nestedif(ZOLTAN_FOUND)block inCMakeLists_files.cmake, since it directly includes<zoltan.h>and cannot compile without ZoltanMotivation
When building opm-simulators with MPI enabled but without Zoltan (e.g. when using MPICH instead of OpenMPI, where the system Zoltan package is linked against OpenMPI), the build fails with two errors:
OPM_BEGIN_PARALLEL_TRY_CATCHundeclared (becauseDeferredLoggingErrorHelpers.hppwas only included under the Zoltan guard) andzoltan.h: No such file or directory(becauseParallelNLDDPartitioningZoltan.cppwas compiled unconditionally). This is a companion fix to a corresponding opm-grid PR that addsHAVE_ZOLTANguards there. See also OPM/opm-grid#1014.