From 5580e0466392dcae689592db79913d56686b77ac Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 27 Jul 2017 19:37:48 +0000 Subject: [PATCH 01/36] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild --- sundials.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sundials.spec b/sundials.spec index 5288d86..ef2a4b9 100644 --- a/sundials.spec +++ b/sundials.spec @@ -46,7 +46,7 @@ Summary: Suite of nonlinear solvers Name: sundials Version: 2.7.0 -Release: 10%{?dist} +Release: 11%{?dist} # SUNDIALS is licensed under BSD with some additional (but unrestrictive) clauses. # Check the file 'LICENSE' for details. License: BSD @@ -857,6 +857,9 @@ popd %{_includedir}/nvector/nvector_pthreads.h %changelog +* Thu Jul 27 2017 Fedora Release Engineering - 2.7.0-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + * Fri Mar 03 2017 Antonio Trande - 2.7.0-10 - Build OpenMPI libraries on EPEL From 83659d2e812e2b3afc18d7c6be69632a54b0c513 Mon Sep 17 00:00:00 2001 From: sagitter Date: Wed, 8 Nov 2017 21:48:45 +0100 Subject: [PATCH 02/36] Update to 3.0.0 --- .gitignore | 1 + sources | 2 +- sundials-2.7.0-set_superlumt_name.patch | 11 - sundials-3.0.0-set_superlumt_name.patch | 11 + sundials.spec | 402 +++++++++++++++++------- 5 files changed, 306 insertions(+), 121 deletions(-) delete mode 100644 sundials-2.7.0-set_superlumt_name.patch create mode 100644 sundials-3.0.0-set_superlumt_name.patch diff --git a/.gitignore b/.gitignore index ade35eb..15542b8 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ sundials-2.3.0.tar.gz /sundials-2.7.0-pkgconfig_files.tar.gz /sundials-2.7.0.tar.gz /sundials-2.7.0_pkgconfig_files.tar.gz +/sundials-3.0.0.tar.gz diff --git a/sources b/sources index 0c5c26a..16c0cea 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (sundials-2.7.0.tar.gz) = c86c167538065a4109b36ae7c8f60f3d92184133cfa661b5acfccee052c38f40be865412a1746bb57907b61602c212c0f15e1e30ef29e8a49db6d46a75a28e69 +SHA512 (sundials-3.0.0.tar.gz) = 3c86c7f27e64c2e6732546b0b1e87ea092502e361cae09b3b7eb29795c978edf494e17be13b78541dc91cc0709d928006bd0fc62ea968f2b621efa51856cdd60 diff --git a/sundials-2.7.0-set_superlumt_name.patch b/sundials-2.7.0-set_superlumt_name.patch deleted file mode 100644 index 28c3283..0000000 --- a/sundials-2.7.0-set_superlumt_name.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- config/FindSUPERLUMT.orig.cmake 2016-09-27 00:16:47.000000000 +0200 -+++ config/FindSUPERLUMT.cmake 2016-10-04 12:08:58.202988791 +0200 -@@ -42,7 +42,7 @@ - - else() - # find library with user provided directory path -- set(SUPERLUMT_LIBRARY_NAME superlu_mt_${POST}) -+ set(SUPERLUMT_LIBRARY_NAME superlumt_d) - find_library(SUPERLUMT_LIBRARY ${SUPERLUMT_LIBRARY_NAME} ${SUPERLUMT_LIBRARY_DIR} NO_DEFAULT_PATH) - endif() - mark_as_advanced(SUPERLUMT_LIBRARY) diff --git a/sundials-3.0.0-set_superlumt_name.patch b/sundials-3.0.0-set_superlumt_name.patch new file mode 100644 index 0000000..039bc26 --- /dev/null +++ b/sundials-3.0.0-set_superlumt_name.patch @@ -0,0 +1,11 @@ +--- config/FindSUPERLUMT.orig.cmake 2016-09-27 00:16:47.000000000 +0200 ++++ config/FindSUPERLUMT.cmake 2016-10-04 12:08:58.202988791 +0200 +@@ -44,7 +44,7 @@ + set(SUPERLUMT_LIBRARY_DIR ${SUPERLUMT_LIBRARY_DIR} CACHE PATH "" FORCE) + else() + # find library with user provided directory path +- set(SUPERLUMT_LIBRARY_NAME superlu_mt_${POST}) ++ set(SUPERLUMT_LIBRARY_NAME superlumt_d) + find_library(SUPERLUMT_LIBRARY ${SUPERLUMT_LIBRARY_NAME} ${SUPERLUMT_LIBRARY_DIR} NO_DEFAULT_PATH) + endif() + mark_as_advanced(SUPERLUMT_LIBRARY) diff --git a/sundials.spec b/sundials.spec index ef2a4b9..0923d51 100644 --- a/sundials.spec +++ b/sundials.spec @@ -6,6 +6,16 @@ %{!?__global_ldflags: %global __global_ldflags -Wl,-z,relro} %endif +# openblas available on these architectures. +%if 0%{?fedora} && 0%{?fedora} > 26 +%{!?openblas_arches:%global openblas_arches x86_64 %{ix86} armv7hl %{power64} aarch64 s390x} +%else +%{!?openblas_arches:%global openblas_arches x86_64 %{ix86} armv7hl %{power64} aarch64} +%endif +%if 0%{?rhel} +%{!?openblas_arches:%global openblas_arches x86_64 %{ix86} armv7hl %{power64} aarch64} +%endif + ## Define if use openmpi or not %ifarch s390x %if 0%{?fedora} >= 26 @@ -40,28 +50,38 @@ %global with_mpich 1 %endif +%global with_hypre 1 + %global with_parcheck 1 %global with_sercheck 1 Summary: Suite of nonlinear solvers Name: sundials -Version: 2.7.0 -Release: 11%{?dist} +Version: 3.0.0 +Release: 1%{?dist} # SUNDIALS is licensed under BSD with some additional (but unrestrictive) clauses. # Check the file 'LICENSE' for details. License: BSD Group: Development/Libraries URL: http://www.llnl.gov/casc/sundials/ -Source0: http://www.llnl.gov/casc/sundials/download/code/%{name}-%{version}.tar.gz +Source0: https://computation.llnl.gov/projects/sundials/download/sundials-%{version}.tar.gz # This patch rename superLUMT library Patch0: %{name}-%{version}-set_superlumt_name.patch BuildRequires: gcc-gfortran BuildRequires: suitesparse-devel +%if 0%{?rhel} +BuildRequires: cmake3, epel-rpm-macros +%else BuildRequires: cmake -BuildRequires: lapack-devel -BuildRequires: blas-devel +%global cmake3 %{cmake} +%endif +%ifarch %{openblas_arches} +BuildRequires: openblas-devel, openblas-srpm-macros +%else +BuildRequires: blas-devel, lapack-devel +%endif # SuperLUMT is unavailable on following architectures %ifnarch %{power64} aarch64 @@ -127,6 +147,19 @@ Requires: %{name}-devel%{?_isa} = %{version}-%{release} SUNDIALS is a SUite of Non-linear DIfferential/ALgebraic equation Solvers for use in writing mathematical software. This package contains the developer files (.so file). + +%package samples +Summary: Suite of nonlinear solvers (example files) +Group: Development/Libraries +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name}-fortran%{?_isa} = %{version}-%{release} +Requires: %{name}-fortran-openmp%{?_isa} = %{version}-%{release} +Requires: %{name}-openmp%{?_isa} = %{version}-%{release} +Requires: %{name}-threads%{?_isa} = %{version}-%{release} +%description samples +SUNDIALS is a SUite of Non-linear DIfferential/ALgebraic equation Solvers +for use in writing mathematical software. +This package contains the C, CXX, F77 example files. ############################################################################# ######### %if 0%{?with_openmpi} @@ -172,6 +205,16 @@ SUNDIALS is a SUite of Non-linear DIfferential/ALgebraic equation Solvers for use in writing mathematical software. This package contains the Sundials Fortran parallel OpenMPI devel libraries and header files. + +%package openmpi-samples +Summary: Suite of nonlinear solvers (example files) +Group: Development/Libraries +Requires: %{name}-openmpi%{?_isa} = %{version}-%{release} +Requires: %{name}-fortran-openmpi%{?_isa} = %{version}-%{release} +%description openmpi-samples +SUNDIALS is a SUite of Non-linear DIfferential/ALgebraic equation Solvers +for use in writing mathematical software. +This package contains the C, CXX, F77 example files. %endif ###### ############################################################################### @@ -219,6 +262,16 @@ SUNDIALS is a SUite of Non-linear DIfferential/ALgebraic equation Solvers for use in writing mathematical software. This package contains the Sundials Fortran parallel MPICH devel libraries and header files. + +%package mpich-samples +Summary: Suite of nonlinear solvers (example files) +Group: Development/Libraries +Requires: %{name}-mpich%{?_isa} = %{version}-%{release} +Requires: %{name}-fortran-mpich%{?_isa} = %{version}-%{release} +%description mpich-samples +SUNDIALS is a SUite of Non-linear DIfferential/ALgebraic equation Solvers +for use in writing mathematical software. +This package contains the C, CXX, F77 example files. %endif ###### ############################################################################# @@ -279,9 +332,11 @@ This package contains the documentation files. %setup -qc pushd sundials-%{version} + %ifnarch %{power64} aarch64 %patch0 -p0 %endif + ##Set destination library's paths sed -i 's/DESTINATION lib/DESTINATION %{_lib}/g' src/arkode/CMakeLists.txt sed -i 's|DESTINATION lib|DESTINATION %{_lib}|g' src/arkode/fcmix/CMakeLists.txt @@ -294,6 +349,10 @@ sed -i 's/DESTINATION lib/DESTINATION %{_lib}/g' src/idas/CMakeLists.txt sed -i 's/DESTINATION lib/DESTINATION %{_lib}/g' src/kinsol/CMakeLists.txt sed -i 's|DESTINATION lib|DESTINATION %{_lib}|g' src/kinsol/fcmix/CMakeLists.txt sed -i 's|DESTINATION lib|DESTINATION %{_lib}|g' src/nvec_openmp/CMakeLists.txt +sed -i 's|DESTINATION lib|DESTINATION %{_lib}|g' src/sunlinsol_*/CMakeLists.txt +sed -i 's|DESTINATION lib|DESTINATION %{_lib}|g' src/sunmat_*/CMakeLists.txt +sed -i 's| SOVERSION | %{version} |g' src/sunlinsol_*/CMakeLists.txt +sed -i 's| SOVERSION | %{version} |g' src/sunmat_*/CMakeLists.txt ##Set pthread library's paths sed -i 's|INSTALL(TARGETS sundials_nvecpthreads_shared DESTINATION lib)|INSTALL(TARGETS sundials_nvecpthreads_shared DESTINATION %{_libdir})|g' src/nvec_pthreads/CMakeLists.txt @@ -329,45 +388,64 @@ cp -a sundials-%{version} buildmpich_dir %build pushd sundials-%{version} +# LAPACK is not compatible with INT64_T integers mkdir -p build && cd build + +%ifarch %{openblas_arches} +export LIBBLASLINK=-lopenblas +export LIBBLAS=libopenblas +export LIBLAPACKLINK= +export INCBLAS=-I%{_includedir}/openblas +%else +export LIBBLASLINK=-lblas +export LIBBLAS=libblas +export LIBLAPACKLINK=-llapack +export LIBLAPACK=liblapack +export INCBLAS=-I%{_includedir} +%endif +%ifnarch %{power64} aarch64 +export LIBSUPERLUMTLINK=-lsuperlumt_d +%else +export LIBSUPERLUMTLINK= +%endif + %if %{with debug} export CFLAGS="" cmake \ -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ -DCMAKE_BUILD_TYPE:STRING=Debug \ -DCMAKE_C_FLAGS_DEBUG:STRING="-O0 -g -Wl,-z,relro -Wl,-z,now" \ - -DCMAKE_Fortran_FLAGS_DEBUG:STRING="-O0 -g -Wl,-z,relro -Wl,-z,now -lpthread -lgomp" \ -%ifnarch %{power64} aarch64 - -DCMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING="%{__global_ldflags} -Wl,-z,now -lklu -llapack -lblas -lgomp -lsuperlumt_d -lpthread -lm" \ + -DCMAKE_Fortran_FLAGS_DEBUG:STRING="-O0 -g -Wl,-z,relro -Wl,-z,now" \ %else - -DCMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING="%{__global_ldflags} -Wl,-z,now -lklu -llapack -lblas -lgomp -lpthread -lm" \ -%endif -%else -%cmake \ +%{cmake3} \ + -DSUNDIALS_INDEX_TYPE:STRING=int64_t \ -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ -DCMAKE_BUILD_TYPE:STRING=Release \ -DCMAKE_C_FLAGS_RELEASE:STRING="%{optflags} -Wl,-z,relro -Wl,-z,now" \ - -DCMAKE_Fortran_FLAGS_RELEASE:STRING="%{optflags} -Wl,-z,relro -Wl,-z,now -lpthread -lgomp" \ -%ifnarch %{power64} aarch64 - -DCMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING="%{__global_ldflags} -Wl,-z,now -lklu -llapack -lblas -lgomp -lsuperlumt_d -lpthread -lm" \ -%else - -DCMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING="%{__global_ldflags} -Wl,-z,now -lklu -llapack -lblas -lgomp -lpthread -lm" \ + -DCMAKE_Fortran_FLAGS_RELEASE:STRING="%{optflags} -Wl,-z,relro -Wl,-z,now" \ %endif + -DCMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING="%{__global_ldflags} -Wl,-z,now -lklu $LIBBLASLINK $LIBLAPACKLINK $LIBSUPERLUMTLINK" \ +%ifnarch %{power64} aarch64 s390x + -DLAPACK_ENABLE:BOOL=OFF \ + -DBLAS_ENABLE:BOOL=ON \ + -DBLAS_LIBRARIES:STRING=%{_libdir}/$LIBBLAS.so \ +%else + -DLAPACK_ENABLE:BOOL=ON \ + -DBLAS_ENABLE:BOOL=ON \ + -DBLAS_LIBRARIES:STRING=%{_libdir}/$LIBBLAS.so \ + -DLAPACK_LIBRARIES:STRING=%{_libdir}/$LIBLAPACK.so \ %endif -DCMAKE_MODULE_LINKER_FLAGS:STRING="%{__global_ldflags} -Wl,-z,now" \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \ - -DEXAMPLES_ENABLE=ON -DEXAMPLES_INSTALL=OFF -DEXAMPLES_INSTALL_PATH:PATH=%{_datadir}/%{name}/serial_examples \ + -DEXAMPLES_ENABLE_CXX:BOOL=ON -DEXAMPLES_ENABLE_C:BOOL=ON -DEXAMPLES_ENABLE_F77:BOOL=ON \ -DCMAKE_SKIP_RPATH:BOOL=YES -DCMAKE_SKIP_INSTALL_RPATH:BOOL=YES \ -DBUILD_SHARED_LIBS:BOOL=ON -DBUILD_STATIC_LIBS:BOOL=OFF \ -DMPI_ENABLE:BOOL=OFF \ -DCMAKE_Fortran_COMPILER:STRING=gfortran \ -DFCMIX_ENABLE:BOOL=ON \ - -DF90_ENABLE:BOOL=ON \ -DUSE_GENERIC_MATH:BOOL=ON \ -DOPENMP_ENABLE:BOOL=ON \ - -DCXX_ENABLE:BOOL=ON \ -DPTHREAD_ENABLE:BOOL=ON \ - -DLAPACK_ENABLE:BOOL=ON \ -DSUNDIALS_PRECISION:STRING=double \ %ifnarch %{power64} aarch64 -DSUPERLUMT_ENABLE:BOOL=ON \ @@ -376,9 +454,10 @@ cmake \ -DSUPERLUMT_THREAD_TYPE:STRING=OpenMP \ %endif -DHYPRE_ENABLE:BOOL=OFF \ - -DKLU_ENABLE=ON -DKLU_LIBRARY_DIR:PATH=%{_libdir} -DKLU_INCLUDE_DIR:PATH=%{_includedir}/suitesparse -Wno-dev .. + -DKLU_ENABLE=ON -DKLU_LIBRARY_DIR:PATH=%{_libdir} -DKLU_INCLUDE_DIR:PATH=%{_includedir}/suitesparse \ + -DEXAMPLES_INSTALL:BOOL=OFF -Wno-dev .. -make V=1 %{?_smp_mflags} +%make_build V=1 cd .. popd @@ -397,61 +476,98 @@ mkdir -p build && cd build export CC=mpicc export CXX=mpicxx export FC=mpif77 + +## Blas +%ifarch %{openblas_arches} +export LIBBLASLINK=-lopenblas +export LIBBLAS=libopenblas +export LIBLAPACKLINK= +export INCBLAS=-I%{_includedir}/openblas +%else +export LIBBLASLINK=-lblas +export LIBBLAS=libblas +export LIBLAPACKLINK=-llapack +export LIBLAPACK=liblapack +export INCBLAS=-I%{_includedir} +%endif +## +## SuperLUMT +%ifnarch %{power64} aarch64 +export LIBSUPERLUMTLINK=-lsuperlumt_d +%else +export LIBSUPERLUMTLINK= +%endif +## Hypre +%if 0%{?with_hypre} +%ifarch s390x +export LIBHYPRELINK= +%else +export LIBHYPRELINK="-L$MPI_LIB -lHYPRE" +%endif +%endif +## + %if %{with debug} export CFLAGS="" cmake \ -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ -DCMAKE_BUILD_TYPE:STRING=Debug \ -DCMAKE_C_FLAGS_DEBUG:STRING="-O0 -g -Wl,-z,relro -Wl,-z,now" \ - -DCMAKE_Fortran_FLAGS_DEBUG:STRING="-O0 -g -Wl,-z,relro -Wl,-z,now -lm -lpthread -lgomp" \ - -DCMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING="%{__global_ldflags} -Wl,-z,now -lm -lpthread -lgomp -lklu \ -%ifnarch s390x --L%{_libdir}/openmpi/lib -lHYPRE" \ -%endif + -DCMAKE_Fortran_FLAGS_DEBUG:STRING="-O0 -g -Wl,-z,relro -Wl,-z,now" \ %else -%cmake \ +%{cmake3} \ + -DSUNDIALS_INDEX_TYPE:STRING=int64_t \ -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ -DCMAKE_BUILD_TYPE:STRING=Release \ -DCMAKE_C_FLAGS_RELEASE:STRING="%{optflags} -Wl,-z,relro -Wl,-z,now" \ - -DCMAKE_Fortran_FLAGS_RELEASE:STRING="%{optflags} -Wl,-z,relro -Wl,-z,now -lm -lpthread -lgomp" \ -%ifnarch s390x - -DCMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING="%{__global_ldflags} -Wl,-z,now -lm -lpthread -lgomp -lklu -L%{_libdir}/openmpi/lib -lHYPRE" \ -%else - -DCMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING="%{__global_ldflags} -Wl,-z,now -lm -lpthread -lgomp -lklu" \ + -DCMAKE_Fortran_FLAGS_RELEASE:STRING="%{optflags} -Wl,-z,relro -Wl,-z,now" \ %endif + -DCMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING="%{__global_ldflags} -Wl,-z,now -lklu $LIBLAPACKLINK $LIBBLASLINK $LIBSUPERLUMTLINK $LIBHYPRELINK" \ +%ifnarch %{power64} aarch64 s390x + -DLAPACK_ENABLE:BOOL=OFF \ + -DBLAS_ENABLE:BOOL=ON \ + -DBLAS_LIBRARIES:STRING=%{_libdir}/$LIBBLAS.so \ +%else + -DLAPACK_ENABLE:BOOL=ON \ + -DBLAS_ENABLE:BOOL=ON \ + -DBLAS_LIBRARIES:STRING=%{_libdir}/$LIBBLAS.so \ + -DLAPACK_LIBRARIES:STRING=%{_libdir}/$LIBLAPACK.so \ %endif -DCMAKE_INSTALL_PREFIX=%{_prefix} \ - -DEXAMPLES_ENABLE=ON -DEXAMPLES_INSTALL=OFF -DEXAMPLES_INSTALL_PATH:PATH=%{_datadir}/%{name}/openmpi_examples \ + -DEXAMPLES_ENABLE_CXX:BOOL=ON -DEXAMPLES_ENABLE_C:BOOL=ON -DEXAMPLES_ENABLE_F77:BOOL=ON \ -DBUILD_SHARED_LIBS:BOOL=ON -DBUILD_STATIC_LIBS:BOOL=OFF \ -DCMAKE_SKIP_RPATH:BOOL=YES -DCMAKE_SKIP_INSTALL_RPATH:BOOL=YES \ -DMPI_ENABLE:BOOL=ON \ - -DMPI_MPICC:STRING=%{_libdir}/openmpi/bin/mpicc \ + -DMPI_MPICC:STRING=$MPI_BIN/mpicc \ -DMPI_RUN_COMMAND=mpirun \ - -DMPI_MPIF77:STRING=%{_libdir}/openmpi/bin/mpif77 \ + -DMPI_MPIF77:STRING=$MPI_BIN/mpif77 \ -DFCMIX_ENABLE:BOOL=ON \ - -DF90_ENABLE:BOOL=OFF \ -DUSE_GENERIC_MATH:BOOL=ON \ -DOPENMP_ENABLE:BOOL=ON \ - -DCXX_ENABLE:BOOL=ON \ - -DCMAKE_Fortran_COMPILER:STRING=%{_libdir}/openmpi/bin/mpif77 \ + -DCMAKE_Fortran_COMPILER:STRING=$MPI_BIN/mpif77 \ -DPTHREAD_ENABLE:BOOL=ON \ - -DLAPACK_ENABLE:BOOL=ON \ - -DSUPERLUMT_ENABLE:BOOL=OFF \ -%ifnarch s390x - -DHYPRE_ENABLE:BOOL=ON \ - -DHYPRE_INCLUDE_DIR:PATH=%{_includedir}/openmpi-%{_arch}/hypre \ - -DHYPRE_LIBRARY_DIR:PATH=%{_libdir}/openmpi/lib \ +%ifnarch %{power64} aarch64 + -DSUPERLUMT_ENABLE:BOOL=ON \ + -DSUPERLUMT_INCLUDE_DIR:PATH=%{_includedir}/SuperLUMT \ + -DSUPERLUMT_LIBRARY_DIR:PATH=%{_libdir} \ + -DSUPERLUMT_THREAD_TYPE:STRING=OpenMP \ %endif - -DKLU_ENABLE=ON -DKLU_LIBRARY_DIR:PATH=%{_libdir} -DKLU_INCLUDE_DIR:PATH=%{_includedir}/suitesparse -Wno-dev .. +%if 0%{?with_hypre} + -DHYPRE_ENABLE:BOOL=ON \ + -DHYPRE_INCLUDE_DIR:PATH=$MPI_INCLUDE/hypre \ + -DHYPRE_LIBRARY_DIR:PATH=$MPI_LIB \ +%endif + -DKLU_ENABLE=ON -DKLU_LIBRARY_DIR:PATH=%{_libdir} -DKLU_INCLUDE_DIR:PATH=%{_includedir}/suitesparse \ + -DEXAMPLES_INSTALL:BOOL=OFF -Wno-dev .. -make V=1 %{?_smp_mflags} +%make_build V=1 %{_openmpi_unload} cd .. popd %endif ###### -############################################################################# -###### +########################################################################### + %if 0%{?with_mpich} pushd buildmpich_dir ##Set mpich library's paths @@ -474,60 +590,100 @@ export CXX=mpicxx export F77=mpifort export FC=mpifort %endif +## Blas +%ifarch %{openblas_arches} +export LIBBLASLINK=-lopenblas +export LIBBLAS=libopenblas +export LIBLAPACKLINK= +export INCBLAS=-I%{_includedir}/openblas +%else +export LIBBLASLINK=-lblas +export LIBBLAS=libblas +export LIBLAPACKLINK=-llapack +export LIBLAPACK=liblapack +export INCBLAS=-I%{_includedir} +%endif +## +## SuperLUMT +%ifnarch %{power64} aarch64 +export LIBSUPERLUMTLINK=-lsuperlumt_d +%else +export LIBSUPERLUMTLINK= +%endif +## Hypre +%if 0%{?with_hypre} +%if 0%{?el6} +%ifarch ppc64 +export LIBHYPRELINK= +%else +export LIBHYPRELINK="-L$MPI_LIB -lHYPRE" +%endif +%else +export LIBHYPRELINK="-L$MPI_LIB -lHYPRE" +%endif +%endif +## + %if %{with debug} export CFLAGS="" cmake \ -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ -DCMAKE_BUILD_TYPE:STRING=Debug \ -DCMAKE_C_FLAGS_DEBUG:STRING="-O0 -g -Wl,-z,relro -Wl,-z,now" \ - -DCMAKE_Fortran_FLAGS_DEBUG:STRING="-O0 -g -Wl,-z,relro -Wl,-z,now -lm -lpthread -lgomp" \ - -DCMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING="%{__global_ldflags} -Wl,-z,now -lm -lpthread -lgomp -lklu \ -%ifnarch s390x --L%{_libdir}/openmpi/lib -lHYPRE" \ -%endif + -DCMAKE_Fortran_FLAGS_DEBUG:STRING="-O0 -g -Wl,-z,relro -Wl,-z,now" \ %else -%cmake \ +%{cmake3} \ + -DSUNDIALS_INDEX_TYPE:STRING=int64_t \ -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ -DCMAKE_BUILD_TYPE:STRING=Release \ -DCMAKE_C_FLAGS_RELEASE:STRING="%{optflags} -Wl,-z,relro -Wl,-z,now" \ - -DCMAKE_Fortran_FLAGS_RELEASE:STRING="%{optflags} -Wl,-z,relro -Wl,-z,now -lm -lpthread -lgomp" \ -%ifnarch s390x - -DCMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING="%{__global_ldflags} -Wl,-z,now -lm -lpthread -lgomp -lklu -L%{_libdir}/mpich/lib -lHYPRE" \ -%else - -DCMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING="%{__global_ldflags} -Wl,-z,now -lm -lpthread -lgomp -lklu" \ + -DCMAKE_Fortran_FLAGS_RELEASE:STRING="%{optflags} -Wl,-z,relro -Wl,-z,now" \ %endif + -DCMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING="%{__global_ldflags} -Wl,-z,now -lklu $LIBLAPACKLINK $LIBBLASLINK $LIBSUPERLUMTLINK $LIBHYPRELINK" \ +%ifnarch %{power64} aarch64 s390x + -DLAPACK_ENABLE:BOOL=OFF \ + -DBLAS_ENABLE:BOOL=ON \ + -DBLAS_LIBRARIES:STRING=%{_libdir}/$LIBBLAS.so \ +%else + -DLAPACK_ENABLE:BOOL=ON \ + -DBLAS_ENABLE:BOOL=ON \ + -DBLAS_LIBRARIES:STRING=%{_libdir}/$LIBBLAS.so \ + -DLAPACK_LIBRARIES:STRING=%{_libdir}/$LIBLAPACK.so \ %endif -DCMAKE_INSTALL_PREFIX=%{_prefix} \ - -DEXAMPLES_ENABLE=ON -DEXAMPLES_INSTALL=OFF -DEXAMPLES_INSTALL_PATH:PATH=%{_datadir}/%{name}/mpich_examples \ + -DEXAMPLES_ENABLE_CXX:BOOL=ON -DEXAMPLES_ENABLE_C:BOOL=ON -DEXAMPLES_ENABLE_F77:BOOL=ON \ -DBUILD_SHARED_LIBS:BOOL=ON -DBUILD_STATIC_LIBS:BOOL=OFF \ -DCMAKE_SKIP_RPATH:BOOL=YES -DCMAKE_SKIP_INSTALL_RPATH:BOOL=YES \ -DMPI_ENABLE:BOOL=ON \ - -DMPI_MPICC:STRING=%{_libdir}/mpich/bin/mpicc \ + -DMPI_MPICC:STRING=$MPI_BIN/mpicc \ -DMPI_RUN_COMMAND=mpirun \ %if 0%{?fedora} - -DMPI_MPIF77:STRING=%{_libdir}/mpich/bin/mpifort \ - -DMPI_MPIF90:STRING=%{_libdir}/mpich/bin/mpifort \ + -DMPI_MPIF77:STRING=$MPI_BIN/mpifort \ + -DMPI_MPIF90:STRING=$MPI_BIN/mpifort \ %else - -DMPI_MPIF77:STRING=%{_libdir}/mpich/bin/mpif77 \ - -DMPI_MPIF90:STRING=%{_libdir}/mpich/bin/mpif90 \ + -DMPI_MPIF77:STRING=$MPI_BIN/mpif77 \ + -DMPI_MPIF90:STRING=$MPI_BIN/mpif90 \ %endif -DFCMIX_ENABLE:BOOL=ON \ - -DF90_ENABLE:BOOL=ON \ -DUSE_GENERIC_MATH:BOOL=ON \ -DOPENMP_ENABLE:BOOL=ON \ - -DCXX_ENABLE:BOOL=ON \ - -DCMAKE_Fortran_COMPILER:STRING=%{_libdir}/mpich/bin/mpif77 \ + -DCMAKE_Fortran_COMPILER:STRING=$MPI_BIN/mpif77 \ -DPTHREAD_ENABLE:BOOL=ON \ - -DLAPACK_ENABLE:BOOL=ON \ - -DSUPERLUMT_ENABLE:BOOL=OFF \ -%ifnarch s390x - -DHYPRE_ENABLE:BOOL=ON \ - -DHYPRE_INCLUDE_DIR:PATH=%{_includedir}/mpich-%{_arch}/hypre \ - -DHYPRE_LIBRARY_DIR:PATH=%{_libdir}/mpich/lib \ +%ifnarch %{power64} aarch64 + -DSUPERLUMT_ENABLE:BOOL=ON \ + -DSUPERLUMT_INCLUDE_DIR:PATH=%{_includedir}/SuperLUMT \ + -DSUPERLUMT_LIBRARY_DIR:PATH=%{_libdir} \ + -DSUPERLUMT_THREAD_TYPE:STRING=OpenMP \ %endif - -DKLU_ENABLE=ON -DKLU_LIBRARY_DIR:PATH=%{_libdir} -DKLU_INCLUDE_DIR:PATH=%{_includedir}/suitesparse -Wno-dev .. +%if 0%{?with_hypre} + -DHYPRE_ENABLE:BOOL=ON \ + -DHYPRE_INCLUDE_DIR:PATH=$MPI_INCLUDE/hypre \ + -DHYPRE_LIBRARY_DIR:PATH=$MPI_LIB \ +%endif + -DKLU_ENABLE=ON -DKLU_LIBRARY_DIR:PATH=%{_libdir} -DKLU_INCLUDE_DIR:PATH=%{_includedir}/suitesparse \ + -DEXAMPLES_INSTALL:BOOL=OFF -Wno-dev .. -make V=1 %{?_smp_mflags} +%make_build V=1 %{_mpich_unload} cd .. popd @@ -538,17 +694,41 @@ popd %install %if 0%{?with_openmpi} %{_openmpi_load} -make install DESTDIR=%{buildroot} -C buildopenmpi_dir/build +%make_install -C buildopenmpi_dir/build + +mkdir -p %{buildroot}$MPI_LIB/sundials-%{version} +cp -a buildopenmpi_dir/build/examples %{buildroot}$MPI_LIB/sundials-%{version}/ + +## Remove CMake files +for i in `find %{buildroot}$MPI_LIB/sundials-%{version}/examples -perm /644 -type f \( -name "*Makefile*" \)`; do + rm -rf $i +done %{_openmpi_unload} %endif %if 0%{?with_mpich} %{_mpich_load} -make install DESTDIR=%{buildroot} -C buildmpich_dir/build +%make_install -C buildmpich_dir/build + +mkdir -p %{buildroot}$MPI_LIB/sundials-%{version} +cp -a buildmpich_dir/build/examples %{buildroot}$MPI_LIB/sundials-%{version}/ + +## Remove CMake files +for i in `find %{buildroot}$MPI_LIB/sundials-%{version}/examples -perm /644 -type f \( -name "*Makefile*" \)`; do + rm -rf $i +done %{_mpich_unload} %endif -make install DESTDIR=%{buildroot} -C sundials-%{version}/build +%make_install -C sundials-%{version}/build + +mkdir -p %{buildroot}%{_libexecdir}/sundials-%{version} +cp -a sundials-%{version}/build/examples %{buildroot}%{_libexecdir}/sundials-%{version}/ + +## Remove CMake files +for i in `find %{buildroot}%{_libexecdir}/sundials-%{version}/examples -perm /644 -type f \( -name "*Makefile*" \)`; do + rm -rf $i +done %post -p /sbin/ldconfig %postun -p /sbin/ldconfig @@ -559,32 +739,31 @@ make install DESTDIR=%{buildroot} -C sundials-%{version}/build %post fortran -p /sbin/ldconfig %postun fortran -p /sbin/ldconfig +%post fortran-openmp -p /sbin/ldconfig +%postun fortran-openmp -p /sbin/ldconfig + +%post openmp -p /sbin/ldconfig +%postun openmp -p /sbin/ldconfig + %check %if 0%{?with_parcheck} %if 0%{?with_openmpi} %{_openmpi_load} -export LD_LIBRARY_PATH=%{buildroot}%{_libdir}/openmpi/lib:%{buildroot}%{_libdir} -##arkode -buildopenmpi_dir/build/examples/arkode/CXX_parallel/ark_heat2D -buildopenmpi_dir/build/examples/arkode/F77_parallel/fark_diag_kry_bbd_p - +export LD_LIBRARY_PATH=%{buildroot}$MPI_LIB:%{buildroot}%{_libdir} ##cvode -buildopenmpi_dir/build/examples/cvode/fcmix_parallel/fcvDiag_kry_bbd_p buildopenmpi_dir/build/examples/cvode/parallel/cvAdvDiff_diag_p ##cvodes mpirun -np 2 buildopenmpi_dir/build/examples/cvodes/parallel/cvsAdvDiff_ASAp_non_p #ida -mpirun -np 4 buildopenmpi_dir/build/examples/ida/fcmix_parallel/fidaHeat2D_kry_bbd_p mpirun -np 4 buildopenmpi_dir/build/examples/ida/parallel/idaFoodWeb_kry_bbd_p #idas mpirun -np 4 buildopenmpi_dir/build/examples/idas/parallel/idasBruss_ASAp_kry_bbd_p #kinsol -mpirun -np 4 buildopenmpi_dir/build/examples/kinsol/fcmix_parallel/fkinDiagon_kry_p mpirun -np 4 buildopenmpi_dir/build/examples/kinsol/parallel/kinFoodWeb_kry_bbd_p #nvector @@ -608,16 +787,12 @@ cd arkode/C_serial ./ark_brusselator1D ./ark_brusselator_fp ./ark_heat1D -./ark_heat1D_adapt ./ark_KrylovDemo_prec ./ark_robertson ./ark_robertson_root cd ../F77_serial ./fark_diurnal_kry_bp -%ifnarch s390 s390x ppc64 ppc64le -./fark_roberts_dnsL -%endif cd ../.. ##cvode cd cvode/fcmix_serial @@ -626,26 +801,22 @@ cd cvode/fcmix_serial ./fcvDiurnal_kry ./fcvDiurnal_kry_bp ./fcvRoberts_dns -./fcvRoberts_dnsL %endif cd ../serial ./cvAdvDiff_bnd -./cvAdvDiff_bndL ./cvDirectDemo_ls ./cvDiurnal_kry ./cvDiurnal_kry_bp ./cvKrylovDemo_ls ./cvKrylovDemo_prec ./cvRoberts_dns -./cvRoberts_dnsL ./cvRoberts_dns_uw cd ../.. ##cvodes cd cvodes/serial ./cvsAdvDiff_ASAi_bnd ./cvsAdvDiff_bnd -./cvsAdvDiff_bndL ./cvsAdvDiff_FSA_non ./cvsDirectDemo_ls ./cvsDiurnal_FSA_kry @@ -658,7 +829,6 @@ cd cvodes/serial ./cvsKrylovDemo_prec ./cvsRoberts_ASAi_dns ./cvsRoberts_dns -./cvsRoberts_dnsL ./cvsRoberts_dns_uw ./cvsRoberts_FSA_dns cd ../.. @@ -694,16 +864,9 @@ cd idas/serial cd ../.. ##kinsol cd kinsol/fcmix_serial -%ifnarch s390 s390x ppc64 ppc64le -./fkinDiagon_kry -%endif cd ../serial ./kinFerTron_dns ./kinFoodWeb_kry -##http://sundials.2283335.n4.nabble.com/kinKrylovDemo-ls-failed-on-aarch64-td4653553.html -%ifnarch aarch64 s390 s390x ppc64 ppc64le -./kinKrylovDemo_ls -%endif ./kinLaplace_bnd ./kinLaplace_picard_bnd ./kinRoberts_fp @@ -728,18 +891,16 @@ popd %{_libdir}/libsundials_ida.so.* %{_libdir}/libsundials_idas.so.* %{_libdir}/libsundials_kinsol.so.* +%{_libdir}/libsundials_sunlinsol*.so.* +%{_libdir}/libsundials_sunmatrix*.so.* %files doc %{!?_licensedir:%global license %doc} %license sundials-%{version}/LICENSE %doc sundials-%{version}/README -%doc sundials-%{version}/doc/cvode/cv_examples.pdf %doc sundials-%{version}/doc/cvode/cv_guide.pdf -%doc sundials-%{version}/doc/kinsol/kin_examples.pdf %doc sundials-%{version}/doc/kinsol/kin_guide.pdf -%doc sundials-%{version}/doc/cvodes/cvs_examples.pdf %doc sundials-%{version}/doc/cvodes/cvs_guide.pdf -%doc sundials-%{version}/doc/ida/ida_examples.pdf %doc sundials-%{version}/doc/ida/ida_guide.pdf %doc sundials-%{version}/doc/arkode/* @@ -751,6 +912,8 @@ popd %{_libdir}/libsundials_ida.so %{_libdir}/libsundials_idas.so %{_libdir}/libsundials_kinsol.so +%{_libdir}/libsundials_sunlinsol*.so +%{_libdir}/libsundials_sunmatrix*.so %{_includedir}/sundials/ %{_includedir}/cvode/ %{_includedir}/cvodes/ @@ -759,6 +922,8 @@ popd %{_includedir}/idas/ %{_includedir}/kinsol/ %{_includedir}/nvector/ +%{_includedir}/sunlinsol/ +%{_includedir}/sunmatrix/ %files openmp %{!?_licensedir:%global license %doc} @@ -778,6 +943,9 @@ popd %files fortran-openmp-devel %{_libdir}/libsundials_fnvecopenmp.so +%files samples +%{_libexecdir}/sundials-%{version}/ + %if 0%{?with_openmpi} %files openmpi %license sundials-%{version}/LICENSE @@ -803,6 +971,9 @@ popd %files fortran-openmpi-devel %{_includedir}/openmpi-%{_arch}/nvector/nvector_parallel.h %{_libdir}/openmpi/lib/libsundials_fnvecparallel.so + +%files openmpi-samples +%{_libdir}/openmpi/lib/sundials-%{version}/ %endif %if 0%{?with_mpich} @@ -814,6 +985,7 @@ popd %ifnarch s390x %{_libdir}/mpich/lib/libsundials_nvecparhyp.so.* %endif +%{_libdir}/mpich/lib/sundials-%{version}/ %files mpich-devel %{_includedir}/mpich-%{_arch}/nvector/nvector_parallel.h @@ -831,6 +1003,9 @@ popd %files fortran-mpich-devel %{_includedir}/mpich-%{_arch}/nvector/nvector_parallel.h %{_libdir}/mpich/lib/libsundials_fnvecparallel.so + +%files mpich-samples +%{_libdir}/mpich/lib/sundials-%{version}/ %endif %files fortran @@ -838,10 +1013,14 @@ popd %license sundials-%{version}/LICENSE %doc sundials-%{version}/README %{_libdir}/libsundials_fnvecserial.so.* +%{_libdir}/libsundials_fsunlinsol*.so.* +%{_libdir}/libsundials_fsunmatrix*.so.* %files fortran-devel %{_includedir}/sundials/sundials_fnvector.h %{_libdir}/libsundials_fnvecserial.so +%{_libdir}/libsundials_fsunlinsol*.so +%{_libdir}/libsundials_fsunmatrix*.so %{_libdir}/libsundials_*.a %files threads @@ -857,6 +1036,11 @@ popd %{_includedir}/nvector/nvector_pthreads.h %changelog +* Mon Oct 30 2017 Antonio Trande - 3.0.0-1 +- Update to 3.0.0 +- Use cmake3 on epel +- Install examples + * Thu Jul 27 2017 Fedora Release Engineering - 2.7.0-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild From c3a8a98e4ad39faafefb2e1e570cc9ee5ad60cdd Mon Sep 17 00:00:00 2001 From: sagitter Date: Thu, 9 Nov 2017 11:39:42 +0100 Subject: [PATCH 03/36] Remove sub-packages --- sundials.spec | 241 +++++++------------------------------------------- 1 file changed, 33 insertions(+), 208 deletions(-) diff --git a/sundials.spec b/sundials.spec index 0923d51..1aca8da 100644 --- a/sundials.spec +++ b/sundials.spec @@ -58,7 +58,7 @@ Summary: Suite of nonlinear solvers Name: sundials Version: 3.0.0 -Release: 1%{?dist} +Release: 2%{?dist} # SUNDIALS is licensed under BSD with some additional (but unrestrictive) clauses. # Check the file 'LICENSE' for details. License: BSD @@ -90,6 +90,7 @@ BuildRequires: SuperLUMT-devel %if 0%{?rhel} BuildRequires: rsh %endif +Requires: gcc-gfortran%{?_isa} %description SUNDIALS is a SUite of Non-linear DIfferential/ALgebraic equation Solvers @@ -106,56 +107,15 @@ preconditioners. Summary: Suite of nonlinear solvers (developer files) Group: Development/Libraries Requires: %{name}%{?_isa} = %{version}-%{release} -Provides: %{name}-static = %{version}-%{release} %description devel SUNDIALS is a SUite of Non-linear DIfferential/ALgebraic equation Solvers for use in writing mathematical software. This package contains the developer files (.so file, header files). -%package openmp -Summary: Suite of nonlinear solvers with OpenMP -Group: Development/Libraries -%description openmp -SUNDIALS is a SUite of Non-linear DIfferential/ALgebraic equation Solvers -for use in writing mathematical software. -This package contains Sundials libraries with OpenMP support. - -%package openmp-devel -Summary: Suite of nonlinear solvers with OpenMP (developer files) -Group: Development/Libraries -Requires: %{name}-openmp%{?_isa} = %{version}-%{release} -Requires: %{name}-devel%{?_isa} = %{version}-%{release} -%description openmp-devel -SUNDIALS is a SUite of Non-linear DIfferential/ALgebraic equation Solvers -for use in writing mathematical software. -This package contains the developer files (.so file). - -%package fortran-openmp -Summary: Suite of nonlinear solvers with OpenMP -Group: Development/Libraries -%description fortran-openmp -SUNDIALS is a SUite of Non-linear DIfferential/ALgebraic equation Solvers -for use in writing mathematical software. -This package contains Sundials fortran libraries with OpenMP support. - -%package fortran-openmp-devel -Summary: Suite of nonlinear solvers with OpenMP (developer files) -Group: Development/Libraries -Requires: %{name}-fortran-openmp%{?_isa} = %{version}-%{release} -Requires: %{name}-devel%{?_isa} = %{version}-%{release} -%description fortran-openmp-devel -SUNDIALS is a SUite of Non-linear DIfferential/ALgebraic equation Solvers -for use in writing mathematical software. -This package contains the developer files (.so file). - %package samples Summary: Suite of nonlinear solvers (example files) Group: Development/Libraries Requires: %{name}%{?_isa} = %{version}-%{release} -Requires: %{name}-fortran%{?_isa} = %{version}-%{release} -Requires: %{name}-fortran-openmp%{?_isa} = %{version}-%{release} -Requires: %{name}-openmp%{?_isa} = %{version}-%{release} -Requires: %{name}-threads%{?_isa} = %{version}-%{release} %description samples SUNDIALS is a SUite of Non-linear DIfferential/ALgebraic equation Solvers for use in writing mathematical software. @@ -171,13 +131,14 @@ BuildRequires: openmpi-devel BuildRequires: hypre-openmpi-devel %endif Requires: openmpi +Requires: gcc-gfortran%{?_isa} %description openmpi SUNDIALS is a SUite of Non-linear DIfferential/ALgebraic equation Solvers for use in writing mathematical software. This package contains the Sundials Fortran parallel OpenMPI libraries. %package openmpi-devel -Summary: Suite of nonlinear solvers (static libraries) +Summary: Suite of nonlinear solvers Group: Development/Libraries Requires: %{name}-openmpi%{?_isa} = %{version}-%{release} %description openmpi-devel @@ -186,31 +147,10 @@ for use in writing mathematical software. This package contains the Sundials parallel OpenMPI devel libraries and header files. -%package fortran-openmpi -Summary: Suite of nonlinear solvers -Group: Development/Libraries -Requires: gcc-gfortran%{?_isa} -Requires: openmpi -%description fortran-openmpi -SUNDIALS is a SUite of Non-linear DIfferential/ALgebraic equation Solvers -for use in writing mathematical software. -This package contains the Sundials Fortran parallel OpenMPI libraries. - -%package fortran-openmpi-devel -Summary: Suite of nonlinear solvers -Group: Development/Libraries -Requires: %{name}-fortran-openmpi%{?_isa} = %{version}-%{release} -%description fortran-openmpi-devel -SUNDIALS is a SUite of Non-linear DIfferential/ALgebraic equation Solvers -for use in writing mathematical software. -This package contains the Sundials Fortran parallel OpenMPI devel libraries and -header files. - %package openmpi-samples Summary: Suite of nonlinear solvers (example files) Group: Development/Libraries Requires: %{name}-openmpi%{?_isa} = %{version}-%{release} -Requires: %{name}-fortran-openmpi%{?_isa} = %{version}-%{release} %description openmpi-samples SUNDIALS is a SUite of Non-linear DIfferential/ALgebraic equation Solvers for use in writing mathematical software. @@ -228,13 +168,14 @@ BuildRequires: mpich-devel BuildRequires: hypre-mpich-devel %endif Requires: mpich +Requires: gcc-gfortran%{?_isa} %description mpich SUNDIALS is a SUite of Non-linear DIfferential/ALgebraic equation Solvers for use in writing mathematical software. This package contains the Sundials parallel MPICH libraries. %package mpich-devel -Summary: Suite of nonlinear solvers (static libraries) +Summary: Suite of nonlinear solvers Group: Development/Libraries Requires: %{name}-mpich%{?_isa} = %{version}-%{release} %description mpich-devel @@ -243,31 +184,10 @@ for use in writing mathematical software. This package contains the Sundials parallel MPICH devel libraries and header files. -%package fortran-mpich -Summary: Suite of nonlinear solvers -Group: Development/Libraries -Requires: gcc-gfortran%{?_isa} -Requires: mpich -%description fortran-mpich -SUNDIALS is a SUite of Non-linear DIfferential/ALgebraic equation Solvers -for use in writing mathematical software. -This package contains the Sundials Fortran parallel MPICH libraries. - -%package fortran-mpich-devel -Summary: Suite of nonlinear solvers -Group: Development/Libraries -Requires: %{name}-fortran-mpich%{?_isa} = %{version}-%{release} -%description fortran-mpich-devel -SUNDIALS is a SUite of Non-linear DIfferential/ALgebraic equation Solvers -for use in writing mathematical software. -This package contains the Sundials Fortran parallel MPICH devel libraries and -header files. - %package mpich-samples Summary: Suite of nonlinear solvers (example files) Group: Development/Libraries Requires: %{name}-mpich%{?_isa} = %{version}-%{release} -Requires: %{name}-fortran-mpich%{?_isa} = %{version}-%{release} %description mpich-samples SUNDIALS is a SUite of Non-linear DIfferential/ALgebraic equation Solvers for use in writing mathematical software. @@ -276,49 +196,6 @@ This package contains the C, CXX, F77 example files. ###### ############################################################################# -%package fortran -Summary: Suite of nonlinear solvers (static libraries) -Group: Development/Libraries -Requires: gcc-gfortran%{?_isa} -%description fortran -SUNDIALS is a SUite of Non-linear DIfferential/ALgebraic equation Solvers -for use in writing mathematical software. -This package contains the Sundials Fortran libraries. - -## Cannot build shared libraries for the FCMIX (Fortran) interfaces -## due to unresolved symbol errors -## coming from inexistent user-provided functions. -## This package provides some static libraries -%package fortran-devel -Summary: Suite of nonlinear solvers -Group: Development/Libraries -Requires: %{name}-fortran%{?_isa} = %{version}-%{release} -Provides: %{name}-fortran-static = %{version}-%{release} -%description fortran-devel -SUNDIALS is a SUite of Non-linear DIfferential/ALgebraic equation Solvers -for use in writing mathematical software. -This package contains the Sundials Fortran devel libraries and -header files. - -%package threads -Summary: Suite of nonlinear solvers -Group: Development/Libraries -%description threads -SUNDIALS is a SUite of Non-linear DIfferential/ALgebraic equation Solvers -for use in writing mathematical software. -This package contains the Sundials libraries (included the Fortran ones) -compiled with threading support. - -%package threads-devel -Summary: Suite of nonlinear solvers -Group: Development/Libraries -Requires: %{name}-threads%{?_isa} = %{version}-%{release} -%description threads-devel -SUNDIALS is a SUite of Non-linear DIfferential/ALgebraic equation Solvers -for use in writing mathematical software. -This package contains the Sundials devel library compiled with threading support -and relative header files. - %package doc Summary: Suite of nonlinear solvers (documentation) Group: Documentation @@ -722,6 +599,9 @@ done %make_install -C sundials-%{version}/build +# Remove static libraries +rm -f %{buildroot}%{_libdir}/*.a + mkdir -p %{buildroot}%{_libexecdir}/sundials-%{version} cp -a sundials-%{version}/build/examples %{buildroot}%{_libexecdir}/sundials-%{version}/ @@ -733,18 +613,6 @@ done %post -p /sbin/ldconfig %postun -p /sbin/ldconfig -%post threads -p /sbin/ldconfig -%postun threads -p /sbin/ldconfig - -%post fortran -p /sbin/ldconfig -%postun fortran -p /sbin/ldconfig - -%post fortran-openmp -p /sbin/ldconfig -%postun fortran-openmp -p /sbin/ldconfig - -%post openmp -p /sbin/ldconfig -%postun openmp -p /sbin/ldconfig - %check %if 0%{?with_parcheck} @@ -893,6 +761,13 @@ popd %{_libdir}/libsundials_kinsol.so.* %{_libdir}/libsundials_sunlinsol*.so.* %{_libdir}/libsundials_sunmatrix*.so.* +%{_libdir}/libsundials_nvecpthreads.so.* +%{_libdir}/libsundials_fnvecpthreads.so.* +%{_libdir}/libsundials_fnvecserial.so.* +%{_libdir}/libsundials_fsunlinsol*.so.* +%{_libdir}/libsundials_fsunmatrix*.so.* +%{_libdir}/libsundials_fnvecopenmp.so.* +%{_libdir}/libsundials_nvecopenmp.so.* %files doc %{!?_licensedir:%global license %doc} @@ -914,6 +789,13 @@ popd %{_libdir}/libsundials_kinsol.so %{_libdir}/libsundials_sunlinsol*.so %{_libdir}/libsundials_sunmatrix*.so +%{_libdir}/libsundials_fnvecpthreads.so +%{_libdir}/libsundials_nvecpthreads.so +%{_libdir}/libsundials_fnvecserial.so +%{_libdir}/libsundials_fsunlinsol*.so +%{_libdir}/libsundials_fsunmatrix*.so +%{_libdir}/libsundials_fnvecopenmp.so +%{_libdir}/libsundials_nvecopenmp.so %{_includedir}/sundials/ %{_includedir}/cvode/ %{_includedir}/cvodes/ @@ -925,32 +807,15 @@ popd %{_includedir}/sunlinsol/ %{_includedir}/sunmatrix/ -%files openmp -%{!?_licensedir:%global license %doc} -%license sundials-%{version}/LICENSE -%doc sundials-%{version}/README sundials-%{version}/src/README-* -%{_libdir}/libsundials_nvecopenmp.so.* - -%files openmp-devel -%{_libdir}/libsundials_nvecopenmp.so - -%files fortran-openmp -%{!?_licensedir:%global license %doc} -%license sundials-%{version}/LICENSE -%doc sundials-%{version}/README sundials-%{version}/src/README-* -%{_libdir}/libsundials_fnvecopenmp.so.* - -%files fortran-openmp-devel -%{_libdir}/libsundials_fnvecopenmp.so - %files samples %{_libexecdir}/sundials-%{version}/ %if 0%{?with_openmpi} %files openmpi %license sundials-%{version}/LICENSE -%doc sundials-%{version}/README sundials-%{version}/src/README-nvec_par +%doc sundials-%{version}/README sundials-%{version}/src/README-* %{_libdir}/openmpi/lib/libsundials_nvecparallel.so.* +%{_libdir}/openmpi/lib/libsundials_fnvecparallel.so.* %ifnarch s390x %{_libdir}/openmpi/lib/libsundials_nvecparhyp.so.* %endif @@ -958,20 +823,11 @@ popd %files openmpi-devel %{_includedir}/openmpi-%{_arch}/nvector/nvector_parallel.h %{_libdir}/openmpi/lib/libsundials_nvecparallel.so +%{_libdir}/openmpi/lib/libsundials_fnvecparallel.so %ifnarch s390x %{_libdir}/openmpi/lib/libsundials_nvecparhyp.so %endif -%files fortran-openmpi -%{!?_licensedir:%global license %doc} -%license sundials-%{version}/LICENSE -%doc sundials-%{version}/README sundials-%{version}/src/README-nvec_par -%{_libdir}/openmpi/lib/libsundials_fnvecparallel.so.* - -%files fortran-openmpi-devel -%{_includedir}/openmpi-%{_arch}/nvector/nvector_parallel.h -%{_libdir}/openmpi/lib/libsundials_fnvecparallel.so - %files openmpi-samples %{_libdir}/openmpi/lib/sundials-%{version}/ %endif @@ -980,8 +836,9 @@ popd %files mpich %{!?_licensedir:%global license %doc} %license sundials-%{version}/LICENSE -%doc sundials-%{version}/README sundials-%{version}/src/README-nvec_par +%doc sundials-%{version}/README sundials-%{version}/src/README-* %{_libdir}/mpich/lib/libsundials_nvecparallel.so.* +%{_libdir}/mpich/lib/libsundials_fnvecparallel.so.* %ifnarch s390x %{_libdir}/mpich/lib/libsundials_nvecparhyp.so.* %endif @@ -990,52 +847,20 @@ popd %files mpich-devel %{_includedir}/mpich-%{_arch}/nvector/nvector_parallel.h %{_libdir}/mpich/lib/libsundials_nvecparallel.so +%{_libdir}/mpich/lib/libsundials_fnvecparallel.so %ifnarch s390x %{_libdir}/mpich/lib/libsundials_nvecparhyp.so %endif -%files fortran-mpich -%{!?_licensedir:%global license %doc} -%license sundials-%{version}/LICENSE -%doc sundials-%{version}/README sundials-%{version}/src/README-nvec_par -%{_libdir}/mpich/lib/libsundials_fnvecparallel.so.* - -%files fortran-mpich-devel -%{_includedir}/mpich-%{_arch}/nvector/nvector_parallel.h -%{_libdir}/mpich/lib/libsundials_fnvecparallel.so - %files mpich-samples %{_libdir}/mpich/lib/sundials-%{version}/ %endif -%files fortran -%{!?_licensedir:%global license %doc} -%license sundials-%{version}/LICENSE -%doc sundials-%{version}/README -%{_libdir}/libsundials_fnvecserial.so.* -%{_libdir}/libsundials_fsunlinsol*.so.* -%{_libdir}/libsundials_fsunmatrix*.so.* - -%files fortran-devel -%{_includedir}/sundials/sundials_fnvector.h -%{_libdir}/libsundials_fnvecserial.so -%{_libdir}/libsundials_fsunlinsol*.so -%{_libdir}/libsundials_fsunmatrix*.so -%{_libdir}/libsundials_*.a - -%files threads -%{!?_licensedir:%global license %doc} -%license sundials-%{version}/LICENSE -%doc sundials-%{version}/README sundials-%{version}/src/README-nvec_pthreads -%{_libdir}/libsundials_nvecpthreads.so.* -%{_libdir}/libsundials_fnvecpthreads.so.* - -%files threads-devel -%{_libdir}/libsundials_fnvecpthreads.so -%{_libdir}/libsundials_nvecpthreads.so -%{_includedir}/nvector/nvector_pthreads.h - %changelog +* Thu Nov 09 2017 Antonio Trande - 3.0.0-2 +- Remove sub-packages +- Uninstall static libraries + * Mon Oct 30 2017 Antonio Trande - 3.0.0-1 - Update to 3.0.0 - Use cmake3 on epel From 9cd47d64e7d7c5958f4427fdbb2688386bf16a04 Mon Sep 17 00:00:00 2001 From: sagitter Date: Wed, 15 Nov 2017 20:38:37 +0100 Subject: [PATCH 04/36] Fix shared-linker flags --- sundials.spec | 41 ++++++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/sundials.spec b/sundials.spec index 1aca8da..8a1f84d 100644 --- a/sundials.spec +++ b/sundials.spec @@ -58,7 +58,7 @@ Summary: Suite of nonlinear solvers Name: sundials Version: 3.0.0 -Release: 2%{?dist} +Release: 3%{?dist} # SUNDIALS is licensed under BSD with some additional (but unrestrictive) clauses. # Check the file 'LICENSE' for details. License: BSD @@ -291,17 +291,18 @@ export CFLAGS="" cmake \ -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ -DCMAKE_BUILD_TYPE:STRING=Debug \ - -DCMAKE_C_FLAGS_DEBUG:STRING="-O0 -g -Wl,-z,relro -Wl,-z,now" \ - -DCMAKE_Fortran_FLAGS_DEBUG:STRING="-O0 -g -Wl,-z,relro -Wl,-z,now" \ + -DCMAKE_C_FLAGS_DEBUG:STRING="-O0 -g -Wl,-z,relro -Wl,-z,now -Wl,--as-needed" \ + -DCMAKE_Fortran_FLAGS_DEBUG:STRING="-O0 -g -Wl,-z,relro -Wl,-z,now -Wl,--as-needed" \ + -DCMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING="%{__global_ldflags} -Wl,-z,now -Wl,--as-needed -lklu $LIBBLASLINK $LIBLAPACKLINK $LIBSUPERLUMTLINK" \ %else %{cmake3} \ -DSUNDIALS_INDEX_TYPE:STRING=int64_t \ -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ -DCMAKE_BUILD_TYPE:STRING=Release \ - -DCMAKE_C_FLAGS_RELEASE:STRING="%{optflags} -Wl,-z,relro -Wl,-z,now" \ - -DCMAKE_Fortran_FLAGS_RELEASE:STRING="%{optflags} -Wl,-z,relro -Wl,-z,now" \ + -DCMAKE_C_FLAGS_RELEASE:STRING="%{optflags} -Wl,-z,relro -Wl,-z,now -Wl,--as-needed" \ + -DCMAKE_Fortran_FLAGS_RELEASE:STRING="%{optflags} -Wl,-z,relro -Wl,-z,now -Wl,--as-needed" \ + -DCMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING="%{__global_ldflags} -Wl,-z,now -Wl,--as-needed -lklu $LIBBLASLINK $LIBLAPACKLINK $LIBSUPERLUMTLINK" \ %endif - -DCMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING="%{__global_ldflags} -Wl,-z,now -lklu $LIBBLASLINK $LIBLAPACKLINK $LIBSUPERLUMTLINK" \ %ifnarch %{power64} aarch64 s390x -DLAPACK_ENABLE:BOOL=OFF \ -DBLAS_ENABLE:BOOL=ON \ @@ -312,7 +313,7 @@ cmake \ -DBLAS_LIBRARIES:STRING=%{_libdir}/$LIBBLAS.so \ -DLAPACK_LIBRARIES:STRING=%{_libdir}/$LIBLAPACK.so \ %endif - -DCMAKE_MODULE_LINKER_FLAGS:STRING="%{__global_ldflags} -Wl,-z,now" \ + -DCMAKE_MODULE_LINKER_FLAGS:STRING="%{__global_ldflags} -Wl,-z,now -Wl,--as-needed" \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DEXAMPLES_ENABLE_CXX:BOOL=ON -DEXAMPLES_ENABLE_C:BOOL=ON -DEXAMPLES_ENABLE_F77:BOOL=ON \ -DCMAKE_SKIP_RPATH:BOOL=YES -DCMAKE_SKIP_INSTALL_RPATH:BOOL=YES \ @@ -389,17 +390,18 @@ export CFLAGS="" cmake \ -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ -DCMAKE_BUILD_TYPE:STRING=Debug \ - -DCMAKE_C_FLAGS_DEBUG:STRING="-O0 -g -Wl,-z,relro -Wl,-z,now" \ - -DCMAKE_Fortran_FLAGS_DEBUG:STRING="-O0 -g -Wl,-z,relro -Wl,-z,now" \ + -DCMAKE_C_FLAGS_DEBUG:STRING="-O0 -g -Wl,-z,relro -Wl,-z,now -Wl,--as-needed" \ + -DCMAKE_Fortran_FLAGS_DEBUG:STRING="-O0 -g -Wl,-z,relro -Wl,-z,now -Wl,--as-needed" \ + -DCMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING="%{__global_ldflags} -Wl,-z,now -Wl,--as-needed -lklu $LIBLAPACKLINK $LIBBLASLINK $LIBSUPERLUMTLINK $LIBHYPRELINK" \ %else %{cmake3} \ -DSUNDIALS_INDEX_TYPE:STRING=int64_t \ -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ -DCMAKE_BUILD_TYPE:STRING=Release \ - -DCMAKE_C_FLAGS_RELEASE:STRING="%{optflags} -Wl,-z,relro -Wl,-z,now" \ - -DCMAKE_Fortran_FLAGS_RELEASE:STRING="%{optflags} -Wl,-z,relro -Wl,-z,now" \ + -DCMAKE_C_FLAGS_RELEASE:STRING="%{optflags} -Wl,-z,relro -Wl,-z,now -Wl,--as-needed" \ + -DCMAKE_Fortran_FLAGS_RELEASE:STRING="%{optflags} -Wl,-z,relro -Wl,-z,now -Wl,--as-needed" \ + -DCMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING="%{__global_ldflags} -Wl,-z,now -Wl,--as-needed -lklu $LIBLAPACKLINK $LIBBLASLINK $LIBSUPERLUMTLINK $LIBHYPRELINK" \ %endif - -DCMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING="%{__global_ldflags} -Wl,-z,now -lklu $LIBLAPACKLINK $LIBBLASLINK $LIBSUPERLUMTLINK $LIBHYPRELINK" \ %ifnarch %{power64} aarch64 s390x -DLAPACK_ENABLE:BOOL=OFF \ -DBLAS_ENABLE:BOOL=ON \ @@ -506,17 +508,18 @@ export CFLAGS="" cmake \ -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ -DCMAKE_BUILD_TYPE:STRING=Debug \ - -DCMAKE_C_FLAGS_DEBUG:STRING="-O0 -g -Wl,-z,relro -Wl,-z,now" \ - -DCMAKE_Fortran_FLAGS_DEBUG:STRING="-O0 -g -Wl,-z,relro -Wl,-z,now" \ + -DCMAKE_C_FLAGS_DEBUG:STRING="-O0 -g -Wl,-z,relro -Wl,-z,now -Wl,--as-needed" \ + -DCMAKE_Fortran_FLAGS_DEBUG:STRING="-O0 -g -Wl,-z,relro -Wl,-z,now -Wl,--as-needed" \ + -DCMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING="%{__global_ldflags} -Wl,-z,now -Wl,--as-needed -lklu $LIBLAPACKLINK $LIBBLASLINK $LIBSUPERLUMTLINK $LIBHYPRELINK" \ %else %{cmake3} \ -DSUNDIALS_INDEX_TYPE:STRING=int64_t \ -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ -DCMAKE_BUILD_TYPE:STRING=Release \ - -DCMAKE_C_FLAGS_RELEASE:STRING="%{optflags} -Wl,-z,relro -Wl,-z,now" \ - -DCMAKE_Fortran_FLAGS_RELEASE:STRING="%{optflags} -Wl,-z,relro -Wl,-z,now" \ + -DCMAKE_C_FLAGS_RELEASE:STRING="%{optflags} -Wl,-z,relro -Wl,-z,now -Wl,--as-needed" \ + -DCMAKE_Fortran_FLAGS_RELEASE:STRING="%{optflags} -Wl,-z,relro -Wl,-z,now -Wl,--as-needed" \ + -DCMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING="%{__global_ldflags} -Wl,-z,now -Wl,--as-needed -lklu $LIBLAPACKLINK $LIBBLASLINK $LIBSUPERLUMTLINK $LIBHYPRELINK" \ %endif - -DCMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING="%{__global_ldflags} -Wl,-z,now -lklu $LIBLAPACKLINK $LIBBLASLINK $LIBSUPERLUMTLINK $LIBHYPRELINK" \ %ifnarch %{power64} aarch64 s390x -DLAPACK_ENABLE:BOOL=OFF \ -DBLAS_ENABLE:BOOL=ON \ @@ -857,6 +860,10 @@ popd %endif %changelog +* Wed Nov 15 2017 Antonio Trande - 3.0.0-3 +- Use -Wl,--as-needed flag +- Fix shared-linker flags + * Thu Nov 09 2017 Antonio Trande - 3.0.0-2 - Remove sub-packages - Uninstall static libraries From cad9e21501512d3c24826793cdd3fcce1e3be416 Mon Sep 17 00:00:00 2001 From: sagitter Date: Wed, 15 Nov 2017 21:10:34 +0100 Subject: [PATCH 05/36] Define builds for Hypre libraries --- sundials.spec | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/sundials.spec b/sundials.spec index 8a1f84d..bf1721a 100644 --- a/sundials.spec +++ b/sundials.spec @@ -431,10 +431,12 @@ cmake \ -DSUPERLUMT_LIBRARY_DIR:PATH=%{_libdir} \ -DSUPERLUMT_THREAD_TYPE:STRING=OpenMP \ %endif +%ifnarch s390x %if 0%{?with_hypre} -DHYPRE_ENABLE:BOOL=ON \ -DHYPRE_INCLUDE_DIR:PATH=$MPI_INCLUDE/hypre \ -DHYPRE_LIBRARY_DIR:PATH=$MPI_LIB \ +%endif %endif -DKLU_ENABLE=ON -DKLU_LIBRARY_DIR:PATH=%{_libdir} -DKLU_INCLUDE_DIR:PATH=%{_includedir}/suitesparse \ -DEXAMPLES_INSTALL:BOOL=OFF -Wno-dev .. @@ -555,10 +557,23 @@ cmake \ -DSUPERLUMT_LIBRARY_DIR:PATH=%{_libdir} \ -DSUPERLUMT_THREAD_TYPE:STRING=OpenMP \ %endif +%if 0%{?fedora} +%ifnarch s390x %if 0%{?with_hypre} -DHYPRE_ENABLE:BOOL=ON \ -DHYPRE_INCLUDE_DIR:PATH=$MPI_INCLUDE/hypre \ -DHYPRE_LIBRARY_DIR:PATH=$MPI_LIB \ +%endif +%endif +%endif +%if 0%{?el6} +%ifnarch ppc64 +%if 0%{?with_hypre} + -DHYPRE_ENABLE:BOOL=ON \ + -DHYPRE_INCLUDE_DIR:PATH=$MPI_INCLUDE/hypre \ + -DHYPRE_LIBRARY_DIR:PATH=$MPI_LIB \ +%endif +%endif %endif -DKLU_ENABLE=ON -DKLU_LIBRARY_DIR:PATH=%{_libdir} -DKLU_INCLUDE_DIR:PATH=%{_includedir}/suitesparse \ -DEXAMPLES_INSTALL:BOOL=OFF -Wno-dev .. From a197b37daf0907156555c7fc6ab5b21896388ba4 Mon Sep 17 00:00:00 2001 From: sagitter Date: Wed, 15 Nov 2017 21:21:54 +0100 Subject: [PATCH 06/36] Define Hypre libraries --- sundials.spec | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/sundials.spec b/sundials.spec index bf1721a..2d65526 100644 --- a/sundials.spec +++ b/sundials.spec @@ -492,17 +492,20 @@ export LIBSUPERLUMTLINK=-lsuperlumt_d export LIBSUPERLUMTLINK= %endif ## Hypre +%if 0%{?fedora} +%ifnarch s390x %if 0%{?with_hypre} -%if 0%{?el6} -%ifarch ppc64 -export LIBHYPRELINK= -%else export LIBHYPRELINK="-L$MPI_LIB -lHYPRE" %endif -%else +%endif +%endif +%if 0%{?el6} +%ifnarch ppc64 +%if 0%{?with_hypre} export LIBHYPRELINK="-L$MPI_LIB -lHYPRE" %endif %endif +%endif ## %if %{with debug} From 672fa4e932f5596d119a48af1a05d6880f859a9c Mon Sep 17 00:00:00 2001 From: sagitter Date: Sun, 28 Jan 2018 12:37:16 +0100 Subject: [PATCH 07/36] Update to 3.1.0 --- .gitignore | 1 + sources | 2 +- sundials.spec | 12 +++++++++--- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 15542b8..61cdd71 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ sundials-2.3.0.tar.gz /sundials-2.7.0.tar.gz /sundials-2.7.0_pkgconfig_files.tar.gz /sundials-3.0.0.tar.gz +/sundials-3.1.0.tar.gz diff --git a/sources b/sources index 16c0cea..1ca2e46 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (sundials-3.0.0.tar.gz) = 3c86c7f27e64c2e6732546b0b1e87ea092502e361cae09b3b7eb29795c978edf494e17be13b78541dc91cc0709d928006bd0fc62ea968f2b621efa51856cdd60 +SHA512 (sundials-3.1.0.tar.gz) = 288427e00f58c512583cc14d81385e82b0fdeaa4e9adca588a108ad0752341b7be62c9fa2740924ec733e3e0d5794f305dc582fc72e244e675e5ea00ac0d08ca diff --git a/sundials.spec b/sundials.spec index 2d65526..1c1a226 100644 --- a/sundials.spec +++ b/sundials.spec @@ -57,8 +57,8 @@ Summary: Suite of nonlinear solvers Name: sundials -Version: 3.0.0 -Release: 3%{?dist} +Version: 3.1.0 +Release: 1%{?dist} # SUNDIALS is licensed under BSD with some additional (but unrestrictive) clauses. # Check the file 'LICENSE' for details. License: BSD @@ -67,7 +67,7 @@ URL: http://www.llnl.gov/casc/sundials/ Source0: https://computation.llnl.gov/projects/sundials/download/sundials-%{version}.tar.gz # This patch rename superLUMT library -Patch0: %{name}-%{version}-set_superlumt_name.patch +Patch0: %{name}-3.0.0-set_superlumt_name.patch BuildRequires: gcc-gfortran BuildRequires: suitesparse-devel @@ -631,6 +631,9 @@ for i in `find %{buildroot}%{_libexecdir}/sundials-%{version}/examples -perm /64 rm -rf $i done +# Remove file in a bad position +rm -f %{buildroot}%{_prefix}/LICENSE + %post -p /sbin/ldconfig %postun -p /sbin/ldconfig @@ -878,6 +881,9 @@ popd %endif %changelog +* Fri Dec 22 2017 Antonio Trande - 3.1.0-1 +- Update to 3.1.0 + * Wed Nov 15 2017 Antonio Trande - 3.0.0-3 - Use -Wl,--as-needed flag - Fix shared-linker flags From d7777177dc138bc49e2ea059ab6d0e1cf2e363d0 Mon Sep 17 00:00:00 2001 From: sagitter Date: Wed, 31 Jan 2018 12:05:24 +0100 Subject: [PATCH 08/36] Rebuild for GCC-8 --- sundials.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sundials.spec b/sundials.spec index 1c1a226..026b8ba 100644 --- a/sundials.spec +++ b/sundials.spec @@ -58,7 +58,7 @@ Summary: Suite of nonlinear solvers Name: sundials Version: 3.1.0 -Release: 1%{?dist} +Release: 2%{?dist} # SUNDIALS is licensed under BSD with some additional (but unrestrictive) clauses. # Check the file 'LICENSE' for details. License: BSD @@ -881,6 +881,9 @@ popd %endif %changelog +* Wed Jan 31 2018 Antonio Trande - 3.1.0-2 +- Rebuild for GCC-8 + * Fri Dec 22 2017 Antonio Trande - 3.1.0-1 - Update to 3.1.0 From 33c0fcb7ab1f7bfaa653d5ceed7f75de0c200ff9 Mon Sep 17 00:00:00 2001 From: sagitter Date: Fri, 2 Feb 2018 12:16:55 +0100 Subject: [PATCH 09/36] Use %%ldconfig_scriptlets --- sundials.spec | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sundials.spec b/sundials.spec index 026b8ba..d392e04 100644 --- a/sundials.spec +++ b/sundials.spec @@ -58,7 +58,7 @@ Summary: Suite of nonlinear solvers Name: sundials Version: 3.1.0 -Release: 2%{?dist} +Release: 3%{?dist} # SUNDIALS is licensed under BSD with some additional (but unrestrictive) clauses. # Check the file 'LICENSE' for details. License: BSD @@ -634,8 +634,7 @@ done # Remove file in a bad position rm -f %{buildroot}%{_prefix}/LICENSE -%post -p /sbin/ldconfig -%postun -p /sbin/ldconfig +%ldconfig_scriptlets %check @@ -881,6 +880,9 @@ popd %endif %changelog +* Fri Feb 02 2018 Antonio Trande - 3.1.0-3 +- Use %%ldconfig_scriptlets + * Wed Jan 31 2018 Antonio Trande - 3.1.0-2 - Rebuild for GCC-8 From 7275ab2f0e5fd3ab3fe9e6a9a558db0b735d9e89 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 9 Feb 2018 18:04:10 +0000 Subject: [PATCH 10/36] - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- sundials.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sundials.spec b/sundials.spec index d392e04..e35b50a 100644 --- a/sundials.spec +++ b/sundials.spec @@ -58,7 +58,7 @@ Summary: Suite of nonlinear solvers Name: sundials Version: 3.1.0 -Release: 3%{?dist} +Release: 4%{?dist} # SUNDIALS is licensed under BSD with some additional (but unrestrictive) clauses. # Check the file 'LICENSE' for details. License: BSD @@ -880,6 +880,9 @@ popd %endif %changelog +* Fri Feb 09 2018 Fedora Release Engineering - 3.1.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + * Fri Feb 02 2018 Antonio Trande - 3.1.0-3 - Use %%ldconfig_scriptlets From 84523661ac8b1afcd53b78cc7669f6d0a91856d6 Mon Sep 17 00:00:00 2001 From: sagitter Date: Fri, 4 May 2018 22:18:52 +0200 Subject: [PATCH 11/36] Rebuild for hypre-2.14.0 --- sundials.spec | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/sundials.spec b/sundials.spec index e35b50a..5129f51 100644 --- a/sundials.spec +++ b/sundials.spec @@ -17,17 +17,18 @@ %endif ## Define if use openmpi or not +%if 0%{?fedora} < 28 +## Exclude MPI builds on s390x %ifarch s390x -%if 0%{?fedora} >= 26 -%global with_mpich 1 -%global with_openmpi 1 +%global with_mpich 0 +%global with_openmpi 0 %else %global with_mpich 1 -%global with_openmpi 0 +%global with_openmpi 1 %endif %endif -%if 0%{?fedora} +%if 0%{?fedora} >= 28 %global with_mpich 1 %global with_openmpi 1 %endif @@ -58,7 +59,7 @@ Summary: Suite of nonlinear solvers Name: sundials Version: 3.1.0 -Release: 4%{?dist} +Release: 5%{?dist} # SUNDIALS is licensed under BSD with some additional (but unrestrictive) clauses. # Check the file 'LICENSE' for details. License: BSD @@ -880,6 +881,9 @@ popd %endif %changelog +* Fri May 04 2018 Antonio Trande - 3.1.0-5 +- Rebuild for hypre-2.14.0 + * Fri Feb 09 2018 Fedora Release Engineering - 3.1.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild From 8f0a496edc2a9e470d3486a301001d982bbb0621 Mon Sep 17 00:00:00 2001 From: sagitter Date: Mon, 14 May 2018 13:57:06 +0200 Subject: [PATCH 12/36] Update to 3.1.1 --- .gitignore | 1 + sources | 2 +- ...=> sundials-3.1.1-set_superlumt_name.patch | 0 sundials.spec | 97 ++++++++++++------- 4 files changed, 66 insertions(+), 34 deletions(-) rename sundials-3.0.0-set_superlumt_name.patch => sundials-3.1.1-set_superlumt_name.patch (100%) diff --git a/.gitignore b/.gitignore index 61cdd71..76bdc66 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ sundials-2.3.0.tar.gz /sundials-2.7.0_pkgconfig_files.tar.gz /sundials-3.0.0.tar.gz /sundials-3.1.0.tar.gz +/sundials-3.1.1.tar.gz diff --git a/sources b/sources index 1ca2e46..3edc675 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (sundials-3.1.0.tar.gz) = 288427e00f58c512583cc14d81385e82b0fdeaa4e9adca588a108ad0752341b7be62c9fa2740924ec733e3e0d5794f305dc582fc72e244e675e5ea00ac0d08ca +SHA512 (sundials-3.1.1.tar.gz) = 3e8fc7183c5503943f1ba00c73b04c1614a48b6e6cb90559ec5481f9acffaa19acd97bd961611b251ebdc032f1a13f0919b0ab0cdfe9d9b4ddc99d40bef5719f diff --git a/sundials-3.0.0-set_superlumt_name.patch b/sundials-3.1.1-set_superlumt_name.patch similarity index 100% rename from sundials-3.0.0-set_superlumt_name.patch rename to sundials-3.1.1-set_superlumt_name.patch diff --git a/sundials.spec b/sundials.spec index 5129f51..598b93c 100644 --- a/sundials.spec +++ b/sundials.spec @@ -6,16 +6,6 @@ %{!?__global_ldflags: %global __global_ldflags -Wl,-z,relro} %endif -# openblas available on these architectures. -%if 0%{?fedora} && 0%{?fedora} > 26 -%{!?openblas_arches:%global openblas_arches x86_64 %{ix86} armv7hl %{power64} aarch64 s390x} -%else -%{!?openblas_arches:%global openblas_arches x86_64 %{ix86} armv7hl %{power64} aarch64} -%endif -%if 0%{?rhel} -%{!?openblas_arches:%global openblas_arches x86_64 %{ix86} armv7hl %{power64} aarch64} -%endif - ## Define if use openmpi or not %if 0%{?fedora} < 28 ## Exclude MPI builds on s390x @@ -58,8 +48,8 @@ Summary: Suite of nonlinear solvers Name: sundials -Version: 3.1.0 -Release: 5%{?dist} +Version: 3.1.1 +Release: 1%{?dist} # SUNDIALS is licensed under BSD with some additional (but unrestrictive) clauses. # Check the file 'LICENSE' for details. License: BSD @@ -68,7 +58,7 @@ URL: http://www.llnl.gov/casc/sundials/ Source0: https://computation.llnl.gov/projects/sundials/download/sundials-%{version}.tar.gz # This patch rename superLUMT library -Patch0: %{name}-3.0.0-set_superlumt_name.patch +Patch0: %{name}-%{version}-set_superlumt_name.patch BuildRequires: gcc-gfortran BuildRequires: suitesparse-devel @@ -128,9 +118,14 @@ This package contains the C, CXX, F77 example files. Summary: Suite of nonlinear solvers Group: Development/Libraries BuildRequires: openmpi-devel +%if 0%{?rhel} || 0%{?fedora} > 28 +BuildRequires: hypre-openmpi-devel +%else %ifnarch s390x BuildRequires: hypre-openmpi-devel %endif +%endif + Requires: openmpi Requires: gcc-gfortran%{?_isa} %description openmpi @@ -165,9 +160,13 @@ This package contains the C, CXX, F77 example files. Summary: Suite of nonlinear solvers Group: Development/Libraries BuildRequires: mpich-devel +%if 0%{?rhel} || 0%{?fedora} > 28 +BuildRequires: hypre-mpich-devel +%else %ifnarch s390x BuildRequires: hypre-mpich-devel %endif +%endif Requires: mpich Requires: gcc-gfortran%{?_isa} %description mpich @@ -378,12 +377,20 @@ export LIBSUPERLUMTLINK= %endif ## Hypre %if 0%{?with_hypre} +%if 0%{?fedora} <= 28 %ifarch s390x export LIBHYPRELINK= %else export LIBHYPRELINK="-L$MPI_LIB -lHYPRE" %endif %endif +%endif + +%if 0%{?with_hypre} +%if 0%{?rhel} || 0%{?fedora} > 28 +export LIBHYPRELINK="-L$MPI_LIB -lHYPRE" +%endif +%endif ## %if %{with debug} @@ -432,8 +439,17 @@ cmake \ -DSUPERLUMT_LIBRARY_DIR:PATH=%{_libdir} \ -DSUPERLUMT_THREAD_TYPE:STRING=OpenMP \ %endif -%ifnarch s390x %if 0%{?with_hypre} +%if 0%{?fedora} <= 28 +%ifarch s390x + -DHYPRE_ENABLE:BOOL=OFF \ +%else + -DHYPRE_ENABLE:BOOL=ON \ + -DHYPRE_INCLUDE_DIR:PATH=$MPI_INCLUDE/hypre \ + -DHYPRE_LIBRARY_DIR:PATH=$MPI_LIB \ +%endif +%endif +%if 0%{?rhel} || 0%{?fedora} > 28 -DHYPRE_ENABLE:BOOL=ON \ -DHYPRE_INCLUDE_DIR:PATH=$MPI_INCLUDE/hypre \ -DHYPRE_LIBRARY_DIR:PATH=$MPI_LIB \ @@ -493,20 +509,21 @@ export LIBSUPERLUMTLINK=-lsuperlumt_d export LIBSUPERLUMTLINK= %endif ## Hypre -%if 0%{?fedora} -%ifnarch s390x %if 0%{?with_hypre} +%if 0%{?fedora} <= 28 +%ifarch s390x +export LIBHYPRELINK= +%else export LIBHYPRELINK="-L$MPI_LIB -lHYPRE" %endif %endif %endif -%if 0%{?el6} -%ifnarch ppc64 + %if 0%{?with_hypre} +%if 0%{?rhel} || 0%{?fedora} > 28 export LIBHYPRELINK="-L$MPI_LIB -lHYPRE" %endif %endif -%endif ## %if %{with debug} @@ -561,23 +578,21 @@ cmake \ -DSUPERLUMT_LIBRARY_DIR:PATH=%{_libdir} \ -DSUPERLUMT_THREAD_TYPE:STRING=OpenMP \ %endif -%if 0%{?fedora} -%ifnarch s390x %if 0%{?with_hypre} +%if 0%{?fedora} <= 28 +%ifarch s390x + -DHYPRE_ENABLE:BOOL=OFF \ +%else -DHYPRE_ENABLE:BOOL=ON \ -DHYPRE_INCLUDE_DIR:PATH=$MPI_INCLUDE/hypre \ -DHYPRE_LIBRARY_DIR:PATH=$MPI_LIB \ %endif %endif -%endif -%if 0%{?el6} -%ifnarch ppc64 -%if 0%{?with_hypre} +%if 0%{?rhel} || 0%{?fedora} > 28 -DHYPRE_ENABLE:BOOL=ON \ -DHYPRE_INCLUDE_DIR:PATH=$MPI_INCLUDE/hypre \ -DHYPRE_LIBRARY_DIR:PATH=$MPI_LIB \ %endif -%endif %endif -DKLU_ENABLE=ON -DKLU_LIBRARY_DIR:PATH=%{_libdir} -DKLU_INCLUDE_DIR:PATH=%{_includedir}/suitesparse \ -DEXAMPLES_INSTALL:BOOL=OFF -Wno-dev .. @@ -773,9 +788,8 @@ popd %endif ##if with_sercheck %files -%{!?_licensedir:%global license %doc} %license sundials-%{version}/LICENSE -%doc sundials-%{version}/README sundials-%{version}/src/README-* +%doc sundials-%{version}/README.md sundials-%{version}/src/README-* %{_libdir}/libsundials_nvecserial.so.* %{_libdir}/libsundials_cvode.so.* %{_libdir}/libsundials_cvodes.so.* @@ -794,9 +808,8 @@ popd %{_libdir}/libsundials_nvecopenmp.so.* %files doc -%{!?_licensedir:%global license %doc} %license sundials-%{version}/LICENSE -%doc sundials-%{version}/README +%doc sundials-%{version}/README.md %doc sundials-%{version}/doc/cvode/cv_guide.pdf %doc sundials-%{version}/doc/kinsol/kin_guide.pdf %doc sundials-%{version}/doc/cvodes/cvs_guide.pdf @@ -837,20 +850,28 @@ popd %if 0%{?with_openmpi} %files openmpi %license sundials-%{version}/LICENSE -%doc sundials-%{version}/README sundials-%{version}/src/README-* +%doc sundials-%{version}/README.md sundials-%{version}/src/README-* %{_libdir}/openmpi/lib/libsundials_nvecparallel.so.* %{_libdir}/openmpi/lib/libsundials_fnvecparallel.so.* +%if 0%{?rhel} || 0%{?fedora} > 28 +%{_libdir}/openmpi/lib/libsundials_nvecparhyp.so.* +%else %ifnarch s390x %{_libdir}/openmpi/lib/libsundials_nvecparhyp.so.* %endif +%endif %files openmpi-devel %{_includedir}/openmpi-%{_arch}/nvector/nvector_parallel.h %{_libdir}/openmpi/lib/libsundials_nvecparallel.so %{_libdir}/openmpi/lib/libsundials_fnvecparallel.so +%if 0%{?rhel} || 0%{?fedora} > 28 +%{_libdir}/openmpi/lib/libsundials_nvecparhyp.so +%else %ifnarch s390x %{_libdir}/openmpi/lib/libsundials_nvecparhyp.so %endif +%endif %files openmpi-samples %{_libdir}/openmpi/lib/sundials-%{version}/ @@ -858,29 +879,39 @@ popd %if 0%{?with_mpich} %files mpich -%{!?_licensedir:%global license %doc} %license sundials-%{version}/LICENSE -%doc sundials-%{version}/README sundials-%{version}/src/README-* +%doc sundials-%{version}/README.md sundials-%{version}/src/README-* %{_libdir}/mpich/lib/libsundials_nvecparallel.so.* %{_libdir}/mpich/lib/libsundials_fnvecparallel.so.* +%if 0%{?rhel} || 0%{?fedora} > 28 +%{_libdir}/mpich/lib/libsundials_nvecparhyp.so.* +%else %ifnarch s390x %{_libdir}/mpich/lib/libsundials_nvecparhyp.so.* %endif +%endif %{_libdir}/mpich/lib/sundials-%{version}/ %files mpich-devel %{_includedir}/mpich-%{_arch}/nvector/nvector_parallel.h %{_libdir}/mpich/lib/libsundials_nvecparallel.so %{_libdir}/mpich/lib/libsundials_fnvecparallel.so +%if 0%{?rhel} || 0%{?fedora} > 28 +%{_libdir}/mpich/lib/libsundials_nvecparhyp.so +%else %ifnarch s390x %{_libdir}/mpich/lib/libsundials_nvecparhyp.so %endif +%endif %files mpich-samples %{_libdir}/mpich/lib/sundials-%{version}/ %endif %changelog +* Sun May 13 2018 Antonio Trande - 3.1.1-1 +- Update to 3.1.1 + * Fri May 04 2018 Antonio Trande - 3.1.0-5 - Rebuild for hypre-2.14.0 From 596e8b54b3e6934d65df56db9d1b5407023684d9 Mon Sep 17 00:00:00 2001 From: sagitter Date: Wed, 6 Jun 2018 11:37:24 +0200 Subject: [PATCH 13/36] Use SuperLUMT64 on 64bit systems --- sundials-3.1.1-set_superlumt64_name.patch | 11 + sundials.spec | 269 ++++++---------------- 2 files changed, 85 insertions(+), 195 deletions(-) create mode 100644 sundials-3.1.1-set_superlumt64_name.patch diff --git a/sundials-3.1.1-set_superlumt64_name.patch b/sundials-3.1.1-set_superlumt64_name.patch new file mode 100644 index 0000000..ebbc062 --- /dev/null +++ b/sundials-3.1.1-set_superlumt64_name.patch @@ -0,0 +1,11 @@ +--- config/FindSUPERLUMT.orig.cmake 2016-09-27 00:16:47.000000000 +0200 ++++ config/FindSUPERLUMT.cmake 2016-10-04 12:08:58.202988791 +0200 +@@ -44,7 +44,7 @@ + set(SUPERLUMT_LIBRARY_DIR ${SUPERLUMT_LIBRARY_DIR} CACHE PATH "" FORCE) + else() + # find library with user provided directory path +- set(SUPERLUMT_LIBRARY_NAME superlu_mt_${POST}) ++ set(SUPERLUMT_LIBRARY_NAME superlumt64_d) + find_library(SUPERLUMT_LIBRARY ${SUPERLUMT_LIBRARY_NAME} ${SUPERLUMT_LIBRARY_DIR} NO_DEFAULT_PATH) + endif() + mark_as_advanced(SUPERLUMT_LIBRARY) diff --git a/sundials.spec b/sundials.spec index 598b93c..c63741e 100644 --- a/sundials.spec +++ b/sundials.spec @@ -49,7 +49,7 @@ Summary: Suite of nonlinear solvers Name: sundials Version: 3.1.1 -Release: 1%{?dist} +Release: 2%{?dist} # SUNDIALS is licensed under BSD with some additional (but unrestrictive) clauses. # Check the file 'LICENSE' for details. License: BSD @@ -58,15 +58,20 @@ URL: http://www.llnl.gov/casc/sundials/ Source0: https://computation.llnl.gov/projects/sundials/download/sundials-%{version}.tar.gz # This patch rename superLUMT library -Patch0: %{name}-%{version}-set_superlumt_name.patch +Patch0: %{name}-3.1.1-set_superlumt_name.patch -BuildRequires: gcc-gfortran +# This patch rename superLUMT64 library +Patch1: %{name}-3.1.1-set_superlumt64_name.patch + +BuildRequires: gcc-gfortran, python2-devel BuildRequires: suitesparse-devel %if 0%{?rhel} -BuildRequires: cmake3, epel-rpm-macros +BuildRequires: cmake3, epel-rpm-macros +%global ctest3 ctest3 %else -BuildRequires: cmake -%global cmake3 %{cmake} +BuildRequires: cmake +%global cmake3 %cmake +%global ctest3 ctest %endif %ifarch %{openblas_arches} BuildRequires: openblas-devel, openblas-srpm-macros @@ -74,14 +79,17 @@ BuildRequires: openblas-devel, openblas-srpm-macros BuildRequires: blas-devel, lapack-devel %endif -# SuperLUMT is unavailable on following architectures -%ifnarch %{power64} aarch64 +%ifarch s390x x86_64 +BuildRequires: SuperLUMT64-devel +%endif +%ifarch %{arm} %{ix86} BuildRequires: SuperLUMT-devel %endif %if 0%{?rhel} BuildRequires: rsh %endif Requires: gcc-gfortran%{?_isa} +Obsoletes: %{name}-samples%{?_isa} < 3.1.1 %description SUNDIALS is a SUite of Non-linear DIfferential/ALgebraic equation Solvers @@ -102,15 +110,6 @@ Requires: %{name}%{?_isa} = %{version}-%{release} SUNDIALS is a SUite of Non-linear DIfferential/ALgebraic equation Solvers for use in writing mathematical software. This package contains the developer files (.so file, header files). - -%package samples -Summary: Suite of nonlinear solvers (example files) -Group: Development/Libraries -Requires: %{name}%{?_isa} = %{version}-%{release} -%description samples -SUNDIALS is a SUite of Non-linear DIfferential/ALgebraic equation Solvers -for use in writing mathematical software. -This package contains the C, CXX, F77 example files. ############################################################################# ######### %if 0%{?with_openmpi} @@ -128,6 +127,8 @@ BuildRequires: hypre-openmpi-devel Requires: openmpi Requires: gcc-gfortran%{?_isa} +Obsoletes: %{name}-openmpi-samples%{?_isa} < 3.1.1 + %description openmpi SUNDIALS is a SUite of Non-linear DIfferential/ALgebraic equation Solvers for use in writing mathematical software. @@ -142,15 +143,6 @@ SUNDIALS is a SUite of Non-linear DIfferential/ALgebraic equation Solvers for use in writing mathematical software. This package contains the Sundials parallel OpenMPI devel libraries and header files. - -%package openmpi-samples -Summary: Suite of nonlinear solvers (example files) -Group: Development/Libraries -Requires: %{name}-openmpi%{?_isa} = %{version}-%{release} -%description openmpi-samples -SUNDIALS is a SUite of Non-linear DIfferential/ALgebraic equation Solvers -for use in writing mathematical software. -This package contains the C, CXX, F77 example files. %endif ###### ############################################################################### @@ -169,6 +161,8 @@ BuildRequires: hypre-mpich-devel %endif Requires: mpich Requires: gcc-gfortran%{?_isa} +Obsoletes: %{name}-mpich-samples%{?_isa} < 3.1.1 + %description mpich SUNDIALS is a SUite of Non-linear DIfferential/ALgebraic equation Solvers for use in writing mathematical software. @@ -183,15 +177,6 @@ SUNDIALS is a SUite of Non-linear DIfferential/ALgebraic equation Solvers for use in writing mathematical software. This package contains the Sundials parallel MPICH devel libraries and header files. - -%package mpich-samples -Summary: Suite of nonlinear solvers (example files) -Group: Development/Libraries -Requires: %{name}-mpich%{?_isa} = %{version}-%{release} -%description mpich-samples -SUNDIALS is a SUite of Non-linear DIfferential/ALgebraic equation Solvers -for use in writing mathematical software. -This package contains the C, CXX, F77 example files. %endif ###### ############################################################################# @@ -210,7 +195,10 @@ This package contains the documentation files. pushd sundials-%{version} -%ifnarch %{power64} aarch64 +%ifarch s390x x86_64 +%patch1 -p0 +%endif +%ifarch %{arm} %{ix86} %patch0 -p0 %endif @@ -280,9 +268,14 @@ export LIBLAPACKLINK=-llapack export LIBLAPACK=liblapack export INCBLAS=-I%{_includedir} %endif -%ifnarch %{power64} aarch64 + +%ifarch s390x x86_64 +export LIBSUPERLUMTLINK=-lsuperlumt64_d +%endif +%ifarch %{arm} %{ix86} export LIBSUPERLUMTLINK=-lsuperlumt_d -%else +%endif +%ifnarch s390x x86_64 %{arm} %{ix86} export LIBSUPERLUMTLINK= %endif @@ -296,7 +289,11 @@ cmake \ -DCMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING="%{__global_ldflags} -Wl,-z,now -Wl,--as-needed -lklu $LIBBLASLINK $LIBLAPACKLINK $LIBSUPERLUMTLINK" \ %else %{cmake3} \ +%if %{?__isa_bits:%{__isa_bits}}%{!?__isa_bits:32} == 64 -DSUNDIALS_INDEX_TYPE:STRING=int64_t \ +%else + -DSUNDIALS_INDEX_TYPE:STRING=int32_t \ +%endif -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ -DCMAKE_BUILD_TYPE:STRING=Release \ -DCMAKE_C_FLAGS_RELEASE:STRING="%{optflags} -Wl,-z,relro -Wl,-z,now -Wl,--as-needed" \ @@ -315,6 +312,7 @@ cmake \ %endif -DCMAKE_MODULE_LINKER_FLAGS:STRING="%{__global_ldflags} -Wl,-z,now -Wl,--as-needed" \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \ + -DPYTHON_EXECUTABLE:FILEPATH=%{__python2} \ -DEXAMPLES_ENABLE_CXX:BOOL=ON -DEXAMPLES_ENABLE_C:BOOL=ON -DEXAMPLES_ENABLE_F77:BOOL=ON \ -DCMAKE_SKIP_RPATH:BOOL=YES -DCMAKE_SKIP_INSTALL_RPATH:BOOL=YES \ -DBUILD_SHARED_LIBS:BOOL=ON -DBUILD_STATIC_LIBS:BOOL=OFF \ @@ -370,9 +368,13 @@ export INCBLAS=-I%{_includedir} %endif ## ## SuperLUMT -%ifnarch %{power64} aarch64 +%ifarch s390x x86_64 +export LIBSUPERLUMTLINK=-lsuperlumt64_d +%endif +%ifarch %{arm} %{ix86} export LIBSUPERLUMTLINK=-lsuperlumt_d -%else +%endif +%ifnarch s390x x86_64 %{arm} %{ix86} export LIBSUPERLUMTLINK= %endif ## Hypre @@ -403,7 +405,11 @@ cmake \ -DCMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING="%{__global_ldflags} -Wl,-z,now -Wl,--as-needed -lklu $LIBLAPACKLINK $LIBBLASLINK $LIBSUPERLUMTLINK $LIBHYPRELINK" \ %else %{cmake3} \ +%if %{?__isa_bits:%{__isa_bits}}%{!?__isa_bits:32} == 64 -DSUNDIALS_INDEX_TYPE:STRING=int64_t \ +%else + -DSUNDIALS_INDEX_TYPE:STRING=int32_t \ +%endif -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ -DCMAKE_BUILD_TYPE:STRING=Release \ -DCMAKE_C_FLAGS_RELEASE:STRING="%{optflags} -Wl,-z,relro -Wl,-z,now -Wl,--as-needed" \ @@ -421,6 +427,7 @@ cmake \ -DLAPACK_LIBRARIES:STRING=%{_libdir}/$LIBLAPACK.so \ %endif -DCMAKE_INSTALL_PREFIX=%{_prefix} \ + -DPYTHON_EXECUTABLE:FILEPATH=%{__python2} \ -DEXAMPLES_ENABLE_CXX:BOOL=ON -DEXAMPLES_ENABLE_C:BOOL=ON -DEXAMPLES_ENABLE_F77:BOOL=ON \ -DBUILD_SHARED_LIBS:BOOL=ON -DBUILD_STATIC_LIBS:BOOL=OFF \ -DCMAKE_SKIP_RPATH:BOOL=YES -DCMAKE_SKIP_INSTALL_RPATH:BOOL=YES \ @@ -503,9 +510,13 @@ export INCBLAS=-I%{_includedir} %endif ## ## SuperLUMT -%ifnarch %{power64} aarch64 +%ifarch s390x x86_64 +export LIBSUPERLUMTLINK=-lsuperlumt64_d +%endif +%ifarch %{arm} %{ix86} export LIBSUPERLUMTLINK=-lsuperlumt_d -%else +%endif +%ifnarch s390x x86_64 %{arm} %{ix86} export LIBSUPERLUMTLINK= %endif ## Hypre @@ -536,7 +547,11 @@ cmake \ -DCMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING="%{__global_ldflags} -Wl,-z,now -Wl,--as-needed -lklu $LIBLAPACKLINK $LIBBLASLINK $LIBSUPERLUMTLINK $LIBHYPRELINK" \ %else %{cmake3} \ +%if %{?__isa_bits:%{__isa_bits}}%{!?__isa_bits:32} == 64 -DSUNDIALS_INDEX_TYPE:STRING=int64_t \ +%else + -DSUNDIALS_INDEX_TYPE:STRING=int32_t \ +%endif -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ -DCMAKE_BUILD_TYPE:STRING=Release \ -DCMAKE_C_FLAGS_RELEASE:STRING="%{optflags} -Wl,-z,relro -Wl,-z,now -Wl,--as-needed" \ @@ -554,6 +569,7 @@ cmake \ -DLAPACK_LIBRARIES:STRING=%{_libdir}/$LIBLAPACK.so \ %endif -DCMAKE_INSTALL_PREFIX=%{_prefix} \ + -DPYTHON_EXECUTABLE:FILEPATH=%{__python2} \ -DEXAMPLES_ENABLE_CXX:BOOL=ON -DEXAMPLES_ENABLE_C:BOOL=ON -DEXAMPLES_ENABLE_F77:BOOL=ON \ -DBUILD_SHARED_LIBS:BOOL=ON -DBUILD_STATIC_LIBS:BOOL=OFF \ -DCMAKE_SKIP_RPATH:BOOL=YES -DCMAKE_SKIP_INSTALL_RPATH:BOOL=YES \ @@ -609,28 +625,12 @@ popd %if 0%{?with_openmpi} %{_openmpi_load} %make_install -C buildopenmpi_dir/build - -mkdir -p %{buildroot}$MPI_LIB/sundials-%{version} -cp -a buildopenmpi_dir/build/examples %{buildroot}$MPI_LIB/sundials-%{version}/ - -## Remove CMake files -for i in `find %{buildroot}$MPI_LIB/sundials-%{version}/examples -perm /644 -type f \( -name "*Makefile*" \)`; do - rm -rf $i -done %{_openmpi_unload} %endif %if 0%{?with_mpich} %{_mpich_load} %make_install -C buildmpich_dir/build - -mkdir -p %{buildroot}$MPI_LIB/sundials-%{version} -cp -a buildmpich_dir/build/examples %{buildroot}$MPI_LIB/sundials-%{version}/ - -## Remove CMake files -for i in `find %{buildroot}$MPI_LIB/sundials-%{version}/examples -perm /644 -type f \( -name "*Makefile*" \)`; do - rm -rf $i -done %{_mpich_unload} %endif @@ -639,151 +639,36 @@ done # Remove static libraries rm -f %{buildroot}%{_libdir}/*.a -mkdir -p %{buildroot}%{_libexecdir}/sundials-%{version} -cp -a sundials-%{version}/build/examples %{buildroot}%{_libexecdir}/sundials-%{version}/ - -## Remove CMake files -for i in `find %{buildroot}%{_libexecdir}/sundials-%{version}/examples -perm /644 -type f \( -name "*Makefile*" \)`; do - rm -rf $i -done - # Remove file in a bad position rm -f %{buildroot}%{_prefix}/LICENSE %ldconfig_scriptlets %check - %if 0%{?with_parcheck} %if 0%{?with_openmpi} %{_openmpi_load} +pushd buildopenmpi_dir/build export LD_LIBRARY_PATH=%{buildroot}$MPI_LIB:%{buildroot}%{_libdir} -##cvode -buildopenmpi_dir/build/examples/cvode/parallel/cvAdvDiff_diag_p - -##cvodes -mpirun -np 2 buildopenmpi_dir/build/examples/cvodes/parallel/cvsAdvDiff_ASAp_non_p - -#ida -mpirun -np 4 buildopenmpi_dir/build/examples/ida/parallel/idaFoodWeb_kry_bbd_p - -#idas -mpirun -np 4 buildopenmpi_dir/build/examples/idas/parallel/idasBruss_ASAp_kry_bbd_p - -#kinsol -mpirun -np 4 buildopenmpi_dir/build/examples/kinsol/parallel/kinFoodWeb_kry_bbd_p - -#nvector -mpirun buildopenmpi_dir/build/examples/nvector/parallel/test_nvector_mpi +%ctest3 --force-new-ctest-process -VV +popd %{_openmpi_unload} %endif ##if openmpi %if 0%{?with_mpich} -## Tests not perfomred due to 'gethostname' failure on koji +%{_mpich_load} +pushd buildmpich_dir/build +export LD_LIBRARY_PATH=%{buildroot}$MPI_LIB:%{buildroot}%{_libdir} +%ctest3 --force-new-ctest-process -VV +popd +%{_mpich_unload} %endif ##if openmpi %endif ## if with_parcheck %if 0%{?with_sercheck} -pushd sundials-%{version}/build/examples -export LD_LIBRARY_PATH=%{buildroot}%{_libdir} -##arkode -cd arkode/C_serial -./ark_analytic -./ark_analytic_nonlin -./ark_brusselator -./ark_brusselator1D -./ark_brusselator_fp -./ark_heat1D -./ark_KrylovDemo_prec -./ark_robertson -./ark_robertson_root - -cd ../F77_serial -./fark_diurnal_kry_bp -cd ../.. -##cvode -cd cvode/fcmix_serial -%ifnarch s390 s390x ppc64 ppc64le -./fcvAdvDiff_bnd -./fcvDiurnal_kry -./fcvDiurnal_kry_bp -./fcvRoberts_dns -%endif - -cd ../serial -./cvAdvDiff_bnd -./cvDirectDemo_ls -./cvDiurnal_kry -./cvDiurnal_kry_bp -./cvKrylovDemo_ls -./cvKrylovDemo_prec -./cvRoberts_dns -./cvRoberts_dns_uw -cd ../.. -##cvodes -cd cvodes/serial -./cvsAdvDiff_ASAi_bnd -./cvsAdvDiff_bnd -./cvsAdvDiff_FSA_non -./cvsDirectDemo_ls -./cvsDiurnal_FSA_kry -./cvsDiurnal_kry -./cvsDiurnal_kry_bp -./cvsFoodWeb_ASAi_kry -./cvsFoodWeb_ASAp_kry -./cvsHessian_ASA_FSA -./cvsKrylovDemo_ls -./cvsKrylovDemo_prec -./cvsRoberts_ASAi_dns -./cvsRoberts_dns -./cvsRoberts_dns_uw -./cvsRoberts_FSA_dns -cd ../.. -##ida -cd ida/fcmix_pthreads -%ifnarch s390 s390x ppc64 ppc64le -./fidaRoberts_dns_pthreads -cd ../fcmix_serial -./fidaRoberts_dns -%endif -cd ../serial -./idaFoodWeb_bnd -./idaHeat2D_bnd -./idaHeat2D_kry -./idaKrylovDemo_ls -./idaRoberts_dns -./idaSlCrank_dns -cd ../.. -##idas -cd idas/serial -./idasAkzoNob_ASAi_dns -./idasAkzoNob_dns -./idasFoodWeb_bnd -./idasHeat2D_bnd -./idasHeat2D_kry -./idasHessian_ASA_FSA -./idasKrylovDemo_ls -./idasRoberts_ASAi_dns -./idasRoberts_dns -./idasRoberts_FSA_dns -./idasSlCrank_dns -./idasSlCrank_FSA_dns -cd ../.. -##kinsol -cd kinsol/fcmix_serial -cd ../serial -./kinFerTron_dns -./kinFoodWeb_kry -./kinLaplace_bnd -./kinLaplace_picard_bnd -./kinRoberts_fp -./kinRoboKin_dns -cd ../.. -##nvector -cd nvector/pthreads -./test_nvector_pthreads 5000 4 1 -cd ../serial -./test_nvector_serial 5000 4 1 +pushd sundials-%{version}/build +export LD_LIBRARY_PATH=%{buildroot}%{_libdir} +%ctest3 --force-new-ctest-process -VV popd %endif ##if with_sercheck @@ -844,9 +729,6 @@ popd %{_includedir}/sunlinsol/ %{_includedir}/sunmatrix/ -%files samples -%{_libexecdir}/sundials-%{version}/ - %if 0%{?with_openmpi} %files openmpi %license sundials-%{version}/LICENSE @@ -872,9 +754,6 @@ popd %{_libdir}/openmpi/lib/libsundials_nvecparhyp.so %endif %endif - -%files openmpi-samples -%{_libdir}/openmpi/lib/sundials-%{version}/ %endif %if 0%{?with_mpich} @@ -890,7 +769,6 @@ popd %{_libdir}/mpich/lib/libsundials_nvecparhyp.so.* %endif %endif -%{_libdir}/mpich/lib/sundials-%{version}/ %files mpich-devel %{_includedir}/mpich-%{_arch}/nvector/nvector_parallel.h @@ -903,12 +781,13 @@ popd %{_libdir}/mpich/lib/libsundials_nvecparhyp.so %endif %endif - -%files mpich-samples -%{_libdir}/mpich/lib/sundials-%{version}/ %endif %changelog +* Wed Jun 06 2018 Antonio Trande - 3.1.1-2 +- Do not pack examples +- Use SuperLUMT64 on 64bit systems + * Sun May 13 2018 Antonio Trande - 3.1.1-1 - Update to 3.1.1 From 5904663f3d04a89e7f105ebe836fda6771c7a681 Mon Sep 17 00:00:00 2001 From: sagitter Date: Wed, 6 Jun 2018 12:51:27 +0200 Subject: [PATCH 14/36] Fix Oboletes tag --- sundials.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sundials.spec b/sundials.spec index c63741e..57d3d8c 100644 --- a/sundials.spec +++ b/sundials.spec @@ -89,7 +89,7 @@ BuildRequires: SuperLUMT-devel BuildRequires: rsh %endif Requires: gcc-gfortran%{?_isa} -Obsoletes: %{name}-samples%{?_isa} < 3.1.1 +Obsoletes: %{name}-samples%{?_isa} < 3.1.1-2 %description SUNDIALS is a SUite of Non-linear DIfferential/ALgebraic equation Solvers @@ -127,7 +127,7 @@ BuildRequires: hypre-openmpi-devel Requires: openmpi Requires: gcc-gfortran%{?_isa} -Obsoletes: %{name}-openmpi-samples%{?_isa} < 3.1.1 +Obsoletes: %{name}-openmpi-samples%{?_isa} < 3.1.1-2 %description openmpi SUNDIALS is a SUite of Non-linear DIfferential/ALgebraic equation Solvers @@ -161,7 +161,7 @@ BuildRequires: hypre-mpich-devel %endif Requires: mpich Requires: gcc-gfortran%{?_isa} -Obsoletes: %{name}-mpich-samples%{?_isa} < 3.1.1 +Obsoletes: %{name}-mpich-samples%{?_isa} < 3.1.1-2 %description mpich SUNDIALS is a SUite of Non-linear DIfferential/ALgebraic equation Solvers From 32c341a6f7873a38b3ff85c37a3481d3a369afd1 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 14 Jul 2018 06:59:30 +0000 Subject: [PATCH 15/36] - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- sundials.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sundials.spec b/sundials.spec index 57d3d8c..94a7556 100644 --- a/sundials.spec +++ b/sundials.spec @@ -49,7 +49,7 @@ Summary: Suite of nonlinear solvers Name: sundials Version: 3.1.1 -Release: 2%{?dist} +Release: 3%{?dist} # SUNDIALS is licensed under BSD with some additional (but unrestrictive) clauses. # Check the file 'LICENSE' for details. License: BSD @@ -784,6 +784,9 @@ popd %endif %changelog +* Sat Jul 14 2018 Fedora Release Engineering - 3.1.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Wed Jun 06 2018 Antonio Trande - 3.1.1-2 - Do not pack examples - Use SuperLUMT64 on 64bit systems From 2a6b1c6092cb3d45ef8f7cd4670cacf2c795dee3 Mon Sep 17 00:00:00 2001 From: sagitter Date: Mon, 16 Jul 2018 11:25:59 +0200 Subject: [PATCH 16/36] Add gcc gcc-c++ BR --- sundials.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/sundials.spec b/sundials.spec index 94a7556..e1dea61 100644 --- a/sundials.spec +++ b/sundials.spec @@ -64,6 +64,7 @@ Patch0: %{name}-3.1.1-set_superlumt_name.patch Patch1: %{name}-3.1.1-set_superlumt64_name.patch BuildRequires: gcc-gfortran, python2-devel +BuildRequires: gcc, gcc-c++ BuildRequires: suitesparse-devel %if 0%{?rhel} BuildRequires: cmake3, epel-rpm-macros From 44a352649d07a171e0a4c57ad81c2c3c6bb18a83 Mon Sep 17 00:00:00 2001 From: sagitter Date: Wed, 5 Sep 2018 11:12:20 +0200 Subject: [PATCH 17/36] Update to 3.1.2; enable PETSC support. --- .gitignore | 1 + sources | 2 +- sundials.spec | 189 +++++++++++++++++++++++++++----------------------- 3 files changed, 103 insertions(+), 89 deletions(-) diff --git a/.gitignore b/.gitignore index 76bdc66..ba17595 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ sundials-2.3.0.tar.gz /sundials-3.0.0.tar.gz /sundials-3.1.0.tar.gz /sundials-3.1.1.tar.gz +/sundials-3.1.2.tar.gz diff --git a/sources b/sources index 3edc675..a25a78d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (sundials-3.1.1.tar.gz) = 3e8fc7183c5503943f1ba00c73b04c1614a48b6e6cb90559ec5481f9acffaa19acd97bd961611b251ebdc032f1a13f0919b0ab0cdfe9d9b4ddc99d40bef5719f +SHA512 (sundials-3.1.2.tar.gz) = b65989998b440b2b5c5d000f4b86d8bcbf03215fcee4e348cd4b8ff935ea3471a3593ab8bd0e7d5f8ba519b5a1285cc93d41ec622d0b51592d7593c7579af082 diff --git a/sundials.spec b/sundials.spec index e1dea61..507071f 100644 --- a/sundials.spec +++ b/sundials.spec @@ -43,17 +43,35 @@ %global with_hypre 1 +## PETSc ## +%if 0%{?fedora} && 0%{?fedora} < 29 +## Exclude MPI builds on s390x +%ifarch s390x +%global with_petsc 0 +%endif +%ifnarch s390x +%global with_petsc 1 +%endif +%endif + +%if 0%{?fedora} && 0%{?fedora} >= 29 +%global with_petsc 1 +%endif +%if 0%{?rhel} && 0%{?rhel} >= 7 +%global with_petsc 1 +%endif +########### + %global with_parcheck 1 %global with_sercheck 1 Summary: Suite of nonlinear solvers Name: sundials -Version: 3.1.1 -Release: 3%{?dist} +Version: 3.1.2 +Release: 1%{?dist} # SUNDIALS is licensed under BSD with some additional (but unrestrictive) clauses. # Check the file 'LICENSE' for details. License: BSD -Group: Development/Libraries URL: http://www.llnl.gov/casc/sundials/ Source0: https://computation.llnl.gov/projects/sundials/download/sundials-%{version}.tar.gz @@ -74,12 +92,7 @@ BuildRequires: cmake %global cmake3 %cmake %global ctest3 ctest %endif -%ifarch %{openblas_arches} BuildRequires: openblas-devel, openblas-srpm-macros -%else -BuildRequires: blas-devel, lapack-devel -%endif - %ifarch s390x x86_64 BuildRequires: SuperLUMT64-devel %endif @@ -105,7 +118,6 @@ preconditioners. %package devel Summary: Suite of nonlinear solvers (developer files) -Group: Development/Libraries Requires: %{name}%{?_isa} = %{version}-%{release} %description devel SUNDIALS is a SUite of Non-linear DIfferential/ALgebraic equation Solvers @@ -116,7 +128,6 @@ This package contains the developer files (.so file, header files). %if 0%{?with_openmpi} %package openmpi Summary: Suite of nonlinear solvers -Group: Development/Libraries BuildRequires: openmpi-devel %if 0%{?rhel} || 0%{?fedora} > 28 BuildRequires: hypre-openmpi-devel @@ -125,8 +136,11 @@ BuildRequires: hypre-openmpi-devel BuildRequires: hypre-openmpi-devel %endif %endif +%if 0%{?with_petsc} +BuildRequires: petsc-openmpi-devel +%endif -Requires: openmpi +Requires: openmpi%{?_isa} Requires: gcc-gfortran%{?_isa} Obsoletes: %{name}-openmpi-samples%{?_isa} < 3.1.1-2 @@ -137,7 +151,6 @@ This package contains the Sundials Fortran parallel OpenMPI libraries. %package openmpi-devel Summary: Suite of nonlinear solvers -Group: Development/Libraries Requires: %{name}-openmpi%{?_isa} = %{version}-%{release} %description openmpi-devel SUNDIALS is a SUite of Non-linear DIfferential/ALgebraic equation Solvers @@ -151,7 +164,6 @@ header files. %if 0%{?with_mpich} %package mpich Summary: Suite of nonlinear solvers -Group: Development/Libraries BuildRequires: mpich-devel %if 0%{?rhel} || 0%{?fedora} > 28 BuildRequires: hypre-mpich-devel @@ -160,7 +172,10 @@ BuildRequires: hypre-mpich-devel BuildRequires: hypre-mpich-devel %endif %endif -Requires: mpich +%if 0%{?with_petsc} +BuildRequires: petsc-mpich-devel +%endif +Requires: mpich%{?_isa} Requires: gcc-gfortran%{?_isa} Obsoletes: %{name}-mpich-samples%{?_isa} < 3.1.1-2 @@ -171,7 +186,6 @@ This package contains the Sundials parallel MPICH libraries. %package mpich-devel Summary: Suite of nonlinear solvers -Group: Development/Libraries Requires: %{name}-mpich%{?_isa} = %{version}-%{release} %description mpich-devel SUNDIALS is a SUite of Non-linear DIfferential/ALgebraic equation Solvers @@ -184,7 +198,6 @@ header files. %package doc Summary: Suite of nonlinear solvers (documentation) -Group: Documentation BuildArch: noarch %description doc SUNDIALS is a SUite of Non-linear DIfferential/ALgebraic equation Solvers @@ -240,9 +253,6 @@ mv src/cvodes/README src/README-cvodes mv src/ida/README src/README-ida mv src/idas/README src/README.idas mv src/kinsol/README src/README-kinsol -mv src/nvec_ser/README src/README-nvec_ser -mv src/nvec_par/README src/README-nvec_par -mv src/nvec_pthreads/README src/README-nvec_pthreads popd %if 0%{?with_openmpi} @@ -254,21 +264,12 @@ cp -a sundials-%{version} buildmpich_dir %build pushd sundials-%{version} -# LAPACK is not compatible with INT64_T integers + mkdir -p build && cd build -%ifarch %{openblas_arches} export LIBBLASLINK=-lopenblas export LIBBLAS=libopenblas -export LIBLAPACKLINK= export INCBLAS=-I%{_includedir}/openblas -%else -export LIBBLASLINK=-lblas -export LIBBLAS=libblas -export LIBLAPACKLINK=-llapack -export LIBLAPACK=liblapack -export INCBLAS=-I%{_includedir} -%endif %ifarch s390x x86_64 export LIBSUPERLUMTLINK=-lsuperlumt64_d @@ -285,9 +286,9 @@ export CFLAGS="" cmake \ -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ -DCMAKE_BUILD_TYPE:STRING=Debug \ - -DCMAKE_C_FLAGS_DEBUG:STRING="-O0 -g -Wl,-z,relro -Wl,-z,now -Wl,--as-needed" \ - -DCMAKE_Fortran_FLAGS_DEBUG:STRING="-O0 -g -Wl,-z,relro -Wl,-z,now -Wl,--as-needed" \ - -DCMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING="%{__global_ldflags} -Wl,-z,now -Wl,--as-needed -lklu $LIBBLASLINK $LIBLAPACKLINK $LIBSUPERLUMTLINK" \ + -DCMAKE_C_FLAGS_DEBUG:STRING="-O0 -g -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -I$INCBLAS" \ + -DCMAKE_Fortran_FLAGS_DEBUG:STRING="-O0 -g -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -I$INCBLAS" \ + -DCMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING="%{__global_ldflags} -Wl,-z,now -Wl,--as-needed -lklu $LIBBLASLINK $LIBSUPERLUMTLINK" \ %else %{cmake3} \ %if %{?__isa_bits:%{__isa_bits}}%{!?__isa_bits:32} == 64 @@ -297,20 +298,13 @@ cmake \ %endif -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ -DCMAKE_BUILD_TYPE:STRING=Release \ - -DCMAKE_C_FLAGS_RELEASE:STRING="%{optflags} -Wl,-z,relro -Wl,-z,now -Wl,--as-needed" \ - -DCMAKE_Fortran_FLAGS_RELEASE:STRING="%{optflags} -Wl,-z,relro -Wl,-z,now -Wl,--as-needed" \ - -DCMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING="%{__global_ldflags} -Wl,-z,now -Wl,--as-needed -lklu $LIBBLASLINK $LIBLAPACKLINK $LIBSUPERLUMTLINK" \ + -DCMAKE_C_FLAGS_RELEASE:STRING="%{optflags} -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -I$INCBLAS" \ + -DCMAKE_Fortran_FLAGS_RELEASE:STRING="%{optflags} -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -I$INCBLAS" \ + -DCMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING="%{__global_ldflags} -Wl,-z,now -Wl,--as-needed -lklu $LIBBLASLINK $LIBSUPERLUMTLINK" \ %endif -%ifnarch %{power64} aarch64 s390x -DLAPACK_ENABLE:BOOL=OFF \ -DBLAS_ENABLE:BOOL=ON \ -DBLAS_LIBRARIES:STRING=%{_libdir}/$LIBBLAS.so \ -%else - -DLAPACK_ENABLE:BOOL=ON \ - -DBLAS_ENABLE:BOOL=ON \ - -DBLAS_LIBRARIES:STRING=%{_libdir}/$LIBBLAS.so \ - -DLAPACK_LIBRARIES:STRING=%{_libdir}/$LIBLAPACK.so \ -%endif -DCMAKE_MODULE_LINKER_FLAGS:STRING="%{__global_ldflags} -Wl,-z,now -Wl,--as-needed" \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DPYTHON_EXECUTABLE:FILEPATH=%{__python2} \ @@ -347,6 +341,10 @@ sed -i 's|TARGETS sundials_nvecparallel_shared DESTINATION lib|TARGETS sundials_ sed -i 's|DESTINATION include/nvector|DESTINATION %{_includedir}/openmpi-%{_arch}/nvector|g' src/nvec_par/CMakeLists.txt sed -i 's|TARGETS sundials_fnvecparallel_shared DESTINATION lib|TARGETS sundials_fnvecparallel_shared DESTINATION %{_libdir}/openmpi/lib|g' src/nvec_par/CMakeLists.txt sed -i 's|TARGETS sundials_nvecparhyp_shared DESTINATION lib|TARGETS sundials_nvecparhyp_shared DESTINATION %{_libdir}/openmpi/lib|g' src/nvec_parhyp/CMakeLists.txt +%if 0%{?with_petsc} +sed -i 's|TARGETS sundials_nvecpetsc_shared DESTINATION lib|TARGETS sundials_nvecpetsc_shared DESTINATION %{_libdir}/openmpi/lib|g' src/nvec_petsc/CMakeLists.txt +sed -i 's|DESTINATION include/nvector|DESTINATION %{_includedir}/openmpi-%{_arch}/nvector|g' src/nvec_petsc/CMakeLists.txt +%endif mkdir -p build && cd build %{_openmpi_load} @@ -355,18 +353,9 @@ export CXX=mpicxx export FC=mpif77 ## Blas -%ifarch %{openblas_arches} export LIBBLASLINK=-lopenblas export LIBBLAS=libopenblas -export LIBLAPACKLINK= export INCBLAS=-I%{_includedir}/openblas -%else -export LIBBLASLINK=-lblas -export LIBBLAS=libblas -export LIBLAPACKLINK=-llapack -export LIBLAPACK=liblapack -export INCBLAS=-I%{_includedir} -%endif ## ## SuperLUMT %ifarch s390x x86_64 @@ -401,9 +390,9 @@ export CFLAGS="" cmake \ -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ -DCMAKE_BUILD_TYPE:STRING=Debug \ - -DCMAKE_C_FLAGS_DEBUG:STRING="-O0 -g -Wl,-z,relro -Wl,-z,now -Wl,--as-needed" \ - -DCMAKE_Fortran_FLAGS_DEBUG:STRING="-O0 -g -Wl,-z,relro -Wl,-z,now -Wl,--as-needed" \ - -DCMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING="%{__global_ldflags} -Wl,-z,now -Wl,--as-needed -lklu $LIBLAPACKLINK $LIBBLASLINK $LIBSUPERLUMTLINK $LIBHYPRELINK" \ + -DCMAKE_C_FLAGS_DEBUG:STRING="-O0 -g -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -I$INCBLAS" \ + -DCMAKE_Fortran_FLAGS_DEBUG:STRING="-O0 -g -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -I$INCBLAS" \ + -DCMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING="%{__global_ldflags} -Wl,-z,now -Wl,--as-needed -lklu $LIBBLASLINK $LIBSUPERLUMTLINK $LIBHYPRELINK" \ %else %{cmake3} \ %if %{?__isa_bits:%{__isa_bits}}%{!?__isa_bits:32} == 64 @@ -413,19 +402,17 @@ cmake \ %endif -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ -DCMAKE_BUILD_TYPE:STRING=Release \ - -DCMAKE_C_FLAGS_RELEASE:STRING="%{optflags} -Wl,-z,relro -Wl,-z,now -Wl,--as-needed" \ - -DCMAKE_Fortran_FLAGS_RELEASE:STRING="%{optflags} -Wl,-z,relro -Wl,-z,now -Wl,--as-needed" \ - -DCMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING="%{__global_ldflags} -Wl,-z,now -Wl,--as-needed -lklu $LIBLAPACKLINK $LIBBLASLINK $LIBSUPERLUMTLINK $LIBHYPRELINK" \ + -DCMAKE_C_FLAGS_RELEASE:STRING="%{optflags} -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -I$INCBLAS" \ + -DCMAKE_Fortran_FLAGS_RELEASE:STRING="%{optflags} -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -I$INCBLAS" \ + -DCMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING="%{__global_ldflags} -Wl,-z,now -Wl,--as-needed -lklu $LIBBLASLINK $LIBSUPERLUMTLINK $LIBHYPRELINK" \ %endif -%ifnarch %{power64} aarch64 s390x -DLAPACK_ENABLE:BOOL=OFF \ -DBLAS_ENABLE:BOOL=ON \ -DBLAS_LIBRARIES:STRING=%{_libdir}/$LIBBLAS.so \ -%else - -DLAPACK_ENABLE:BOOL=ON \ - -DBLAS_ENABLE:BOOL=ON \ - -DBLAS_LIBRARIES:STRING=%{_libdir}/$LIBBLAS.so \ - -DLAPACK_LIBRARIES:STRING=%{_libdir}/$LIBLAPACK.so \ +%if 0%{?with_petsc} + -DPETSC_ENABLE:BOOL=ON \ + -DPETSC_INCLUDE_DIR:PATH=$MPI_INCLUDE/petsc \ + -DPETSC_LIBRARY_DIR:PATH=$MPI_LIB \ %endif -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DPYTHON_EXECUTABLE:FILEPATH=%{__python2} \ @@ -481,6 +468,10 @@ sed -i 's|TARGETS sundials_nvecparallel_shared DESTINATION lib|TARGETS sundials_ sed -i 's|DESTINATION include/nvector|DESTINATION %{_includedir}/mpich-%{_arch}/nvector|g' src/nvec_par/CMakeLists.txt sed -i 's|TARGETS sundials_fnvecparallel_shared DESTINATION lib|TARGETS sundials_fnvecparallel_shared DESTINATION %{_libdir}/mpich/lib|g' src/nvec_par/CMakeLists.txt sed -i 's|TARGETS sundials_nvecparhyp_shared DESTINATION lib|TARGETS sundials_nvecparhyp_shared DESTINATION %{_libdir}/mpich/lib|g' src/nvec_parhyp/CMakeLists.txt +%if 0%{?with_petsc} +sed -i 's|TARGETS sundials_nvecpetsc_shared DESTINATION lib|TARGETS sundials_nvecpetsc_shared DESTINATION %{_libdir}/mpich/lib|g' src/nvec_petsc/CMakeLists.txt +sed -i 's|DESTINATION include/nvector|DESTINATION %{_includedir}/mpich-%{_arch}/nvector|g' src/nvec_petsc/CMakeLists.txt +%endif mkdir -p build && cd build %{_mpich_load} @@ -497,18 +488,9 @@ export F77=mpifort export FC=mpifort %endif ## Blas -%ifarch %{openblas_arches} export LIBBLASLINK=-lopenblas export LIBBLAS=libopenblas -export LIBLAPACKLINK= export INCBLAS=-I%{_includedir}/openblas -%else -export LIBBLASLINK=-lblas -export LIBBLAS=libblas -export LIBLAPACKLINK=-llapack -export LIBLAPACK=liblapack -export INCBLAS=-I%{_includedir} -%endif ## ## SuperLUMT %ifarch s390x x86_64 @@ -543,9 +525,9 @@ export CFLAGS="" cmake \ -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ -DCMAKE_BUILD_TYPE:STRING=Debug \ - -DCMAKE_C_FLAGS_DEBUG:STRING="-O0 -g -Wl,-z,relro -Wl,-z,now -Wl,--as-needed" \ - -DCMAKE_Fortran_FLAGS_DEBUG:STRING="-O0 -g -Wl,-z,relro -Wl,-z,now -Wl,--as-needed" \ - -DCMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING="%{__global_ldflags} -Wl,-z,now -Wl,--as-needed -lklu $LIBLAPACKLINK $LIBBLASLINK $LIBSUPERLUMTLINK $LIBHYPRELINK" \ + -DCMAKE_C_FLAGS_DEBUG:STRING="-O0 -g -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -I$INCBLAS" \ + -DCMAKE_Fortran_FLAGS_DEBUG:STRING="-O0 -g -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -I$INCBLAS" \ + -DCMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING="%{__global_ldflags} -Wl,-z,now -Wl,--as-needed -lklu $LIBBLASLINK $LIBSUPERLUMTLINK $LIBHYPRELINK" \ %else %{cmake3} \ %if %{?__isa_bits:%{__isa_bits}}%{!?__isa_bits:32} == 64 @@ -555,19 +537,17 @@ cmake \ %endif -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ -DCMAKE_BUILD_TYPE:STRING=Release \ - -DCMAKE_C_FLAGS_RELEASE:STRING="%{optflags} -Wl,-z,relro -Wl,-z,now -Wl,--as-needed" \ - -DCMAKE_Fortran_FLAGS_RELEASE:STRING="%{optflags} -Wl,-z,relro -Wl,-z,now -Wl,--as-needed" \ - -DCMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING="%{__global_ldflags} -Wl,-z,now -Wl,--as-needed -lklu $LIBLAPACKLINK $LIBBLASLINK $LIBSUPERLUMTLINK $LIBHYPRELINK" \ + -DCMAKE_C_FLAGS_RELEASE:STRING="%{optflags} -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -I$INCBLAS" \ + -DCMAKE_Fortran_FLAGS_RELEASE:STRING="%{optflags} -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -I$INCBLAS" \ + -DCMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING="%{__global_ldflags} -Wl,-z,now -Wl,--as-needed -lklu $LIBBLASLINK $LIBSUPERLUMTLINK $LIBHYPRELINK" \ %endif -%ifnarch %{power64} aarch64 s390x -DLAPACK_ENABLE:BOOL=OFF \ -DBLAS_ENABLE:BOOL=ON \ -DBLAS_LIBRARIES:STRING=%{_libdir}/$LIBBLAS.so \ -%else - -DLAPACK_ENABLE:BOOL=ON \ - -DBLAS_ENABLE:BOOL=ON \ - -DBLAS_LIBRARIES:STRING=%{_libdir}/$LIBBLAS.so \ - -DLAPACK_LIBRARIES:STRING=%{_libdir}/$LIBLAPACK.so \ +%if 0%{?with_petsc} + -DPETSC_ENABLE:BOOL=ON \ + -DPETSC_INCLUDE_DIR:PATH=$MPI_INCLUDE/petsc \ + -DPETSC_LIBRARY_DIR:PATH=$MPI_LIB \ %endif -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DPYTHON_EXECUTABLE:FILEPATH=%{__python2} \ @@ -640,8 +620,9 @@ popd # Remove static libraries rm -f %{buildroot}%{_libdir}/*.a -# Remove file in a bad position +# Remove files in bad position rm -f %{buildroot}%{_prefix}/LICENSE +rm -f %{buildroot}%{_includedir}/sundials/LICENSE %ldconfig_scriptlets @@ -651,7 +632,11 @@ rm -f %{buildroot}%{_prefix}/LICENSE %{_openmpi_load} pushd buildopenmpi_dir/build export LD_LIBRARY_PATH=%{buildroot}$MPI_LIB:%{buildroot}%{_libdir} -%ctest3 --force-new-ctest-process -VV +%ifarch %{power64} %{arm} aarch64 s390x +%ctest3 --force-new-ctest-process -VV -j 1 --output-on-failure -E 'test_sunmatrix_sparse_400_400_0_0' +%else +%ctest3 --force-new-ctest-process -VV -j 1 --output-on-failure +%endif popd %{_openmpi_unload} %endif ##if openmpi @@ -660,7 +645,11 @@ popd %{_mpich_load} pushd buildmpich_dir/build export LD_LIBRARY_PATH=%{buildroot}$MPI_LIB:%{buildroot}%{_libdir} -%ctest3 --force-new-ctest-process -VV +%ifarch %{power64} %{arm} aarch64 s390x +%ctest3 --force-new-ctest-process -VV -j 1 --output-on-failure -E 'test_sunmatrix_sparse_400_400_0_0' +%else +%ctest3 --force-new-ctest-process -VV -j 1 --output-on-failure +%endif popd %{_mpich_unload} %endif ##if openmpi @@ -669,7 +658,11 @@ popd %if 0%{?with_sercheck} pushd sundials-%{version}/build export LD_LIBRARY_PATH=%{buildroot}%{_libdir} -%ctest3 --force-new-ctest-process -VV +%ifarch %{power64} %{arm} aarch64 s390x +%ctest3 --force-new-ctest-process -VV -j 1 --output-on-failure -E 'test_sunmatrix_sparse_400_400_0_0' +%else +%ctest3 --force-new-ctest-process -VV -j 1 --output-on-failure +%endif popd %endif ##if with_sercheck @@ -736,6 +729,9 @@ popd %doc sundials-%{version}/README.md sundials-%{version}/src/README-* %{_libdir}/openmpi/lib/libsundials_nvecparallel.so.* %{_libdir}/openmpi/lib/libsundials_fnvecparallel.so.* +%if 0%{?with_petsc} +%{_libdir}/openmpi/lib/libsundials_nvecpetsc.so.* +%endif %if 0%{?rhel} || 0%{?fedora} > 28 %{_libdir}/openmpi/lib/libsundials_nvecparhyp.so.* %else @@ -745,9 +741,14 @@ popd %endif %files openmpi-devel +%dir %{_includedir}/openmpi-%{_arch}/nvector %{_includedir}/openmpi-%{_arch}/nvector/nvector_parallel.h %{_libdir}/openmpi/lib/libsundials_nvecparallel.so %{_libdir}/openmpi/lib/libsundials_fnvecparallel.so +%if 0%{?with_petsc} +%{_libdir}/openmpi/lib/libsundials_nvecpetsc.so +%{_includedir}/openmpi-%{_arch}/nvector/nvector_petsc.h +%endif %if 0%{?rhel} || 0%{?fedora} > 28 %{_libdir}/openmpi/lib/libsundials_nvecparhyp.so %else @@ -763,6 +764,9 @@ popd %doc sundials-%{version}/README.md sundials-%{version}/src/README-* %{_libdir}/mpich/lib/libsundials_nvecparallel.so.* %{_libdir}/mpich/lib/libsundials_fnvecparallel.so.* +%if 0%{?with_petsc} +%{_libdir}/mpich/lib/libsundials_nvecpetsc.so.* +%endif %if 0%{?rhel} || 0%{?fedora} > 28 %{_libdir}/mpich/lib/libsundials_nvecparhyp.so.* %else @@ -772,9 +776,14 @@ popd %endif %files mpich-devel +%dir %{_includedir}/mpich-%{_arch}/nvector %{_includedir}/mpich-%{_arch}/nvector/nvector_parallel.h %{_libdir}/mpich/lib/libsundials_nvecparallel.so %{_libdir}/mpich/lib/libsundials_fnvecparallel.so +%if 0%{?with_petsc} +%{_libdir}/mpich/lib/libsundials_nvecpetsc.so +%{_includedir}/mpich-%{_arch}/nvector/nvector_petsc.h +%endif %if 0%{?rhel} || 0%{?fedora} > 28 %{_libdir}/mpich/lib/libsundials_nvecparhyp.so %else @@ -785,6 +794,10 @@ popd %endif %changelog +* Wed Aug 01 2018 Antonio Trande - 3.1.2-1 +- Update to 3.1.2 +- Enable PETSC support + * Sat Jul 14 2018 Fedora Release Engineering - 3.1.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild From 6380cb5008e4301379cef7e9feda9e45bf99455b Mon Sep 17 00:00:00 2001 From: sagitter Date: Wed, 5 Sep 2018 11:29:51 +0200 Subject: [PATCH 18/36] Exclude test_nvector_mpi_4 on s390x --- sundials.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sundials.spec b/sundials.spec index 507071f..36cb766 100644 --- a/sundials.spec +++ b/sundials.spec @@ -633,7 +633,7 @@ rm -f %{buildroot}%{_includedir}/sundials/LICENSE pushd buildopenmpi_dir/build export LD_LIBRARY_PATH=%{buildroot}$MPI_LIB:%{buildroot}%{_libdir} %ifarch %{power64} %{arm} aarch64 s390x -%ctest3 --force-new-ctest-process -VV -j 1 --output-on-failure -E 'test_sunmatrix_sparse_400_400_0_0' +%ctest3 --force-new-ctest-process -VV -j 1 --output-on-failure -E 'test_sunmatrix_sparse_400_400_0_0|test_nvector_mpi_4' %else %ctest3 --force-new-ctest-process -VV -j 1 --output-on-failure %endif @@ -646,7 +646,7 @@ popd pushd buildmpich_dir/build export LD_LIBRARY_PATH=%{buildroot}$MPI_LIB:%{buildroot}%{_libdir} %ifarch %{power64} %{arm} aarch64 s390x -%ctest3 --force-new-ctest-process -VV -j 1 --output-on-failure -E 'test_sunmatrix_sparse_400_400_0_0' +%ctest3 --force-new-ctest-process -VV -j 1 --output-on-failure -E 'test_sunmatrix_sparse_400_400_0_0|test_nvector_mpi_4' %else %ctest3 --force-new-ctest-process -VV -j 1 --output-on-failure %endif From 820cbdfa3401770bf111f9ef63c8c86cc707c88a Mon Sep 17 00:00:00 2001 From: sagitter Date: Wed, 5 Sep 2018 11:42:53 +0200 Subject: [PATCH 19/36] Switch to python3 --- sundials.spec | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/sundials.spec b/sundials.spec index 36cb766..449125e 100644 --- a/sundials.spec +++ b/sundials.spec @@ -68,7 +68,7 @@ Summary: Suite of nonlinear solvers Name: sundials Version: 3.1.2 -Release: 1%{?dist} +Release: 2%{?dist} # SUNDIALS is licensed under BSD with some additional (but unrestrictive) clauses. # Check the file 'LICENSE' for details. License: BSD @@ -81,7 +81,7 @@ Patch0: %{name}-3.1.1-set_superlumt_name.patch # This patch rename superLUMT64 library Patch1: %{name}-3.1.1-set_superlumt64_name.patch -BuildRequires: gcc-gfortran, python2-devel +BuildRequires: gcc-gfortran, python3-devel BuildRequires: gcc, gcc-c++ BuildRequires: suitesparse-devel %if 0%{?rhel} @@ -307,7 +307,7 @@ cmake \ -DBLAS_LIBRARIES:STRING=%{_libdir}/$LIBBLAS.so \ -DCMAKE_MODULE_LINKER_FLAGS:STRING="%{__global_ldflags} -Wl,-z,now -Wl,--as-needed" \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \ - -DPYTHON_EXECUTABLE:FILEPATH=%{__python2} \ + -DPYTHON_EXECUTABLE:FILEPATH=%{__python3} \ -DEXAMPLES_ENABLE_CXX:BOOL=ON -DEXAMPLES_ENABLE_C:BOOL=ON -DEXAMPLES_ENABLE_F77:BOOL=ON \ -DCMAKE_SKIP_RPATH:BOOL=YES -DCMAKE_SKIP_INSTALL_RPATH:BOOL=YES \ -DBUILD_SHARED_LIBS:BOOL=ON -DBUILD_STATIC_LIBS:BOOL=OFF \ @@ -415,7 +415,7 @@ cmake \ -DPETSC_LIBRARY_DIR:PATH=$MPI_LIB \ %endif -DCMAKE_INSTALL_PREFIX=%{_prefix} \ - -DPYTHON_EXECUTABLE:FILEPATH=%{__python2} \ + -DPYTHON_EXECUTABLE:FILEPATH=%{__python3} \ -DEXAMPLES_ENABLE_CXX:BOOL=ON -DEXAMPLES_ENABLE_C:BOOL=ON -DEXAMPLES_ENABLE_F77:BOOL=ON \ -DBUILD_SHARED_LIBS:BOOL=ON -DBUILD_STATIC_LIBS:BOOL=OFF \ -DCMAKE_SKIP_RPATH:BOOL=YES -DCMAKE_SKIP_INSTALL_RPATH:BOOL=YES \ @@ -550,7 +550,7 @@ cmake \ -DPETSC_LIBRARY_DIR:PATH=$MPI_LIB \ %endif -DCMAKE_INSTALL_PREFIX=%{_prefix} \ - -DPYTHON_EXECUTABLE:FILEPATH=%{__python2} \ + -DPYTHON_EXECUTABLE:FILEPATH=%{__python3} \ -DEXAMPLES_ENABLE_CXX:BOOL=ON -DEXAMPLES_ENABLE_C:BOOL=ON -DEXAMPLES_ENABLE_F77:BOOL=ON \ -DBUILD_SHARED_LIBS:BOOL=ON -DBUILD_STATIC_LIBS:BOOL=OFF \ -DCMAKE_SKIP_RPATH:BOOL=YES -DCMAKE_SKIP_INSTALL_RPATH:BOOL=YES \ @@ -794,6 +794,9 @@ popd %endif %changelog +* Wed Sep 05 2018 Antonio Trande - 3.1.2-2 +- Switch to python3 + * Wed Aug 01 2018 Antonio Trande - 3.1.2-1 - Update to 3.1.2 - Enable PETSC support From 1cf85289ff9b18f39b0b5700851ed78be93ce9aa Mon Sep 17 00:00:00 2001 From: sagitter Date: Wed, 5 Sep 2018 11:56:43 +0200 Subject: [PATCH 20/36] Switch back to python2 --- sundials.spec | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/sundials.spec b/sundials.spec index 449125e..d59cde7 100644 --- a/sundials.spec +++ b/sundials.spec @@ -81,7 +81,9 @@ Patch0: %{name}-3.1.1-set_superlumt_name.patch # This patch rename superLUMT64 library Patch1: %{name}-3.1.1-set_superlumt64_name.patch -BuildRequires: gcc-gfortran, python3-devel +BuildRequires: gcc-gfortran +# Tests work under python2 only +BuildRequires: python2-devel BuildRequires: gcc, gcc-c++ BuildRequires: suitesparse-devel %if 0%{?rhel} @@ -307,7 +309,7 @@ cmake \ -DBLAS_LIBRARIES:STRING=%{_libdir}/$LIBBLAS.so \ -DCMAKE_MODULE_LINKER_FLAGS:STRING="%{__global_ldflags} -Wl,-z,now -Wl,--as-needed" \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \ - -DPYTHON_EXECUTABLE:FILEPATH=%{__python3} \ + -DPYTHON_EXECUTABLE:FILEPATH=%{__python2} \ -DEXAMPLES_ENABLE_CXX:BOOL=ON -DEXAMPLES_ENABLE_C:BOOL=ON -DEXAMPLES_ENABLE_F77:BOOL=ON \ -DCMAKE_SKIP_RPATH:BOOL=YES -DCMAKE_SKIP_INSTALL_RPATH:BOOL=YES \ -DBUILD_SHARED_LIBS:BOOL=ON -DBUILD_STATIC_LIBS:BOOL=OFF \ @@ -415,7 +417,7 @@ cmake \ -DPETSC_LIBRARY_DIR:PATH=$MPI_LIB \ %endif -DCMAKE_INSTALL_PREFIX=%{_prefix} \ - -DPYTHON_EXECUTABLE:FILEPATH=%{__python3} \ + -DPYTHON_EXECUTABLE:FILEPATH=%{__python2} \ -DEXAMPLES_ENABLE_CXX:BOOL=ON -DEXAMPLES_ENABLE_C:BOOL=ON -DEXAMPLES_ENABLE_F77:BOOL=ON \ -DBUILD_SHARED_LIBS:BOOL=ON -DBUILD_STATIC_LIBS:BOOL=OFF \ -DCMAKE_SKIP_RPATH:BOOL=YES -DCMAKE_SKIP_INSTALL_RPATH:BOOL=YES \ @@ -550,7 +552,7 @@ cmake \ -DPETSC_LIBRARY_DIR:PATH=$MPI_LIB \ %endif -DCMAKE_INSTALL_PREFIX=%{_prefix} \ - -DPYTHON_EXECUTABLE:FILEPATH=%{__python3} \ + -DPYTHON_EXECUTABLE:FILEPATH=%{__python2} \ -DEXAMPLES_ENABLE_CXX:BOOL=ON -DEXAMPLES_ENABLE_C:BOOL=ON -DEXAMPLES_ENABLE_F77:BOOL=ON \ -DBUILD_SHARED_LIBS:BOOL=ON -DBUILD_STATIC_LIBS:BOOL=OFF \ -DCMAKE_SKIP_RPATH:BOOL=YES -DCMAKE_SKIP_INSTALL_RPATH:BOOL=YES \ @@ -795,7 +797,7 @@ popd %changelog * Wed Sep 05 2018 Antonio Trande - 3.1.2-2 -- Switch to python3 +- Forced to use python2 (tests work under python2 only) * Wed Aug 01 2018 Antonio Trande - 3.1.2-1 - Update to 3.1.2 From 30a3228171d39902e28488599feb98060882ab64 Mon Sep 17 00:00:00 2001 From: sagitter Date: Mon, 15 Oct 2018 19:01:28 +0200 Subject: [PATCH 21/36] Update to 3.2.0 --- .gitignore | 1 + sources | 2 +- sundials.spec | 106 +++++++++++++++++++++----------------------------- 3 files changed, 46 insertions(+), 63 deletions(-) diff --git a/.gitignore b/.gitignore index ba17595..5a827e6 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ sundials-2.3.0.tar.gz /sundials-3.1.0.tar.gz /sundials-3.1.1.tar.gz /sundials-3.1.2.tar.gz +/sundials-3.2.0.tar.gz diff --git a/sources b/sources index a25a78d..4574d64 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (sundials-3.1.2.tar.gz) = b65989998b440b2b5c5d000f4b86d8bcbf03215fcee4e348cd4b8ff935ea3471a3593ab8bd0e7d5f8ba519b5a1285cc93d41ec622d0b51592d7593c7579af082 +SHA512 (sundials-3.2.0.tar.gz) = e57bf0c384ac2bf9f5c547c4b22d1a409f149d1d8afabbcb29d19e7fad1427f34f96c09eb990604cde7f2748b3b7307e867c331aece089cb9b155dc4ebabbdab diff --git a/sundials.spec b/sundials.spec index d59cde7..e4ef176 100644 --- a/sundials.spec +++ b/sundials.spec @@ -6,19 +6,7 @@ %{!?__global_ldflags: %global __global_ldflags -Wl,-z,relro} %endif -## Define if use openmpi or not -%if 0%{?fedora} < 28 -## Exclude MPI builds on s390x -%ifarch s390x -%global with_mpich 0 -%global with_openmpi 0 -%else -%global with_mpich 1 -%global with_openmpi 1 -%endif -%endif - -%if 0%{?fedora} >= 28 +%if 0%{?fedora} %global with_mpich 1 %global with_openmpi 1 %endif @@ -67,8 +55,8 @@ Summary: Suite of nonlinear solvers Name: sundials -Version: 3.1.2 -Release: 2%{?dist} +Version: 3.2.0 +Release: 1%{?dist} # SUNDIALS is licensed under BSD with some additional (but unrestrictive) clauses. # Check the file 'LICENSE' for details. License: BSD @@ -87,13 +75,9 @@ BuildRequires: python2-devel BuildRequires: gcc, gcc-c++ BuildRequires: suitesparse-devel %if 0%{?rhel} -BuildRequires: cmake3, epel-rpm-macros -%global ctest3 ctest3 -%else -BuildRequires: cmake -%global cmake3 %cmake -%global ctest3 ctest +BuildRequires: epel-rpm-macros %endif +BuildRequires: cmake3 BuildRequires: openblas-devel, openblas-srpm-macros %ifarch s390x x86_64 BuildRequires: SuperLUMT64-devel @@ -244,11 +228,6 @@ sed -i 's|TARGETS sundials_nvecserial_shared DESTINATION lib|TARGETS sundials_nv sed -i 's|DESTINATION include/nvector|DESTINATION %{_includedir}/nvector|g' src/nvec_ser/CMakeLists.txt sed -i 's|TARGETS sundials_fnvecserial_shared DESTINATION lib|TARGETS sundials_fnvecserial_shared DESTINATION %{_libdir}|g' src/nvec_ser/CMakeLists.txt -## mpif77 test fails -## Hardened flags break cmake's MPI Fortran compiler test -sed -i 's|set(MPIF_PERFORM_TEST TRUE)|set(MPIF_PERFORM_TEST FALSE)|g' config/SundialsMPIF.cmake -sed -i 's|set(MPIF_FOUND FALSE)|set(MPIF_FOUND TRUE)|g' config/SundialsMPIF.cmake - mv src/arkode/README src/README-arkode mv src/cvode/README src/README-cvode mv src/cvodes/README src/README-cvodes @@ -290,24 +269,24 @@ cmake \ -DCMAKE_BUILD_TYPE:STRING=Debug \ -DCMAKE_C_FLAGS_DEBUG:STRING="-O0 -g -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -I$INCBLAS" \ -DCMAKE_Fortran_FLAGS_DEBUG:STRING="-O0 -g -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -I$INCBLAS" \ - -DCMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING="%{__global_ldflags} -Wl,-z,now -Wl,--as-needed -lklu $LIBBLASLINK $LIBSUPERLUMTLINK" \ + -DCMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING="%{__global_ldflags} -lklu $LIBBLASLINK $LIBSUPERLUMTLINK" \ %else %{cmake3} \ %if %{?__isa_bits:%{__isa_bits}}%{!?__isa_bits:32} == 64 - -DSUNDIALS_INDEX_TYPE:STRING=int64_t \ + -DSUNDIALS_INDEX_SIZE:STRING=64 \ %else - -DSUNDIALS_INDEX_TYPE:STRING=int32_t \ + -DSUNDIALS_INDEX_SIZE:STRING=32 \ %endif -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ -DCMAKE_BUILD_TYPE:STRING=Release \ - -DCMAKE_C_FLAGS_RELEASE:STRING="%{optflags} -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -I$INCBLAS" \ - -DCMAKE_Fortran_FLAGS_RELEASE:STRING="%{optflags} -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -I$INCBLAS" \ - -DCMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING="%{__global_ldflags} -Wl,-z,now -Wl,--as-needed -lklu $LIBBLASLINK $LIBSUPERLUMTLINK" \ + -DCMAKE_C_FLAGS_RELEASE:STRING="%{optflags} -I$INCBLAS" \ + -DCMAKE_Fortran_FLAGS_RELEASE:STRING="%{optflags} -I$INCBLAS" \ + -DCMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING="%{__global_ldflags} -lklu $LIBBLASLINK $LIBSUPERLUMTLINK" \ %endif -DLAPACK_ENABLE:BOOL=OFF \ -DBLAS_ENABLE:BOOL=ON \ -DBLAS_LIBRARIES:STRING=%{_libdir}/$LIBBLAS.so \ - -DCMAKE_MODULE_LINKER_FLAGS:STRING="%{__global_ldflags} -Wl,-z,now -Wl,--as-needed" \ + -DCMAKE_MODULE_LINKER_FLAGS:STRING="%{__global_ldflags}" \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DPYTHON_EXECUTABLE:FILEPATH=%{__python2} \ -DEXAMPLES_ENABLE_CXX:BOOL=ON -DEXAMPLES_ENABLE_C:BOOL=ON -DEXAMPLES_ENABLE_F77:BOOL=ON \ @@ -394,19 +373,19 @@ cmake \ -DCMAKE_BUILD_TYPE:STRING=Debug \ -DCMAKE_C_FLAGS_DEBUG:STRING="-O0 -g -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -I$INCBLAS" \ -DCMAKE_Fortran_FLAGS_DEBUG:STRING="-O0 -g -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -I$INCBLAS" \ - -DCMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING="%{__global_ldflags} -Wl,-z,now -Wl,--as-needed -lklu $LIBBLASLINK $LIBSUPERLUMTLINK $LIBHYPRELINK" \ + -DCMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING="%{__global_ldflags} -lklu $LIBBLASLINK $LIBSUPERLUMTLINK $LIBHYPRELINK" \ %else %{cmake3} \ %if %{?__isa_bits:%{__isa_bits}}%{!?__isa_bits:32} == 64 - -DSUNDIALS_INDEX_TYPE:STRING=int64_t \ + -DSUNDIALS_INDEX_SIZE:STRING=64 \ %else - -DSUNDIALS_INDEX_TYPE:STRING=int32_t \ + -DSUNDIALS_INDEX_SIZE:STRING=32 \ %endif -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ -DCMAKE_BUILD_TYPE:STRING=Release \ - -DCMAKE_C_FLAGS_RELEASE:STRING="%{optflags} -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -I$INCBLAS" \ - -DCMAKE_Fortran_FLAGS_RELEASE:STRING="%{optflags} -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -I$INCBLAS" \ - -DCMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING="%{__global_ldflags} -Wl,-z,now -Wl,--as-needed -lklu $LIBBLASLINK $LIBSUPERLUMTLINK $LIBHYPRELINK" \ + -DCMAKE_C_FLAGS_RELEASE:STRING="%{optflags} -I$INCBLAS" \ + -DCMAKE_Fortran_FLAGS_RELEASE:STRING="%{optflags} -I$INCBLAS" \ + -DCMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING="%{__global_ldflags} -lklu $LIBBLASLINK $LIBSUPERLUMTLINK $LIBHYPRELINK" \ %endif -DLAPACK_ENABLE:BOOL=OFF \ -DBLAS_ENABLE:BOOL=ON \ @@ -422,13 +401,16 @@ cmake \ -DBUILD_SHARED_LIBS:BOOL=ON -DBUILD_STATIC_LIBS:BOOL=OFF \ -DCMAKE_SKIP_RPATH:BOOL=YES -DCMAKE_SKIP_INSTALL_RPATH:BOOL=YES \ -DMPI_ENABLE:BOOL=ON \ - -DMPI_MPICC:STRING=$MPI_BIN/mpicc \ - -DMPI_RUN_COMMAND=mpirun \ - -DMPI_MPIF77:STRING=$MPI_BIN/mpif77 \ + -DMPI_C_COMPILER:STRING=$MPI_BIN/mpicc \ + -DMPIEXEC_EXECUTABLE=$MPI_BIN/mpirun \ +%if 0%{?fedora} + -DMPI_Fortran_COMPILER:STRING=$MPI_BIN/mpifort \ +%else + -DMPI_Fortran_COMPILER:STRING=$MPI_BIN/mpif77 \ +%endif -DFCMIX_ENABLE:BOOL=ON \ -DUSE_GENERIC_MATH:BOOL=ON \ -DOPENMP_ENABLE:BOOL=ON \ - -DCMAKE_Fortran_COMPILER:STRING=$MPI_BIN/mpif77 \ -DPTHREAD_ENABLE:BOOL=ON \ %ifnarch %{power64} aarch64 -DSUPERLUMT_ENABLE:BOOL=ON \ @@ -529,19 +511,19 @@ cmake \ -DCMAKE_BUILD_TYPE:STRING=Debug \ -DCMAKE_C_FLAGS_DEBUG:STRING="-O0 -g -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -I$INCBLAS" \ -DCMAKE_Fortran_FLAGS_DEBUG:STRING="-O0 -g -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -I$INCBLAS" \ - -DCMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING="%{__global_ldflags} -Wl,-z,now -Wl,--as-needed -lklu $LIBBLASLINK $LIBSUPERLUMTLINK $LIBHYPRELINK" \ + -DCMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING="%{__global_ldflags} -lklu $LIBBLASLINK $LIBSUPERLUMTLINK $LIBHYPRELINK" \ %else %{cmake3} \ %if %{?__isa_bits:%{__isa_bits}}%{!?__isa_bits:32} == 64 - -DSUNDIALS_INDEX_TYPE:STRING=int64_t \ + -DSUNDIALS_INDEX_SIZE:STRING=64 \ %else - -DSUNDIALS_INDEX_TYPE:STRING=int32_t \ + -DSUNDIALS_INDEX_SIZE:STRING=32 \ %endif -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ -DCMAKE_BUILD_TYPE:STRING=Release \ - -DCMAKE_C_FLAGS_RELEASE:STRING="%{optflags} -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -I$INCBLAS" \ - -DCMAKE_Fortran_FLAGS_RELEASE:STRING="%{optflags} -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -I$INCBLAS" \ - -DCMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING="%{__global_ldflags} -Wl,-z,now -Wl,--as-needed -lklu $LIBBLASLINK $LIBSUPERLUMTLINK $LIBHYPRELINK" \ + -DCMAKE_C_FLAGS_RELEASE:STRING="%{optflags} -I$INCBLAS" \ + -DCMAKE_Fortran_FLAGS_RELEASE:STRING="%{optflags} -I$INCBLAS" \ + -DCMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING="%{__global_ldflags} -lklu $LIBBLASLINK $LIBSUPERLUMTLINK $LIBHYPRELINK" \ %endif -DLAPACK_ENABLE:BOOL=OFF \ -DBLAS_ENABLE:BOOL=ON \ @@ -557,19 +539,16 @@ cmake \ -DBUILD_SHARED_LIBS:BOOL=ON -DBUILD_STATIC_LIBS:BOOL=OFF \ -DCMAKE_SKIP_RPATH:BOOL=YES -DCMAKE_SKIP_INSTALL_RPATH:BOOL=YES \ -DMPI_ENABLE:BOOL=ON \ - -DMPI_MPICC:STRING=$MPI_BIN/mpicc \ - -DMPI_RUN_COMMAND=mpirun \ + -DMPI_C_COMPILER:STRING=$MPI_BIN/mpicc \ + -DMPIEXEC_EXECUTABLE=$MPI_BIN/mpirun \ %if 0%{?fedora} - -DMPI_MPIF77:STRING=$MPI_BIN/mpifort \ - -DMPI_MPIF90:STRING=$MPI_BIN/mpifort \ + -DMPI_Fortran_COMPILER:STRING=$MPI_BIN/mpifort \ %else - -DMPI_MPIF77:STRING=$MPI_BIN/mpif77 \ - -DMPI_MPIF90:STRING=$MPI_BIN/mpif90 \ + -DMPI_Fortran_COMPILER:STRING=$MPI_BIN/mpif77 \ %endif -DFCMIX_ENABLE:BOOL=ON \ -DUSE_GENERIC_MATH:BOOL=ON \ -DOPENMP_ENABLE:BOOL=ON \ - -DCMAKE_Fortran_COMPILER:STRING=$MPI_BIN/mpif77 \ -DPTHREAD_ENABLE:BOOL=ON \ %ifnarch %{power64} aarch64 -DSUPERLUMT_ENABLE:BOOL=ON \ @@ -635,9 +614,9 @@ rm -f %{buildroot}%{_includedir}/sundials/LICENSE pushd buildopenmpi_dir/build export LD_LIBRARY_PATH=%{buildroot}$MPI_LIB:%{buildroot}%{_libdir} %ifarch %{power64} %{arm} aarch64 s390x -%ctest3 --force-new-ctest-process -VV -j 1 --output-on-failure -E 'test_sunmatrix_sparse_400_400_0_0|test_nvector_mpi_4' +ctest3 --force-new-ctest-process -VV -j 1 --output-on-failure -E 'test_sunmatrix_sparse_400_400_0_0|test_nvector_mpi_4' %else -%ctest3 --force-new-ctest-process -VV -j 1 --output-on-failure +ctest3 --force-new-ctest-process -VV -j 1 --output-on-failure %endif popd %{_openmpi_unload} @@ -648,9 +627,9 @@ popd pushd buildmpich_dir/build export LD_LIBRARY_PATH=%{buildroot}$MPI_LIB:%{buildroot}%{_libdir} %ifarch %{power64} %{arm} aarch64 s390x -%ctest3 --force-new-ctest-process -VV -j 1 --output-on-failure -E 'test_sunmatrix_sparse_400_400_0_0|test_nvector_mpi_4' +ctest3 --force-new-ctest-process -VV -j 1 --output-on-failure -E 'test_sunmatrix_sparse_400_400_0_0|test_nvector_mpi_4' %else -%ctest3 --force-new-ctest-process -VV -j 1 --output-on-failure +ctest3 --force-new-ctest-process -VV -j 1 --output-on-failure %endif popd %{_mpich_unload} @@ -661,9 +640,9 @@ popd pushd sundials-%{version}/build export LD_LIBRARY_PATH=%{buildroot}%{_libdir} %ifarch %{power64} %{arm} aarch64 s390x -%ctest3 --force-new-ctest-process -VV -j 1 --output-on-failure -E 'test_sunmatrix_sparse_400_400_0_0' +ctest3 --force-new-ctest-process -VV -j 1 --output-on-failure -E 'test_sunmatrix_sparse_400_400_0_0' %else -%ctest3 --force-new-ctest-process -VV -j 1 --output-on-failure +ctest3 --force-new-ctest-process -VV -j 1 --output-on-failure %endif popd %endif ##if with_sercheck @@ -796,6 +775,9 @@ popd %endif %changelog +* Sat Oct 13 2018 Antonio Trande - 3.2.0-1 +- Update to 3.2.0 + * Wed Sep 05 2018 Antonio Trande - 3.1.2-2 - Forced to use python2 (tests work under python2 only) From 0ac4346a69387116e2478af156f1872e35399680 Mon Sep 17 00:00:00 2001 From: sagitter Date: Thu, 8 Nov 2018 19:54:18 +0100 Subject: [PATCH 22/36] Update to 3.2.1 --- .gitignore | 1 + sources | 2 +- sundials.spec | 298 +++++++++++++++++--------------------------------- 3 files changed, 103 insertions(+), 198 deletions(-) diff --git a/.gitignore b/.gitignore index 5a827e6..e453d8e 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ sundials-2.3.0.tar.gz /sundials-3.1.1.tar.gz /sundials-3.1.2.tar.gz /sundials-3.2.0.tar.gz +/sundials-3.2.1.tar.gz diff --git a/sources b/sources index 4574d64..1aba1b9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (sundials-3.2.0.tar.gz) = e57bf0c384ac2bf9f5c547c4b22d1a409f149d1d8afabbcb29d19e7fad1427f34f96c09eb990604cde7f2748b3b7307e867c331aece089cb9b155dc4ebabbdab +SHA512 (sundials-3.2.1.tar.gz) = 1f3e4b12f368e4f50c38b970c012f1702e339319ee0a858661bdf83e5739bb5b8a36f98b82e2ef76d1ce8a473123046347ee1b44f3cb685509823864f0af1384 diff --git a/sundials.spec b/sundials.spec index e4ef176..983a41d 100644 --- a/sundials.spec +++ b/sundials.spec @@ -43,19 +43,25 @@ %endif %if 0%{?fedora} && 0%{?fedora} >= 29 -%global with_petsc 1 +%global with_petsc 0 %endif %if 0%{?rhel} && 0%{?rhel} >= 7 %global with_petsc 1 %endif ########### -%global with_parcheck 1 +# rhbz #1639646 +%if 0%{?fedora} && 0%{?fedora} > 29 +%global with_openmpicheck 0 +%else +%global with_openmpicheck 1 +%endif +%global with_mpichcheck 1 %global with_sercheck 1 Summary: Suite of nonlinear solvers Name: sundials -Version: 3.2.0 +Version: 3.2.1 Release: 1%{?dist} # SUNDIALS is licensed under BSD with some additional (but unrestrictive) clauses. # Check the file 'LICENSE' for details. @@ -203,30 +209,11 @@ pushd sundials-%{version} %endif ##Set destination library's paths -sed -i 's/DESTINATION lib/DESTINATION %{_lib}/g' src/arkode/CMakeLists.txt -sed -i 's|DESTINATION lib|DESTINATION %{_lib}|g' src/arkode/fcmix/CMakeLists.txt -sed -i 's/DESTINATION lib/DESTINATION %{_lib}/g' src/cvode/CMakeLists.txt -sed -i 's|DESTINATION lib|DESTINATION %{_lib}|g' src/cvode/fcmix/CMakeLists.txt -sed -i 's/DESTINATION lib/DESTINATION %{_lib}/g' src/cvodes/CMakeLists.txt -sed -i 's/DESTINATION lib/DESTINATION %{_lib}/g' src/ida/CMakeLists.txt -sed -i 's|DESTINATION lib|DESTINATION %{_lib}|g' src/ida/fcmix/CMakeLists.txt -sed -i 's/DESTINATION lib/DESTINATION %{_lib}/g' src/idas/CMakeLists.txt -sed -i 's/DESTINATION lib/DESTINATION %{_lib}/g' src/kinsol/CMakeLists.txt -sed -i 's|DESTINATION lib|DESTINATION %{_lib}|g' src/kinsol/fcmix/CMakeLists.txt -sed -i 's|DESTINATION lib|DESTINATION %{_lib}|g' src/nvec_openmp/CMakeLists.txt -sed -i 's|DESTINATION lib|DESTINATION %{_lib}|g' src/sunlinsol_*/CMakeLists.txt -sed -i 's|DESTINATION lib|DESTINATION %{_lib}|g' src/sunmat_*/CMakeLists.txt sed -i 's| SOVERSION | %{version} |g' src/sunlinsol_*/CMakeLists.txt sed -i 's| SOVERSION | %{version} |g' src/sunmat_*/CMakeLists.txt -##Set pthread library's paths -sed -i 's|INSTALL(TARGETS sundials_nvecpthreads_shared DESTINATION lib)|INSTALL(TARGETS sundials_nvecpthreads_shared DESTINATION %{_libdir})|g' src/nvec_pthreads/CMakeLists.txt -sed -i 's|INSTALL(TARGETS sundials_fnvecpthreads_shared DESTINATION lib)|INSTALL(TARGETS sundials_fnvecpthreads_shared DESTINATION %{_libdir})|g' src/nvec_pthreads/CMakeLists.txt - ##Set serial library's paths -sed -i 's|TARGETS sundials_nvecserial_shared DESTINATION lib|TARGETS sundials_nvecserial_shared DESTINATION %{_libdir}|g' src/nvec_ser/CMakeLists.txt sed -i 's|DESTINATION include/nvector|DESTINATION %{_includedir}/nvector|g' src/nvec_ser/CMakeLists.txt -sed -i 's|TARGETS sundials_fnvecserial_shared DESTINATION lib|TARGETS sundials_fnvecserial_shared DESTINATION %{_libdir}|g' src/nvec_ser/CMakeLists.txt mv src/arkode/README src/README-arkode mv src/cvode/README src/README-cvode @@ -263,15 +250,19 @@ export LIBSUPERLUMTLINK= %endif %if %{with debug} +%undefine _hardened_build export CFLAGS="" -cmake \ +%if 0%{?rhel} +%global cmake cmake3 +%endif +%cmake \ -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ -DCMAKE_BUILD_TYPE:STRING=Debug \ -DCMAKE_C_FLAGS_DEBUG:STRING="-O0 -g -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -I$INCBLAS" \ -DCMAKE_Fortran_FLAGS_DEBUG:STRING="-O0 -g -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -I$INCBLAS" \ -DCMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING="%{__global_ldflags} -lklu $LIBBLASLINK $LIBSUPERLUMTLINK" \ %else -%{cmake3} \ +%cmake3 \ %if %{?__isa_bits:%{__isa_bits}}%{!?__isa_bits:32} == 64 -DSUNDIALS_INDEX_SIZE:STRING=64 \ %else @@ -287,7 +278,7 @@ cmake \ -DBLAS_ENABLE:BOOL=ON \ -DBLAS_LIBRARIES:STRING=%{_libdir}/$LIBBLAS.so \ -DCMAKE_MODULE_LINKER_FLAGS:STRING="%{__global_ldflags}" \ - -DCMAKE_INSTALL_PREFIX=%{_prefix} \ + -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} -DCMAKE_INSTALL_LIBDIR:PATH=%{_lib} \ -DPYTHON_EXECUTABLE:FILEPATH=%{__python2} \ -DEXAMPLES_ENABLE_CXX:BOOL=ON -DEXAMPLES_ENABLE_C:BOOL=ON -DEXAMPLES_ENABLE_F77:BOOL=ON \ -DCMAKE_SKIP_RPATH:BOOL=YES -DCMAKE_SKIP_INSTALL_RPATH:BOOL=YES \ @@ -318,12 +309,8 @@ popd %if 0%{?with_openmpi} pushd buildopenmpi_dir ##Set openmpi library's paths -sed -i 's|TARGETS sundials_nvecparallel_shared DESTINATION lib|TARGETS sundials_nvecparallel_shared DESTINATION %{_libdir}/openmpi/lib|g' src/nvec_par/CMakeLists.txt sed -i 's|DESTINATION include/nvector|DESTINATION %{_includedir}/openmpi-%{_arch}/nvector|g' src/nvec_par/CMakeLists.txt -sed -i 's|TARGETS sundials_fnvecparallel_shared DESTINATION lib|TARGETS sundials_fnvecparallel_shared DESTINATION %{_libdir}/openmpi/lib|g' src/nvec_par/CMakeLists.txt -sed -i 's|TARGETS sundials_nvecparhyp_shared DESTINATION lib|TARGETS sundials_nvecparhyp_shared DESTINATION %{_libdir}/openmpi/lib|g' src/nvec_parhyp/CMakeLists.txt %if 0%{?with_petsc} -sed -i 's|TARGETS sundials_nvecpetsc_shared DESTINATION lib|TARGETS sundials_nvecpetsc_shared DESTINATION %{_libdir}/openmpi/lib|g' src/nvec_petsc/CMakeLists.txt sed -i 's|DESTINATION include/nvector|DESTINATION %{_includedir}/openmpi-%{_arch}/nvector|g' src/nvec_petsc/CMakeLists.txt %endif @@ -350,32 +337,24 @@ export LIBSUPERLUMTLINK= %endif ## Hypre %if 0%{?with_hypre} -%if 0%{?fedora} <= 28 -%ifarch s390x -export LIBHYPRELINK= -%else export LIBHYPRELINK="-L$MPI_LIB -lHYPRE" %endif -%endif -%endif - -%if 0%{?with_hypre} -%if 0%{?rhel} || 0%{?fedora} > 28 -export LIBHYPRELINK="-L$MPI_LIB -lHYPRE" -%endif -%endif ## %if %{with debug} +%undefine _hardened_build export CFLAGS="" -cmake \ +%if 0%{?rhel} +%global cmake cmake3 +%endif +%cmake \ -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ -DCMAKE_BUILD_TYPE:STRING=Debug \ -DCMAKE_C_FLAGS_DEBUG:STRING="-O0 -g -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -I$INCBLAS" \ -DCMAKE_Fortran_FLAGS_DEBUG:STRING="-O0 -g -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -I$INCBLAS" \ -DCMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING="%{__global_ldflags} -lklu $LIBBLASLINK $LIBSUPERLUMTLINK $LIBHYPRELINK" \ %else -%{cmake3} \ +%cmake3 \ %if %{?__isa_bits:%{__isa_bits}}%{!?__isa_bits:32} == 64 -DSUNDIALS_INDEX_SIZE:STRING=64 \ %else @@ -395,7 +374,7 @@ cmake \ -DPETSC_INCLUDE_DIR:PATH=$MPI_INCLUDE/petsc \ -DPETSC_LIBRARY_DIR:PATH=$MPI_LIB \ %endif - -DCMAKE_INSTALL_PREFIX=%{_prefix} \ + -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} -DCMAKE_INSTALL_LIBDIR:PATH=%{_lib}/openmpi/lib \ -DPYTHON_EXECUTABLE:FILEPATH=%{__python2} \ -DEXAMPLES_ENABLE_CXX:BOOL=ON -DEXAMPLES_ENABLE_C:BOOL=ON -DEXAMPLES_ENABLE_F77:BOOL=ON \ -DBUILD_SHARED_LIBS:BOOL=ON -DBUILD_STATIC_LIBS:BOOL=OFF \ @@ -419,20 +398,9 @@ cmake \ -DSUPERLUMT_THREAD_TYPE:STRING=OpenMP \ %endif %if 0%{?with_hypre} -%if 0%{?fedora} <= 28 -%ifarch s390x - -DHYPRE_ENABLE:BOOL=OFF \ -%else -DHYPRE_ENABLE:BOOL=ON \ -DHYPRE_INCLUDE_DIR:PATH=$MPI_INCLUDE/hypre \ -DHYPRE_LIBRARY_DIR:PATH=$MPI_LIB \ -%endif -%endif -%if 0%{?rhel} || 0%{?fedora} > 28 - -DHYPRE_ENABLE:BOOL=ON \ - -DHYPRE_INCLUDE_DIR:PATH=$MPI_INCLUDE/hypre \ - -DHYPRE_LIBRARY_DIR:PATH=$MPI_LIB \ -%endif %endif -DKLU_ENABLE=ON -DKLU_LIBRARY_DIR:PATH=%{_libdir} -DKLU_INCLUDE_DIR:PATH=%{_includedir}/suitesparse \ -DEXAMPLES_INSTALL:BOOL=OFF -Wno-dev .. @@ -448,12 +416,8 @@ popd %if 0%{?with_mpich} pushd buildmpich_dir ##Set mpich library's paths -sed -i 's|TARGETS sundials_nvecparallel_shared DESTINATION lib|TARGETS sundials_nvecparallel_shared DESTINATION %{_libdir}/mpich/lib|g' src/nvec_par/CMakeLists.txt sed -i 's|DESTINATION include/nvector|DESTINATION %{_includedir}/mpich-%{_arch}/nvector|g' src/nvec_par/CMakeLists.txt -sed -i 's|TARGETS sundials_fnvecparallel_shared DESTINATION lib|TARGETS sundials_fnvecparallel_shared DESTINATION %{_libdir}/mpich/lib|g' src/nvec_par/CMakeLists.txt -sed -i 's|TARGETS sundials_nvecparhyp_shared DESTINATION lib|TARGETS sundials_nvecparhyp_shared DESTINATION %{_libdir}/mpich/lib|g' src/nvec_parhyp/CMakeLists.txt %if 0%{?with_petsc} -sed -i 's|TARGETS sundials_nvecpetsc_shared DESTINATION lib|TARGETS sundials_nvecpetsc_shared DESTINATION %{_libdir}/mpich/lib|g' src/nvec_petsc/CMakeLists.txt sed -i 's|DESTINATION include/nvector|DESTINATION %{_includedir}/mpich-%{_arch}/nvector|g' src/nvec_petsc/CMakeLists.txt %endif @@ -488,32 +452,24 @@ export LIBSUPERLUMTLINK= %endif ## Hypre %if 0%{?with_hypre} -%if 0%{?fedora} <= 28 -%ifarch s390x -export LIBHYPRELINK= -%else export LIBHYPRELINK="-L$MPI_LIB -lHYPRE" %endif -%endif -%endif - -%if 0%{?with_hypre} -%if 0%{?rhel} || 0%{?fedora} > 28 -export LIBHYPRELINK="-L$MPI_LIB -lHYPRE" -%endif -%endif ## %if %{with debug} +%undefine _hardened_build export CFLAGS="" -cmake \ +%if 0%{?rhel} +%global cmake cmake3 +%endif +%cmake \ -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ -DCMAKE_BUILD_TYPE:STRING=Debug \ -DCMAKE_C_FLAGS_DEBUG:STRING="-O0 -g -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -I$INCBLAS" \ -DCMAKE_Fortran_FLAGS_DEBUG:STRING="-O0 -g -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -I$INCBLAS" \ -DCMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING="%{__global_ldflags} -lklu $LIBBLASLINK $LIBSUPERLUMTLINK $LIBHYPRELINK" \ %else -%{cmake3} \ +%cmake3 \ %if %{?__isa_bits:%{__isa_bits}}%{!?__isa_bits:32} == 64 -DSUNDIALS_INDEX_SIZE:STRING=64 \ %else @@ -533,7 +489,7 @@ cmake \ -DPETSC_INCLUDE_DIR:PATH=$MPI_INCLUDE/petsc \ -DPETSC_LIBRARY_DIR:PATH=$MPI_LIB \ %endif - -DCMAKE_INSTALL_PREFIX=%{_prefix} \ + -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} -DCMAKE_INSTALL_LIBDIR:PATH=%{_lib}/mpich/lib \ -DPYTHON_EXECUTABLE:FILEPATH=%{__python2} \ -DEXAMPLES_ENABLE_CXX:BOOL=ON -DEXAMPLES_ENABLE_C:BOOL=ON -DEXAMPLES_ENABLE_F77:BOOL=ON \ -DBUILD_SHARED_LIBS:BOOL=ON -DBUILD_STATIC_LIBS:BOOL=OFF \ @@ -557,20 +513,9 @@ cmake \ -DSUPERLUMT_THREAD_TYPE:STRING=OpenMP \ %endif %if 0%{?with_hypre} -%if 0%{?fedora} <= 28 -%ifarch s390x - -DHYPRE_ENABLE:BOOL=OFF \ -%else -DHYPRE_ENABLE:BOOL=ON \ -DHYPRE_INCLUDE_DIR:PATH=$MPI_INCLUDE/hypre \ -DHYPRE_LIBRARY_DIR:PATH=$MPI_LIB \ -%endif -%endif -%if 0%{?rhel} || 0%{?fedora} > 28 - -DHYPRE_ENABLE:BOOL=ON \ - -DHYPRE_INCLUDE_DIR:PATH=$MPI_INCLUDE/hypre \ - -DHYPRE_LIBRARY_DIR:PATH=$MPI_LIB \ -%endif %endif -DKLU_ENABLE=ON -DKLU_LIBRARY_DIR:PATH=%{_libdir} -DKLU_INCLUDE_DIR:PATH=%{_includedir}/suitesparse \ -DEXAMPLES_INSTALL:BOOL=OFF -Wno-dev .. @@ -587,12 +532,18 @@ popd %if 0%{?with_openmpi} %{_openmpi_load} %make_install -C buildopenmpi_dir/build + +# Remove static libraries +rm -f %{buildroot}$MPI_LIB/*.a %{_openmpi_unload} %endif %if 0%{?with_mpich} %{_mpich_load} %make_install -C buildmpich_dir/build + +# Remove static libraries +rm -f %{buildroot}$MPI_LIB/*.a %{_mpich_unload} %endif @@ -608,91 +559,78 @@ rm -f %{buildroot}%{_includedir}/sundials/LICENSE %ldconfig_scriptlets %check -%if 0%{?with_parcheck} %if 0%{?with_openmpi} -%{_openmpi_load} +%if 0%{?with_openmpicheck} pushd buildopenmpi_dir/build -export LD_LIBRARY_PATH=%{buildroot}$MPI_LIB:%{buildroot}%{_libdir} +%{_openmpi_load} +export LD_LIBRARY_PATH=%{buildroot}$MPI_LIB +%if %{with debug} %ifarch %{power64} %{arm} aarch64 s390x -ctest3 --force-new-ctest-process -VV -j 1 --output-on-failure -E 'test_sunmatrix_sparse_400_400_0_0|test_nvector_mpi_4' +ctest3 --force-new-ctest-process -VV -j 1 --output-on-failure --debug -E 'test_sunmatrix_sparse_400_400_0_0|test_nvector_mpi_4' %else -ctest3 --force-new-ctest-process -VV -j 1 --output-on-failure +ctest3 --force-new-ctest-process -VV -j 1 --output-on-failure --debug +%endif +%else +%ifarch %{power64} %{arm} aarch64 s390x +ctest3 --force-new-ctest-process -j 1 -E 'test_sunmatrix_sparse_400_400_0_0|test_nvector_mpi_4' +%else +ctest3 --force-new-ctest-process -j 1 +%endif %endif -popd %{_openmpi_unload} -%endif ##if openmpi +popd +%endif ## if with_openmpicheck +%endif ## if with_openmpi %if 0%{?with_mpich} -%{_mpich_load} +%if 0%{?with_mpichcheck} pushd buildmpich_dir/build -export LD_LIBRARY_PATH=%{buildroot}$MPI_LIB:%{buildroot}%{_libdir} +%{_mpich_load} +export LD_LIBRARY_PATH=%{buildroot}$MPI_LIB +%if %{with debug} %ifarch %{power64} %{arm} aarch64 s390x -ctest3 --force-new-ctest-process -VV -j 1 --output-on-failure -E 'test_sunmatrix_sparse_400_400_0_0|test_nvector_mpi_4' +ctest3 --force-new-ctest-process -VV -j 1 --output-on-failure --debug -E 'test_sunmatrix_sparse_400_400_0_0|test_nvector_mpi_4' %else -ctest3 --force-new-ctest-process -VV -j 1 --output-on-failure +ctest3 --force-new-ctest-process -VV -j 1 --output-on-failure --debug +%endif +%else +%ifarch %{power64} %{arm} aarch64 s390x +ctest3 --force-new-ctest-process -j 1 -E 'test_sunmatrix_sparse_400_400_0_0|test_nvector_mpi_4' +%else +ctest3 --force-new-ctest-process -j 1 +%endif %endif -popd %{_mpich_unload} -%endif ##if openmpi -%endif ## if with_parcheck +popd +%endif ## if with_mpichcheck +%endif ## if with_mpich %if 0%{?with_sercheck} pushd sundials-%{version}/build export LD_LIBRARY_PATH=%{buildroot}%{_libdir} +%if %{with debug} %ifarch %{power64} %{arm} aarch64 s390x -ctest3 --force-new-ctest-process -VV -j 1 --output-on-failure -E 'test_sunmatrix_sparse_400_400_0_0' +ctest3 --force-new-ctest-process -VV -j 1 --output-on-failure --debug -E 'test_sunmatrix_sparse_400_400_0_0|test_nvector_mpi_4' %else -ctest3 --force-new-ctest-process -VV -j 1 --output-on-failure +ctest3 --force-new-ctest-process -VV -j 1 --output-on-failure --debug +%endif +%else +%ifarch %{power64} %{arm} aarch64 s390x +ctest3 --force-new-ctest-process -j 1 -E 'test_sunmatrix_sparse_400_400_0_0|test_nvector_mpi_4' +%else +ctest3 --force-new-ctest-process -j 1 +%endif %endif popd -%endif ##if with_sercheck +%endif ## if with_sercheck %files %license sundials-%{version}/LICENSE %doc sundials-%{version}/README.md sundials-%{version}/src/README-* -%{_libdir}/libsundials_nvecserial.so.* -%{_libdir}/libsundials_cvode.so.* -%{_libdir}/libsundials_cvodes.so.* -%{_libdir}/libsundials_arkode.so.* -%{_libdir}/libsundials_ida.so.* -%{_libdir}/libsundials_idas.so.* -%{_libdir}/libsundials_kinsol.so.* -%{_libdir}/libsundials_sunlinsol*.so.* -%{_libdir}/libsundials_sunmatrix*.so.* -%{_libdir}/libsundials_nvecpthreads.so.* -%{_libdir}/libsundials_fnvecpthreads.so.* -%{_libdir}/libsundials_fnvecserial.so.* -%{_libdir}/libsundials_fsunlinsol*.so.* -%{_libdir}/libsundials_fsunmatrix*.so.* -%{_libdir}/libsundials_fnvecopenmp.so.* -%{_libdir}/libsundials_nvecopenmp.so.* - -%files doc -%license sundials-%{version}/LICENSE -%doc sundials-%{version}/README.md -%doc sundials-%{version}/doc/cvode/cv_guide.pdf -%doc sundials-%{version}/doc/kinsol/kin_guide.pdf -%doc sundials-%{version}/doc/cvodes/cvs_guide.pdf -%doc sundials-%{version}/doc/ida/ida_guide.pdf -%doc sundials-%{version}/doc/arkode/* +%{_libdir}/libsundials*.so.* %files devel -%{_libdir}/libsundials_nvecserial.so -%{_libdir}/libsundials_cvode.so -%{_libdir}/libsundials_cvodes.so -%{_libdir}/libsundials_arkode.so -%{_libdir}/libsundials_ida.so -%{_libdir}/libsundials_idas.so -%{_libdir}/libsundials_kinsol.so -%{_libdir}/libsundials_sunlinsol*.so -%{_libdir}/libsundials_sunmatrix*.so -%{_libdir}/libsundials_fnvecpthreads.so -%{_libdir}/libsundials_nvecpthreads.so -%{_libdir}/libsundials_fnvecserial.so -%{_libdir}/libsundials_fsunlinsol*.so -%{_libdir}/libsundials_fsunmatrix*.so -%{_libdir}/libsundials_fnvecopenmp.so -%{_libdir}/libsundials_nvecopenmp.so +%{_libdir}/libsundials*.so %{_includedir}/sundials/ %{_includedir}/cvode/ %{_includedir}/cvodes/ @@ -708,73 +646,39 @@ popd %files openmpi %license sundials-%{version}/LICENSE %doc sundials-%{version}/README.md sundials-%{version}/src/README-* -%{_libdir}/openmpi/lib/libsundials_nvecparallel.so.* -%{_libdir}/openmpi/lib/libsundials_fnvecparallel.so.* -%if 0%{?with_petsc} -%{_libdir}/openmpi/lib/libsundials_nvecpetsc.so.* -%endif -%if 0%{?rhel} || 0%{?fedora} > 28 -%{_libdir}/openmpi/lib/libsundials_nvecparhyp.so.* -%else -%ifnarch s390x -%{_libdir}/openmpi/lib/libsundials_nvecparhyp.so.* -%endif -%endif +%{_libdir}/openmpi/lib/libsundials*.so.* %files openmpi-devel -%dir %{_includedir}/openmpi-%{_arch}/nvector -%{_includedir}/openmpi-%{_arch}/nvector/nvector_parallel.h -%{_libdir}/openmpi/lib/libsundials_nvecparallel.so -%{_libdir}/openmpi/lib/libsundials_fnvecparallel.so -%if 0%{?with_petsc} -%{_libdir}/openmpi/lib/libsundials_nvecpetsc.so -%{_includedir}/openmpi-%{_arch}/nvector/nvector_petsc.h -%endif -%if 0%{?rhel} || 0%{?fedora} > 28 -%{_libdir}/openmpi/lib/libsundials_nvecparhyp.so -%else -%ifnarch s390x -%{_libdir}/openmpi/lib/libsundials_nvecparhyp.so -%endif -%endif +%{_includedir}/openmpi-%{_arch}/nvector/ +%{_libdir}/openmpi/lib/libsundials*.so %endif %if 0%{?with_mpich} %files mpich %license sundials-%{version}/LICENSE %doc sundials-%{version}/README.md sundials-%{version}/src/README-* -%{_libdir}/mpich/lib/libsundials_nvecparallel.so.* -%{_libdir}/mpich/lib/libsundials_fnvecparallel.so.* -%if 0%{?with_petsc} -%{_libdir}/mpich/lib/libsundials_nvecpetsc.so.* -%endif -%if 0%{?rhel} || 0%{?fedora} > 28 -%{_libdir}/mpich/lib/libsundials_nvecparhyp.so.* -%else -%ifnarch s390x -%{_libdir}/mpich/lib/libsundials_nvecparhyp.so.* -%endif -%endif +%{_libdir}/mpich/lib/libsundials*.so.* %files mpich-devel -%dir %{_includedir}/mpich-%{_arch}/nvector -%{_includedir}/mpich-%{_arch}/nvector/nvector_parallel.h -%{_libdir}/mpich/lib/libsundials_nvecparallel.so -%{_libdir}/mpich/lib/libsundials_fnvecparallel.so -%if 0%{?with_petsc} -%{_libdir}/mpich/lib/libsundials_nvecpetsc.so -%{_includedir}/mpich-%{_arch}/nvector/nvector_petsc.h -%endif -%if 0%{?rhel} || 0%{?fedora} > 28 -%{_libdir}/mpich/lib/libsundials_nvecparhyp.so -%else -%ifnarch s390x -%{_libdir}/mpich/lib/libsundials_nvecparhyp.so -%endif -%endif +%{_includedir}/mpich-%{_arch}/nvector/ +%{_libdir}/mpich/lib/libsundials*.so %endif +%files doc +%license sundials-%{version}/LICENSE +%doc sundials-%{version}/README.md +%doc sundials-%{version}/doc/cvode/cv_guide.pdf +%doc sundials-%{version}/doc/kinsol/kin_guide.pdf +%doc sundials-%{version}/doc/cvodes/cvs_guide.pdf +%doc sundials-%{version}/doc/ida/ida_guide.pdf +%doc sundials-%{version}/doc/arkode/* + %changelog +* Sat Oct 20 2018 Antonio Trande - 3.2.1-1 +- Update to 3.2.1 +- Disable PETSc support (rhbz#1639646) +- Disable OpenMPI tests (rhbz#1639646) + * Sat Oct 13 2018 Antonio Trande - 3.2.0-1 - Update to 3.2.0 From 4b5491b20b060d96648debbe432fe1c55c571080 Mon Sep 17 00:00:00 2001 From: sagitter Date: Sun, 2 Dec 2018 22:01:01 +0100 Subject: [PATCH 23/36] PETSc support is now re-enabled (rhbz#1639646) --- sundials.spec | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/sundials.spec b/sundials.spec index 983a41d..228b43f 100644 --- a/sundials.spec +++ b/sundials.spec @@ -43,26 +43,20 @@ %endif %if 0%{?fedora} && 0%{?fedora} >= 29 -%global with_petsc 0 +%global with_petsc 1 %endif %if 0%{?rhel} && 0%{?rhel} >= 7 %global with_petsc 1 %endif ########### -# rhbz #1639646 -%if 0%{?fedora} && 0%{?fedora} > 29 -%global with_openmpicheck 0 -%else -%global with_openmpicheck 1 -%endif %global with_mpichcheck 1 %global with_sercheck 1 Summary: Suite of nonlinear solvers Name: sundials Version: 3.2.1 -Release: 1%{?dist} +Release: 2%{?dist} # SUNDIALS is licensed under BSD with some additional (but unrestrictive) clauses. # Check the file 'LICENSE' for details. License: BSD @@ -674,6 +668,9 @@ popd %doc sundials-%{version}/doc/arkode/* %changelog +* Sun Dec 02 2018 Antonio Trande - 3.2.1-2 +- PETSc support is now re-enabled (rhbz#1639646) + * Sat Oct 20 2018 Antonio Trande - 3.2.1-1 - Update to 3.2.1 - Disable PETSc support (rhbz#1639646) From 46f721b97935814f868dadd19b2d359c4656c7a5 Mon Sep 17 00:00:00 2001 From: sagitter Date: Sun, 2 Dec 2018 22:02:39 +0100 Subject: [PATCH 24/36] Use with_openmpicheck macro --- sundials.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/sundials.spec b/sundials.spec index 228b43f..83e61ae 100644 --- a/sundials.spec +++ b/sundials.spec @@ -50,6 +50,7 @@ %endif ########### +%global with_openmpicheck 1 %global with_mpichcheck 1 %global with_sercheck 1 From 36605b8190e88633157881df1f23718dba8d814c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 3 Feb 2019 08:58:41 +0000 Subject: [PATCH 25/36] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- sundials.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sundials.spec b/sundials.spec index 83e61ae..1f46717 100644 --- a/sundials.spec +++ b/sundials.spec @@ -57,7 +57,7 @@ Summary: Suite of nonlinear solvers Name: sundials Version: 3.2.1 -Release: 2%{?dist} +Release: 3%{?dist} # SUNDIALS is licensed under BSD with some additional (but unrestrictive) clauses. # Check the file 'LICENSE' for details. License: BSD @@ -669,6 +669,9 @@ popd %doc sundials-%{version}/doc/arkode/* %changelog +* Sun Feb 03 2019 Fedora Release Engineering - 3.2.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Sun Dec 02 2018 Antonio Trande - 3.2.1-2 - PETSc support is now re-enabled (rhbz#1639646) From 9dc49c590c45fc3530ba4b608bfaac73ffab3ceb Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Thu, 14 Feb 2019 08:51:47 -0700 Subject: [PATCH 26/36] Rebuild for openmpi 3.1.3 --- sundials.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sundials.spec b/sundials.spec index 1f46717..cf3edf9 100644 --- a/sundials.spec +++ b/sundials.spec @@ -57,7 +57,7 @@ Summary: Suite of nonlinear solvers Name: sundials Version: 3.2.1 -Release: 3%{?dist} +Release: 4%{?dist} # SUNDIALS is licensed under BSD with some additional (but unrestrictive) clauses. # Check the file 'LICENSE' for details. License: BSD @@ -669,6 +669,9 @@ popd %doc sundials-%{version}/doc/arkode/* %changelog +* Thu Feb 14 2019 Orion Poplawski - 3.2.1-4 +- Rebuild for openmpi 3.1.3 + * Sun Feb 03 2019 Fedora Release Engineering - 3.2.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild From 27ef8e99cf6ee24f3d7c53430bf6785771fc9dd8 Mon Sep 17 00:00:00 2001 From: sagitter Date: Tue, 19 Feb 2019 18:13:08 +0100 Subject: [PATCH 27/36] Debugging builds --- sundials.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sundials.spec b/sundials.spec index cf3edf9..db2a7fa 100644 --- a/sundials.spec +++ b/sundials.spec @@ -1,5 +1,5 @@ ## Debug builds? -%bcond_with debug +%bcond_without debug # %if 0%{?rhel} && 0%{?rhel} < 7 From 1969a5e4dcef92c7abf765d2328f1e9513046d9b Mon Sep 17 00:00:00 2001 From: sagitter Date: Wed, 20 Feb 2019 20:05:53 +0100 Subject: [PATCH 28/36] Tests of MPI libraries disabled for 'not enough slots available' errors --- sundials.spec | 59 +++++++++++++++++++++------------------------------ 1 file changed, 24 insertions(+), 35 deletions(-) diff --git a/sundials.spec b/sundials.spec index db2a7fa..bd58bce 100644 --- a/sundials.spec +++ b/sundials.spec @@ -1,5 +1,5 @@ ## Debug builds? -%bcond_without debug +%bcond_with debug # %if 0%{?rhel} && 0%{?rhel} < 7 @@ -50,8 +50,12 @@ %endif ########### +# Tests of MPI libraries disabled for +# "not enough slots available" errors +%if 0%{?fedora} && 0%{?fedora} < 30 %global with_openmpicheck 1 %global with_mpichcheck 1 +%endif %global with_sercheck 1 Summary: Suite of nonlinear solvers @@ -305,8 +309,12 @@ popd pushd buildopenmpi_dir ##Set openmpi library's paths sed -i 's|DESTINATION include/nvector|DESTINATION %{_includedir}/openmpi-%{_arch}/nvector|g' src/nvec_par/CMakeLists.txt +sed -i 's|CMAKE_INSTALL_LIBDIR}|CMAKE_INSTALL_LIBDIR}/openmpi/lib|g' src/nvec_par/CMakeLists.txt +sed -i 's|DESTINATION include/nvector|DESTINATION %{_includedir}/openmpi-%{_arch}/nvector|g' src/nvec_parhyp/CMakeLists.txt +sed -i 's|CMAKE_INSTALL_LIBDIR}|CMAKE_INSTALL_LIBDIR}/openmpi/lib|g' src/nvec_parhyp/CMakeLists.txt %if 0%{?with_petsc} sed -i 's|DESTINATION include/nvector|DESTINATION %{_includedir}/openmpi-%{_arch}/nvector|g' src/nvec_petsc/CMakeLists.txt +sed -i 's|CMAKE_INSTALL_LIBDIR}|CMAKE_INSTALL_LIBDIR}/openmpi/lib|g' src/nvec_petsc/CMakeLists.txt %endif mkdir -p build && cd build @@ -369,7 +377,7 @@ export CFLAGS="" -DPETSC_INCLUDE_DIR:PATH=$MPI_INCLUDE/petsc \ -DPETSC_LIBRARY_DIR:PATH=$MPI_LIB \ %endif - -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} -DCMAKE_INSTALL_LIBDIR:PATH=%{_lib}/openmpi/lib \ + -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} -DCMAKE_INSTALL_LIBDIR:PATH=%{_lib} \ -DPYTHON_EXECUTABLE:FILEPATH=%{__python2} \ -DEXAMPLES_ENABLE_CXX:BOOL=ON -DEXAMPLES_ENABLE_C:BOOL=ON -DEXAMPLES_ENABLE_F77:BOOL=ON \ -DBUILD_SHARED_LIBS:BOOL=ON -DBUILD_STATIC_LIBS:BOOL=OFF \ @@ -412,8 +420,12 @@ popd pushd buildmpich_dir ##Set mpich library's paths sed -i 's|DESTINATION include/nvector|DESTINATION %{_includedir}/mpich-%{_arch}/nvector|g' src/nvec_par/CMakeLists.txt +sed -i 's|CMAKE_INSTALL_LIBDIR}|CMAKE_INSTALL_LIBDIR}/mpich/lib|g' src/nvec_par/CMakeLists.txt +sed -i 's|DESTINATION include/nvector|DESTINATION %{_includedir}/mpich-%{_arch}/nvector|g' src/nvec_parhyp/CMakeLists.txt +sed -i 's|CMAKE_INSTALL_LIBDIR}|CMAKE_INSTALL_LIBDIR}/mpich/lib|g' src/nvec_parhyp/CMakeLists.txt %if 0%{?with_petsc} sed -i 's|DESTINATION include/nvector|DESTINATION %{_includedir}/mpich-%{_arch}/nvector|g' src/nvec_petsc/CMakeLists.txt +sed -i 's|CMAKE_INSTALL_LIBDIR}|CMAKE_INSTALL_LIBDIR}/mpich/lib|g' src/nvec_petsc/CMakeLists.txt %endif mkdir -p build && cd build @@ -484,7 +496,7 @@ export CFLAGS="" -DPETSC_INCLUDE_DIR:PATH=$MPI_INCLUDE/petsc \ -DPETSC_LIBRARY_DIR:PATH=$MPI_LIB \ %endif - -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} -DCMAKE_INSTALL_LIBDIR:PATH=%{_lib}/mpich/lib \ + -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} -DCMAKE_INSTALL_LIBDIR:PATH=%{_lib} \ -DPYTHON_EXECUTABLE:FILEPATH=%{__python2} \ -DEXAMPLES_ENABLE_CXX:BOOL=ON -DEXAMPLES_ENABLE_C:BOOL=ON -DEXAMPLES_ENABLE_F77:BOOL=ON \ -DBUILD_SHARED_LIBS:BOOL=ON -DBUILD_STATIC_LIBS:BOOL=OFF \ @@ -558,19 +570,11 @@ rm -f %{buildroot}%{_includedir}/sundials/LICENSE %if 0%{?with_openmpicheck} pushd buildopenmpi_dir/build %{_openmpi_load} -export LD_LIBRARY_PATH=%{buildroot}$MPI_LIB +export LD_LIBRARY_PATH=%{buildroot}$MPI_LIB:%{buildroot}%{_libdir} %if %{with debug} -%ifarch %{power64} %{arm} aarch64 s390x -ctest3 --force-new-ctest-process -VV -j 1 --output-on-failure --debug -E 'test_sunmatrix_sparse_400_400_0_0|test_nvector_mpi_4' +ctest3 --force-new-ctest-process -VV %{?_smp_mflags} --output-on-failure --debug %else -ctest3 --force-new-ctest-process -VV -j 1 --output-on-failure --debug -%endif -%else -%ifarch %{power64} %{arm} aarch64 s390x -ctest3 --force-new-ctest-process -j 1 -E 'test_sunmatrix_sparse_400_400_0_0|test_nvector_mpi_4' -%else -ctest3 --force-new-ctest-process -j 1 -%endif +ctest3 --force-new-ctest-process %{?_smp_mflags} %endif %{_openmpi_unload} popd @@ -581,19 +585,11 @@ popd %if 0%{?with_mpichcheck} pushd buildmpich_dir/build %{_mpich_load} -export LD_LIBRARY_PATH=%{buildroot}$MPI_LIB +export LD_LIBRARY_PATH=%{buildroot}$MPI_LIB:%{buildroot}%{_libdir} %if %{with debug} -%ifarch %{power64} %{arm} aarch64 s390x -ctest3 --force-new-ctest-process -VV -j 1 --output-on-failure --debug -E 'test_sunmatrix_sparse_400_400_0_0|test_nvector_mpi_4' +ctest3 --force-new-ctest-process -VV %{?_smp_mflags} --output-on-failure --debug %else -ctest3 --force-new-ctest-process -VV -j 1 --output-on-failure --debug -%endif -%else -%ifarch %{power64} %{arm} aarch64 s390x -ctest3 --force-new-ctest-process -j 1 -E 'test_sunmatrix_sparse_400_400_0_0|test_nvector_mpi_4' -%else -ctest3 --force-new-ctest-process -j 1 -%endif +ctest3 --force-new-ctest-process %{?_smp_mflags} %endif %{_mpich_unload} popd @@ -604,17 +600,9 @@ popd pushd sundials-%{version}/build export LD_LIBRARY_PATH=%{buildroot}%{_libdir} %if %{with debug} -%ifarch %{power64} %{arm} aarch64 s390x -ctest3 --force-new-ctest-process -VV -j 1 --output-on-failure --debug -E 'test_sunmatrix_sparse_400_400_0_0|test_nvector_mpi_4' +ctest3 --force-new-ctest-process -VV %{?_smp_mflags} --output-on-failure --debug %else -ctest3 --force-new-ctest-process -VV -j 1 --output-on-failure --debug -%endif -%else -%ifarch %{power64} %{arm} aarch64 s390x -ctest3 --force-new-ctest-process -j 1 -E 'test_sunmatrix_sparse_400_400_0_0|test_nvector_mpi_4' -%else -ctest3 --force-new-ctest-process -j 1 -%endif +ctest3 --force-new-ctest-process %{?_smp_mflags} %endif popd %endif ## if with_sercheck @@ -671,6 +659,7 @@ popd %changelog * Thu Feb 14 2019 Orion Poplawski - 3.2.1-4 - Rebuild for openmpi 3.1.3 +- Tests of MPI libraries disabled for "not enough slots available" errors * Sun Feb 03 2019 Fedora Release Engineering - 3.2.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild From e136623fc0ede03c22b9f183c2e252dbc0294b75 Mon Sep 17 00:00:00 2001 From: sagitter Date: Wed, 20 Feb 2019 20:09:46 +0100 Subject: [PATCH 29/36] Serial/MPI libraries are now separated --- sundials.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sundials.spec b/sundials.spec index bd58bce..713bfac 100644 --- a/sundials.spec +++ b/sundials.spec @@ -50,7 +50,7 @@ %endif ########### -# Tests of MPI libraries disabled for +# Disable tests of MPI libraries for # "not enough slots available" errors %if 0%{?fedora} && 0%{?fedora} < 30 %global with_openmpicheck 1 @@ -659,7 +659,7 @@ popd %changelog * Thu Feb 14 2019 Orion Poplawski - 3.2.1-4 - Rebuild for openmpi 3.1.3 -- Tests of MPI libraries disabled for "not enough slots available" errors +- Disable tests of MPI libraries for "not enough slots available" errors * Sun Feb 03 2019 Fedora Release Engineering - 3.2.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild From 7abfdf28872afd95b4722d8fba055040d4dcb591 Mon Sep 17 00:00:00 2001 From: sagitter Date: Wed, 20 Feb 2019 20:35:23 +0100 Subject: [PATCH 30/36] Tests disabled --- sundials.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sundials.spec b/sundials.spec index 713bfac..36f854c 100644 --- a/sundials.spec +++ b/sundials.spec @@ -55,8 +55,8 @@ %if 0%{?fedora} && 0%{?fedora} < 30 %global with_openmpicheck 1 %global with_mpichcheck 1 -%endif %global with_sercheck 1 +%endif Summary: Suite of nonlinear solvers Name: sundials From 50a51f9a0262d44837e9a6107a0eb0bb60c4a8e3 Mon Sep 17 00:00:00 2001 From: sagitter Date: Tue, 23 Apr 2019 12:30:05 +0200 Subject: [PATCH 31/36] Release 4.1.0|Use Python3 --- .gitignore | 1 + sources | 2 +- sundials.spec | 232 +++++++++++++++++++++++--------------------------- 3 files changed, 109 insertions(+), 126 deletions(-) diff --git a/.gitignore b/.gitignore index e453d8e..cea54e4 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ sundials-2.3.0.tar.gz /sundials-3.1.2.tar.gz /sundials-3.2.0.tar.gz /sundials-3.2.1.tar.gz +/sundials-4.1.0.tar.gz diff --git a/sources b/sources index 1aba1b9..e62b34d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (sundials-3.2.1.tar.gz) = 1f3e4b12f368e4f50c38b970c012f1702e339319ee0a858661bdf83e5739bb5b8a36f98b82e2ef76d1ce8a473123046347ee1b44f3cb685509823864f0af1384 +SHA512 (sundials-4.1.0.tar.gz) = 1922dca3f0b8869098670aede802e48abec39607c96304e4efd9b03d195b16920175846fce10641aeebc48c216bda73c8691139dce57ffa7731a6bc8194b81b0 diff --git a/sundials.spec b/sundials.spec index 36f854c..fc22c9c 100644 --- a/sundials.spec +++ b/sundials.spec @@ -2,28 +2,11 @@ %bcond_with debug # -%if 0%{?rhel} && 0%{?rhel} < 7 -%{!?__global_ldflags: %global __global_ldflags -Wl,-z,relro} -%endif - %if 0%{?fedora} %global with_mpich 1 %global with_openmpi 1 %endif -# No MPICH support on these arches -%if 0%{?rhel} && 0%{?rhel} < 7 -%ifarch %{power64} -%global with_openmpi 1 -%global with_mpich 0 -%endif -%endif -%if 0%{?rhel} && 0%{?rhel} < 7 -%ifnarch %{power64} -%global with_openmpi 1 -%global with_mpich 1 -%endif -%endif %if 0%{?rhel} && 0%{?rhel} >= 7 %global with_openmpi 1 %global with_mpich 1 @@ -32,36 +15,26 @@ %global with_hypre 1 ## PETSc ## -%if 0%{?fedora} && 0%{?fedora} < 29 -## Exclude MPI builds on s390x -%ifarch s390x -%global with_petsc 0 -%endif -%ifnarch s390x %global with_petsc 1 -%endif -%endif - -%if 0%{?fedora} && 0%{?fedora} >= 29 %global with_petsc 1 -%endif -%if 0%{?rhel} && 0%{?rhel} >= 7 -%global with_petsc 1 -%endif ########### -# Disable tests of MPI libraries for -# "not enough slots available" errors -%if 0%{?fedora} && 0%{?fedora} < 30 %global with_openmpicheck 1 %global with_mpichcheck 1 %global with_sercheck 1 + +## Fortran ## +%if %{?__isa_bits:%{__isa_bits}}%{!?__isa_bits:32} == 64 +%global with_fortran 1 +%else +%global with_fortran 0 %endif +############# Summary: Suite of nonlinear solvers Name: sundials -Version: 3.2.1 -Release: 4%{?dist} +Version: 4.1.0 +Release: 1%{?dist} # SUNDIALS is licensed under BSD with some additional (but unrestrictive) clauses. # Check the file 'LICENSE' for details. License: BSD @@ -74,9 +47,10 @@ Patch0: %{name}-3.1.1-set_superlumt_name.patch # This patch rename superLUMT64 library Patch1: %{name}-3.1.1-set_superlumt64_name.patch +%if 0%{?with_fortran} BuildRequires: gcc-gfortran -# Tests work under python2 only -BuildRequires: python2-devel +%endif +BuildRequires: python%{python3_pkgversion}-devel BuildRequires: gcc, gcc-c++ BuildRequires: suitesparse-devel %if 0%{?rhel} @@ -93,8 +67,9 @@ BuildRequires: SuperLUMT-devel %if 0%{?rhel} BuildRequires: rsh %endif +%if 0%{?with_fortran} Requires: gcc-gfortran%{?_isa} -Obsoletes: %{name}-samples%{?_isa} < 3.1.1-2 +%endif %description SUNDIALS is a SUite of Non-linear DIfferential/ALgebraic equation Solvers @@ -120,20 +95,16 @@ This package contains the developer files (.so file, header files). %package openmpi Summary: Suite of nonlinear solvers BuildRequires: openmpi-devel -%if 0%{?rhel} || 0%{?fedora} > 28 BuildRequires: hypre-openmpi-devel -%else -%ifnarch s390x -BuildRequires: hypre-openmpi-devel -%endif -%endif %if 0%{?with_petsc} -BuildRequires: petsc-openmpi-devel +BuildRequires: petsc-openmpi-devel >= 3.10 +BuildRequires: scalapack-openmpi-devel %endif Requires: openmpi%{?_isa} +%if 0%{?with_fortran} Requires: gcc-gfortran%{?_isa} -Obsoletes: %{name}-openmpi-samples%{?_isa} < 3.1.1-2 +%endif %description openmpi SUNDIALS is a SUite of Non-linear DIfferential/ALgebraic equation Solvers @@ -143,6 +114,7 @@ This package contains the Sundials Fortran parallel OpenMPI libraries. %package openmpi-devel Summary: Suite of nonlinear solvers Requires: %{name}-openmpi%{?_isa} = %{version}-%{release} +Requires: %{name}-devel%{?_isa} = %{version}-%{release} %description openmpi-devel SUNDIALS is a SUite of Non-linear DIfferential/ALgebraic equation Solvers for use in writing mathematical software. @@ -156,19 +128,15 @@ header files. %package mpich Summary: Suite of nonlinear solvers BuildRequires: mpich-devel -%if 0%{?rhel} || 0%{?fedora} > 28 BuildRequires: hypre-mpich-devel -%else -%ifnarch s390x -BuildRequires: hypre-mpich-devel -%endif -%endif %if 0%{?with_petsc} -BuildRequires: petsc-mpich-devel +BuildRequires: petsc-mpich-devel >= 3.10 +BuildRequires: scalapack-mpich-devel %endif Requires: mpich%{?_isa} +%if 0%{?with_fortran} Requires: gcc-gfortran%{?_isa} -Obsoletes: %{name}-mpich-samples%{?_isa} < 3.1.1-2 +%endif %description mpich SUNDIALS is a SUite of Non-linear DIfferential/ALgebraic equation Solvers @@ -178,6 +146,7 @@ This package contains the Sundials parallel MPICH libraries. %package mpich-devel Summary: Suite of nonlinear solvers Requires: %{name}-mpich%{?_isa} = %{version}-%{release} +Requires: %{name}-devel%{?_isa} = %{version}-%{release} %description mpich-devel SUNDIALS is a SUite of Non-linear DIfferential/ALgebraic equation Solvers for use in writing mathematical software. @@ -200,19 +169,17 @@ This package contains the documentation files. pushd sundials-%{version} -%ifarch s390x x86_64 +%ifarch s390x x86_64 %{power64} %patch1 -p0 %endif %ifarch %{arm} %{ix86} %patch0 -p0 %endif -##Set destination library's paths -sed -i 's| SOVERSION | %{version} |g' src/sunlinsol_*/CMakeLists.txt -sed -i 's| SOVERSION | %{version} |g' src/sunmat_*/CMakeLists.txt - ##Set serial library's paths -sed -i 's|DESTINATION include/nvector|DESTINATION %{_includedir}/nvector|g' src/nvec_ser/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/pthreads/CMakeLists.txt mv src/arkode/README src/README-arkode mv src/cvode/README src/README-cvode @@ -236,7 +203,7 @@ mkdir -p build && cd build export LIBBLASLINK=-lopenblas export LIBBLAS=libopenblas -export INCBLAS=-I%{_includedir}/openblas +export INCBLAS=%{_includedir}/openblas %ifarch s390x x86_64 export LIBSUPERLUMTLINK=-lsuperlumt64_d @@ -252,9 +219,12 @@ export LIBSUPERLUMTLINK= %undefine _hardened_build export CFLAGS="" %if 0%{?rhel} -%global cmake cmake3 +%global _cmake cmake3 %endif -%cmake \ +%if 0%{?fedora} +%global _cmake cmake +%endif +%_cmake \ -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ -DCMAKE_BUILD_TYPE:STRING=Debug \ -DCMAKE_C_FLAGS_DEBUG:STRING="-O0 -g -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -I$INCBLAS" \ @@ -278,13 +248,18 @@ export CFLAGS="" -DBLAS_LIBRARIES:STRING=%{_libdir}/$LIBBLAS.so \ -DCMAKE_MODULE_LINKER_FLAGS:STRING="%{__global_ldflags}" \ -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} -DCMAKE_INSTALL_LIBDIR:PATH=%{_lib} \ - -DPYTHON_EXECUTABLE:FILEPATH=%{__python2} \ - -DEXAMPLES_ENABLE_CXX:BOOL=ON -DEXAMPLES_ENABLE_C:BOOL=ON -DEXAMPLES_ENABLE_F77:BOOL=ON \ + -DPYTHON_EXECUTABLE:FILEPATH=%{__python3} \ + -DEXAMPLES_ENABLE_CXX:BOOL=ON -DEXAMPLES_ENABLE_C:BOOL=ON \ -DCMAKE_SKIP_RPATH:BOOL=YES -DCMAKE_SKIP_INSTALL_RPATH:BOOL=YES \ -DBUILD_SHARED_LIBS:BOOL=ON -DBUILD_STATIC_LIBS:BOOL=OFF \ -DMPI_ENABLE:BOOL=OFF \ - -DCMAKE_Fortran_COMPILER:STRING=gfortran \ - -DFCMIX_ENABLE:BOOL=ON \ +%if 0%{?with_fortran} + -DF77_INTERFACE_ENABLE:BOOL=ON \ + -DEXAMPLES_ENABLE_F77:BOOL=ON \ + -DF2003_INTERFACE_ENABLE:BOOL=ON \ + -DEXAMPLES_ENABLE_F90:BOOL=ON \ + -DFortran_INSTALL_MODDIR:PATH=%{_fmoddir}/%{name} \ +%endif -DUSE_GENERIC_MATH:BOOL=ON \ -DOPENMP_ENABLE:BOOL=ON \ -DPTHREAD_ENABLE:BOOL=ON \ @@ -308,25 +283,19 @@ popd %if 0%{?with_openmpi} pushd buildopenmpi_dir ##Set openmpi library's paths -sed -i 's|DESTINATION include/nvector|DESTINATION %{_includedir}/openmpi-%{_arch}/nvector|g' src/nvec_par/CMakeLists.txt -sed -i 's|CMAKE_INSTALL_LIBDIR}|CMAKE_INSTALL_LIBDIR}/openmpi/lib|g' src/nvec_par/CMakeLists.txt -sed -i 's|DESTINATION include/nvector|DESTINATION %{_includedir}/openmpi-%{_arch}/nvector|g' src/nvec_parhyp/CMakeLists.txt -sed -i 's|CMAKE_INSTALL_LIBDIR}|CMAKE_INSTALL_LIBDIR}/openmpi/lib|g' src/nvec_parhyp/CMakeLists.txt +sed -i 's|DESTINATION include/nvector|DESTINATION %{_includedir}/openmpi-%{_arch}/nvector|g' src/nvector/parallel/CMakeLists.txt +sed -i 's|DESTINATION include/nvector|DESTINATION %{_includedir}/openmpi-%{_arch}/nvector|g' src/nvector/parhyp/CMakeLists.txt %if 0%{?with_petsc} -sed -i 's|DESTINATION include/nvector|DESTINATION %{_includedir}/openmpi-%{_arch}/nvector|g' src/nvec_petsc/CMakeLists.txt -sed -i 's|CMAKE_INSTALL_LIBDIR}|CMAKE_INSTALL_LIBDIR}/openmpi/lib|g' src/nvec_petsc/CMakeLists.txt +sed -i 's|DESTINATION include/nvector|DESTINATION %{_includedir}/openmpi-%{_arch}/nvector|g' src/nvector/petsc/CMakeLists.txt %endif mkdir -p build && cd build %{_openmpi_load} -export CC=mpicc -export CXX=mpicxx -export FC=mpif77 ## Blas export LIBBLASLINK=-lopenblas export LIBBLAS=libopenblas -export INCBLAS=-I%{_includedir}/openblas +export INCBLAS=%{_includedir}/openblas ## ## SuperLUMT %ifarch s390x x86_64 @@ -348,9 +317,12 @@ export LIBHYPRELINK="-L$MPI_LIB -lHYPRE" %undefine _hardened_build export CFLAGS="" %if 0%{?rhel} -%global cmake cmake3 +%global _cmake cmake3 %endif -%cmake \ +%if 0%{?fedora} +%global _cmake cmake +%endif +%_cmake \ -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ -DCMAKE_BUILD_TYPE:STRING=Debug \ -DCMAKE_C_FLAGS_DEBUG:STRING="-O0 -g -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -I$INCBLAS" \ @@ -377,20 +349,24 @@ export CFLAGS="" -DPETSC_INCLUDE_DIR:PATH=$MPI_INCLUDE/petsc \ -DPETSC_LIBRARY_DIR:PATH=$MPI_LIB \ %endif - -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} -DCMAKE_INSTALL_LIBDIR:PATH=%{_lib} \ - -DPYTHON_EXECUTABLE:FILEPATH=%{__python2} \ - -DEXAMPLES_ENABLE_CXX:BOOL=ON -DEXAMPLES_ENABLE_C:BOOL=ON -DEXAMPLES_ENABLE_F77:BOOL=ON \ + -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} -DCMAKE_INSTALL_LIBDIR:PATH=%{_lib}/openmpi/lib \ + -DPYTHON_EXECUTABLE:FILEPATH=%{__python3} \ + -DEXAMPLES_ENABLE_CXX:BOOL=ON -DEXAMPLES_ENABLE_C:BOOL=ON \ -DBUILD_SHARED_LIBS:BOOL=ON -DBUILD_STATIC_LIBS:BOOL=OFF \ -DCMAKE_SKIP_RPATH:BOOL=YES -DCMAKE_SKIP_INSTALL_RPATH:BOOL=YES \ -DMPI_ENABLE:BOOL=ON \ - -DMPI_C_COMPILER:STRING=$MPI_BIN/mpicc \ - -DMPIEXEC_EXECUTABLE=$MPI_BIN/mpirun \ +%if 0%{?with_fortran} %if 0%{?fedora} -DMPI_Fortran_COMPILER:STRING=$MPI_BIN/mpifort \ %else -DMPI_Fortran_COMPILER:STRING=$MPI_BIN/mpif77 \ %endif - -DFCMIX_ENABLE:BOOL=ON \ + -DF77_INTERFACE_ENABLE:BOOL=ON \ + -DEXAMPLES_ENABLE_F77:BOOL=ON \ + -DF2003_INTERFACE_ENABLE:BOOL=ON \ + -DEXAMPLES_ENABLE_F90:BOOL=ON \ + -DFortran_INSTALL_MODDIR:PATH=$MPI_FORTRAN_MOD_DIR/%{name} \ +%endif -DUSE_GENERIC_MATH:BOOL=ON \ -DOPENMP_ENABLE:BOOL=ON \ -DPTHREAD_ENABLE:BOOL=ON \ @@ -419,33 +395,19 @@ popd %if 0%{?with_mpich} pushd buildmpich_dir ##Set mpich library's paths -sed -i 's|DESTINATION include/nvector|DESTINATION %{_includedir}/mpich-%{_arch}/nvector|g' src/nvec_par/CMakeLists.txt -sed -i 's|CMAKE_INSTALL_LIBDIR}|CMAKE_INSTALL_LIBDIR}/mpich/lib|g' src/nvec_par/CMakeLists.txt -sed -i 's|DESTINATION include/nvector|DESTINATION %{_includedir}/mpich-%{_arch}/nvector|g' src/nvec_parhyp/CMakeLists.txt -sed -i 's|CMAKE_INSTALL_LIBDIR}|CMAKE_INSTALL_LIBDIR}/mpich/lib|g' src/nvec_parhyp/CMakeLists.txt +sed -i 's|DESTINATION include/nvector|DESTINATION %{_includedir}/mpich-%{_arch}/nvector|g' src/nvector/parallel/CMakeLists.txt +sed -i 's|DESTINATION include/nvector|DESTINATION %{_includedir}/mpich-%{_arch}/nvector|g' src/nvector/parhyp/CMakeLists.txt %if 0%{?with_petsc} -sed -i 's|DESTINATION include/nvector|DESTINATION %{_includedir}/mpich-%{_arch}/nvector|g' src/nvec_petsc/CMakeLists.txt -sed -i 's|CMAKE_INSTALL_LIBDIR}|CMAKE_INSTALL_LIBDIR}/mpich/lib|g' src/nvec_petsc/CMakeLists.txt +sed -i 's|DESTINATION include/nvector|DESTINATION %{_includedir}/mpich-%{_arch}/nvector|g' src/nvector/petsc/CMakeLists.txt %endif mkdir -p build && cd build %{_mpich_load} -%if 0%{?rhel} -export CC=mpicc -export CXX=mpicxx -export F77=mpif77 -export FC=mpif90 -%endif -%if 0%{?fedora} -export CC=mpicc -export CXX=mpicxx -export F77=mpifort -export FC=mpifort -%endif + ## Blas export LIBBLASLINK=-lopenblas export LIBBLAS=libopenblas -export INCBLAS=-I%{_includedir}/openblas +export INCBLAS=%{_includedir}/openblas ## ## SuperLUMT %ifarch s390x x86_64 @@ -467,9 +429,12 @@ export LIBHYPRELINK="-L$MPI_LIB -lHYPRE" %undefine _hardened_build export CFLAGS="" %if 0%{?rhel} -%global cmake cmake3 +%global _cmake cmake3 %endif -%cmake \ +%if 0%{?fedora} +%global _cmake cmake +%endif +%_cmake \ -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ -DCMAKE_BUILD_TYPE:STRING=Debug \ -DCMAKE_C_FLAGS_DEBUG:STRING="-O0 -g -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -I$INCBLAS" \ @@ -496,20 +461,24 @@ export CFLAGS="" -DPETSC_INCLUDE_DIR:PATH=$MPI_INCLUDE/petsc \ -DPETSC_LIBRARY_DIR:PATH=$MPI_LIB \ %endif - -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} -DCMAKE_INSTALL_LIBDIR:PATH=%{_lib} \ - -DPYTHON_EXECUTABLE:FILEPATH=%{__python2} \ - -DEXAMPLES_ENABLE_CXX:BOOL=ON -DEXAMPLES_ENABLE_C:BOOL=ON -DEXAMPLES_ENABLE_F77:BOOL=ON \ + -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} -DCMAKE_INSTALL_LIBDIR:PATH=%{_lib}/mpich/lib \ + -DPYTHON_EXECUTABLE:FILEPATH=%{__python3} \ + -DEXAMPLES_ENABLE_CXX:BOOL=ON -DEXAMPLES_ENABLE_C:BOOL=ON \ -DBUILD_SHARED_LIBS:BOOL=ON -DBUILD_STATIC_LIBS:BOOL=OFF \ -DCMAKE_SKIP_RPATH:BOOL=YES -DCMAKE_SKIP_INSTALL_RPATH:BOOL=YES \ -DMPI_ENABLE:BOOL=ON \ - -DMPI_C_COMPILER:STRING=$MPI_BIN/mpicc \ - -DMPIEXEC_EXECUTABLE=$MPI_BIN/mpirun \ +%if 0%{?with_fortran} %if 0%{?fedora} -DMPI_Fortran_COMPILER:STRING=$MPI_BIN/mpifort \ %else -DMPI_Fortran_COMPILER:STRING=$MPI_BIN/mpif77 \ %endif - -DFCMIX_ENABLE:BOOL=ON \ + -DF77_INTERFACE_ENABLE:BOOL=ON \ + -DEXAMPLES_ENABLE_F77:BOOL=ON \ + -DF2003_INTERFACE_ENABLE:BOOL=ON \ + -DEXAMPLES_ENABLE_F90:BOOL=ON \ + -DFortran_INSTALL_MODDIR:PATH=$MPI_FORTRAN_MOD_DIR/%{name} \ +%endif -DUSE_GENERIC_MATH:BOOL=ON \ -DOPENMP_ENABLE:BOOL=ON \ -DPTHREAD_ENABLE:BOOL=ON \ @@ -539,30 +508,24 @@ popd %if 0%{?with_openmpi} %{_openmpi_load} %make_install -C buildopenmpi_dir/build - -# Remove static libraries -rm -f %{buildroot}$MPI_LIB/*.a %{_openmpi_unload} %endif %if 0%{?with_mpich} %{_mpich_load} %make_install -C buildmpich_dir/build - -# Remove static libraries -rm -f %{buildroot}$MPI_LIB/*.a %{_mpich_unload} %endif %make_install -C sundials-%{version}/build -# Remove static libraries -rm -f %{buildroot}%{_libdir}/*.a - # Remove files in bad position rm -f %{buildroot}%{_prefix}/LICENSE rm -f %{buildroot}%{_includedir}/sundials/LICENSE +# Remove static files +find %{buildroot} -name '*.a' -exec rm -f {} ';' + %ldconfig_scriptlets %check @@ -570,10 +533,11 @@ rm -f %{buildroot}%{_includedir}/sundials/LICENSE %if 0%{?with_openmpicheck} pushd buildopenmpi_dir/build %{_openmpi_load} -export LD_LIBRARY_PATH=%{buildroot}$MPI_LIB:%{buildroot}%{_libdir} %if %{with debug} +export LD_LIBRARY_PATH=%{buildroot}$MPI_LIB:$MPI_LIB ctest3 --force-new-ctest-process -VV %{?_smp_mflags} --output-on-failure --debug %else +export LD_LIBRARY_PATH=%{buildroot}$MPI_LIB:$MPI_LIB ctest3 --force-new-ctest-process %{?_smp_mflags} %endif %{_openmpi_unload} @@ -585,10 +549,11 @@ popd %if 0%{?with_mpichcheck} pushd buildmpich_dir/build %{_mpich_load} -export LD_LIBRARY_PATH=%{buildroot}$MPI_LIB:%{buildroot}%{_libdir} %if %{with debug} +export LD_LIBRARY_PATH=%{buildroot}$MPI_LIB:$MPI_LIB ctest3 --force-new-ctest-process -VV %{?_smp_mflags} --output-on-failure --debug %else +export LD_LIBRARY_PATH=%{buildroot}$MPI_LIB:$MPI_LIB ctest3 --force-new-ctest-process %{?_smp_mflags} %endif %{_mpich_unload} @@ -598,10 +563,11 @@ popd %if 0%{?with_sercheck} pushd sundials-%{version}/build -export LD_LIBRARY_PATH=%{buildroot}%{_libdir} %if %{with debug} +export LD_LIBRARY_PATH=%{buildroot}%{_libdir}:%{_libdir} ctest3 --force-new-ctest-process -VV %{?_smp_mflags} --output-on-failure --debug %else +export LD_LIBRARY_PATH=%{buildroot}%{_libdir}:%{_libdir} ctest3 --force-new-ctest-process %{?_smp_mflags} %endif popd @@ -624,6 +590,10 @@ popd %{_includedir}/nvector/ %{_includedir}/sunlinsol/ %{_includedir}/sunmatrix/ +%{_includedir}/sunnonlinsol/ +%if 0%{?with_fortran} +%{_fmoddir}/%{name}/ +%endif %if 0%{?with_openmpi} %files openmpi @@ -633,6 +603,9 @@ popd %files openmpi-devel %{_includedir}/openmpi-%{_arch}/nvector/ +%if 0%{?with_fortran} +%{_fmoddir}/openmpi%{?el7:-%_arch}/%{name}/ +%endif %{_libdir}/openmpi/lib/libsundials*.so %endif @@ -644,6 +617,9 @@ popd %files mpich-devel %{_includedir}/mpich-%{_arch}/nvector/ +%if 0%{?with_fortran} +%{_fmoddir}/mpich%{?el7:-%_arch}/%{name}/ +%endif %{_libdir}/mpich/lib/libsundials*.so %endif @@ -657,6 +633,12 @@ popd %doc sundials-%{version}/doc/arkode/* %changelog +* Sun Apr 21 2019 Antonio Trande - 4.1.0-1 +- Release 4.1.0 +- Re-enable OpenMPI tests (rhbz#1639646) +- Use Python3 +- Compile Fortran libraries + * Thu Feb 14 2019 Orion Poplawski - 3.2.1-4 - Rebuild for openmpi 3.1.3 - Disable tests of MPI libraries for "not enough slots available" errors From 96b64ebad29b9366399af7cd0813f5dadc556d37 Mon Sep 17 00:00:00 2001 From: sagitter Date: Tue, 23 Apr 2019 13:07:23 +0200 Subject: [PATCH 32/36] Exclude MPI tests on s390x --- sundials.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sundials.spec b/sundials.spec index fc22c9c..4ced894 100644 --- a/sundials.spec +++ b/sundials.spec @@ -19,8 +19,10 @@ %global with_petsc 1 ########### +%ifnarch s390x %global with_openmpicheck 1 %global with_mpichcheck 1 +%endif %global with_sercheck 1 ## Fortran ## From 76d3c19213a3de2c3763bb37176f6ac702a1fa49 Mon Sep 17 00:00:00 2001 From: sagitter Date: Thu, 25 Apr 2019 21:20:14 +0200 Subject: [PATCH 33/36] Reorganization of the files --- sundials.spec | 202 ++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 179 insertions(+), 23 deletions(-) diff --git a/sundials.spec b/sundials.spec index 4ced894..0d1f959 100644 --- a/sundials.spec +++ b/sundials.spec @@ -12,7 +12,9 @@ %global with_mpich 1 %endif +## Hypre ## %global with_hypre 1 +########### ## PETSc ## %global with_petsc 1 @@ -36,12 +38,12 @@ Summary: Suite of nonlinear solvers Name: sundials Version: 4.1.0 -Release: 1%{?dist} +Release: 2%{?dist} # SUNDIALS is licensed under BSD with some additional (but unrestrictive) clauses. # Check the file 'LICENSE' for details. License: BSD -URL: http://www.llnl.gov/casc/sundials/ -Source0: https://computation.llnl.gov/projects/sundials/download/sundials-%{version}.tar.gz +URL: https://computation.llnl.gov/projects/sundials +Source0: %{url}/download/sundials-%{version}.tar.gz # This patch rename superLUMT library Patch0: %{name}-3.1.1-set_superlumt_name.patch @@ -287,6 +289,7 @@ pushd buildopenmpi_dir ##Set openmpi library's paths sed -i 's|DESTINATION include/nvector|DESTINATION %{_includedir}/openmpi-%{_arch}/nvector|g' src/nvector/parallel/CMakeLists.txt sed -i 's|DESTINATION include/nvector|DESTINATION %{_includedir}/openmpi-%{_arch}/nvector|g' src/nvector/parhyp/CMakeLists.txt +sed -i 's|DESTINATION include/sundials|DESTINATION %{_includedir}/openmpi-%{_arch}/sundials|g' src/sundials/CMakeLists.txt %if 0%{?with_petsc} sed -i 's|DESTINATION include/nvector|DESTINATION %{_includedir}/openmpi-%{_arch}/nvector|g' src/nvector/petsc/CMakeLists.txt %endif @@ -315,6 +318,16 @@ export LIBHYPRELINK="-L$MPI_LIB -lHYPRE" %endif ## +# Force MPI compilers +export CC=$MPI_BIN/mpicc +export CXX=$MPI_BIN/mpic++ +%if 0%{?fedora} +export FC=$MPI_BIN/mpifort +%else +export FC=$MPI_BIN/mpif77 +%endif +## + %if %{with debug} %undefine _hardened_build export CFLAGS="" @@ -399,6 +412,7 @@ pushd buildmpich_dir ##Set mpich library's paths sed -i 's|DESTINATION include/nvector|DESTINATION %{_includedir}/mpich-%{_arch}/nvector|g' src/nvector/parallel/CMakeLists.txt sed -i 's|DESTINATION include/nvector|DESTINATION %{_includedir}/mpich-%{_arch}/nvector|g' src/nvector/parhyp/CMakeLists.txt +sed -i 's|DESTINATION include/sundials|DESTINATION %{_includedir}/mpich-%{_arch}/sundials|g' src/sundials/CMakeLists.txt %if 0%{?with_petsc} sed -i 's|DESTINATION include/nvector|DESTINATION %{_includedir}/mpich-%{_arch}/nvector|g' src/nvector/petsc/CMakeLists.txt %endif @@ -427,6 +441,16 @@ export LIBHYPRELINK="-L$MPI_LIB -lHYPRE" %endif ## +# Force MPI compilers +export CC=$MPI_BIN/mpicc +export CXX=$MPI_BIN/mpic++ +%if 0%{?fedora} +export FC=$MPI_BIN/mpifort +%else +export FC=$MPI_BIN/mpif77 +%endif +## + %if %{with debug} %undefine _hardened_build export CFLAGS="" @@ -577,52 +601,181 @@ popd %files %license sundials-%{version}/LICENSE -%doc sundials-%{version}/README.md sundials-%{version}/src/README-* -%{_libdir}/libsundials*.so.* +%doc sundials-%{version}/README.md +%doc sundials-%{version}/src/README-arkode +%doc sundials-%{version}/src/README-cvode +%doc sundials-%{version}/src/README-cvodes +%doc sundials-%{version}/src/README-ida +%doc sundials-%{version}/src/README.idas +%doc sundials-%{version}/src/README-kinsol +%doc sundials-%{version}/NOTICE +%{_libdir}/libsundials_ida*.so.* +%{_libdir}/libsundials_cvode*.so.* +%{_libdir}/libsundials_arkode*.so.* +%{_libdir}/libsundials_kinsol.so.* +%{_libdir}/libsundials_nvecserial.so.* +%{_libdir}/libsundials_nvecopenmp.so.* +%{_libdir}/libsundials_sunmatrix*.so.* +%{_libdir}/libsundials_sunlinsol*.so.* +%{_libdir}/libsundials_sunnonlinsol*.so.* +%if 0%{?with_fortran} +%{_libdir}/libsundials_fnvecserial.so.* +%{_libdir}/libsundials_fnvecserial_mod.so.* +%{_libdir}/libsundials_fnvecopenmp.so.* +%{_libdir}/libsundials_fnvecopenmp_mod.so.* +%{_libdir}/libsundials_fsunmatrix*.so.* +%{_libdir}/libsundials_fsunlinsol*.so.* +%{_libdir}/libsundials_fsunnonlinsol*.so.* +%endif %files devel -%{_libdir}/libsundials*.so -%{_includedir}/sundials/ -%{_includedir}/cvode/ -%{_includedir}/cvodes/ -%{_includedir}/arkode/ -%{_includedir}/ida/ -%{_includedir}/idas/ -%{_includedir}/kinsol/ -%{_includedir}/nvector/ -%{_includedir}/sunlinsol/ -%{_includedir}/sunmatrix/ -%{_includedir}/sunnonlinsol/ +%{_libdir}/libsundials_ida*.so +%{_libdir}/libsundials_cvode*.so +%{_libdir}/libsundials_arkode*.so +%{_libdir}/libsundials_kinsol.so +%{_libdir}/libsundials_nvecserial.so +%{_libdir}/libsundials_nvecopenmp.so +%{_libdir}/libsundials_sunmatrix*.so +%{_libdir}/libsundials_sunlinsol*.so +%{_libdir}/libsundials_sunnonlinsol*.so %if 0%{?with_fortran} %{_fmoddir}/%{name}/ +%{_libdir}/libsundials_fcvode_mod.so +%{_libdir}/libsundials_fnvecserial.so +%{_libdir}/libsundials_fnvecserial_mod.so +%{_libdir}/libsundials_fnvecopenmp.so +%{_libdir}/libsundials_fnvecopenmp_mod.so +%{_libdir}/libsundials_fsunmatrix*.so +%{_libdir}/libsundials_fsunlinsol*.so +%{_libdir}/libsundials_fsunnonlinsol*.so %endif +%{_includedir}/{sundials,nvector,sunmatrix,sunlinsol,sunnonlinsol,arkode,cvode,cvodes,ida,idas,kinsol} %if 0%{?with_openmpi} %files openmpi %license sundials-%{version}/LICENSE -%doc sundials-%{version}/README.md sundials-%{version}/src/README-* -%{_libdir}/openmpi/lib/libsundials*.so.* +%doc sundials-%{version}/README.md +%doc sundials-%{version}/src/README-arkode +%doc sundials-%{version}/src/README-cvode +%doc sundials-%{version}/src/README-cvodes +%doc sundials-%{version}/src/README-ida +%doc sundials-%{version}/src/README.idas +%doc sundials-%{version}/src/README-kinsol +%doc sundials-%{version}/NOTICE +%{_libdir}/openmpi/lib/libsundials_nvecparallel.so.* +%{_libdir}/openmpi/lib/libsundials_nvecparhyp.so.* +%{_libdir}/openmpi/lib/libsundials_nvecpetsc.so.* +%exclude %{_libdir}/openmpi/lib/libsundials_kinsol.so.* +%exclude %{_libdir}/openmpi/lib/libsundials_ida*.so.* +%exclude %{_libdir}/openmpi/lib/libsundials_cvode*.so.* +%exclude %{_libdir}/openmpi/lib/libsundials_arkode*.so.* +%exclude %{_libdir}/openmpi/lib/libsundials_nvecserial.so.* +%exclude %{_libdir}/openmpi/lib/libsundials_nvecopenmp.so.* +%exclude %{_libdir}/openmpi/lib/libsundials_sunmatrix*.so.* +%exclude %{_libdir}/openmpi/lib/libsundials_sunlinsol*.so.* +%exclude %{_libdir}/openmpi/lib/libsundials_sunnonlinsol*.so.* +%if 0%{?with_fortran} +%{_libdir}/openmpi/lib/libsundials_fnvecparallel.so.* +%exclude %{_libdir}/openmpi/lib/libsundials_fnvecserial.so.* +%exclude %{_libdir}/openmpi/lib/libsundials_fnvecserial_mod.so.* +%exclude %{_libdir}/openmpi/lib/libsundials_fnvecopenmp.so.* +%exclude %{_libdir}/openmpi/lib/libsundials_fnvecopenmp_mod.so.* +%exclude %{_libdir}/openmpi/lib/libsundials_fsunmatrix*.so.* +%exclude %{_libdir}/openmpi/lib/libsundials_fsunlinsol*.so.* +%exclude %{_libdir}/openmpi/lib/libsundials_fsunnonlinsol*.so.* +%endif %files openmpi-devel %{_includedir}/openmpi-%{_arch}/nvector/ +%{_includedir}/openmpi-%{_arch}/sundials/ %if 0%{?with_fortran} %{_fmoddir}/openmpi%{?el7:-%_arch}/%{name}/ +%{_libdir}/openmpi/lib/libsundials_fnvecparallel.so +%exclude %{_libdir}/openmpi/lib/libsundials_fcvode_mod.so +%exclude %{_libdir}/openmpi/lib/libsundials_fnvecserial.so +%exclude %{_libdir}/openmpi/lib/libsundials_fnvecserial_mod.so +%exclude %{_libdir}/openmpi/lib/libsundials_fnvecopenmp.so +%exclude %{_libdir}/openmpi/lib/libsundials_fnvecopenmp_mod.so +%exclude %{_libdir}/openmpi/lib/libsundials_fsunmatrix*.so +%exclude %{_libdir}/openmpi/lib/libsundials_fsunlinsol*.so +%exclude %{_libdir}/openmpi/lib/libsundials_fsunnonlinsol*.so %endif -%{_libdir}/openmpi/lib/libsundials*.so +%{_libdir}/openmpi/lib/libsundials_nvecparallel.so +%{_libdir}/openmpi/lib/libsundials_nvecparhyp.so +%{_libdir}/openmpi/lib/libsundials_nvecpetsc.so +%exclude %{_libdir}/openmpi/lib/libsundials_kinsol.so +%exclude %{_libdir}/openmpi/lib/libsundials_ida*.so +%exclude %{_libdir}/openmpi/lib/libsundials_cvode*.so +%exclude %{_libdir}/openmpi/lib/libsundials_arkode*.so +%exclude %{_libdir}/openmpi/lib/libsundials_nvecserial.so +%exclude %{_libdir}/openmpi/lib/libsundials_nvecopenmp.so +%exclude %{_libdir}/openmpi/lib/libsundials_sunmatrix*.so +%exclude %{_libdir}/openmpi/lib/libsundials_sunlinsol*.so +%exclude %{_libdir}/openmpi/lib/libsundials_sunnonlinsol*.so %endif %if 0%{?with_mpich} %files mpich %license sundials-%{version}/LICENSE -%doc sundials-%{version}/README.md sundials-%{version}/src/README-* -%{_libdir}/mpich/lib/libsundials*.so.* +%doc sundials-%{version}/README.md +%doc sundials-%{version}/src/README-arkode +%doc sundials-%{version}/src/README-cvode +%doc sundials-%{version}/src/README-cvodes +%doc sundials-%{version}/src/README-ida +%doc sundials-%{version}/src/README.idas +%doc sundials-%{version}/src/README-kinsol +%doc sundials-%{version}/NOTICE +%{_libdir}/mpich/lib/libsundials_nvecparallel.so.* +%{_libdir}/mpich/lib/libsundials_nvecparhyp.so.* +%{_libdir}/mpich/lib/libsundials_nvecpetsc.so.* +%exclude %{_libdir}/mpich/lib/libsundials_kinsol.so.* +%exclude %{_libdir}/mpich/lib/libsundials_ida*.so.* +%exclude %{_libdir}/mpich/lib/libsundials_cvode*.so.* +%exclude %{_libdir}/mpich/lib/libsundials_arkode*.so.* +%exclude %{_libdir}/mpich/lib/libsundials_nvecserial.so.* +%exclude %{_libdir}/mpich/lib/libsundials_nvecopenmp.so.* +%exclude %{_libdir}/mpich/lib/libsundials_sunmatrix*.so.* +%exclude %{_libdir}/mpich/lib/libsundials_sunlinsol*.so.* +%exclude %{_libdir}/mpich/lib/libsundials_sunnonlinsol*.so.* +%if 0%{?with_fortran} +%{_libdir}/mpich/lib/libsundials_fnvecparallel.so.* +%exclude %{_libdir}/mpich/lib/libsundials_fnvecserial.so.* +%exclude %{_libdir}/mpich/lib/libsundials_fnvecserial_mod.so.* +%exclude %{_libdir}/mpich/lib/libsundials_fnvecopenmp.so.* +%exclude %{_libdir}/mpich/lib/libsundials_fnvecopenmp_mod.so.* +%exclude %{_libdir}/mpich/lib/libsundials_fsunmatrix*.so.* +%exclude %{_libdir}/mpich/lib/libsundials_fsunlinsol*.so.* +%exclude %{_libdir}/mpich/lib/libsundials_fsunnonlinsol*.so.* +%endif + %files mpich-devel %{_includedir}/mpich-%{_arch}/nvector/ +%{_includedir}/mpich-%{_arch}/sundials/ %if 0%{?with_fortran} %{_fmoddir}/mpich%{?el7:-%_arch}/%{name}/ +%{_libdir}/mpich/lib/libsundials_fnvecparallel.so +%exclude %{_libdir}/mpich/lib/libsundials_fcvode_mod.so +%exclude %{_libdir}/mpich/lib/libsundials_fnvecserial.so +%exclude %{_libdir}/mpich/lib/libsundials_fnvecserial_mod.so +%exclude %{_libdir}/mpich/lib/libsundials_fnvecopenmp.so +%exclude %{_libdir}/mpich/lib/libsundials_fnvecopenmp_mod.so +%exclude %{_libdir}/mpich/lib/libsundials_fsunmatrix*.so +%exclude %{_libdir}/mpich/lib/libsundials_fsunlinsol*.so +%exclude %{_libdir}/mpich/lib/libsundials_fsunnonlinsol*.so %endif -%{_libdir}/mpich/lib/libsundials*.so +%{_libdir}/mpich/lib/libsundials_nvecparallel.so +%{_libdir}/mpich/lib/libsundials_nvecparhyp.so +%{_libdir}/mpich/lib/libsundials_nvecpetsc.so +%exclude %{_libdir}/mpich/lib/libsundials_kinsol.so +%exclude %{_libdir}/mpich/lib/libsundials_ida*.so +%exclude %{_libdir}/mpich/lib/libsundials_cvode*.so +%exclude %{_libdir}/mpich/lib/libsundials_arkode*.so +%exclude %{_libdir}/mpich/lib/libsundials_nvecserial.so +%exclude %{_libdir}/mpich/lib/libsundials_nvecopenmp.so +%exclude %{_libdir}/mpich/lib/libsundials_sunmatrix*.so +%exclude %{_libdir}/mpich/lib/libsundials_sunlinsol*.so +%exclude %{_libdir}/mpich/lib/libsundials_sunnonlinsol*.so %endif %files doc @@ -635,6 +788,9 @@ popd %doc sundials-%{version}/doc/arkode/* %changelog +* Thu Apr 25 2019 Antonio Trande - 4.1.0-2 +- Reorganization of the files + * Sun Apr 21 2019 Antonio Trande - 4.1.0-1 - Release 4.1.0 - Re-enable OpenMPI tests (rhbz#1639646) From abc773e6126f1c819a636a7021a9614b1030e375 Mon Sep 17 00:00:00 2001 From: sagitter Date: Fri, 28 Jun 2019 20:07:01 +0200 Subject: [PATCH 34/36] Do not use curly brackets under %%files| Rebuild for petsc-3.11.3 --- sundials.spec | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/sundials.spec b/sundials.spec index 0d1f959..28cacef 100644 --- a/sundials.spec +++ b/sundials.spec @@ -38,7 +38,7 @@ Summary: Suite of nonlinear solvers Name: sundials Version: 4.1.0 -Release: 2%{?dist} +Release: 3%{?dist} # SUNDIALS is licensed under BSD with some additional (but unrestrictive) clauses. # Check the file 'LICENSE' for details. License: BSD @@ -568,8 +568,10 @@ ctest3 --force-new-ctest-process %{?_smp_mflags} %endif %{_openmpi_unload} popd -%endif ## if with_openmpicheck -%endif ## if with_openmpi +%endif +## if with_openmpicheck +%endif +## if with_openmpi %if 0%{?with_mpich} %if 0%{?with_mpichcheck} @@ -584,8 +586,10 @@ ctest3 --force-new-ctest-process %{?_smp_mflags} %endif %{_mpich_unload} popd -%endif ## if with_mpichcheck -%endif ## if with_mpich +%endif +## if with_mpichcheck +%endif +## if with_mpich %if 0%{?with_sercheck} pushd sundials-%{version}/build @@ -597,7 +601,8 @@ export LD_LIBRARY_PATH=%{buildroot}%{_libdir}:%{_libdir} ctest3 --force-new-ctest-process %{?_smp_mflags} %endif popd -%endif ## if with_sercheck +%endif +## if with_sercheck %files %license sundials-%{version}/LICENSE @@ -639,6 +644,7 @@ popd %{_libdir}/libsundials_sunlinsol*.so %{_libdir}/libsundials_sunnonlinsol*.so %if 0%{?with_fortran} +%{_includedir}/sundials/sundials_fconfig.h %{_fmoddir}/%{name}/ %{_libdir}/libsundials_fcvode_mod.so %{_libdir}/libsundials_fnvecserial.so @@ -649,7 +655,18 @@ popd %{_libdir}/libsundials_fsunlinsol*.so %{_libdir}/libsundials_fsunnonlinsol*.so %endif -%{_includedir}/{sundials,nvector,sunmatrix,sunlinsol,sunnonlinsol,arkode,cvode,cvodes,ida,idas,kinsol} +%dir %{_includedir}/sundials +%{_includedir}/sundials/sundials_config.h +%{_includedir}/nvector/ +%{_includedir}/sunmatrix/ +%{_includedir}/sunlinsol/ +%{_includedir}/sunnonlinsol/ +%{_includedir}/arkode/ +%{_includedir}/cvode/ +%{_includedir}/cvodes/ +%{_includedir}/ida/ +%{_includedir}/idas/ +%{_includedir}/kinsol/ %if 0%{?with_openmpi} %files openmpi @@ -788,6 +805,9 @@ popd %doc sundials-%{version}/doc/arkode/* %changelog +* Wed Jun 26 2019 Antonio Trande - 4.1.0-3 +- Do not use curly brackets under %%files + * Thu Apr 25 2019 Antonio Trande - 4.1.0-2 - Reorganization of the files From 895b67c62171ae7ed6f05f303e4ac11a0ac34b63 Mon Sep 17 00:00:00 2001 From: sagitter Date: Fri, 28 Jun 2019 22:29:57 +0200 Subject: [PATCH 35/36] PETSc needs HDF5| Patched for disabling the PETSc tests of CMake --- sundials-disable_petsc_tests.patch | 75 ++++++++++++++++++++++++++++++ sundials.spec | 12 ++++- 2 files changed, 85 insertions(+), 2 deletions(-) create mode 100644 sundials-disable_petsc_tests.patch diff --git a/sundials-disable_petsc_tests.patch b/sundials-disable_petsc_tests.patch new file mode 100644 index 0000000..8541dee --- /dev/null +++ b/sundials-disable_petsc_tests.patch @@ -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 diff --git a/sundials.spec b/sundials.spec index 28cacef..6c0ab93 100644 --- a/sundials.spec +++ b/sundials.spec @@ -51,6 +51,10 @@ Patch0: %{name}-3.1.1-set_superlumt_name.patch # This patch rename superLUMT64 library 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} BuildRequires: gcc-gfortran %endif @@ -103,6 +107,7 @@ BuildRequires: hypre-openmpi-devel %if 0%{?with_petsc} BuildRequires: petsc-openmpi-devel >= 3.10 BuildRequires: scalapack-openmpi-devel +BuildRequires: hdf5-openmpi-devel %endif Requires: openmpi%{?_isa} @@ -136,6 +141,7 @@ BuildRequires: hypre-mpich-devel %if 0%{?with_petsc} BuildRequires: petsc-mpich-devel >= 3.10 BuildRequires: scalapack-mpich-devel +BuildRequires: hdf5-mpich-devel %endif Requires: mpich%{?_isa} %if 0%{?with_fortran} @@ -180,6 +186,8 @@ pushd sundials-%{version} %patch0 -p0 %endif +%patch2 -p1 -b .disable_petsc_tests + ##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/openmp/CMakeLists.txt @@ -655,8 +663,7 @@ popd %{_libdir}/libsundials_fsunlinsol*.so %{_libdir}/libsundials_fsunnonlinsol*.so %endif -%dir %{_includedir}/sundials -%{_includedir}/sundials/sundials_config.h +%{_includedir}/sundials/ %{_includedir}/nvector/ %{_includedir}/sunmatrix/ %{_includedir}/sunlinsol/ @@ -807,6 +814,7 @@ popd %changelog * Wed Jun 26 2019 Antonio Trande - 4.1.0-3 - Do not use curly brackets under %%files +- PETSc needs HDF5 * Thu Apr 25 2019 Antonio Trande - 4.1.0-2 - Reorganization of the files From 41a145bb2f8c7556910c5c8875f8be855c957b29 Mon Sep 17 00:00:00 2001 From: sagitter Date: Sat, 29 Jun 2019 15:02:09 +0200 Subject: [PATCH 36/36] Use devtoolset-8 on epel --- sundials.spec | 47 ++++++++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/sundials.spec b/sundials.spec index 6c0ab93..b40d047 100644 --- a/sundials.spec +++ b/sundials.spec @@ -10,6 +10,7 @@ %if 0%{?rhel} && 0%{?rhel} >= 7 %global with_openmpi 1 %global with_mpich 1 +%global dts devtoolset-8- %endif ## Hypre ## @@ -56,17 +57,17 @@ Patch1: %{name}-3.1.1-set_superlumt64_name.patch Patch2: %{name}-disable_petsc_tests.patch %if 0%{?with_fortran} -BuildRequires: gcc-gfortran +BuildRequires: %{?dts}gcc-gfortran %endif BuildRequires: python%{python3_pkgversion}-devel -BuildRequires: gcc, gcc-c++ +BuildRequires: %{?dts}gcc, %{?dts}gcc-c++ BuildRequires: suitesparse-devel %if 0%{?rhel} BuildRequires: epel-rpm-macros %endif BuildRequires: cmake3 BuildRequires: openblas-devel, openblas-srpm-macros -%ifarch s390x x86_64 +%ifarch s390x x86_64 %{power64} aarch64 BuildRequires: SuperLUMT64-devel %endif %ifarch %{arm} %{ix86} @@ -112,7 +113,7 @@ BuildRequires: hdf5-openmpi-devel Requires: openmpi%{?_isa} %if 0%{?with_fortran} -Requires: gcc-gfortran%{?_isa} +Requires: %{?dts}gcc-gfortran%{?_isa} %endif %description openmpi @@ -145,7 +146,7 @@ BuildRequires: hdf5-mpich-devel %endif Requires: mpich%{?_isa} %if 0%{?with_fortran} -Requires: gcc-gfortran%{?_isa} +Requires: %{?dts}gcc-gfortran%{?_isa} %endif %description mpich @@ -179,7 +180,7 @@ This package contains the documentation files. pushd sundials-%{version} -%ifarch s390x x86_64 %{power64} +%ifarch s390x x86_64 %{power64} aarch64 %patch1 -p0 %endif %ifarch %{arm} %{ix86} @@ -217,14 +218,15 @@ export LIBBLASLINK=-lopenblas export LIBBLAS=libopenblas export INCBLAS=%{_includedir}/openblas -%ifarch s390x x86_64 +%ifarch s390x x86_64 %{power64} aarch64 export LIBSUPERLUMTLINK=-lsuperlumt64_d %endif %ifarch %{arm} %{ix86} export LIBSUPERLUMTLINK=-lsuperlumt_d %endif -%ifnarch s390x x86_64 %{arm} %{ix86} -export LIBSUPERLUMTLINK= + +%if 0%{?rhel} +%{?dts:source /opt/rh/devtoolset-8/enable} %endif %if %{with debug} @@ -276,7 +278,7 @@ export CFLAGS="" -DOPENMP_ENABLE:BOOL=ON \ -DPTHREAD_ENABLE:BOOL=ON \ -DSUNDIALS_PRECISION:STRING=double \ -%ifnarch %{power64} aarch64 +%ifnarch s390x x86_64 %{power64} aarch64 -DSUPERLUMT_ENABLE:BOOL=ON \ -DSUPERLUMT_INCLUDE_DIR:PATH=%{_includedir}/SuperLUMT \ -DSUPERLUMT_LIBRARY_DIR:PATH=%{_libdir} \ @@ -285,7 +287,6 @@ export CFLAGS="" -DHYPRE_ENABLE:BOOL=OFF \ -DKLU_ENABLE=ON -DKLU_LIBRARY_DIR:PATH=%{_libdir} -DKLU_INCLUDE_DIR:PATH=%{_includedir}/suitesparse \ -DEXAMPLES_INSTALL:BOOL=OFF -Wno-dev .. - %make_build V=1 cd .. popd @@ -311,15 +312,12 @@ export LIBBLAS=libopenblas export INCBLAS=%{_includedir}/openblas ## ## SuperLUMT -%ifarch s390x x86_64 +%ifarch s390x x86_64 %{power64} aarch64 export LIBSUPERLUMTLINK=-lsuperlumt64_d %endif %ifarch %{arm} %{ix86} export LIBSUPERLUMTLINK=-lsuperlumt_d %endif -%ifnarch s390x x86_64 %{arm} %{ix86} -export LIBSUPERLUMTLINK= -%endif ## Hypre %if 0%{?with_hypre} export LIBHYPRELINK="-L$MPI_LIB -lHYPRE" @@ -393,7 +391,7 @@ export CFLAGS="" -DUSE_GENERIC_MATH:BOOL=ON \ -DOPENMP_ENABLE:BOOL=ON \ -DPTHREAD_ENABLE:BOOL=ON \ -%ifnarch %{power64} aarch64 +%ifnarch s390x x86_64 %{power64} aarch64 -DSUPERLUMT_ENABLE:BOOL=ON \ -DSUPERLUMT_INCLUDE_DIR:PATH=%{_includedir}/SuperLUMT \ -DSUPERLUMT_LIBRARY_DIR:PATH=%{_libdir} \ @@ -434,15 +432,12 @@ export LIBBLAS=libopenblas export INCBLAS=%{_includedir}/openblas ## ## SuperLUMT -%ifarch s390x x86_64 +%ifarch s390x x86_64 %{power64} aarch64 export LIBSUPERLUMTLINK=-lsuperlumt64_d %endif %ifarch %{arm} %{ix86} export LIBSUPERLUMTLINK=-lsuperlumt_d %endif -%ifnarch s390x x86_64 %{arm} %{ix86} -export LIBSUPERLUMTLINK= -%endif ## Hypre %if 0%{?with_hypre} export LIBHYPRELINK="-L$MPI_LIB -lHYPRE" @@ -516,7 +511,7 @@ export CFLAGS="" -DUSE_GENERIC_MATH:BOOL=ON \ -DOPENMP_ENABLE:BOOL=ON \ -DPTHREAD_ENABLE:BOOL=ON \ -%ifnarch %{power64} aarch64 +%ifnarch s390x x86_64 %{power64} aarch64 -DSUPERLUMT_ENABLE:BOOL=ON \ -DSUPERLUMT_INCLUDE_DIR:PATH=%{_includedir}/SuperLUMT \ -DSUPERLUMT_LIBRARY_DIR:PATH=%{_libdir} \ @@ -572,8 +567,13 @@ export LD_LIBRARY_PATH=%{buildroot}$MPI_LIB:$MPI_LIB ctest3 --force-new-ctest-process -VV %{?_smp_mflags} --output-on-failure --debug %else export LD_LIBRARY_PATH=%{buildroot}$MPI_LIB:$MPI_LIB +# Tests excluded fail on ppc64le and aarch64 +%if 0%{?rhel} +ctest3 --force-new-ctest-process %{?_smp_mflags} -E 'spgmr|spfgmr|spbcgs|sptfqmr' +%else ctest3 --force-new-ctest-process %{?_smp_mflags} %endif +%endif %{_openmpi_unload} popd %endif @@ -590,8 +590,12 @@ export LD_LIBRARY_PATH=%{buildroot}$MPI_LIB:$MPI_LIB ctest3 --force-new-ctest-process -VV %{?_smp_mflags} --output-on-failure --debug %else export LD_LIBRARY_PATH=%{buildroot}$MPI_LIB:$MPI_LIB +%if 0%{?rhel} +ctest3 --force-new-ctest-process %{?_smp_mflags} -E 'spgmr|spfgmr|spbcgs|sptfqmr' +%else ctest3 --force-new-ctest-process %{?_smp_mflags} %endif +%endif %{_mpich_unload} popd %endif @@ -815,6 +819,7 @@ popd * Wed Jun 26 2019 Antonio Trande - 4.1.0-3 - Do not use curly brackets under %%files - PETSc needs HDF5 +- Use devtoolset-8 on epel * Thu Apr 25 2019 Antonio Trande - 4.1.0-2 - Reorganization of the files