From d01a8f7cd69dd26797da3c637829943fa4efd910 Mon Sep 17 00:00:00 2001 From: "Seth R. Johnson" Date: Sat, 9 Nov 2019 13:47:04 -0500 Subject: [PATCH] Fix visit+ (#13652) * Propagate MPI option in VTK to NetCDF This fixes a conflict message reads as though NetCDF always requires hdf5+mpi. It allows `visit~mpi` to resolve correctly without an additional `^netcdf~mpi`. * Tell VisIt not to look for 'hdf5_mpi' library --- .../repos/builtin/packages/visit/package.py | 8 +++++--- .../packages/visit/parallel-hdf5.patch | 19 +++++++++++++++++++ .../repos/builtin/packages/vtk/package.py | 9 +++------ 3 files changed, 27 insertions(+), 9 deletions(-) create mode 100644 var/spack/repos/builtin/packages/visit/parallel-hdf5.patch diff --git a/var/spack/repos/builtin/packages/visit/package.py b/var/spack/repos/builtin/packages/visit/package.py index e9bea6592f5..057916dce7e 100644 --- a/var/spack/repos/builtin/packages/visit/package.py +++ b/var/spack/repos/builtin/packages/visit/package.py @@ -30,19 +30,21 @@ class Visit(CMakePackage): patch('spack-changes.patch') patch('nonframework-qwt.patch', when='^qt~framework platform=darwin') + patch('parallel-hdf5.patch', when='+hdf5+mpi') depends_on('cmake@3.0:', type='build') depends_on('vtk@8.1.0:+opengl2', when='@3.0:3.0.1') depends_on('vtk@6.1.0~opengl2', when='@:2.999') depends_on('vtk+python', when='+python @3.0:') - depends_on('vtk~mpi') + depends_on('vtk~mpi', when='~mpi') depends_on('vtk+qt', when='+gui') depends_on('qt@4.8.6:4.999', when='+gui @:2.999') depends_on('qt@5.10:', when='+gui @3.0:') depends_on('qwt', when='+gui') depends_on('python@2.6:2.8', when='+python') depends_on('silo+shared', when='+silo') - depends_on('hdf5', when='+hdf5') + depends_on('hdf5~mpi', when='+hdf5~mpi') + depends_on('hdf5+mpi', when='+hdf5+mpi') depends_on('mpi', when='+mpi') depends_on('adios2', when='+adios2') @@ -91,7 +93,7 @@ def cmake_args(self): if '+hdf5' in spec: args.append( '-DVISIT_HDF5_DIR:PATH={0}'.format(spec['hdf5'].prefix)) - if spec.satisfies('^hdf5+mpi', strict=True): + if '+mpi' in spec: args.append('-DVISIT_HDF5_MPI_DIR:PATH={0}'.format( spec['hdf5'].prefix)) diff --git a/var/spack/repos/builtin/packages/visit/parallel-hdf5.patch b/var/spack/repos/builtin/packages/visit/parallel-hdf5.patch new file mode 100644 index 00000000000..f6fca356e83 --- /dev/null +++ b/var/spack/repos/builtin/packages/visit/parallel-hdf5.patch @@ -0,0 +1,19 @@ +--- a/src/CMake/FindHDF5.cmake 2019-02-15 18:31:27.000000000 -0500 ++++ b/src/CMake/FindHDF5.cmake 2019-11-08 07:57:26.000000000 -0500 +@@ -46,7 +46,7 @@ + # + #****************************************************************************/ + +-# Use the HDF5_DIR hint from the config-site .cmake file ++# Use the HDF5_DIR hint from the config-site .cmake file + + INCLUDE(${VISIT_SOURCE_DIR}/CMake/SetUpThirdParty.cmake) + +@@ -73,6 +73,6 @@ + ELSE() + SET_UP_THIRD_PARTY(HDF5 lib include hdf5) + IF(VISIT_PARALLEL) +- SET_UP_THIRD_PARTY(HDF5_MPI lib include hdf5_mpi) ++ SET_UP_THIRD_PARTY(HDF5_MPI lib include hdf5) + ENDIF(VISIT_PARALLEL) + ENDIF() diff --git a/var/spack/repos/builtin/packages/vtk/package.py b/var/spack/repos/builtin/packages/vtk/package.py index 179062b5247..3b920833ac6 100644 --- a/var/spack/repos/builtin/packages/vtk/package.py +++ b/var/spack/repos/builtin/packages/vtk/package.py @@ -70,14 +70,10 @@ class Vtk(CMakePackage): # VTK will need Qt5OpenGL, and qt needs '-opengl' for that depends_on('qt+opengl', when='+qt') - depends_on('mpi', when='+mpi') - depends_on('boost', when='+xdmf') depends_on('boost+mpi', when='+xdmf +mpi') - - depends_on('mpi', when='+mpi') - depends_on('ffmpeg', when='+ffmpeg') + depends_on('mpi', when='+mpi') depends_on('expat') depends_on('freetype') @@ -88,7 +84,8 @@ class Vtk(CMakePackage): depends_on('jsoncpp') depends_on('libxml2') depends_on('lz4') - depends_on('netcdf-c') + depends_on('netcdf-c~mpi', when='~mpi') + depends_on('netcdf-c+mpi', when='+mpi') depends_on('netcdf-cxx') depends_on('libpng') depends_on('libtiff')