28 |
28 |
KEYWORDS="amd64 arm ~x86 ~amd64-linux ~x86-linux ~x64-macos"
|
29 |
29 |
fi
|
30 |
30 |
|
31 |
|
ACCE_IUSE="cpu_flags_x86_sse2 cpu_flags_x86_sse4_1 cpu_flags_x86_fma4 cpu_flags_x86_avx cpu_flags_x86_avx2"
|
|
31 |
ACCE_IUSE="cpu_flags_x86_sse2 cpu_flags_x86_sse4_1 cpu_flags_x86_fma4 cpu_flags_x86_avx cpu_flags_x86_avx2 cpu_flags_x86_avx512f cpu_flags_arm_neon"
|
32 |
32 |
|
33 |
33 |
DESCRIPTION="The ultimate molecular dynamics simulation package"
|
34 |
34 |
HOMEPAGE="https://www.gromacs.org/"
|
... | ... | |
47 |
47 |
x11-libs/libICE
|
48 |
48 |
)
|
49 |
49 |
blas? ( virtual/blas )
|
50 |
|
cuda? ( >=dev-util/nvidia-cuda-toolkit-6.5.14:= )
|
|
50 |
cuda? ( >=dev-util/nvidia-cuda-toolkit-6.5.14[profiler] )
|
51 |
51 |
opencl? ( virtual/opencl )
|
52 |
52 |
fftw? ( sci-libs/fftw:3.0= )
|
53 |
53 |
hwloc? ( sys-apps/hwloc:= )
|
... | ... | |
85 |
85 |
|
86 |
86 |
RESTRICT="!test? ( test )"
|
87 |
87 |
|
|
88 |
PATCHES=( "${FILESDIR}/${PN}-2021-musl-stdint.patch" )
|
|
89 |
|
88 |
90 |
if [[ ${PV} != *9999 ]]; then
|
89 |
91 |
S="${WORKDIR}/${PN}-${PV/_/-}"
|
90 |
92 |
fi
|
91 |
93 |
|
92 |
|
PATCHES=( "${FILESDIR}/${PN}-2020-pytest.patch" )
|
93 |
|
|
94 |
94 |
pkg_pretend() {
|
95 |
95 |
[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
|
96 |
96 |
}
|
... | ... | |
163 |
163 |
|
164 |
164 |
src_configure() {
|
165 |
165 |
local mycmakeargs_pre=( ) extra fft_opts=( )
|
|
166 |
local acce="AUTO"
|
166 |
167 |
|
167 |
168 |
if use custom-cflags; then
|
168 |
169 |
#go from slowest to fastest acceleration
|
169 |
|
local acce="None"
|
170 |
|
use cpu_flags_x86_sse2 && acce="SSE2"
|
171 |
|
use cpu_flags_x86_sse4_1 && acce="SSE4.1"
|
172 |
|
use cpu_flags_x86_fma4 && acce="AVX_128_FMA"
|
173 |
|
use cpu_flags_x86_avx && acce="AVX_256"
|
174 |
|
use cpu_flags_x86_avx2 && acce="AVX2_256"
|
|
170 |
acce="None"
|
|
171 |
if (use amd64 || use x86); then
|
|
172 |
use cpu_flags_x86_sse2 && acce="SSE2"
|
|
173 |
use cpu_flags_x86_sse4_1 && acce="SSE4.1"
|
|
174 |
use cpu_flags_x86_fma4 && acce="AVX_128_FMA"
|
|
175 |
use cpu_flags_x86_avx && acce="AVX_256"
|
|
176 |
use cpu_flags_x86_avx2 && acce="AVX2_256"
|
|
177 |
use cpu_flags_x86_avx512f && acce="AVX_512"
|
|
178 |
elif (use arm); then
|
|
179 |
use cpu_flags_arm_neon && acce="ARM_NEON"
|
|
180 |
elif (use arm64); then
|
|
181 |
use cpu_flags_arm_neon && acce="ARM_NEON_ASIMD"
|
|
182 |
fi
|
175 |
183 |
else
|
176 |
184 |
strip-flags
|
177 |
185 |
fi
|
... | ... | |
226 |
234 |
[[ ${x} = "double" ]] && suffix="_d"
|
227 |
235 |
local p
|
228 |
236 |
[[ ${x} = "double" ]] && p="-DGMX_DOUBLE=ON" || p="-DGMX_DOUBLE=OFF"
|
229 |
|
local cuda=( "-DGMX_GPU=OFF" )
|
230 |
|
[[ ${x} = "float" ]] && use cuda && \
|
231 |
|
cuda=( "-DGMX_GPU=ON" )
|
232 |
|
local opencl=( "-DGMX_USE_OPENCL=OFF" )
|
233 |
|
use opencl && opencl=( "-DGMX_USE_OPENCL=ON" ) cuda=( "-DGMX_GPU=ON" )
|
|
237 |
local gpu=( "-DGMX_GPU=OFF" )
|
|
238 |
[[ ${x} = "float" ]] && use cuda && gpu=( "-DGMX_GPU=CUDA" )
|
|
239 |
use opencl && gpu=( "-DGMX_GPU=OPENCL" )
|
234 |
240 |
local mycmakeargs=(
|
235 |
241 |
${mycmakeargs_pre[@]} ${p}
|
236 |
242 |
-DGMX_MPI=OFF
|
237 |
243 |
-DGMX_THREAD_MPI=$(usex threads)
|
238 |
244 |
-DGMXAPI=$(usex gmxapi)
|
239 |
245 |
-DGMX_INSTALL_LEGACY_API=$(usex gmxapi-legacy)
|
240 |
|
"${opencl[@]}"
|
241 |
|
"${cuda[@]}"
|
|
246 |
"${gpu[@]}"
|
242 |
247 |
"$(use test && echo -DREGRESSIONTEST_PATH="${WORKDIR}/${P}_${x}/tests")"
|
243 |
248 |
-DGMX_BINARY_SUFFIX="${suffix}"
|
244 |
249 |
-DGMX_LIBS_SUFFIX="${suffix}"
|
245 |
250 |
-DGMX_PYTHON_PACKAGE=$(usex python)
|
246 |
|
)
|
|
251 |
)
|
247 |
252 |
BUILD_DIR="${WORKDIR}/${P}_${x}" cmake_src_configure
|
248 |
253 |
[[ ${CHOST} != *-darwin* ]] || \
|
249 |
254 |
sed -i '/SET(CMAKE_INSTALL_NAME_DIR/s/^/#/' "${WORKDIR}/${P}_${x}/gentoo_rules.cmake" || die
|