public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Andrew Ammerlaan" <andrewammerlaan@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-physics/lammps/
Date: Thu, 11 Jan 2024 09:12:44 +0000 (UTC)	[thread overview]
Message-ID: <1704964330.d14803303b4e91fe67b2ab7e813c6e83c2f13eb8.andrewammerlaan@gentoo> (raw)

commit:     d14803303b4e91fe67b2ab7e813c6e83c2f13eb8
Author:     Denis Strizhkin <strdenis02 <AT> gmail <DOT> com>
AuthorDate: Wed Jan  3 19:27:03 2024 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Thu Jan 11 09:12:10 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d1480330

sci-physics/lammps: add openmp and extra iuse flags, fix hip configure

Bug: https://bugs.gentoo.org/907713
Signed-off-by: Denis Strizhkin <strdenis02 <AT> gmail.com>
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>

 sci-physics/lammps/lammps-20230802-r1.ebuild | 175 +++++++++++++++++++++++++++
 sci-physics/lammps/metadata.xml              |   4 +
 2 files changed, 179 insertions(+)

diff --git a/sci-physics/lammps/lammps-20230802-r1.ebuild b/sci-physics/lammps/lammps-20230802-r1.ebuild
new file mode 100644
index 000000000000..3c3d57476605
--- /dev/null
+++ b/sci-physics/lammps/lammps-20230802-r1.ebuild
@@ -0,0 +1,175 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+DISTUTILS_OPTIONAL=1
+DISTUTILS_USE_PEP517=setuptools
+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 ~x86"
+IUSE="cuda examples extra gzip hip lammps-memalign mpi opencl openmp 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:=
+		sci-libs/hipCUB:=
+	)
+	dev-cpp/eigen:3
+	"
+	# Kokkos-3.5 not in tree atm
+	# kokkos? ( dev-cpp/kokkos-3.5.* )
+BDEPEND="${DISTUTILS_DEPS}"
+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 || die
+	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_EXTRA-COMPUTE=$(usex extra)
+		-DPKG_EXTRA-DUMP=$(usex extra)
+		-DPKG_EXTRA-FIX=$(usex extra)
+		-DPKG_EXTRA-MOLECULE=$(usex extra)
+		-DPKG_EXTRA-PAIR=$(usex extra)
+		-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_OPENMP=$(usex openmp)
+		-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 -DHIP_PATH="${EPREFIX}/usr" )
+	else
+		mycmakeargs+=( -DPKG_GPU=OFF )
+	fi
+	cmake_src_configure
+	if use python; then
+		pushd ../python || die
+		distutils-r1_src_configure
+		popd || die
+	fi
+}
+
+src_compile() {
+	cmake_src_compile
+	if use python; then
+		pushd ../python || die
+		distutils-r1_src_compile
+		popd || die
+	fi
+}
+
+src_test() {
+	cmake_src_test
+	if use python; then
+		pushd ../python || die
+		distutils-r1_src_test
+		popd || die
+	fi
+}
+
+src_install() {
+	cmake_src_install
+	if use python; then
+		pushd ../python || die
+		distutils-r1_src_install
+		popd || die
+	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 d44b7b9658ed..8cd9e53aced2 100644
--- a/sci-physics/lammps/metadata.xml
+++ b/sci-physics/lammps/metadata.xml
@@ -20,6 +20,7 @@
 			call instead of malloc() when large chunks or memory are allocated
 			by LAMMPS. Aliengnment is on 16 byte boundaries.</flag>
 		<flag name="hip">Enable hip gpu computing support</flag>
+		<flag name="extra">Additional compute, dump, fix, molecular, pair styles</flag>
 		<!--<flag name="kokkos">Enable kokkos non-bonded kernels</flag>-->
 	</use>
 	<maintainer type="person">
@@ -30,4 +31,7 @@
 		<email>sci-physics@gentoo.org</email>
 		<name>Gentoo Physics Project</name>
 	</maintainer>
+	<upstream>
+		<remote-id type="github">lammps/lammps</remote-id>
+	</upstream>
 </pkgmetadata>


             reply	other threads:[~2024-01-11  9:12 UTC|newest]

Thread overview: 81+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-11  9:12 Andrew Ammerlaan [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-12-04 18:52 [gentoo-commits] repo/gentoo:master commit in: sci-physics/lammps/ Sam James
2024-09-27  8:58 Andrew Ammerlaan
2024-09-27  8:58 Andrew Ammerlaan
2023-12-18 19:03 Nicolas Bock
2023-06-09 15:06 Arthur Zamarin
2023-05-05 18:00 Nicolas Bock
2023-05-03 18:06 Nicolas Bock
2022-12-24 19:13 Andreas Sturmlechner
2022-12-24 18:19 Arthur Zamarin
2022-12-24 18:19 Arthur Zamarin
2022-03-10  9:04 Jakov Smolić
2022-03-04 17:38 Andrew Ammerlaan
2022-03-01  9:27 David Seifert
2021-12-28 22:00 Sam James
2021-09-26 18:11 Arthur Zamarin
2021-04-18  7:05 Michał Górny
2021-04-18  1:44 Sam James
2021-04-13 19:12 Nicolas Bock
2020-08-08  1:25 Sam James
2020-07-27 23:36 Sam James
2020-05-07 15:17 Michał Górny
2020-04-20  1:51 Christoph Junghans
2020-03-15 13:37 Christoph Junghans
2020-03-05  0:31 Christoph Junghans
2020-02-14 13:11 Nicolas Bock
2020-02-14 13:11 Nicolas Bock
2020-02-13 21:40 David Seifert
2019-08-15 22:06 Christoph Junghans
2019-06-06  2:08 Christoph Junghans
2019-05-05  1:02 Aaron Bauman
2018-12-12 15:02 Christoph Junghans
2018-08-31 16:57 Christoph Junghans
2018-04-23  2:30 Aaron Bauman
2018-04-04 13:09 Christoph Junghans
2018-03-08 20:21 Christoph Junghans
2018-03-05 18:11 Christoph Junghans
2018-01-29  2:59 Christoph Junghans
2017-11-19 15:10 Nicolas Bock
2017-09-12 13:09 Christoph Junghans
2017-09-08 16:38 Christoph Junghans
2017-08-05  9:52 Michael Palimaka
2017-07-31 11:36 Tobias Klausmann
2017-07-11 22:09 Christoph Junghans
2017-06-15 17:37 Pacho Ramos
2017-01-13 16:02 Andrew Savchenko
2016-04-19 13:07 Nicolas Bock
2016-04-18 11:31 Nicolas Bock
2016-04-15 11:13 Nicolas Bock
2016-04-15  9:59 Nicolas Bock
2016-04-15  7:38 Nicolas Bock
2016-04-14  8:06 Nicolas Bock
2016-01-25 12:50 Nicolas Bock
2016-01-23 16:59 Agostino Sarubbo
2016-01-19 17:07 Nicolas Bock
2015-12-17 15:13 Nicolas Bock
2015-12-17 13:50 Nicolas Bock
2015-12-16 13:54 Nicolas Bock
2015-12-16 13:43 Nicolas Bock
2015-12-02 13:26 Nicolas Bock
2015-11-09 12:55 Nicolas Bock
2015-11-06 23:35 Nicolas Bock
2015-10-28 19:30 Nicolas Bock
2015-10-28 19:26 Nicolas Bock
2015-10-28 12:25 Nicolas Bock
2015-10-28 12:11 Nicolas Bock
2015-10-23 12:09 Nicolas Bock
2015-10-22 22:08 Nicolas Bock
2015-10-08 12:32 Nicolas Bock
2015-09-25 14:13 Agostino Sarubbo
2015-09-24 23:04 Nicolas Bock
2015-09-24 10:36 Agostino Sarubbo
2015-09-17 10:51 Nicolas Bock
2015-09-13 20:30 Nicolas Bock
2015-09-04 15:29 Nicolas Bock
2015-09-02 12:03 Nicolas Bock
2015-08-31 14:40 Nicolas Bock
2015-08-31 14:38 Nicolas Bock
2015-08-19 11:29 Nicolas Bock
2015-08-17 18:43 Nicolas Bock
2015-08-17 18:43 Nicolas Bock

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1704964330.d14803303b4e91fe67b2ab7e813c6e83c2f13eb8.andrewammerlaan@gentoo \
    --to=andrewammerlaan@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox