diff --git a/.gitignore b/.gitignore index be8aa67..0302787 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ /espresso-4.0.0.tar.gz /espresso-4.0.1.tar.gz /espresso-4.0.2.tar.gz +/espresso-4.1.0.tar.gz diff --git a/2946.patch b/2946.patch deleted file mode 100644 index e574302..0000000 --- a/2946.patch +++ /dev/null @@ -1,21 +0,0 @@ -From 1acce67ef18bc7cff34f8f0d8455dd1e7e38812c Mon Sep 17 00:00:00 2001 -From: Christoph Junghans -Date: Wed, 26 Jun 2019 11:57:51 -0600 -Subject: [PATCH 1/2] cmake: add soversion to libH5mdCore - ---- - src/core/io/writer/CMakeLists.txt | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/core/io/writer/CMakeLists.txt b/src/core/io/writer/CMakeLists.txt -index d0256da721..b0ce2c1d4a 100644 ---- a/src/core/io/writer/CMakeLists.txt -+++ b/src/core/io/writer/CMakeLists.txt -@@ -7,5 +7,6 @@ target_include_directories(H5mdCore SYSTEM PUBLIC - - add_dependencies(H5mdCore EspressoConfig) - target_include_directories(H5mdCore PRIVATE ${CMAKE_SOURCE_DIR}/src/core ${CMAKE_BINARY_DIR}/src/core) -+set_target_properties(H5mdCore PROPERTIES SOVERSION ${SOVERSION}) - install(TARGETS H5mdCore LIBRARY DESTINATION ${LIBDIR}) - endif() - diff --git a/3228.diff b/3228.diff new file mode 100644 index 0000000..812096a --- /dev/null +++ b/3228.diff @@ -0,0 +1,139 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 55ceaaf2bc..f6409ffcc1 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -29,14 +29,6 @@ endif() + enable_language(CXX) + + set(PROJECT_VERSION "4.1.0") +-string(REGEX +- REPLACE "^([1-9]+)\\.[0-9]+.*$" +- "\\1" +- SOVERSION +- "${PROJECT_VERSION}") +-if(NOT ${SOVERSION} MATCHES "^[1-9]+$") +- message(FATAL_ERROR "Could not determine SOVERSION from ${PROJECT_VERSION}") +-endif(NOT ${SOVERSION} MATCHES "^[1-9]+$") + + # + # CMake internal vars +diff --git a/doc/sphinx/conf.py.in b/doc/sphinx/conf.py.in +index cb0b3c6757..abe304110b 100644 +--- a/doc/sphinx/conf.py.in ++++ b/doc/sphinx/conf.py.in +@@ -69,7 +69,7 @@ author = 'C. Holm, F. Weik, R. Weeber' + # The short X.Y version. + version = '@PROJECT_VERSION@' + # The full version, including alpha/beta/rc tags. +-release = '@SOVERSION@' ++release = '@PROJECT_VERSION@' + + # The language for content autogenerated by Sphinx. Refer to documentation + # for a list of supported languages. +diff --git a/src/config/CMakeLists.txt b/src/config/CMakeLists.txt +index 618e4e59c6..dd34cb4b97 100644 +--- a/src/config/CMakeLists.txt ++++ b/src/config/CMakeLists.txt +@@ -36,7 +36,6 @@ execute_process(COMMAND ${PYTHON_EXECUTABLE} + add_library(EspressoConfig SHARED config-features.cpp) + add_dependencies(EspressoConfig myconfig check_myconfig generate_config_features) + install(TARGETS EspressoConfig LIBRARY DESTINATION ${PYTHON_INSTDIR}/espressomd) +-set_target_properties(EspressoConfig PROPERTIES SOVERSION ${SOVERSION}) + target_include_directories(EspressoConfig PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) + + # Parse repository info from git if available +diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt +index de03ad86f8..c956b9de16 100644 +--- a/src/core/CMakeLists.txt ++++ b/src/core/CMakeLists.txt +@@ -158,7 +158,6 @@ else(CUDA) + endif(CUDA) + + install(TARGETS EspressoCore LIBRARY DESTINATION ${PYTHON_INSTDIR}/espressomd) +-set_target_properties(EspressoCore PROPERTIES SOVERSION ${SOVERSION}) + target_include_directories(EspressoCore PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) + if(WITH_COVERAGE) + target_compile_options(EspressoCore PUBLIC "$<$:-g>") +diff --git a/src/core/cluster_analysis/CMakeLists.txt b/src/core/cluster_analysis/CMakeLists.txt +index 354bdd8613..e7e0c22fef 100644 +--- a/src/core/cluster_analysis/CMakeLists.txt ++++ b/src/core/cluster_analysis/CMakeLists.txt +@@ -4,7 +4,6 @@ set(cluster_analysis_SRC + ) + add_library(cluster_analysis SHARED ${cluster_analysis_SRC}) + install(TARGETS cluster_analysis LIBRARY DESTINATION ${PYTHON_INSTDIR}/espressomd) +-set_target_properties(cluster_analysis PROPERTIES SOVERSION ${SOVERSION}) + set_target_properties(cluster_analysis PROPERTIES MACOSX_RPATH TRUE) + target_link_libraries(cluster_analysis PUBLIC EspressoCore PRIVATE EspressoConfig) + +diff --git a/src/core/io/mpiio/CMakeLists.txt b/src/core/io/mpiio/CMakeLists.txt +index 365c58295f..7c4b0dc422 100644 +--- a/src/core/io/mpiio/CMakeLists.txt ++++ b/src/core/io/mpiio/CMakeLists.txt +@@ -1,3 +1,4 @@ + add_library(mpiio SHARED mpiio.cpp) + target_include_directories(mpiio PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) + target_link_libraries(mpiio PRIVATE EspressoConfig EspressoCore MPI::MPI_CXX) ++install(TARGETS mpiio LIBRARY DESTINATION ${PYTHON_INSTDIR}/espressomd) +diff --git a/src/core/io/reader/CMakeLists.txt b/src/core/io/reader/CMakeLists.txt +index 1b9ee38735..6c2de627ac 100644 +--- a/src/core/io/reader/CMakeLists.txt ++++ b/src/core/io/reader/CMakeLists.txt +@@ -1,3 +1,4 @@ + add_library(pdbreader SHARED readpdb.cpp) + target_link_libraries(pdbreader PUBLIC EspressoConfig EspressoCore pdbparser) + target_include_directories(pdbreader PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) ++install(TARGETS pdbreader LIBRARY DESTINATION ${PYTHON_INSTDIR}/espressomd) +diff --git a/src/core/shapes/CMakeLists.txt b/src/core/shapes/CMakeLists.txt +index 268172df6a..c0e78aeeb5 100644 +--- a/src/core/shapes/CMakeLists.txt ++++ b/src/core/shapes/CMakeLists.txt +@@ -13,5 +13,4 @@ set(Shapes_SRC + ) + add_library(Shapes SHARED ${Shapes_SRC}) + install(TARGETS Shapes LIBRARY DESTINATION ${PYTHON_INSTDIR}/espressomd) +-set_target_properties(Shapes PROPERTIES SOVERSION ${SOVERSION}) + target_link_libraries(Shapes PUBLIC EspressoConfig EspressoCore) +diff --git a/src/pdbparser/CMakeLists.txt b/src/pdbparser/CMakeLists.txt +index c58d79e8cb..3c4a66f1dc 100644 +--- a/src/pdbparser/CMakeLists.txt ++++ b/src/pdbparser/CMakeLists.txt +@@ -1,5 +1,6 @@ + add_library(pdbparser SHARED ${CMAKE_CURRENT_SOURCE_DIR}/src/PdbParser.cpp) + target_include_directories(pdbparser PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include) ++install(TARGETS pdbparser LIBRARY DESTINATION ${PYTHON_INSTDIR}/espressomd) + if(WITH_UNIT_TESTS) + add_subdirectory(unit_tests) + endif(WITH_UNIT_TESTS) +diff --git a/src/python/espressomd/CMakeLists.txt b/src/python/espressomd/CMakeLists.txt +index ebe76992da..59f2b8affc 100644 +--- a/src/python/espressomd/CMakeLists.txt ++++ b/src/python/espressomd/CMakeLists.txt +@@ -107,6 +107,7 @@ foreach(cython_file ${cython_SRC}) + target_link_libraries(${target} PRIVATE EspressoConfig EspressoCore EspressoScriptInterface) + target_include_directories(${target} SYSTEM PRIVATE ${PYTHON_INCLUDE_DIRS} ${NUMPY_INCLUDE_DIR}) + add_dependencies(espressomd ${target}) ++ install(TARGETS ${target} LIBRARY DESTINATION ${PYTHON_INSTDIR}/espressomd) + endif() + endforeach() + +@@ -124,6 +125,4 @@ foreach(auxfile ${cython_AUX}) + endforeach(auxfile) + + install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} DESTINATION ${PYTHON_INSTDIR} +- PATTERN "CMakeFiles" EXCLUDE PATTERN "*.cpp" EXCLUDE +- PATTERN "*.cmake" EXCLUDE PATTERN "Makefile" EXCLUDE) +- ++ FILES_MATCHING PATTERN "*.py") +diff --git a/src/script_interface/CMakeLists.txt b/src/script_interface/CMakeLists.txt +index d28603f816..0a8966887f 100644 +--- a/src/script_interface/CMakeLists.txt ++++ b/src/script_interface/CMakeLists.txt +@@ -33,7 +33,6 @@ endif() + + add_library(EspressoScriptInterface SHARED ${EspressoScriptInterface_SRC}) + install(TARGETS EspressoScriptInterface LIBRARY DESTINATION ${PYTHON_INSTDIR}/espressomd) +-set_target_properties(EspressoScriptInterface PROPERTIES SOVERSION ${SOVERSION}) + target_link_libraries(EspressoScriptInterface PRIVATE EspressoConfig PUBLIC EspressoCore Shapes cluster_analysis mpiio pdbreader) + if(HDF5_FOUND) + target_link_libraries(EspressoScriptInterface PRIVATE H5mdCore) diff --git a/espresso.spec b/espresso.spec index c71547e..ad3991f 100644 --- a/espresso.spec +++ b/espresso.spec @@ -3,8 +3,8 @@ %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: espresso -Version: 4.0.2 -Release: 8%{?dist} +Version: 4.1.0 +Release: 1%{?dist} Summary: Extensible Simulation Package for Research on Soft matter License: GPLv3+ @@ -13,23 +13,23 @@ URL: http://espressomd.org Source0: https://github.com/%{name}md/%{name}/archive/%{commit}/%{name}-%{commit}.tar.gz %else Source0: https://github.com/%{name}md/%{name}/releases/download/%{version}/%{name}-%{version}.tar.gz -# Add missing so number to libH5mdCore -# https://github.com/espressomd/espresso/pull/2946 -Patch0: 2946.patch +# Fix install +# https://github.com/espressomd/espresso/pull/3228 +Patch0: 3228.diff +# https://github.com/espressomd/espresso/issues/3230#issuecomment-538495680 +Patch1: mpiio.patch %endif BuildRequires: gcc-c++ +BuildRequires: cmake3 >= 3.4 %if 0%{?rhel} -BuildRequires: cmake3 >= 3.0 BuildRequires: python%{python3_pkgversion}-Cython BuildRequires: python%{python3_pkgversion}-setuptools %global cython /usr/bin/cython%{python3_version} # no boost-mpi* for ppc64le on epel7 ExcludeArch: ppc64le %else -BuildRequires: cmake >= 3.0 -%global cmake3 %{cmake} BuildRequires: /usr/bin/cython %global cython /usr/bin/cython %endif @@ -51,6 +51,7 @@ BuildRequires: python%{python3_pkgversion}-h5py Requires: python%{python3_pkgversion}-numpy Requires: %{name}-common = %{version}-%{release} +Obsoletes: %{name}-devel < %{version}-%{release} %description ESPResSo can perform Molecular Dynamics simulations of bead-spring models @@ -74,19 +75,6 @@ ESPResSo contains a number of advanced algorithms, e.g. This package contains the license file and data files shared between the sub-packages of %{name}. -%package devel -Summary: Development package for %{name} packages -Requires: python%{python3_pkgversion}-%{name}-openmpi = %{version}-%{release} -Requires: python%{python3_pkgversion}-%{name}-mpich = %{version}-%{release} -%description devel -ESPResSo can perform Molecular Dynamics simulations of bead-spring models -in various ensembles ((N,V,E), (N,V,T), and (N,p,T)). -ESPResSo contains a number of advanced algorithms, e.g. - * DPD thermostat (for hydrodynamics) - * P3M, MMM2D, MMM1D, ELC for electrostatic interactions - * Lattice-Boltzmann for hydrodynamics -This package contains the development libraries of %{name}. - %package -n python%{python3_pkgversion}-%{name}-openmpi Requires: %{name}-common = %{version}-%{release} Requires: python%{python3_pkgversion}-h5py @@ -131,10 +119,7 @@ This package contains %{name} compiled against MPICH2. %else %setup -q -n %{name} %patch0 -p1 -%endif -mkdir openmpi_build mpich_build -%if 0%{?fedora} <= 29 -sed -i 's/1.67/1.66/' CMakeLists.txt +%patch1 -p1 %endif %build @@ -149,87 +134,46 @@ sed -i 's/1.67/1.66/' CMakeLists.txt #save some memory using -j1 %define _smp_mflags -j1 -# Build OpenMPI version -%{_openmpi_load} -pushd openmpi_build -%{cmake3} \ - %{defopts} \ - -DLIBDIR=${MPI_LIB} \ - -DPYTHON_INSTDIR=%{python3_sitearch}/openmpi \ - .. -%make_build -popd -%{_openmpi_unload} - -# Build mpich version -%{_mpich_load} -pushd mpich_build -%{cmake3} \ - %{defopts} \ - -DLIBDIR=${MPI_LIB} \ - -DPYTHON_INSTDIR=%{python3_sitearch}/mpich \ - .. -%make_build -popd -%{_mpich_unload} +for mpi in mpich openmpi ; do + module load mpi/${mpi}-%{_arch} + mkdir ${mpi} + pushd ${mpi} + %{cmake3} %{defopts} -DLIBDIR=${MPI_LIB} -DPYTHON_INSTDIR=${MPI_PYTHON3_SITEARCH} .. + %make_build + popd + module unload mpi/${mpi}-%{_arch} +done %install -# first install mpi files and move around because MPI_SUFFIX above doesn't -# work yet (will be fixed in a new version) -%{_openmpi_load} -pushd openmpi_build -%make_install -popd -%{_openmpi_unload} - -%{_mpich_load} -pushd mpich_build -%make_install -popd -%{_mpich_unload} -find %{buildroot}%{_prefix} -name "*.so" -exec chmod +x {} \; -find %{buildroot}%{_prefix} -name "gen_pxiconfig" -exec chmod +x {} \; +for mpi in mpich openmpi ; do + module load mpi/${mpi}-%{_arch} + %make_install -C "${mpi}" + module unload mpi/${mpi}-%{_arch} +done %check -# https://github.com/espressomd/espresso/issues/2468 -%if 0%{?fedora} <= 29 -%ifarch ppc64 ppc64le aarch64 -%global testargs ARGS='-E npt' -%endif -# old Boost.MPI versions contain a use-after-free bug that seems to only cause crashes on 32-bit plattform -# remove after boost>=1.67 is available -%ifarch i686 %arm -%global testargs ARGS='-E .' -%endif -%endif -%{_openmpi_load} -pushd openmpi_build -LD_LIBRARY_PATH=${MPI_LIB}:%{buildroot}${MPI_LIB} make check CTEST_OUTPUT_ON_FAILURE=1 %{?testargs:%{testargs}} -popd -%{_openmpi_unload} - -%{_mpich_load} -pushd mpich_build -LD_LIBRARY_PATH=${MPI_LIB}:%{buildroot}${MPI_LIB} make check CTEST_OUTPUT_ON_FAILURE=1 %{?testargs:%{testargs}} -popd -%{_mpich_unload} +for mpi in mpich openmpi ; do + module load mpi/${mpi}-%{_arch} + LD_LIBRARY_PATH=${MPI_LIB}:%{buildroot}${MPI_PYTHON3_SITEARCH}/%{name}md make -C "${mpi}" check CTEST_OUTPUT_ON_FAILURE=1 %{?testargs:%{testargs}} + module unload mpi/${mpi}-%{_arch} +done %files common %doc AUTHORS README NEWS ChangeLog %license COPYING -%files devel -%{_libdir}/*/lib/lib*.so - %files -n python%{python3_pkgversion}-%{name}-openmpi -%{_libdir}/openmpi/lib/lib*.so.* -%{python3_sitearch}/openmpi/%{name}md +%{python3_sitearch}/openmpi/%{name}md/ %files -n python%{python3_pkgversion}-%{name}-mpich -%{_libdir}/mpich/lib/lib*.so.* -%{python3_sitearch}/mpich/%{name}md +%{python3_sitearch}/mpich/%{name}md/ %changelog +* Tue Oct 01 2019 Christoph Junghans - 4.1.0-1 +- Version bump to v4.1.0 (bug #1757509) +- updated 2946.patch to 3228.diff +- major spec clean up + * Wed Sep 11 2019 Christoph Junghans - 4.0.2-8 - MDAnalysis is optional diff --git a/mpiio.patch b/mpiio.patch new file mode 100644 index 0000000..287ee76 --- /dev/null +++ b/mpiio.patch @@ -0,0 +1,11 @@ +--- espresso/src/core/io/mpiio/mpiio.cpp.orig 2019-10-04 12:17:47.025423034 -0600 ++++ espresso/src/core/io/mpiio/mpiio.cpp 2019-10-04 12:18:04.708572591 -0600 +@@ -448,7 +448,7 @@ + int blen = boff[i + 1] - boff[i]; + auto &bl = local_particles[id[i]]->bl; + bl.resize(blen); +- std::copy_n(&bond[boff[i]], blen, bl.begin()); ++ if(blen) std::copy_n(&bond[boff[i]], blen, bl.begin()); + } + } + diff --git a/sources b/sources index e91b8dd..4a5d742 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (espresso-4.0.2.tar.gz) = 0033bcc6da3129988923f5521edfcbd689871fb355a33f6b9f4d4146e2af084eb987a73466c8ba8f2553aa2617fdfb650c42a3180c5c7fa29a0cd296d48424be +SHA512 (espresso-4.1.0.tar.gz) = 5c164118a7c2d498b2891a00528a348a5ca6ef9c1dc33b0c92b116bd91701108ec91bbc00c3eb396411c33dbfc489832afcad72b9d83daecc58392047532dfea