1 |
commit: d1918a66024dbcb24aa822b3402c6b7b8862070d |
2 |
Author: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Mar 4 17:34:12 2022 +0000 |
4 |
Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Mar 4 17:38:15 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d1918a66 |
7 |
|
8 |
sci-physics/lammps: add version 2022 Feb 17 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/834112 |
11 |
Bug: https://bugs.gentoo.org/763189 |
12 |
Bug: https://bugs.gentoo.org/815085 |
13 |
Bug: https://bugs.gentoo.org/659882 |
14 |
Bug: https://bugs.gentoo.org/830693 |
15 |
Package-Manager: Portage-3.0.30, Repoman-3.0.3 |
16 |
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org> |
17 |
|
18 |
sci-physics/lammps/Manifest | 1 + |
19 |
sci-physics/lammps/lammps-20220217.ebuild | 164 ++++++++++++++++++++++++++++++ |
20 |
sci-physics/lammps/metadata.xml | 6 +- |
21 |
3 files changed, 169 insertions(+), 2 deletions(-) |
22 |
|
23 |
diff --git a/sci-physics/lammps/Manifest b/sci-physics/lammps/Manifest |
24 |
index 4dd18e6d8f56..e5977998434f 100644 |
25 |
--- a/sci-physics/lammps/Manifest |
26 |
+++ b/sci-physics/lammps/Manifest |
27 |
@@ -1,2 +1,3 @@ |
28 |
+DIST lammps-17Feb2022.tar.gz 170036241 BLAKE2B 74d370657bff17847dce0bbe082134721722574b298832ea37d319968123b12d37ecdfea5560b2776e846c32d05a98f722710327d8da46f80869f75a36f6c255 SHA512 f2df65847906ca5890aae98efed5712eb6dd694f2b85dc062084a02b9bf43412ecd075f54df2947bff71d3b6313c1ec39c437e02497920da795e9ba0cd5dc068 |
29 |
DIST lammps-stable_3Mar2020.tar.gz 126001870 BLAKE2B 35ed6ff208fd6dcc8eae50b8e0562a6a0771aa6419c0225353f648d95512ca64b22250ad4a3f9b836b9a25a6838e24e070a1d190fdc02b896dc1ed9838648f01 SHA512 6608cd9f6ea18d8acb55d611a560cb4b329043b41aca23fafd91fac0dfbde5a5286e1a6563bd16b2414bb3bf95929e3a2f270a0b023ce5ede515eb3353d56f04 |
30 |
DIST lammps-testing-stable_3Mar2020.tar.gz 55729550 BLAKE2B d0de8efa83342b4a350f17a43d3fe96011534b3f410beb295e396a45200ea56298c14664b290b2e30ab4f2fd70b92c01c73927b2878e8171a166dedee8ecf379 SHA512 e3dc592ce57ae625eb66ddd9ca80d7bbaca57c47a07166a7196dcc3074b574a497e706da8baf93b5deacdf588702ceb141014533ac2aaccdd011836fb34943b9 |
31 |
|
32 |
diff --git a/sci-physics/lammps/lammps-20220217.ebuild b/sci-physics/lammps/lammps-20220217.ebuild |
33 |
new file mode 100644 |
34 |
index 000000000000..56e4a03a5b0f |
35 |
--- /dev/null |
36 |
+++ b/sci-physics/lammps/lammps-20220217.ebuild |
37 |
@@ -0,0 +1,164 @@ |
38 |
+# Copyright 1999-2022 Gentoo Authors |
39 |
+# Distributed under the terms of the GNU General Public License v2 |
40 |
+ |
41 |
+EAPI=8 |
42 |
+ |
43 |
+PYTHON_COMPAT=( python3_{8..10} ) |
44 |
+DISTUTILS_OPTIONAL=1 |
45 |
+CMAKE_MAKEFILE_GENERATOR=emake |
46 |
+# Doc building insists on fetching mathjax |
47 |
+# DOCS_BUILDER="doxygen" |
48 |
+# DOCS_DEPEND=" |
49 |
+# media-gfx/graphviz |
50 |
+# dev-libs/mathjax |
51 |
+# " |
52 |
+ |
53 |
+inherit cmake fortran-2 distutils-r1 # docs |
54 |
+ |
55 |
+convert_month() { |
56 |
+ local months=( "" Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec ) |
57 |
+ echo ${months[${1#0}]} |
58 |
+} |
59 |
+ |
60 |
+MY_PV="$((10#${PV:6:2}))$(convert_month ${PV:4:2})${PV:0:4}" |
61 |
+MY_P="${PN}-${MY_PV}" |
62 |
+ |
63 |
+DESCRIPTION="Large-scale Atomic/Molecular Massively Parallel Simulator" |
64 |
+HOMEPAGE="https://lammps.sandia.gov/" |
65 |
+SRC_URI="https://download.lammps.org/tars/${MY_P}.tar.gz" |
66 |
+S="${WORKDIR}/${MY_P}/cmake" |
67 |
+ |
68 |
+LICENSE="GPL-2" |
69 |
+SLOT="0" |
70 |
+KEYWORDS="~amd64" |
71 |
+IUSE="cuda examples gzip hip lammps-memalign mpi opencl python test" |
72 |
+# Requires write access to /dev/dri/renderD... |
73 |
+RESTRICT="test" |
74 |
+ |
75 |
+RDEPEND=" |
76 |
+ app-arch/gzip |
77 |
+ media-libs/libpng:0 |
78 |
+ sys-libs/zlib |
79 |
+ mpi? ( |
80 |
+ virtual/mpi |
81 |
+ sci-libs/hdf5:=[mpi] |
82 |
+ ) |
83 |
+ python? ( ${PYTHON_DEPS} ) |
84 |
+ sci-libs/voro++ |
85 |
+ virtual/blas |
86 |
+ virtual/lapack |
87 |
+ sci-libs/fftw:3.0= |
88 |
+ sci-libs/netcdf:= |
89 |
+ cuda? ( >=dev-util/nvidia-cuda-toolkit-4.2.9-r1:= ) |
90 |
+ opencl? ( virtual/opencl ) |
91 |
+ hip? ( dev-util/hip:= ) |
92 |
+ dev-cpp/eigen:3 |
93 |
+ " |
94 |
+ # Kokkos-3.5 not in tree atm |
95 |
+ # kokkos? ( dev-cpp/kokkos-3.5.* ) |
96 |
+DEPEND="${RDEPEND} |
97 |
+ test? ( |
98 |
+ dev-cpp/gtest |
99 |
+ ) |
100 |
+" |
101 |
+ |
102 |
+REQUIRED_USE=" |
103 |
+ python? ( ${PYTHON_REQUIRED_USE} ) |
104 |
+ ?? ( cuda opencl hip ) |
105 |
+" |
106 |
+ |
107 |
+src_prepare() { |
108 |
+ cmake_src_prepare |
109 |
+ if use python; then |
110 |
+ pushd ../python || die |
111 |
+ distutils-r1_src_prepare |
112 |
+ popd |
113 |
+ fi |
114 |
+} |
115 |
+ |
116 |
+src_configure() { |
117 |
+ local mycmakeargs=( |
118 |
+ -DCMAKE_INSTALL_SYSCONFDIR="${EPREFIX}/etc" |
119 |
+ -DBUILD_SHARED_LIBS=ON |
120 |
+ -DBUILD_MPI=$(usex mpi) |
121 |
+ -DBUILD_DOC=OFF |
122 |
+ #-DBUILD_DOC=$(usex doc) |
123 |
+ -DENABLE_TESTING=$(usex test) |
124 |
+ -DPKG_ASPHERE=ON |
125 |
+ -DPKG_BODY=ON |
126 |
+ -DPKG_CLASS2=ON |
127 |
+ -DPKG_COLLOID=ON |
128 |
+ -DPKG_COMPRESS=ON |
129 |
+ -DPKG_CORESHELL=ON |
130 |
+ -DPKG_DIPOLE=ON |
131 |
+ -DPKG_GRANULAR=ON |
132 |
+ -DPKG_KSPACE=ON |
133 |
+ -DFFT=FFTW3 |
134 |
+ -DPKG_KOKKOS=OFF |
135 |
+ #-DPKG_KOKKOS=$(usex kokkos) |
136 |
+ #$(use kokkos && echo -DEXTERNAL_KOKKOS=ON) |
137 |
+ -DPKG_MANYBODY=ON |
138 |
+ -DPKG_MC=ON |
139 |
+ -DPKG_MEAM=ON |
140 |
+ -DPKG_MISC=ON |
141 |
+ -DPKG_MOLECULE=ON |
142 |
+ -DPKG_PERI=ON |
143 |
+ -DPKG_QEQ=ON |
144 |
+ -DPKG_REPLICA=ON |
145 |
+ -DPKG_RIGID=ON |
146 |
+ -DPKG_SHOCK=ON |
147 |
+ -DPKG_SRD=ON |
148 |
+ -DPKG_PYTHON=$(usex python) |
149 |
+ -DPKG_MPIIO=$(usex mpi) |
150 |
+ -DPKG_VORONOI=ON |
151 |
+ ) |
152 |
+ if use cuda || use opencl || use hip; then |
153 |
+ mycmakeargs+=( -DPKG_GPU=ON ) |
154 |
+ use cuda && mycmakeargs+=( -DGPU_API=cuda ) |
155 |
+ use opencl && mycmakeargs+=( -DGPU_API=opencl -DUSE_STATIC_OPENCL_LOADER=OFF ) |
156 |
+ use hip && mycmakeargs+=( -DGPU_API=hip ) |
157 |
+ else |
158 |
+ mycmakeargs+=( -DPKG_GPU=OFF ) |
159 |
+ fi |
160 |
+ cmake_src_configure |
161 |
+ if use python; then |
162 |
+ pushd ../python || die |
163 |
+ distutils-r1_src_configure |
164 |
+ popd |
165 |
+ fi |
166 |
+} |
167 |
+ |
168 |
+src_compile() { |
169 |
+ cmake_src_compile |
170 |
+ if use python; then |
171 |
+ pushd ../python || die |
172 |
+ distutils-r1_src_compile |
173 |
+ popd |
174 |
+ fi |
175 |
+} |
176 |
+ |
177 |
+src_test() { |
178 |
+ cmake_src_test |
179 |
+ if use python; then |
180 |
+ pushd ../python || die |
181 |
+ distutils-r1_src_test |
182 |
+ popd |
183 |
+ fi |
184 |
+} |
185 |
+ |
186 |
+src_install() { |
187 |
+ cmake_src_install |
188 |
+ if use python; then |
189 |
+ pushd ../python || die |
190 |
+ distutils-r1_src_install |
191 |
+ popd |
192 |
+ fi |
193 |
+ |
194 |
+ if use examples; then |
195 |
+ for d in examples bench; do |
196 |
+ local LAMMPS_EXAMPLES="/usr/share/${PN}/${d}" |
197 |
+ insinto "${LAMMPS_EXAMPLES}" |
198 |
+ doins -r "${S}"/../${d}/* |
199 |
+ done |
200 |
+ fi |
201 |
+} |
202 |
|
203 |
diff --git a/sci-physics/lammps/metadata.xml b/sci-physics/lammps/metadata.xml |
204 |
index 8b13daf09171..8ac470d0f10e 100644 |
205 |
--- a/sci-physics/lammps/metadata.xml |
206 |
+++ b/sci-physics/lammps/metadata.xml |
207 |
@@ -19,8 +19,10 @@ |
208 |
<flag name="lammps-memalign">Enables the use of the posix_memalign() |
209 |
call instead of malloc() when large chunks or memory are allocated |
210 |
by LAMMPS. Aliengnment is on 16 byte boundaries.</flag> |
211 |
- <flag name="cuda">Enable cuda non-bonded kernels</flag> |
212 |
- <flag name="kokkos">Enable kokkos non-bonded kernels</flag> |
213 |
+ <flag name="cuda">Enable cuda gpu computing support</flag> |
214 |
+ <flag name="opencl">Enable opencl gpu computing support</flag> |
215 |
+ <flag name="hip">Enable hip gpu computing support</flag> |
216 |
+ <!--<flag name="kokkos">Enable kokkos non-bonded kernels</flag>--> |
217 |
</use> |
218 |
<maintainer type="person"> |
219 |
<email>nicolasbock@g.o</email> |