PETSc needs HDF5| Patched for disabling the PETSc tests of CMake
This commit is contained in:
parent
abc773e612
commit
895b67c621
75
sundials-disable_petsc_tests.patch
Normal file
75
sundials-disable_petsc_tests.patch
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
--- a/config/SundialsPETSc.cmake
|
||||||
|
+++ b/config/SundialsPETSc.cmake
|
||||||
|
@@ -25,49 +25,4 @@
|
||||||
|
# set PETSC_LIBRARIES
|
||||||
|
include(FindPETSc)
|
||||||
|
|
||||||
|
-# If we have the PETSC libraries, test them
|
||||||
|
-if(PETSC_LIBRARIES)
|
||||||
|
- message(STATUS "Looking for PETSc libraries...")
|
||||||
|
- # Create the PETSCTest directory
|
||||||
|
- set(PETSCTest_DIR ${PROJECT_BINARY_DIR}/PETSCTest)
|
||||||
|
- file(MAKE_DIRECTORY ${PETSCTest_DIR})
|
||||||
|
- # Create a CMakeLists.txt file
|
||||||
|
- file(WRITE ${PETSCTest_DIR}/CMakeLists.txt
|
||||||
|
- "CMAKE_MINIMUM_REQUIRED(VERSION 3.0.2)\n"
|
||||||
|
- "PROJECT(ltest C)\n"
|
||||||
|
- "SET(CMAKE_VERBOSE_MAKEFILE ON)\n"
|
||||||
|
- "SET(CMAKE_BUILD_TYPE \"${CMAKE_BUILD_TYPE}\")\n"
|
||||||
|
- "SET(CMAKE_C_COMPILER ${MPI_C_COMPILER})\n"
|
||||||
|
- "SET(CMAKE_C_FLAGS \"${CMAKE_C_FLAGS}\")\n"
|
||||||
|
- "SET(CMAKE_C_FLAGS_RELEASE \"${CMAKE_C_FLAGS_RELEASE}\")\n"
|
||||||
|
- "SET(CMAKE_C_FLAGS_DEBUG \"${CMAKE_C_FLAGS_DEBUG}\")\n"
|
||||||
|
- "SET(CMAKE_C_FLAGS_RELWITHDEBUGINFO \"${CMAKE_C_FLAGS_RELWITHDEBUGINFO}\")\n"
|
||||||
|
- "SET(CMAKE_C_FLAGS_MINSIZE \"${CMAKE_C_FLAGS_MINSIZE}\")\n"
|
||||||
|
- "INCLUDE_DIRECTORIES(${PETSC_INCLUDE_DIR})\n"
|
||||||
|
- "ADD_EXECUTABLE(ltest ltest.c)\n"
|
||||||
|
- "TARGET_LINK_LIBRARIES(ltest ${PETSC_LIBRARIES})\n")
|
||||||
|
- # Create a C source file which calls a PETSC function
|
||||||
|
- file(WRITE ${PETSCTest_DIR}/ltest.c
|
||||||
|
- "\#include \"petscvec.h\"\n"
|
||||||
|
- "int main(){\n"
|
||||||
|
- "Vec x;\n"
|
||||||
|
- "VecCreate(PETSC_COMM_WORLD, &x);\n"
|
||||||
|
- "return(0);\n"
|
||||||
|
- "}\n")
|
||||||
|
- # Attempt to link the "ltest" executable
|
||||||
|
- try_compile(LTEST_OK ${PETSCTest_DIR} ${PETSCTest_DIR} ltest OUTPUT_VARIABLE MY_OUTPUT)
|
||||||
|
-
|
||||||
|
- # To ensure we do not use stuff from the previous attempts,
|
||||||
|
- # we must remove the CMakeFiles directory.
|
||||||
|
- file(REMOVE_RECURSE ${PETSCTest_DIR}/CMakeFiles)
|
||||||
|
- # Process test result
|
||||||
|
- if(LTEST_OK)
|
||||||
|
- message(STATUS "Checking if PETSc works... OK")
|
||||||
|
- set(PETSC_FOUND TRUE)
|
||||||
|
- else(LTEST_OK)
|
||||||
|
- message(STATUS "Checking if PETSc works... FAILED")
|
||||||
|
- endif(LTEST_OK)
|
||||||
|
-else(PETSC_LIBRARIES)
|
||||||
|
- PRINT_WARNING("PETSC LIBRARIES NOT Found. Please check library path" "${PETSC_LIBRARY_DIR} ")
|
||||||
|
- message(STATUS "Looking for PETSc libraries... FAILED")
|
||||||
|
-endif(PETSC_LIBRARIES)
|
||||||
|
+set(PETSC_FOUND TRUE)
|
||||||
|
--- a/examples/ida/petsc/CMakeLists.txt
|
||||||
|
+++ b/examples/ida/petsc/CMakeLists.txt
|
||||||
|
@@ -19,8 +19,6 @@
|
||||||
|
|
||||||
|
# Examples using SUNDIALS linear solvers
|
||||||
|
SET(IDA_examples
|
||||||
|
- #"idaHeat2D_jac_petsc\;1\;4" # Not to be released in 2.7.0
|
||||||
|
- "idaHeat2D_kry_petsc\;1\;4\;develop"
|
||||||
|
)
|
||||||
|
|
||||||
|
IF(MPI_C_COMPILER)
|
||||||
|
--- a/examples/nvector/petsc/CMakeLists.txt
|
||||||
|
+++ b/examples/nvector/petsc/CMakeLists.txt
|
||||||
|
@@ -19,8 +19,6 @@
|
||||||
|
|
||||||
|
# Examples using SUNDIALS PETSc nvector
|
||||||
|
SET(nvector_petsc_examples
|
||||||
|
- "test_nvector_petsc\;1000 0\;\;\;" # run sequentially
|
||||||
|
- "test_nvector_petsc\;1000 0\;1\;4\;" # run 4 procs
|
||||||
|
)
|
||||||
|
|
||||||
|
# Dependencies for nvector examples
|
@ -51,6 +51,10 @@ Patch0: %{name}-3.1.1-set_superlumt_name.patch
|
|||||||
# This patch rename superLUMT64 library
|
# This patch rename superLUMT64 library
|
||||||
Patch1: %{name}-3.1.1-set_superlumt64_name.patch
|
Patch1: %{name}-3.1.1-set_superlumt64_name.patch
|
||||||
|
|
||||||
|
# PETSc libraries unrecognized for unknown reasons
|
||||||
|
# This patch disables the PETSc tests of CMake
|
||||||
|
Patch2: %{name}-disable_petsc_tests.patch
|
||||||
|
|
||||||
%if 0%{?with_fortran}
|
%if 0%{?with_fortran}
|
||||||
BuildRequires: gcc-gfortran
|
BuildRequires: gcc-gfortran
|
||||||
%endif
|
%endif
|
||||||
@ -103,6 +107,7 @@ BuildRequires: hypre-openmpi-devel
|
|||||||
%if 0%{?with_petsc}
|
%if 0%{?with_petsc}
|
||||||
BuildRequires: petsc-openmpi-devel >= 3.10
|
BuildRequires: petsc-openmpi-devel >= 3.10
|
||||||
BuildRequires: scalapack-openmpi-devel
|
BuildRequires: scalapack-openmpi-devel
|
||||||
|
BuildRequires: hdf5-openmpi-devel
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
Requires: openmpi%{?_isa}
|
Requires: openmpi%{?_isa}
|
||||||
@ -136,6 +141,7 @@ BuildRequires: hypre-mpich-devel
|
|||||||
%if 0%{?with_petsc}
|
%if 0%{?with_petsc}
|
||||||
BuildRequires: petsc-mpich-devel >= 3.10
|
BuildRequires: petsc-mpich-devel >= 3.10
|
||||||
BuildRequires: scalapack-mpich-devel
|
BuildRequires: scalapack-mpich-devel
|
||||||
|
BuildRequires: hdf5-mpich-devel
|
||||||
%endif
|
%endif
|
||||||
Requires: mpich%{?_isa}
|
Requires: mpich%{?_isa}
|
||||||
%if 0%{?with_fortran}
|
%if 0%{?with_fortran}
|
||||||
@ -180,6 +186,8 @@ pushd sundials-%{version}
|
|||||||
%patch0 -p0
|
%patch0 -p0
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%patch2 -p1 -b .disable_petsc_tests
|
||||||
|
|
||||||
##Set serial library's paths
|
##Set serial library's paths
|
||||||
sed -i 's|DESTINATION include/nvector|DESTINATION %{_includedir}/nvector|g' src/nvector/serial/CMakeLists.txt
|
sed -i 's|DESTINATION include/nvector|DESTINATION %{_includedir}/nvector|g' src/nvector/serial/CMakeLists.txt
|
||||||
sed -i 's|DESTINATION include/nvector|DESTINATION %{_includedir}/nvector|g' src/nvector/openmp/CMakeLists.txt
|
sed -i 's|DESTINATION include/nvector|DESTINATION %{_includedir}/nvector|g' src/nvector/openmp/CMakeLists.txt
|
||||||
@ -655,8 +663,7 @@ popd
|
|||||||
%{_libdir}/libsundials_fsunlinsol*.so
|
%{_libdir}/libsundials_fsunlinsol*.so
|
||||||
%{_libdir}/libsundials_fsunnonlinsol*.so
|
%{_libdir}/libsundials_fsunnonlinsol*.so
|
||||||
%endif
|
%endif
|
||||||
%dir %{_includedir}/sundials
|
%{_includedir}/sundials/
|
||||||
%{_includedir}/sundials/sundials_config.h
|
|
||||||
%{_includedir}/nvector/
|
%{_includedir}/nvector/
|
||||||
%{_includedir}/sunmatrix/
|
%{_includedir}/sunmatrix/
|
||||||
%{_includedir}/sunlinsol/
|
%{_includedir}/sunlinsol/
|
||||||
@ -807,6 +814,7 @@ popd
|
|||||||
%changelog
|
%changelog
|
||||||
* Wed Jun 26 2019 Antonio Trande <sagitterATfedoraproject.org> - 4.1.0-3
|
* Wed Jun 26 2019 Antonio Trande <sagitterATfedoraproject.org> - 4.1.0-3
|
||||||
- Do not use curly brackets under %%files
|
- Do not use curly brackets under %%files
|
||||||
|
- PETSc needs HDF5
|
||||||
|
|
||||||
* Thu Apr 25 2019 Antonio Trande <sagitterATfedoraproject.org> - 4.1.0-2
|
* Thu Apr 25 2019 Antonio Trande <sagitterATfedoraproject.org> - 4.1.0-2
|
||||||
- Reorganization of the files
|
- Reorganization of the files
|
||||||
|
Loading…
Reference in New Issue
Block a user