GEOS icon indicating copy to clipboard operation
GEOS copied to clipboard

[Bug] Compilation error with VTK and ENABLE_MPI=OFF

Open untereiner opened this issue 2 years ago • 3 comments

Describe the bug

CMake Error at cmake/thirdparty/SetupGeosxThirdParty.cmake:588 (get_target_property):
  get_target_property() called with non-existent target
  "VTK::FiltersParallelDIY2".
Call Stack (most recent call first):
  cmake/CMakeBasics.cmake:49 (include)
  CMakeLists.txt:43 (include)


CMake Error at cmake/thirdparty/SetupGeosxThirdParty.cmake:590 (set_property):
  set_property could not find TARGET VTK::FiltersParallelDIY2.  Perhaps it
  has not yet been created.
Call Stack (most recent call first):
  cmake/CMakeBasics.cmake:49 (include)
  CMakeLists.txt:43 (include)


CMake Error at cmake/thirdparty/SetupGeosxThirdParty.cmake:588 (get_target_property):
  get_target_property() called with non-existent target "VTK::IOParallelXML".
Call Stack (most recent call first):
  cmake/CMakeBasics.cmake:49 (include)
  CMakeLists.txt:43 (include)


CMake Error at cmake/thirdparty/SetupGeosxThirdParty.cmake:590 (set_property):
  set_property could not find TARGET VTK::IOParallelXML.  Perhaps it has not
  yet been created.
Call Stack (most recent call first):
  cmake/CMakeBasics.cmake:49 (include)
  CMakeLists.txt:43 (include)


CMake Error at cmake/thirdparty/SetupGeosxThirdParty.cmake:588 (get_target_property):
  get_target_property() called with non-existent target "VTK::ParallelMPI".
Call Stack (most recent call first):
  cmake/CMakeBasics.cmake:49 (include)
  CMakeLists.txt:43 (include)


CMake Error at cmake/thirdparty/SetupGeosxThirdParty.cmake:590 (set_property):
  set_property could not find TARGET VTK::ParallelMPI.  Perhaps it has not
  yet been created.
Call Stack (most recent call first):
  cmake/CMakeBasics.cmake:49 (include)
  CMakeLists.txt:43 (include)

To Reproduce

Add set(ENABLE_MPI OFF CACHE BOOL "") in hosts-config file

Expected behavior Should compile. The targets VTK::FiltersParallelDIY2, VTK::IOParallelXML and VTK::ParallelMPI in SetupGeosxThirdParty.cmake are enabled and queried (get_target_property) even if they don't exist because not enabled at compile time (i.e. when ENABLE_MPI is FALSE) in the ThirdPartyLib

Platform (please complete the following information):

  • Machine: my laptop
  • Compiler: gcc 12.2.0
  • GEOSX Version: develop branch

untereiner avatar Oct 19 '22 15:10 untereiner

We had a discussion some time ago one whether or not we wanted to keep ENABLE_MPI... Do you think that the current vtk code would compile and run without MPI?

TotoGaz avatar Oct 19 '22 16:10 TotoGaz

We had a discussion some time ago one whether or not we wanted to keep ENABLE_MPI... Do you think that the current vtk code would compile and run without MPI?

I thought we had decided not to support builds without MPI.

CusiniM avatar Oct 19 '22 16:10 CusiniM

We had a discussion some time ago one whether or not we wanted to keep ENABLE_MPI... Do you think that the current vtk code would compile and run without MPI?

Good question, I have to recompile and test

I thought we had decided not to support builds without MPI.

This makes sens to me but then maybe remove the ENABLE_MPI flag everywhere ?

untereiner avatar Oct 20 '22 11:10 untereiner

Yeah we'd decided to not provide official support for non-MPI builds. At the same time we decided not to allocate resources to obsolete our previous support for the non-MPI build.

If someone really needs to build without MPI for some reason, getting the configuration into a state where it will work is possible, but something they'll have to do (and hopefully open a PR to backport into the main code).

Closing this since there doesn't seem to be any action-items for this issue.

wrtobin avatar Nov 03 '22 21:11 wrtobin