Commit 820ca10f authored by Ben Boeckel's avatar Ben Boeckel Committed by Kitware Robot
Browse files

Merge topic 'spack-ci-cmake-spec'

3aeab1e5 gitlab-ci: clean out temporary stages from dependency builds
692b35d4 spack: patch for local development purposes
8021c042 spack pull from upstream as of 2021/09/21
1756cb02

 ci: configure the spack externals information
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !5230
parents a14bae14 3aeab1e5
Pipeline #248146 canceled with stages
in 125 minutes and 21 seconds
......@@ -38,3 +38,12 @@ mv "$filename" cmake
if [ "$( uname -s )" = "Darwin" ]; then
ln -s CMake.app/Contents/bin cmake/bin
fi
if [ "$CI_JOB_NAME" = "build:spack-centos7" ]; then
mkdir -p "$CI_PROJECT_DIR/build/spack"
sed \
-e "s/CMAKE_VERSION/$version/" \
-e "s,CMAKE_PREFIX,$PWD/cmake," \
< "$CI_PROJECT_DIR/Utilities/spack/configs/gitlab-ci/packages.yaml.in" \
> "$CI_PROJECT_DIR/build/spack/packages.yaml"
fi
......@@ -184,7 +184,7 @@
# root
FORCE_UNSAFE_CONFIGURE: 1
spack: "$CI_BUILDS_DIR/spack/bin/spack -C Utilities/spack/configs/gitlab-ci"
spack: "$CI_BUILDS_DIR/spack/bin/spack -C $CI_PROJECT_DIR/build/spack"
paraview_spec: "paraview+osmesa^mesa~glx^mpich"
before_script:
......@@ -211,6 +211,7 @@
- if [ "$CI_MERGE_REQUEST_ID" ]; then TRACK="merge-requests" ; fi
- $LAUNCHER $spack spec $paraview_spec
- $LAUNCHER $spack install --no-check-signature --only dependencies -j $(nproc) $paraview_spec
- $LAUNCHER $spack clean
- export dependency_specs=`$LAUNCHER $spack find --format "{name}{@version}{%compiler}"`
- $LAUNCHER $spack buildcache create -a -f -u -d $PWD/spack-cache $dependency_specs
- $LAUNCHER $spack install --no-check-signature -j $(nproc) --cdash-upload-url="http://open.cdash.org/submit.php?project=ParaView" --cdash-track $TRACK --cdash-build="paraview-spack-$CI_COMMIT_REF_NAME" $paraview_spec
......
......@@ -2,5 +2,5 @@ packages:
cmake:
buildable: false
externals:
- spec: cmake
prefix: /builds/gitlab-kitware-sciviz-ci/.gitlab/cmake
- spec: cmake@CMAKE_VERSION
prefix: CMAKE_PREFIX
--- a/VTK/ThirdParty/h5part/vtkh5part/src/H5PartTypes.h 2020-10-12 17:56:08.942848601 -0400
+++ b/VTK/ThirdParty/h5part/vtkh5part/src/H5PartTypes.h 2020-10-12 17:56:50.656772295 -0400
@@ -19,7 +19,7 @@
#endif
;
-#ifndef PARALLEL_IO
+#if !(defined(PARALLEL_IO) || defined(H5_HAVE_PARALLEL))
typedef unsigned long MPI_Comm;
#endif
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import copy
import itertools
import os, os.path
from spack import *
from spack.fetch_strategy import fetcher, VCSFetchStrategy
from spack.util.executable import which
import llnl.util.tty as tty
import os, os.path
import copy
@fetcher
class LocalStrategy(VCSFetchStrategy):
......@@ -56,12 +57,14 @@ class Paraview(CMakePackage, CudaPackage):
list_depth = 1
git = "https://gitlab.kitware.com/paraview/paraview.git"
maintainers = ['chuckatkins', 'danlipsa']
maintainers = ['chuckatkins', 'danlipsa', 'vicentebolea']
if enable_local_fetch_strategy:
version('develop', file=_determine_paraview_source_dir(), preferred=True)
else:
version('develop', branch='master', submodules=True)
version('master', branch='master', submodules=True)
version('5.9.1', sha256='0d486cb6fbf55e428845c9650486f87466efcb3155e40489182a7ea85dfd4c8d', preferred=True)
version('5.9.0', sha256='b03258b7cddb77f0ee142e3e77b377e5b1f503bcabc02bfa578298c99a06980d')
version('5.8.1', sha256='7653950392a0d7c0287c26f1d3a25cdbaa11baa7524b0af0e6a1a0d7d487d034')
version('5.8.0', sha256='219e4107abf40317ce054408e9c3b22fb935d464238c1c00c0161f1c8697a3f9')
version('5.7.0', sha256='e41e597e1be462974a03031380d9e5ba9a7efcdb22e4ca2f3fec50361f310874')
......@@ -93,6 +96,8 @@ class Paraview(CMakePackage, CudaPackage):
variant('kits', default=True,
description='Use module kits')
variant('advanced_debug', default=False, description="Enable all other debug flags beside build_type, such as VTK_DEBUG_LEAK")
conflicts('+python', when='+python3')
# Python 2 support dropped with 5.9.0
conflicts('+python', when='@5.9:')
......@@ -102,11 +107,18 @@ class Paraview(CMakePackage, CudaPackage):
# See commit: https://gitlab.kitware.com/paraview/paraview/-/commit/798d328c
conflicts('~opengl2', when='@5.5:')
depends_on('cmake@3.3:', type='build')
# We only support one single Architecture
for _arch, _other_arch in itertools.permutations(CudaPackage.cuda_arch_values, 2):
conflicts(
'cuda_arch={0}'.format(_arch),
when='cuda_arch={0}'.format(_other_arch),
msg='Paraview only accepts one architecture value'
)
for _arch in range(10, 14):
conflicts('cuda_arch=%d' % _arch, when="+cuda", msg='ParaView requires cuda_arch >= 20')
# let's use Ninja
generator = 'Ninja'
depends_on('ninja', type='build')
depends_on('cmake@3.3:', type='build')
# Workaround for
# adding the following to your packages.yaml
......@@ -151,6 +163,8 @@ class Paraview(CMakePackage, CudaPackage):
depends_on('double-conversion')
depends_on('expat')
depends_on('eigen@3:')
# Needs https://github.com/fmtlib/fmt/pull/2432 to be released
# depends_on('fmt', when='@5.10:')
depends_on('freetype')
# depends_on('hdf5+mpi', when='+mpi')
# depends_on('hdf5~mpi', when='~mpi')
......@@ -165,17 +179,25 @@ class Paraview(CMakePackage, CudaPackage):
depends_on('netcdf-c')
depends_on('pegtl')
depends_on('protobuf@3.4:')
depends_on('pugixml')
depends_on('libxml2')
depends_on('lz4')
depends_on('lzma')
depends_on('xz')
depends_on('zlib')
# Older builds of pugi export their symbols differently,
# and pre-5.9 is unable to handle that.
depends_on('pugixml@:1.10', when='@:5.8.99')
depends_on('pugixml', when='@5.9:')
# Can't contretize with python2 and py-setuptools@45.0.0:
depends_on('py-setuptools@:44.99.99', when='+python')
# Can't contretize with python2 and py-pillow@7.0.0:
depends_on('pil@:6', when='+python')
# ParaView depends on cli11 due to changes in MR
# https://gitlab.kitware.com/paraview/paraview/-/merge_requests/4951
depends_on('cli11@1.9.1', when='@5.10:')
if enable_local_fetch_strategy:
# skip patches
# we can rely on the version number given `git describe` since
......@@ -197,6 +219,9 @@ class Paraview(CMakePackage, CudaPackage):
# Broken H5Part with external parallel HDF5
patch('h5part-parallel.patch', when='@5.7:5.7.999')
# Broken downstream FindMPI
patch('vtkm-findmpi-downstream.patch', when='@5.9.0')
def url_for_version(self, version):
_urlfmt = 'http://www.paraview.org/files/v{0}/ParaView-v{1}{2}.tar.{3}'
"""Handle ParaView version-based custom URLs."""
......@@ -210,7 +235,7 @@ class Paraview(CMakePackage, CudaPackage):
@property
def paraview_subdir(self):
"""The paraview subdirectory name as paraview-major.minor"""
if self.spec.version == Version('develop'):
if self.spec.version == Version('master'):
return 'paraview-5.9'
else:
return 'paraview-{0}'.format(self.spec.version.up_to(2))
......@@ -229,6 +254,12 @@ class Paraview(CMakePackage, CudaPackage):
env.set('PARAVIEW_VTK_DIR',
join_path(lib_dir, 'cmake', self.paraview_subdir, 'vtk'))
def flag_handler(self, name, flags):
if name == 'ldflags' and self.spec.satisfies('%intel'):
flags.append('-shared-intel')
return(None, flags, None)
return(flags, None, None)
def setup_run_environment(self, env):
# paraview 5.5 and later
# - cmake under lib/cmake/paraview-5.5
......@@ -301,6 +332,15 @@ class Paraview(CMakePackage, CudaPackage):
'-DBUILD_TESTING:BOOL=OFF',
'-DOpenGL_GL_PREFERENCE:STRING=LEGACY']
if spec.satisfies('@5.10:'):
cmake_args.extend([
'-DVTK_MODULE_USE_EXTERNAL_ParaView_vtkcatalyst:BOOL=OFF',
'-DVTK_MODULE_USE_EXTERNAL_VTK_cgns=OFF',
'-DVTK_MODULE_USE_EXTERNAL_VTK_ioss:BOOL=OFF',
'-DVTK_MODULE_USE_EXTERNAL_VTK_exprtk:BOOL=OFF',
'-DVTK_MODULE_USE_EXTERNAL_VTK_fmt:BOOL=OFF'
])
if spec.satisfies('@:5.7') and spec['cmake'].satisfies('@3.17:'):
cmake_args.append('-DFPHSA_NAME_MISMATCHED:BOOL=ON')
......@@ -309,6 +349,8 @@ class Paraview(CMakePackage, CudaPackage):
cmake_args.extend([
'-DPARAVIEW_USE_QT:BOOL=%s' % variant_bool('+qt'),
'-DPARAVIEW_BUILD_WITH_EXTERNAL=ON'])
if spec.satisfies('%cce'):
cmake_args.append('-DVTK_PYTHON_OPTIONAL_LINK:BOOL=OFF')
else: # @5.7:
cmake_args.extend([
'-DPARAVIEW_BUILD_QT_GUI:BOOL=%s' % variant_bool('+qt'),
......@@ -317,7 +359,7 @@ class Paraview(CMakePackage, CudaPackage):
cmake_args.extend([
'-DPARAVIEW_ENABLE_EXAMPLES:BOOL=%s' % variant_bool(
'+examples'),
'-DVTK_MODULE_USE_EXTERNAL_VTK_cgns=OFF',
'-DVTK_MODULE_USE_EXTERNAL_ParaView_cgns=OFF',
'-DVTK_MODULE_USE_EXTERNAL_VTK_glew=OFF',
'-DVTK_MODULE_USE_EXTERNAL_VTK_gl2ps=OFF',
'-DVTK_MODULE_USE_EXTERNAL_VTK_libharu=OFF',
......@@ -375,7 +417,7 @@ class Paraview(CMakePackage, CudaPackage):
'-DMPI_Fortran_COMPILER:PATH=%s' % spec['mpi'].mpifc
])
cmake_args.append(
cmake_args.append(
'-DPARAVIEW_BUILD_SHARED_LIBS:BOOL=%s' % variant_bool('+shared'))
if spec.satisfies('@5.8:'):
......@@ -387,6 +429,42 @@ class Paraview(CMakePackage, CudaPackage):
cmake_args.append('-DVTKm_ENABLE_CUDA:BOOL=%s' %
variant_bool('+cuda'))
# VTK-m expects cuda_arch to be the arch name vs. the arch version.
if spec.satisfies('+cuda'):
supported_cuda_archs = {
# VTK-m and transitively ParaView does not support Tesla Arch
'20': 'fermi',
'21': 'fermi',
'30': 'kepler',
'32': 'kepler',
'35': 'kepler',
'37': 'kepler',
'50': 'maxwel',
'52': 'maxwel',
'53': 'maxwel',
'60': 'pascal',
'61': 'pascal',
'62': 'pascal',
'70': 'volta',
'72': 'volta',
'75': 'turing',
'80': 'ampere',
'86': 'ampere',
}
cuda_arch_value = 'native'
requested_arch = spec.variants['cuda_arch'].value
# ParaView/VTK-m only accepts one arch, default to first element
if requested_arch[0] != 'none':
try:
cuda_arch_value = supported_cuda_archs[requested_arch[0]]
except KeyError:
raise InstallError("Incompatible cuda_arch=" + requested_arch[0])
cmake_args.append(self.define('VTKm_CUDA_Architecture', cuda_arch_value))
if 'darwin' in spec.architecture:
cmake_args.extend([
'-DVTK_USE_X:BOOL=OFF',
......@@ -418,4 +496,16 @@ class Paraview(CMakePackage, CudaPackage):
if '%intel' in spec and spec.version >= Version('5.6'):
cmake_args.append('-DPARAVIEW_ENABLE_MOTIONFX:BOOL=OFF')
# Encourage Paraview to use the correct Python libs
if spec.satisfies('+python') or spec.satisfies('+python3'):
pylibdirs = spec['python'].libs.directories
cmake_args.append(
"-DCMAKE_INSTALL_RPATH={0}".format(
":".join(self.rpath + pylibdirs)
)
)
if '+advanced_debug' in spec:
cmake_args.append('-DVTK_DEBUG_LEAKS:BOOL=ON')
return cmake_args
......@@ -4,9 +4,9 @@
# paraview-5.6.
# They are API-compatible with paraview-5.5 but not ABI compatible.
#
# https://gitlab.kitware.com/vtk/vtk-m/-/merge_requests/1166
# https://gitlab.kitware.com/paraview/paraview/-/merge_requests/2433
# https://gitlab.kitware.com/paraview/paraview/-/merge_requests/2436
# https://gitlab.kitware.com/vtk/vtk-m/merge_requests/1166
# https://gitlab.kitware.com/paraview/paraview/merge_requests/2433
# https://gitlab.kitware.com/paraview/paraview/merge_requests/2436
#
--- ParaView-v5.5.0/VTK/ThirdParty/vtkm/vtk-m/CMake/VTKmDetermineVersion.cmake.orig 2018-04-06 22:03:33.000000000 +0200
+++ ParaView-v5.5.0/VTK/ThirdParty/vtkm/vtk-m/CMake/VTKmDetermineVersion.cmake 2018-04-23 12:00:23.708544206 +0200
......
From 5bf0eff1563820d7c997649da372ab003fd4af81 Mon Sep 17 00:00:00 2001
From: Chuck Atkins <chuck.atkins@kitware.com>
Date: Mon, 15 Feb 2021 13:59:50 -0500
Subject: [PATCH] CMake: Fix FindMPI getting consumed by newer CMake versions
---
CMake/patches/FindMPI.cmake | 11 +++++++++++
CMakeLists.txt | 7 ++++++-
2 files changed, 17 insertions(+), 1 deletion(-)
create mode 100644 CMake/patches/FindMPI.cmake
diff --git a/VTK/ThirdParty/vtkm/vtkvtkm/vtk-m/CMake/patches/FindMPI.cmake b/VTK/ThirdParty/vtkm/vtkvtkm/vtk-m/CMake/patches/FindMPI.cmake
new file mode 100644
index 000000000..a4ed44f04
--- /dev/null
+++ b/VTK/ThirdParty/vtkm/vtkvtkm/vtk-m/CMake/patches/FindMPI.cmake
@@ -0,0 +1,11 @@
+#------------------------------------------------------------------------------#
+# Distributed under the OSI-approved Apache License, Version 2.0. See
+# accompanying file Copyright.txt for details.
+#------------------------------------------------------------------------------#
+
+# This module is already included in new versions of CMake
+if(CMAKE_VERSION VERSION_LESS 3.15)
+ include(${CMAKE_CURRENT_LIST_DIR}/3.15/FindMPI.cmake)
+else()
+ include(${CMAKE_ROOT}/Modules/FindMPI.cmake)
+endif()
diff --git a/VTK/ThirdParty/vtkm/vtkvtkm/vtk-m/CMakeLists.txt b/VTK/ThirdParty/vtkm/vtkvtkm/vtk-m/CMakeLists.txt
index e907495f3..fa464ab8d 100644
--- a/VTK/ThirdParty/vtkm/vtkvtkm/vtk-m/CMakeLists.txt
+++ b/VTK/ThirdParty/vtkm/vtkvtkm/vtk-m/CMakeLists.txt
@@ -277,9 +277,14 @@ if(NOT VTKm_INSTALL_ONLY_LIBRARIES)
FILES
${VTKm_SOURCE_DIR}/CMake/VTKmCMakeBackports.cmake
${VTKm_SOURCE_DIR}/CMake/FindTBB.cmake
- ${VTKm_SOURCE_DIR}/CMake/patches/3.15/FindMPI.cmake
+ ${VTKm_SOURCE_DIR}/CMake/patches/FindMPI.cmake
DESTINATION ${VTKm_INSTALL_CMAKE_MODULE_DIR}
)
+ install(
+ FILES
+ ${VTKm_SOURCE_DIR}/CMake/patches/3.15/FindMPI.cmake
+ DESTINATION ${VTKm_INSTALL_CMAKE_MODULE_DIR}/3.15
+ )
# Install support files.
install(
--
2.24.2
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment