summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKelly (KT) Thompson <KineticTheory@users.noreply.github.com>2022-08-22 08:04:58 -0600
committerGitHub <noreply@github.com>2022-08-22 16:04:58 +0200
commit1c61f0420aec08bbc76cfc710b413f9a06120c39 (patch)
tree3c3528e9ea4779c38d2df96255f64d74263420a1
parent00b244853e6135da572c85cfc73b6ea8dccd8096 (diff)
downloadspack-1c61f0420aec08bbc76cfc710b413f9a06120c39.tar.gz
spack-1c61f0420aec08bbc76cfc710b413f9a06120c39.tar.bz2
spack-1c61f0420aec08bbc76cfc710b413f9a06120c39.tar.xz
spack-1c61f0420aec08bbc76cfc710b413f9a06120c39.zip
Provide patches provided by consumers of draco. (#32281)
-rw-r--r--var/spack/repos/builtin/packages/draco/CMAKE-add-option-to-not-use-QT.patch56
-rw-r--r--var/spack/repos/builtin/packages/draco/d750-intel17.patch25
-rw-r--r--var/spack/repos/builtin/packages/draco/d770-query_craype.patch77
-rw-r--r--var/spack/repos/builtin/packages/draco/package.py13
-rw-r--r--var/spack/repos/builtin/packages/draco/smpi.patch12
5 files changed, 183 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/draco/CMAKE-add-option-to-not-use-QT.patch b/var/spack/repos/builtin/packages/draco/CMAKE-add-option-to-not-use-QT.patch
new file mode 100644
index 0000000000..67e7a0488f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/draco/CMAKE-add-option-to-not-use-QT.patch
@@ -0,0 +1,56 @@
+From ce2d856a516a592cf6c123d2862e9bbdaa4d6926 Mon Sep 17 00:00:00 2001
+From: Howard Pritchard <hppritcha@gmail.com>
+Date: Mon, 7 Dec 2020 13:53:45 -0700
+Subject: [PATCH] CMAKE: add option to not use QT
+
+Signed-off-by: Howard Pritchard <hppritcha@gmail.com>
+
+diff --git a/config/vendor_libraries.cmake b/config/vendor_libraries.cmake
+index 5a3e9d0c..8782170d 100644
+--- a/config/vendor_libraries.cmake
++++ b/config/vendor_libraries.cmake
+@@ -318,22 +318,27 @@ endmacro()
+ macro( setupQt )
+ message( STATUS "Looking for Qt SDK...." )
+
+- # Find the QtWidgets library
+- find_package(Qt5 COMPONENTS Widgets QUIET)
++ option (USE_QT "Build QT support for Draco" ON)
+
+- if( Qt5Core_DIR )
+- mark_as_advanced( Qt5Core_DIR Qt5Gui_DIR Qt5Gui_EGL_LIBRARY
+- Qt5Widgets_DIR QTDIR)
+- message( STATUS "Looking for Qt SDK....found ${Qt5Core_DIR}" )
+- else()
+- message( STATUS "Looking for Qt SDK....not found." )
+- endif()
++ if( USE_QT )
++ # Find the QtWidgets library
++ find_package(Qt5 COMPONENTS Widgets QUIET)
+
+- set_package_properties( Qt PROPERTIES
+- URL "http://qt.io"
+- DESCRIPTION "Qt is a comprehensive cross-platform C++ application framework."
+- TYPE OPTIONAL
+- PURPOSE "Only needed to demo qt version of draco_diagnostics." )
++ if( Qt5Core_DIR )
++ mark_as_advanced( Qt5Core_DIR Qt5Gui_DIR Qt5Gui_EGL_LIBRARY
++ Qt5Widgets_DIR QTDIR)
++ message( STATUS "Looking for Qt SDK....found ${Qt5Core_DIR}" )
++ else()
++ message( STATUS "Looking for Qt SDK....not found." )
++ endif()
++
++ set_package_properties( Qt PROPERTIES
++ URL "http://qt.io"
++ DESCRIPTION "Qt is a comprehensive cross-platform C++ application framework."
++ TYPE OPTIONAL
++ PURPOSE "Only needed to demo qt version of draco_diagnostics." )
++
++ endif()
+
+ endmacro()
+
+--
+2.26.2
+
diff --git a/var/spack/repos/builtin/packages/draco/d750-intel17.patch b/var/spack/repos/builtin/packages/draco/d750-intel17.patch
new file mode 100644
index 0000000000..1d665c6b25
--- /dev/null
+++ b/var/spack/repos/builtin/packages/draco/d750-intel17.patch
@@ -0,0 +1,25 @@
+Allow Draco-7_5_0 to compile with intel-17.0.4 by removing components experimental and cdi_CPEloss.
+This bug is tracked at https://github.com/kokkos/mdspan/issues/16
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index d1aec250..9ebbf8de 100755
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -52,7 +52,7 @@ add_dir_if_exists( c4 ) # needs ds++
+ add_dir_if_exists( cdi ) # needs ds++
+ add_dir_if_exists( compton ) # needs ds++, CSK
+ add_dir_if_exists( device ) # needs ds++
+-add_dir_if_exists( experimental ) # only the tests need ds++
++#add_dir_if_exists( experimental ) # only the tests need ds++
+ add_dir_if_exists( lapack_wrap ) # needs ds++
+ add_dir_if_exists( linear ) # needs ds++
+ add_dir_if_exists( memory ) # needs ds++
+@@ -66,7 +66,7 @@ add_dir_if_exists( viz ) # needs ds++
+ # Level 3
+ message(" ")
+ message( STATUS "Configuring Level 3 packages --" )
+-add_dir_if_exists( cdi_CPEloss ) # needs cdi, units
++#add_dir_if_exists( cdi_CPEloss ) # needs cdi, units
+ add_dir_if_exists( cdi_ipcress ) # needs cdi
+ add_dir_if_exists( cdi_ndi ) # needs ds++, rng, cdi
+ add_dir_if_exists( diagnostics ) # needs c4
diff --git a/var/spack/repos/builtin/packages/draco/d770-query_craype.patch b/var/spack/repos/builtin/packages/draco/d770-query_craype.patch
new file mode 100644
index 0000000000..b6e13f30ac
--- /dev/null
+++ b/var/spack/repos/builtin/packages/draco/d770-query_craype.patch
@@ -0,0 +1,77 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f7a69c95..e44d3496 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -72,7 +72,6 @@ dbsConfigInfo()
+ # Platform Checks: Is HOST_NAME_MAX defined? Is WinSock2.h available? Is
+ # gethostname() available?
+ include( platform_checks )
+-query_craype()
+ set_draco_uname()
+ query_have_gethostname()
+ query_have_maxpathlen()
+diff --git a/config/platform_checks.cmake b/config/platform_checks.cmake
+index 3ddcdab3..e66fd5e8 100644
+--- a/config/platform_checks.cmake
++++ b/config/platform_checks.cmake
+@@ -64,48 +64,6 @@ Platform Checks...
+ ")
+ dbs_set_sitename()
+
+-#------------------------------------------------------------------------------#
+-# Sanity checks for Cray Programming Environments
+-#
+-# - Ensure CMAKE_EXE_LINKER_FLAGS contains "-dynamic"
+-# - Ensure that the compilers given to cmake are actually Cray compiler
+-# wrappers.
+-#------------------------------------------------------------------------------#
+-macro( query_craype )
+-
+- # We expect developers to use the Cray compiler wrappers. See also
+- # https://cmake.org/cmake/help/latest/module/FindMPI.html
+- #
+- # Skip this check if building from within spack.
+- if( CMAKE_CXX_COMPILER_WRAPPER STREQUAL CrayPrgEnv AND
+- NOT "$ENV{CXX}" MATCHES "$ENV{SPACK_ROOT}/lib/spack/env/" )
+- if( NOT "$ENV{CXX}" MATCHES "CC$" OR
+- NOT "$ENV{CC}" MATCHES "cc$" OR
+- NOT "$ENV{FC}" MATCHES "ftn$" OR
+- NOT "$ENV{CRAYPE_LINK_TYPE}" MATCHES "dynamic$" )
+- message( FATAL_ERROR
+- "The build system requires that the Cray compiler wrappers (CC, cc, "
+- "ftn) be used when configuring this product on a Cray system "
+- "(CMAKE_CXX_COMPILER_WRAPPER = ${CMAKE_CXX_COMPILER_WRAPPER}). The "
+- "development environment must also support dynamic linking. The "
+- "build system thinks you are trying to use:\n"
+- " CMAKE_CXX_COMPILER = ${CMAKE_CXX_COMPILER}\n"
+- " CMAKE_C_COMPILER = ${CMAKE_C_COMPILER}\n"
+- " CMAKE_Fortran_COMPILER = ${CMAKE_Fortran_COMPILER}\n"
+- " CRAYPE_LINK_TYPE = $ENV{CRAYPE_LINK_TYPE}\n"
+- "If you are working on a system that runs the Cray Programming "
+- "Environment, try setting the following variables and rerunning cmake "
+- "from a clean build directory:\n"
+- " export CXX=`which CC`\n"
+- " export CC=`which cc`\n"
+- " export FC=`which ftn`\n"
+- " export CRAYPE_LINK_TYPE=dynamic\n"
+- "Otherwise please email this error message and other related "
+- "information to draco@lanl.gov.\n" )
+- endif()
+- endif()
+-endmacro()
+-
+ ##---------------------------------------------------------------------------##
+ ## Determine System Type and System Names
+ ##
+diff --git a/config/vendor_libraries.cmake b/config/vendor_libraries.cmake
+index 7112e786..55596abe 100644
+--- a/config/vendor_libraries.cmake
++++ b/config/vendor_libraries.cmake
+@@ -786,7 +786,6 @@ Looking for Draco...\")
+
+ # CMake macros that check the system for features like 'gethostname', etc.
+ include( platform_checks )
+- query_craype()
+
+ # Set compiler options
+ include( compilerEnv )
diff --git a/var/spack/repos/builtin/packages/draco/package.py b/var/spack/repos/builtin/packages/draco/package.py
index cfd8450491..79d7e8c82e 100644
--- a/var/spack/repos/builtin/packages/draco/package.py
+++ b/var/spack/repos/builtin/packages/draco/package.py
@@ -49,6 +49,7 @@ class Draco(CMakePackage):
variant("caliper", default=False, description="Enable caliper timers support")
variant("cuda", default=False, description="Enable Cuda/GPU support")
variant("eospac", default=True, description="Enable EOSPAC support")
+ variant("fast_fma", default=False, description="Enable fast FMA operations")
variant("lapack", default=True, description="Enable LAPACK wrapper")
variant("libquo", default=True, description="Enable Quo wrapper")
variant("parmetis", default=True, description="Enable Parmetis support")
@@ -90,8 +91,12 @@ class Draco(CMakePackage):
patch("d710-python2.patch", when="@7.1.0^python@2.7:2")
patch("d730.patch", when="@7.3.0:7.3")
patch("d740.patch", when="@7.4.0:7.4")
+ patch("d750-intel17.patch", when="@7.5.0:7.6.99%intel@17.0.0:18.0.0")
patch("d760-cray.patch", when="@7.6.0")
patch("d770-nocuda.patch", when="@7.7.0")
+ patch("d770-query_craype.patch", when="@7.7.0")
+ patch("smpi.patch", when="@:7.6.99")
+ patch("CMAKE-add-option-to-not-use-QT.patch", when="@7.8.0")
def url_for_version(self, version):
url = "https://github.com/lanl/Draco/archive/draco-{0}.zip"
@@ -107,6 +112,14 @@ class Draco(CMakePackage):
"-DUSE_QT={0}".format("ON" if "+qt" in self.spec else "OFF"),
]
)
+ if "+fast_fma" in self.spec:
+ options.extend(
+ [
+ "-DDRACO_ROUNDOFF_MODE={0}".format(
+ "FAST" if "build_type=Release" in self.spec else "ACCURATE"
+ )
+ ]
+ )
return options
def check(self):
diff --git a/var/spack/repos/builtin/packages/draco/smpi.patch b/var/spack/repos/builtin/packages/draco/smpi.patch
new file mode 100644
index 0000000000..64b80d8e34
--- /dev/null
+++ b/var/spack/repos/builtin/packages/draco/smpi.patch
@@ -0,0 +1,12 @@
+The LANL Darwin platform calls the IBM Spectrum modules "smpi".
+diff -up config/setupMPI.cmake.smpi config/setupMPI.cmake
+--- a/config/setupMPI.cmake.smpi 2020-05-28 11:54:17.851957957 -0600
++++ b/config/setupMPI.cmake 2020-05-28 11:55:35.018332601 -0600
+@@ -46,6 +46,7 @@ function( setMPIflavorVer )
+ elseif( "${MPIEXEC_EXECUTABLE}" MATCHES "mvapich2")
+ set( MPI_FLAVOR "mvapich2" )
+ elseif( "${MPIEXEC_EXECUTABLE}" MATCHES "spectrum-mpi" OR
++ "${MPIEXEC_EXECUTABLE}" MATCHES "smpi" OR
+ "${MPIEXEC_EXECUTABLE}" MATCHES "jsrun" )
+ set( MPI_FLAVOR "spectrum")
+ endif()