diff options
author | Jon Rood <jon.rood@nrel.gov> | 2019-08-21 19:00:41 -0600 |
---|---|---|
committer | Peter Scheibel <scheibel1@llnl.gov> | 2019-08-21 18:00:41 -0700 |
commit | 1b8e0c36cb0ebe23eedf118e3a27555eefca34a0 (patch) | |
tree | 244c3fef3aa86c7ca21e3672efb945fcb7edb06b | |
parent | 77703721003ce7c0591940af77804091f97742fd (diff) | |
download | spack-1b8e0c36cb0ebe23eedf118e3a27555eefca34a0.tar.gz spack-1b8e0c36cb0ebe23eedf118e3a27555eefca34a0.tar.bz2 spack-1b8e0c36cb0ebe23eedf118e3a27555eefca34a0.tar.xz spack-1b8e0c36cb0ebe23eedf118e3a27555eefca34a0.zip |
Percept package: add version (#12434)
* Choose a specific commit as a version (before, the only version was
the master branch)
* Add CMake patch which allows for building the version added here
(this replaces the existing patches for percept in Spack)
* Update trilinos dependency
4 files changed, 85 insertions, 84 deletions
diff --git a/var/spack/repos/builtin/packages/percept/cmakelists.patch b/var/spack/repos/builtin/packages/percept/cmakelists.patch new file mode 100644 index 0000000000..6ac9b50dce --- /dev/null +++ b/var/spack/repos/builtin/packages/percept/cmakelists.patch @@ -0,0 +1,76 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b984099..fea4fdc 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -92,18 +92,7 @@ MESSAGE(" Trilinos_BUILD_SHARED_LIBS = ${Trilinos_BUILD_SHARED_LIBS}") + MESSAGE(" Trilinos_CXX_COMPILER_FLAGS = ${Trilinos_CXX_COMPILER_FLAGS}") + MESSAGE("End of Trilinos details\n") + +-# Optional Installation helpers +-SET (INSTALL_PERCEPT FALSE) +-IF (ENABLE_INSTALL) +- SET (INSTALL_PERCEPT TRUE) +-ENDIF() +- +-IF (INSTALL_PERCEPT) +- set(BINARY_INSTALL_DIR bin) +- set(INCLUDE_INSTALL_DIR include) +- set(LIB_INSTALL_DIR lib) +- INCLUDE(CMakePackageConfigHelpers) +-ENDIF () ++INCLUDE(CMakePackageConfigHelpers) + + MESSAGE("Setting and checking of compilers:") + SET(CMAKE_CXX_COMPILER ${Trilinos_CXX_COMPILER} ) +@@ -229,6 +218,9 @@ FILE (GLOB HEADER + FILE (GLOB ADAPT_SOURCE src/adapt/main/*.cpp) + #MESSAGE("-- ADAPT_SOURCE = ${ADAPT_SOURCE}") + ++FILE (GLOB TRANSFER_SOURCE src/percept/mesh_transfer/*.cpp) ++#MESSAGE("-- TRANSFER_SOURCE = ${TRANSFER_SOURCE}") ++ + FILE (GLOB PERCEPT_UTEST_SOURCE test/unit_tests/*.cpp) + #MESSAGE("-- PERCEPT_UTEST_SOURCE = ${PERCEPT_UTEST_SOURCE}") + +@@ -251,6 +243,7 @@ SET(percept_lib_name "percept") + + #SET(percept_ex_name "perceptX") + SET(adapt_ex_name "mesh_adapt") ++SET(transfer_ex_name "mesh_transfer") + #SET(percept_utest_name "percept_utest") + #SET(percept_rtest_name "percept_rtest") + #SET(percept_htest_name "percept_htest") +@@ -268,6 +261,9 @@ IF (NOT STK_PERCEPT_LITE) + ADD_EXECUTABLE(${adapt_ex_name} ${ADAPT_MAIN} ${ADAPT_HEADER}) + TARGET_LINK_LIBRARIES(${adapt_ex_name} ${percept_lib_name} ${YAML_LIBRARY}) + ++ ADD_EXECUTABLE(${transfer_ex_name} ${TRANSFER_SOURCE}) ++ TARGET_LINK_LIBRARIES(${transfer_ex_name} ${percept_lib_name} ${YAML_LIBRARY}) ++ + #ADD_EXECUTABLE(${percept_utest_name} ${PERCEPT_UTEST_SOURCE} ${PERCEPT_UTEST_HEADER}) + #TARGET_LINK_LIBRARIES(${percept_utest_name} ${percept_lib_name} ${GTEST_LIBRARY}) + +@@ -281,7 +277,7 @@ IF (NOT STK_PERCEPT_LITE) + TARGET_LINK_LIBRARIES(${percept_lib_name} ${Trilinos_LIBRARIES} ${YAML_LIBRARY} ${OPENNURBS_LIBRARY} ${BOOST_LIBRARIES}) + + SET_PROPERTY( +- TARGET ${percept_lib_name} ${adapt_ex_name} #${percept_utest_name} ${percept_rtest_name} ++ TARGET ${percept_lib_name} ${adapt_ex_name} ${transfer_ex_name} #${percept_utest_name} ${percept_rtest_name} + PROPERTY COMPILE_DEFINITIONS STK_PERCEPT_LITE=0 STK_PERCEPT_HAS_GEOMETRY STK_PERCEPT_USE_INTREPID + ) + +@@ -290,6 +286,14 @@ IF (NOT STK_PERCEPT_LITE) + PROPERTY COMPILE_DEFINITIONS STK_PERCEPT_LITE=0 + ) + ++ install(TARGETS ${percept_ex_name} ${adapt_ex_name} ${transfer_ex_name} ++ ${percept_htest_name} ${percept_rtest_name} ${percept_utest_name} ++ percept ++ RUNTIME DESTINATION bin ++ ARCHIVE DESTINATION lib ++ LIBRARY DESTINATION lib) ++ include(CMakePackageConfigHelpers) ++ + ENDIF() + + diff --git a/var/spack/repos/builtin/packages/percept/fix_cmakelists.patch b/var/spack/repos/builtin/packages/percept/fix_cmakelists.patch deleted file mode 100644 index a3ce6b1d95..0000000000 --- a/var/spack/repos/builtin/packages/percept/fix_cmakelists.patch +++ /dev/null @@ -1,54 +0,0 @@ ---- percept.orig/CMakeLists.txt 2017-12-08 09:16:41.572819000 -0700 -+++ percept/CMakeLists.txt 2017-12-08 09:17:25.028818000 -0700 -@@ -97,13 +97,6 @@ - SET (INSTALL_PERCEPT TRUE) - ENDIF() - --IF (INSTALL_PERCEPT) -- set(BINARY_INSTALL_DIR bin) -- set(INCLUDE_INSTALL_DIR include) -- set(LIB_INSTALL_DIR lib) -- INCLUDE(CMakePackageConfigHelpers) --ENDIF () -- - MESSAGE("Setting and checking of compilers:") - SET(CMAKE_CXX_COMPILER ${Trilinos_CXX_COMPILER} ) - SET(CMAKE_C_COMPILER ${Trilinos_C_COMPILER} ) -@@ -269,6 +262,8 @@ - FILE (GLOB ADAPT_SOURCE src/adapt/main/*.cpp) - MESSAGE("-- ADAPT_SOURCE = ${ADAPT_SOURCE}") - -+file(GLOB TRANSFER_SOURCE src/percept/mesh_transfer/*.cpp) -+ - FILE (GLOB PERCEPT_UTEST_SOURCE test/unit_tests/*.cpp) - MESSAGE("-- PERCEPT_UTEST_SOURCE = ${PERCEPT_UTEST_SOURCE}") - -@@ -330,8 +325,11 @@ - TARGET_LINK_LIBRARIES(${percept_lib_name} ${Trilinos_LIBRARIES} ${YAML_LIBRARY} ${OPENNURBS_LIBRARY} ${BOOST_LIBRARIES}) - # TARGET_LINK_LIBRARIES(${percept_lib_name} ${GTEST_LIBRARY}) - -+ add_executable(mesh_transfer ${TRANSFER_SOURCE}) -+ target_link_libraries(mesh_transfer ${percept_lib_name}) -+ - SET_PROPERTY( -- TARGET ${percept_lib_name} ${adapt_ex_name} ${percept_utest_name} ${percept_rtest_name} -+ TARGET ${percept_lib_name} mesh_transfer ${adapt_ex_name} ${percept_utest_name} ${percept_rtest_name} - PROPERTY COMPILE_DEFINITIONS STK_PERCEPT_LITE=0 STK_PERCEPT_HAS_GEOMETRY STK_PERCEPT_USE_INTREPID - ) - -@@ -342,5 +340,15 @@ - - ENDIF() - -+IF (INSTALL_PERCEPT) -+ install(TARGETS ${percept_ex_name} ${adapt_ex_name} -+ ${percept_htest_name} ${percept_rtest_name} ${percept_utest_name} -+ mesh_transfer percept -+ RUNTIME DESTINATION bin -+ ARCHIVE DESTINATION lib -+ LIBRARY DESTINATION lib) -+ #install(DIRECTORY include/ DESTINATION include) -+ include(CMakePackageConfigHelpers) -+ENDIF () - - MESSAGE("\nAnd CMake says...:") diff --git a/var/spack/repos/builtin/packages/percept/fix_header.patch b/var/spack/repos/builtin/packages/percept/fix_header.patch deleted file mode 100644 index feca6d022c..0000000000 --- a/var/spack/repos/builtin/packages/percept/fix_header.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- percept.orig/src/percept/MeshType.hpp 2017-12-08 09:16:42.080818000 -0700 -+++ percept/src/percept/MeshType.hpp 2017-12-08 09:17:25.568819000 -0700 -@@ -11,6 +11,7 @@ - #include <percept/Percept.hpp> - - #include <array> -+#include <memory> - #include <stk_mesh/base/Field.hpp> - #include <stk_mesh/base/Entity.hpp> - #include <stk_mesh/base/Bucket.hpp> -@@ -62,7 +63,7 @@ - typedef Kokkos::LayoutRight SecondaryDataLayout; - #endif - -- #elif KOKKOS_HAVE_OPENMP -+ #elif defined(KOKKOS_HAVE_OPENMP) - typedef Kokkos::OpenMP ExecSpace; - typedef Kokkos::OpenMP MemSpace; - typedef Kokkos::LayoutLeft DataLayout; diff --git a/var/spack/repos/builtin/packages/percept/package.py b/var/spack/repos/builtin/packages/percept/package.py index f33a7a61fa..fe72d79ded 100644 --- a/var/spack/repos/builtin/packages/percept/package.py +++ b/var/spack/repos/builtin/packages/percept/package.py @@ -14,19 +14,18 @@ class Percept(CMakePackage): homepage = "https://github.com/PerceptTools/percept" git = "https://github.com/PerceptTools/percept.git" - # This package file was created at percept - # commit dc1c8ec0175213146ac139946beca185a84c22e8 - version('develop', branch='master') - - depends_on('googletest~shared@:1.8.0') + # The open version of Percept does not seem to be supported on + # github and it doesn't have tags. So we specify a specific commit + # here and the patch allows us to build the mesh_transfer exe and + # creates a make install target so Spack can install Percept + version('master', commit='363cdd0050443760d54162f140b2fb54ed9decf0') + patch('cmakelists.patch') + + depends_on('googletest~shared') depends_on('opennurbs@percept') depends_on('boost+graph+mpi') depends_on('yaml-cpp+pic~shared@0.5.3:') - # Percept was initially tested against Trilinos 12.12.1 - depends_on('trilinos~shared+exodus+tpetra+epetra+muelu+belos+ifpack2+amesos2+zoltan+stk+boost~superlu-dist+superlu+hdf5+zlib+pnetcdf+aztec+sacado~openmp+shards+intrepid+cgns@master,12.12.1:') - - patch('fix_cmakelists.patch') - patch('fix_header.patch') + depends_on('trilinos~shared+exodus+tpetra+epetra+epetraext+muelu+belos+ifpack2+amesos2+zoltan+stk+boost~superlu-dist+superlu+hdf5+zlib+pnetcdf+aztec+sacado~openmp+shards+intrepid+cgns@master,12.14.1:') def cmake_args(self): spec = self.spec @@ -49,7 +48,6 @@ class Percept(CMakePackage): spec['opennurbs'].prefix.lib, '-DPERCEPT_TPLS_INSTALL_DIR:PATH=%s' % spec['googletest'].prefix, - '-DENABLE_INSTALL:BOOL=ON' ]) return options |