summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Ammerlaan <andrewammerlaan@gentoo.org>2022-03-04 18:34:12 +0100
committerAndrew Ammerlaan <andrewammerlaan@gentoo.org>2022-03-04 18:38:15 +0100
commitd1918a66024dbcb24aa822b3402c6b7b8862070d (patch)
tree18af77dd8dc53569bc4b46b422cc07406145a70e /sci-physics/lammps
parentsci-chemistry/avogadro2: add version 1.95.1 (diff)
downloadgentoo-d1918a66024dbcb24aa822b3402c6b7b8862070d.tar.gz
gentoo-d1918a66024dbcb24aa822b3402c6b7b8862070d.tar.bz2
gentoo-d1918a66024dbcb24aa822b3402c6b7b8862070d.zip
sci-physics/lammps: add version 2022 Feb 17
Closes: https://bugs.gentoo.org/834112 Bug: https://bugs.gentoo.org/763189 Bug: https://bugs.gentoo.org/815085 Bug: https://bugs.gentoo.org/659882 Bug: https://bugs.gentoo.org/830693 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
Diffstat (limited to 'sci-physics/lammps')
-rw-r--r--sci-physics/lammps/Manifest1
-rw-r--r--sci-physics/lammps/lammps-20220217.ebuild164
-rw-r--r--sci-physics/lammps/metadata.xml6
3 files changed, 169 insertions, 2 deletions
diff --git a/sci-physics/lammps/Manifest b/sci-physics/lammps/Manifest
index 4dd18e6d8f56..e5977998434f 100644
--- a/sci-physics/lammps/Manifest
+++ b/sci-physics/lammps/Manifest
@@ -1,2 +1,3 @@
+DIST lammps-17Feb2022.tar.gz 170036241 BLAKE2B 74d370657bff17847dce0bbe082134721722574b298832ea37d319968123b12d37ecdfea5560b2776e846c32d05a98f722710327d8da46f80869f75a36f6c255 SHA512 f2df65847906ca5890aae98efed5712eb6dd694f2b85dc062084a02b9bf43412ecd075f54df2947bff71d3b6313c1ec39c437e02497920da795e9ba0cd5dc068
DIST lammps-stable_3Mar2020.tar.gz 126001870 BLAKE2B 35ed6ff208fd6dcc8eae50b8e0562a6a0771aa6419c0225353f648d95512ca64b22250ad4a3f9b836b9a25a6838e24e070a1d190fdc02b896dc1ed9838648f01 SHA512 6608cd9f6ea18d8acb55d611a560cb4b329043b41aca23fafd91fac0dfbde5a5286e1a6563bd16b2414bb3bf95929e3a2f270a0b023ce5ede515eb3353d56f04
DIST lammps-testing-stable_3Mar2020.tar.gz 55729550 BLAKE2B d0de8efa83342b4a350f17a43d3fe96011534b3f410beb295e396a45200ea56298c14664b290b2e30ab4f2fd70b92c01c73927b2878e8171a166dedee8ecf379 SHA512 e3dc592ce57ae625eb66ddd9ca80d7bbaca57c47a07166a7196dcc3074b574a497e706da8baf93b5deacdf588702ceb141014533ac2aaccdd011836fb34943b9
diff --git a/sci-physics/lammps/lammps-20220217.ebuild b/sci-physics/lammps/lammps-20220217.ebuild
new file mode 100644
index 000000000000..56e4a03a5b0f
--- /dev/null
+++ b/sci-physics/lammps/lammps-20220217.ebuild
@@ -0,0 +1,164 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+DISTUTILS_OPTIONAL=1
+CMAKE_MAKEFILE_GENERATOR=emake
+# Doc building insists on fetching mathjax
+# DOCS_BUILDER="doxygen"
+# DOCS_DEPEND="
+# media-gfx/graphviz
+# dev-libs/mathjax
+# "
+
+inherit cmake fortran-2 distutils-r1 # docs
+
+convert_month() {
+ local months=( "" Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec )
+ echo ${months[${1#0}]}
+}
+
+MY_PV="$((10#${PV:6:2}))$(convert_month ${PV:4:2})${PV:0:4}"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="Large-scale Atomic/Molecular Massively Parallel Simulator"
+HOMEPAGE="https://lammps.sandia.gov/"
+SRC_URI="https://download.lammps.org/tars/${MY_P}.tar.gz"
+S="${WORKDIR}/${MY_P}/cmake"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="cuda examples gzip hip lammps-memalign mpi opencl python test"
+# Requires write access to /dev/dri/renderD...
+RESTRICT="test"
+
+RDEPEND="
+ app-arch/gzip
+ media-libs/libpng:0
+ sys-libs/zlib
+ mpi? (
+ virtual/mpi
+ sci-libs/hdf5:=[mpi]
+ )
+ python? ( ${PYTHON_DEPS} )
+ sci-libs/voro++
+ virtual/blas
+ virtual/lapack
+ sci-libs/fftw:3.0=
+ sci-libs/netcdf:=
+ cuda? ( >=dev-util/nvidia-cuda-toolkit-4.2.9-r1:= )
+ opencl? ( virtual/opencl )
+ hip? ( dev-util/hip:= )
+ dev-cpp/eigen:3
+ "
+ # Kokkos-3.5 not in tree atm
+ # kokkos? ( dev-cpp/kokkos-3.5.* )
+DEPEND="${RDEPEND}
+ test? (
+ dev-cpp/gtest
+ )
+"
+
+REQUIRED_USE="
+ python? ( ${PYTHON_REQUIRED_USE} )
+ ?? ( cuda opencl hip )
+"
+
+src_prepare() {
+ cmake_src_prepare
+ if use python; then
+ pushd ../python || die
+ distutils-r1_src_prepare
+ popd
+ fi
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DCMAKE_INSTALL_SYSCONFDIR="${EPREFIX}/etc"
+ -DBUILD_SHARED_LIBS=ON
+ -DBUILD_MPI=$(usex mpi)
+ -DBUILD_DOC=OFF
+ #-DBUILD_DOC=$(usex doc)
+ -DENABLE_TESTING=$(usex test)
+ -DPKG_ASPHERE=ON
+ -DPKG_BODY=ON
+ -DPKG_CLASS2=ON
+ -DPKG_COLLOID=ON
+ -DPKG_COMPRESS=ON
+ -DPKG_CORESHELL=ON
+ -DPKG_DIPOLE=ON
+ -DPKG_GRANULAR=ON
+ -DPKG_KSPACE=ON
+ -DFFT=FFTW3
+ -DPKG_KOKKOS=OFF
+ #-DPKG_KOKKOS=$(usex kokkos)
+ #$(use kokkos && echo -DEXTERNAL_KOKKOS=ON)
+ -DPKG_MANYBODY=ON
+ -DPKG_MC=ON
+ -DPKG_MEAM=ON
+ -DPKG_MISC=ON
+ -DPKG_MOLECULE=ON
+ -DPKG_PERI=ON
+ -DPKG_QEQ=ON
+ -DPKG_REPLICA=ON
+ -DPKG_RIGID=ON
+ -DPKG_SHOCK=ON
+ -DPKG_SRD=ON
+ -DPKG_PYTHON=$(usex python)
+ -DPKG_MPIIO=$(usex mpi)
+ -DPKG_VORONOI=ON
+ )
+ if use cuda || use opencl || use hip; then
+ mycmakeargs+=( -DPKG_GPU=ON )
+ use cuda && mycmakeargs+=( -DGPU_API=cuda )
+ use opencl && mycmakeargs+=( -DGPU_API=opencl -DUSE_STATIC_OPENCL_LOADER=OFF )
+ use hip && mycmakeargs+=( -DGPU_API=hip )
+ else
+ mycmakeargs+=( -DPKG_GPU=OFF )
+ fi
+ cmake_src_configure
+ if use python; then
+ pushd ../python || die
+ distutils-r1_src_configure
+ popd
+ fi
+}
+
+src_compile() {
+ cmake_src_compile
+ if use python; then
+ pushd ../python || die
+ distutils-r1_src_compile
+ popd
+ fi
+}
+
+src_test() {
+ cmake_src_test
+ if use python; then
+ pushd ../python || die
+ distutils-r1_src_test
+ popd
+ fi
+}
+
+src_install() {
+ cmake_src_install
+ if use python; then
+ pushd ../python || die
+ distutils-r1_src_install
+ popd
+ fi
+
+ if use examples; then
+ for d in examples bench; do
+ local LAMMPS_EXAMPLES="/usr/share/${PN}/${d}"
+ insinto "${LAMMPS_EXAMPLES}"
+ doins -r "${S}"/../${d}/*
+ done
+ fi
+}
diff --git a/sci-physics/lammps/metadata.xml b/sci-physics/lammps/metadata.xml
index 8b13daf09171..8ac470d0f10e 100644
--- a/sci-physics/lammps/metadata.xml
+++ b/sci-physics/lammps/metadata.xml
@@ -19,8 +19,10 @@
<flag name="lammps-memalign">Enables the use of the posix_memalign()
call instead of malloc() when large chunks or memory are allocated
by LAMMPS. Aliengnment is on 16 byte boundaries.</flag>
- <flag name="cuda">Enable cuda non-bonded kernels</flag>
- <flag name="kokkos">Enable kokkos non-bonded kernels</flag>
+ <flag name="cuda">Enable cuda gpu computing support</flag>
+ <flag name="opencl">Enable opencl gpu computing support</flag>
+ <flag name="hip">Enable hip gpu computing support</flag>
+ <!--<flag name="kokkos">Enable kokkos non-bonded kernels</flag>-->
</use>
<maintainer type="person">
<email>nicolasbock@gentoo.org</email>