Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package lammps for openSUSE:Factory checked in at 2025-05-06 16:41:23 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/lammps (Old) and /work/SRC/openSUSE:Factory/.lammps.new.30101 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "lammps" Tue May 6 16:41:23 2025 rev:24 rq:1274706 version:20240829.02 Changes: -------- --- /work/SRC/openSUSE:Factory/lammps/lammps.changes 2023-05-16 14:28:04.439964162 +0200 +++ /work/SRC/openSUSE:Factory/.lammps.new.30101/lammps.changes 2025-05-06 16:41:36.652638419 +0200 @@ -1,0 +2,31 @@ +Mon May 5 16:47:47 UTC 2025 - Atri Bhattacharya <badshah...@gmail.com> + +- Adapt package version to reflect upstream releases; example: + the current version 20240829.02 reflects upstream's (weirdly but + consistently named) stable_29Aug2024_update2 tag. +- Implement python packaging using python rpm macros (for now + default python3-* only). +- Enable a few non-expensive modules (in terms of build + dependencies): compress (depends on gzip, libzstd), manybody, + molecule (needed for python tests), extra-molecule, and lepton. +- Drop a few unnecessary build dependencies: intel-opencl-devel, + armnn-opencl-devel. +- Add lammps-allow-system-gtest.patch to allow using system + installed gtest/gmock for tests. Note that upstream seems to be + reticent about this (gh#lammp/lammps#3540), but we have no + choice if we want to run tests. So, mark our patch as + PATCH-FEATURE-OPENSUSE for now. +- Use pkgconfig based BuildRequires wherever possible. +- Use ninja for build. +- Define and use macro for shared library name consistency. +- Disable MPI on i586 to resolve builds (missing + openmpi-macros-devel). + +------------------------------------------------------------------- +Tue Mar 18 16:37:36 UTC 2025 - Matej Cepl <mc...@cepl.eu> + +- Update to stable_29Aug2024_update2: + * Too many changes to list, see + <https://github.com/lammps/lammps/releases/tag/stable_29Aug2024> + +------------------------------------------------------------------- Old: ---- lammps-patch_29Oct2020.tar.gz release-1.10.0.tar.gz New: ---- lammps-allow-system-gtest.patch lammps-stable_29Aug2024_update2.tar.gz BETA DEBUG BEGIN: New: armnn-opencl-devel. - Add lammps-allow-system-gtest.patch to allow using system installed gtest/gmock for tests. Note that upstream seems to be BETA DEBUG END: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ lammps.spec ++++++ --- /var/tmp/diff_new_pack.2j1PXl/_old 2025-05-06 16:41:39.540759936 +0200 +++ /var/tmp/diff_new_pack.2j1PXl/_new 2025-05-06 16:41:39.540759936 +0200 @@ -1,7 +1,7 @@ # # spec file for package lammps # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2025 SUSE LLC # Copyright (c) 2017-2020 Christoph Junghans # # All modifications and additions to the file contributed by third parties @@ -17,40 +17,75 @@ # +# kokkos >= 4.3.01 required +%bcond_with kokkos +%bcond_without test +%ifarch %ix86 +# Missing openmpi-macros-devel on i586 +%bcond_with mpi +%else +%bcond_without mpi +%endif +%define shlib lib%{name}0 +%define pythons python3 +%define __builder ninja +%define uversion stable_29Aug2024_update2 Name: lammps -Version: 20201029 +Version: 20240829.02 Release: 0 -%define uversion patch_29Oct2020 Summary: Molecular Dynamics Simulator License: GPL-2.0-only AND GPL-3.0-or-later Group: Productivity/Scientific/Chemistry URL: https://lammps.sandia.gov -Source0: https://github.com/lammps/lammps/archive/%{uversion}.tar.gz#/%{name}-%{uversion}.tar.gz -Source1: https://github.com/google/googletest/archive/release-1.10.0.tar.gz +Source0: https://github.com/lammps/lammps/archive/refs/tags/%{uversion}.tar.gz#/%{name}-%{uversion}.tar.gz +# PATCH-FEATURE-OPENSUSE lammps-allow-system-gtest.patch badshah...@gmail.com -- Look for system installed gtest/gmock before trying to download +Patch0: lammps-allow-system-gtest.patch +BuildRequires: clang BuildRequires: cmake -BuildRequires: fftw3-devel +BuildRequires: fdupes BuildRequires: gcc-c++ BuildRequires: gcc-fortran -BuildRequires: gsl-devel +BuildRequires: gzip BuildRequires: kim-api-devel >= 2.1 -BuildRequires: openmpi-macros-devel -BuildRequires: readline-devel -# for testing -BuildRequires: kim-api-examples -BuildRequires: libjpeg-devel -BuildRequires: libpng-devel -BuildRequires: ocl-icd-devel -BuildRequires: opencl-headers -BuildRequires: python3-devel +BuildRequires: python3-build +BuildRequires: python3-pip +BuildRequires: python3-setuptools +BuildRequires: python3-wheel BuildRequires: voro++-devel -BuildRequires: zlib-devel -# disable kokkos support until -# kokkos-4 is supported -# ifnarch ppc64 %ix86 %{arm} -# global with_kokkos 1 -# BuildRequires: kokkos-devel >= 3.2 -# endif +BuildRequires: pkgconfig(OpenCL) +BuildRequires: pkgconfig(OpenCL-CLHPP) +BuildRequires: pkgconfig(OpenCL-Headers) +BuildRequires: pkgconfig(clBLAS) +BuildRequires: pkgconfig(fftw3) +BuildRequires: pkgconfig(gsl) +BuildRequires: pkgconfig(lapack) +BuildRequires: pkgconfig(libjpeg) +BuildRequires: pkgconfig(libpng) +BuildRequires: pkgconfig(libzstd) +BuildRequires: pkgconfig(ocl-icd) +BuildRequires: pkgconfig(python3) +BuildRequires: pkgconfig(readline) +BuildRequires: pkgconfig(tbb) +BuildRequires: pkgconfig(yaml-0.1) +BuildRequires: pkgconfig(zlib) Requires: %{name}-data +%if "%{?__builder}" == "ninja" +BuildRequires: ninja +%endif +%if %{with kokkos} +BuildRequires: kokkos-devel >= 3.2 +%endif +%if %{with mpi} +BuildRequires: openmpi-macros-devel +%endif +%if %{with test} +BuildRequires: kim-api-examples +BuildRequires: valgrind +BuildRequires: pkgconfig(gmock) +BuildRequires: pkgconfig(gmock_main) +BuildRequires: pkgconfig(gtest) +BuildRequires: pkgconfig(gtest_main) +%endif %description LAMMPS is a classical molecular dynamics code, and an acronym for Large-scale @@ -65,8 +100,8 @@ techniques and a spatial-decomposition of the simulation domain. The code is designed to be easy to modify or extend with new functionality. -%package -n liblammps0 -Summary: LAMMPS library +%package -n %{shlib} +Summary: A molecular dynamics simulator library Group: System/Libraries %description -n liblammps0 @@ -88,7 +123,7 @@ Summary: Development headers and libraries for LAMMPS Group: Development/Libraries/C and C++ Requires: %{name} = %{version} -Requires: liblammps0 = %{version} +Requires: %{shlib} = %{version} %description devel LAMMPS is a classical molecular dynamics code, and an acronym for Large-scale @@ -105,15 +140,16 @@ This package contains development headers and libraries for LAMMPS. -%package -n python3-%{name} +%package -n %{pythons}-%{name} Summary: LAMMPS python module Group: Development/Languages/Python -Requires: liblammps0 = %{version} +Requires: %{shlib} = %{version} +BuildArch: noarch # File conflict, old package contained python3 module Conflicts: python-%{name} <= %{version} Provides: python-%{name}:%{python3_sitearch}/%{name}.py -%description -n python3-%{name} +%description -n %{pythons}-%{name} LAMMPS is a classical molecular dynamics code, and an acronym for Large-scale Atomic/Molecular Massively Parallel Simulator. @@ -149,64 +185,93 @@ This subpackage contains LAMMPS's potential files %prep -%setup -a 1 -q -n %{name}-%{uversion} +%autosetup -p1 -n %{name}-%{uversion} %build +%if %{with mpi} %setup_openmpi +%endif -%{cmake} \ - -C ../cmake/presets/all_on.cmake \ - -C ../cmake/presets/nolib.cmake \ +pushd cmake +%cmake \ + -DCMAKE_INSTALL_SYSCONFDIR=%{_sysconfdir} \ -DCMAKE_TUNE_FLAGS='%{?tune_flags}' \ -DBUILD_TOOLS=ON \ -DBUILD_LAMMPS_SHELL=$(pkg-config readline && echo ON) \ + -DBUILD_MPI=%{?with_mpi:ON}%{!?with_mpi:OFF} \ -DBUILD_OMP=ON \ - %{?with_kokkos:-DPKG_KOKKOS=ON -DEXTERNAL_KOKKOS=ON} \ - -DBUILD_MPI=ON \ - -DPKG_PYTHON=ON \ + -DDOWNLOAD_POTENTIALS=OFF \ + -DENABLE_TESTING:BOOL=%{?with_test:ON}%{!?with_test:OFF} \ + -DEXTERNAL_GTEST:BOOL=ON \ + -DFFT=FFTW3 \ + -DGPU_API=OpenCL \ + -DPKG_COMPRESS=ON \ + -DPKG_EXTRA-MOLECULE=ON \ + -DPKG_GPU=ON \ -DPKG_KIM=ON \ + -DPKG_KSPACE=OFF \ + -DPKG_LEPTON=ON \ + -DPKG_MANYBODY=ON \ + -DPKG_MOLECULE=ON \ + -DPKG_PHONON=OFF \ + -DPKG_PYTHON=ON \ -DPKG_VORONOI=ON \ - -DPKG_GPU=ON -DGPU_API=OpenCL \ - -DFFT=FFTW3 \ - -DPYTHON_INSTDIR=%{python3_sitearch} \ - -DCMAKE_INSTALL_SYSCONFDIR=/etc \ -%ifnarch x86_64 %ix86 - -DPKG_USER-INTEL=OFF \ -%endif - -DENABLE_TESTING=ON \ - -DGTEST_URL=%{S:1} \ - ../cmake + -DPYTHON_EXECUTABLE=%{_bindir}/python%{python3_version} \ + -DUSE_STATIC_OPENCL_LOADER=OFF \ + -DUSE_SPGLIB:BOOL=OFF \ + %{?with_kokkos:-DPKG_KOKKOS=ON -DEXTERNAL_KOKKOS=ON} \ +%{nil} %cmake_build +popd +cd python +%pyproject_wheel %install +pushd cmake %cmake_install -rm -rf %{buildroot}%{_datadir}/{applications,icons}/ +popd + +pushd python +%pyproject_install +popd + +%fdupes %{buildroot}%{_datadir}/%{name}/ +%fdupes %{buildroot}%{python3_sitelib}/%{name}/ +%if %{with test} %check +%if %{with mpi} %setup_openmpi +%endif -# https://github.com/lammps/lammps/issues/2383, inject -msse2 on %ix86 to make test pass -%ifarch %ix86 +pushd cmake +# https://github.com/lammps/lammps/issues/2383, inject -msse2 on %%ix86 to make test pass +%ifarch %{ix86} %ctest --exclude-regex 'AtomStyle|Fortran' || true %ctest --tests-regex 'AtomStyle|Fortran' || true %else %ctest %endif +popd + +%endif -%post -n liblammps0 -p /sbin/ldconfig -%postun -n liblammps0 -p /sbin/ldconfig +%ldconfig_scriptlets -n %{shlib} %files %doc README %license LICENSE %{_bindir}/l{mp,ammps}* -%{_mandir}/man1/lmp.1.* +%{_mandir}/man1/lmp.1%{?ext_man} %{_bindir}/msi2lmp -%{_mandir}/man1/msi2lmp.1.* +%{_mandir}/man1/msi2lmp.1%{?ext_man} %{_bindir}/binary2txt %{_bindir}/chain.x +%{_bindir}/micelle2d.x +%{_bindir}/phana +%{_bindir}/stl_bin2txt -%files -n liblammps0 +%files -n %{shlib} %{_libdir}/liblammps.so.* %files devel @@ -216,11 +281,12 @@ %{_libdir}/pkgconfig/liblammps.pc %{_libdir}/cmake/LAMMPS -%files -n python3-%{name} -%{python3_sitearch}/%{name}.py - %files data %license LICENSE %{_datadir}/%{name} %config %{_sysconfdir}/profile.d/lammps.* +%files -n %{pythons}-%{name} +%{python3_sitelib}/%{name}/ +%{python3_sitelib}/%{name}-*.*-info + ++++++ lammps-allow-system-gtest.patch ++++++ --- unittest/CMakeLists.txt | 41 +++++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 16 deletions(-) Index: lammps-stable_29Aug2024_update2/unittest/CMakeLists.txt =================================================================== --- lammps-stable_29Aug2024_update2.orig/unittest/CMakeLists.txt +++ lammps-stable_29Aug2024_update2/unittest/CMakeLists.txt @@ -9,24 +9,33 @@ if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU" message(FATAL_ERROR "Need GNU C++ compiler version 6.x or later for unit testing") endif() -message(STATUS "Downloading and building googletest framework") -set(GTEST_URL "https://github.com/google/googletest/archive/release-1.12.1.tar.gz" CACHE STRING "URL of googletest source") -set(GTEST_MD5 "e82199374acdfda3f425331028eb4e2a" CACHE STRING "MD5 sum for googletest source") -mark_as_advanced(GTEST_URL) -mark_as_advanced(GTEST_MD5) -set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) +set(EXTERNAL_GTEST OFF CACHE BOOL "Use system gtest") +if (EXTERNAL_GTEST) + find_package(GTest REQUIRED) + add_library(GTest::GTest ALIAS GTest::gtest) + add_library(GTest::GMock ALIAS GTest::gmock) + add_library(GTest::GTestMain ALIAS GTest::gtest_main) + add_library(GTest::GMockMain ALIAS GTest::gmock_main) +else() + message(STATUS "Downloading and building googletest framework") + set(GTEST_URL "https://github.com/google/googletest/archive/release-1.12.1.tar.gz" CACHE STRING "URL of googletest source") + set(GTEST_MD5 "e82199374acdfda3f425331028eb4e2a" CACHE STRING "MD5 sum for googletest source") + mark_as_advanced(GTEST_URL) + mark_as_advanced(GTEST_MD5) + set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) -include(ExternalCMakeProject) -if(CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM") - set(cxx_strict_flags "-Wno-error -Wno-unused-command-line-argument") + include(ExternalCMakeProject) + if(CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM") + set(cxx_strict_flags "-Wno-error -Wno-unused-command-line-argument") + endif() + set(INSTALL_GTEST OFF CACHE BOOL "" FORCE) + set(INSTALL_GMOCK OFF CACHE BOOL "" FORCE) + ExternalCMakeProject(googletest ${GTEST_URL} ${GTEST_MD5} googletest . "") + add_library(GTest::GTest ALIAS gtest) + add_library(GTest::GMock ALIAS gmock) + add_library(GTest::GTestMain ALIAS gtest_main) + add_library(GTest::GMockMain ALIAS gmock_main) endif() -set(INSTALL_GTEST OFF CACHE BOOL "" FORCE) -set(INSTALL_GMOCK OFF CACHE BOOL "" FORCE) -ExternalCMakeProject(googletest ${GTEST_URL} ${GTEST_MD5} googletest . "") -add_library(GTest::GTest ALIAS gtest) -add_library(GTest::GMock ALIAS gmock) -add_library(GTest::GTestMain ALIAS gtest_main) -add_library(GTest::GMockMain ALIAS gmock_main) option(SKIP_DEATH_TESTS "Do not run 'death tests' to reduce false positives in valgrind" OFF) mark_as_advanced(SKIP_DEATH_TESTS)