public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Alexey Shvetsov" <alexxy@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-chemistry/gromacs/, sci-chemistry/gromacs/files/
Date: Sat, 19 Oct 2024 18:43:58 +0000 (UTC)	[thread overview]
Message-ID: <1729363424.fa7e24cadaf7fb109ea385f8357a916343c846bb.alexxy@gentoo> (raw)

commit:     fa7e24cadaf7fb109ea385f8357a916343c846bb
Author:     Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 19 18:40:05 2024 +0000
Commit:     Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
CommitDate: Sat Oct 19 18:43:44 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fa7e24ca

sci-chemistry/gromacs: Update live version

Signed-off-by: Alexey Shvetsov <alexxy <AT> gentoo.org>

 .../files/gromacs-9999-Fix-build-with-torch.patch  | 40 ++++++++++++++++++++++
 sci-chemistry/gromacs/gromacs-9999.ebuild          | 17 +++++++--
 sci-chemistry/gromacs/metadata.xml                 |  1 +
 3 files changed, 55 insertions(+), 3 deletions(-)

diff --git a/sci-chemistry/gromacs/files/gromacs-9999-Fix-build-with-torch.patch b/sci-chemistry/gromacs/files/gromacs-9999-Fix-build-with-torch.patch
new file mode 100644
index 000000000000..f4f3698d96db
--- /dev/null
+++ b/sci-chemistry/gromacs/files/gromacs-9999-Fix-build-with-torch.patch
@@ -0,0 +1,40 @@
+From d997978fc0c644784ed929b0c48e153d5c1f1408 Mon Sep 17 00:00:00 2001
+From: Alexey Shvetsov <alexxyum@gmail.com>
+Date: Sat, 19 Oct 2024 21:22:07 +0300
+Subject: [PATCH] Fix build with torch if non default C{XX}_FLAGS set
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This should fix build colvars with torch if torch was built with non
+default C{,XX}_FLAGS
+
+Erorr info:
+
+FAILED: src/gromacs/CMakeFiles/colvars_objlib.dir/__/external/colvars/colvar.cpp.o
+/usr/bin/x86_64-pc-linux-gnu-g++ -DCOLVARS_TORCH -DGMX_DOUBLE=0 -I/usr/include/torch/csrc/api/include  -O2 -pipe -march=skylake -mtune=skylake -std=c++17 -fPIC "-O2 -pipe -march=skylake -mtune=skylake" -D_GLIBCXX_USE_CXX11_ABI=1 -fopenmp -MD -MT src/gromacs/CMakeFiles/colvars_objlib.dir/__/external/colvars/colvar.cpp.o -MF src/gromacs/CMakeFiles/colvars_objlib.dir/__/external/colvars/colvar.cpp.o.d -o src/gromacs/CMakeFiles/colvars_objlib.dir/__/external/colvars/colvar.cpp.o -c /var/tmp/portage/sci-chemistry/gromacs-9999/work/gromacs-9999/src/external/colvars/colvar.cpp
+cc1plus: error: argument to ‘-O’ should be a non-negative integer, ‘g’, ‘s’, ‘z’ or ‘fast’
+
+This caused by doubling quoted C{,XX}_FLAGS
+
+Signed-off-by: Alexey Shvetsov <alexxyum@gmail.com>
+---
+ cmake/gmxManageColvars.cmake | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cmake/gmxManageColvars.cmake b/cmake/gmxManageColvars.cmake
+index 509d56e116..f49c820fa0 100644
+--- a/cmake/gmxManageColvars.cmake
++++ b/cmake/gmxManageColvars.cmake
+@@ -52,7 +52,7 @@ function(gmx_manage_colvars)
+             target_link_libraries(colvars_objlib PRIVATE OpenMP::OpenMP_CXX)
+         endif()
+         if(GMX_TORCH)
+-            target_compile_options(colvars_objlib PRIVATE ${CMAKE_CXX_FLAGS} ${TORCH_CXX_FLAGS})
++            target_compile_options(colvars_objlib PRIVATE ${CMAKE_CXX_FLAGS})
+             target_include_directories(colvars_objlib PRIVATE ${TORCH_INCLUDE_DIRS})
+             target_compile_definitions(colvars_objlib PRIVATE -DCOLVARS_TORCH)
+         endif()
+-- 
+2.47.0
+

diff --git a/sci-chemistry/gromacs/gromacs-9999.ebuild b/sci-chemistry/gromacs/gromacs-9999.ebuild
index 33e343e23e7c..64de8d68d1c5 100644
--- a/sci-chemistry/gromacs/gromacs-9999.ebuild
+++ b/sci-chemistry/gromacs/gromacs-9999.ebuild
@@ -18,7 +18,7 @@ if [[ ${PV} = *9999* ]]; then
 		https://gitlab.com/gromacs/gromacs.git
 		https://github.com/gromacs/gromacs.git
 		"
-	[[ ${PV} = 9999 ]] && EGIT_BRANCH="master" || EGIT_BRANCH="release-${PV:0:4}"
+	[[ ${PV} = 9999 ]] && EGIT_BRANCH="main" || EGIT_BRANCH="release-${PV:0:4}"
 	inherit git-r3
 else
 	SRC_URI="
@@ -39,17 +39,19 @@ HOMEPAGE="https://www.gromacs.org/"
 #        base,    vmd plugins, fftpack from numpy,  blas/lapck from netlib,        memtestG80 library,  mpi_thread lib
 LICENSE="LGPL-2.1 UoI-NCSA !mkl? ( !fftw? ( BSD ) !blas? ( BSD ) !lapack? ( BSD ) ) cuda? ( LGPL-3 ) threads? ( BSD )"
 SLOT="0/${PV}"
-IUSE="blas clang clang-cuda cuda  +custom-cflags +doc build-manual double-precision +fftw +gmxapi +gmxapi-legacy +hwloc lapack mkl mpi +offensive opencl openmp +python +single-precision test +threads +tng ${ACCE_IUSE}"
+IUSE="blas clang clang-cuda cuda  +custom-cflags +doc build-manual double-precision +fftw +gmxapi +gmxapi-legacy +hdf5 +hwloc lapack mkl mpi nnpot +offensive opencl openmp +python +single-precision test +threads +tng ${ACCE_IUSE}"
 
 CDEPEND="
 	blas? ( virtual/blas )
 	cuda? ( >=dev-util/nvidia-cuda-toolkit-11:=[profiler] )
 	opencl? ( virtual/opencl )
 	fftw? ( sci-libs/fftw:3.0= )
+	hdf5? ( sci-libs/hdf5 )
 	hwloc? ( sys-apps/hwloc:= )
 	lapack? ( virtual/lapack )
 	mkl? ( sci-libs/mkl )
 	mpi? ( virtual/mpi[cxx] )
+	nnpot? ( sci-libs/caffe2[cuda=,opencl=] )
 	sci-libs/lmfit:=
 	>=dev-cpp/muParser-2.3:=
 	${PYTHON_DEPS}
@@ -88,6 +90,8 @@ DOCS=( AUTHORS README )
 
 RESTRICT="!test? ( test )"
 
+PATCHES=( "${FILESDIR}/${P}-Fix-build-with-torch.patch" )
+
 if [[ ${PV} != *9999 ]]; then
 	S="${WORKDIR}/${PN}-${PV/_/-}"
 fi
@@ -178,6 +182,11 @@ src_prepare() {
 src_configure() {
 	local mycmakeargs_pre=( ) extra fft_opts=( )
 	local acce="AUTO"
+	local nnpot="OFF"
+
+	if use nnpot; then
+		nnpot="TORCH"
+	fi
 
 	if use custom-cflags; then
 		#go from slowest to fastest acceleration
@@ -225,9 +234,11 @@ src_configure() {
 		-DGMX_COOL_QUOTES=$(usex offensive)
 		-DGMX_USE_TNG=$(usex tng)
 		-DGMX_BUILD_MANUAL=$(usex build-manual)
+		-DGMX_USE_HDF5=$(usex hdf5)
 		-DGMX_HWLOC=$(usex hwloc)
 		-DGMX_DEFAULT_SUFFIX=off
 		-DGMX_SIMD="$acce"
+		-DGMX_NNPOT="$nnpot"
 		-DGMX_VMD_PLUGIN_PATH="${EPREFIX}/usr/$(get_libdir)/vmd/plugins/*/molfile/"
 		-DBUILD_TESTING=$(usex test)
 		-DGMX_BUILD_UNITTESTS=$(usex test)
@@ -322,7 +333,7 @@ src_install() {
 		cat "${ED}"/usr/bin/gmx-completion.bash "$x" > "${T}/${n}" || die
 		newbashcomp "${T}"/"${n}" "${n}"
 	done
-	rm "${ED}"/usr/bin/gmx-completion*.bash || die
+	#rm "${ED}"/usr/bin/gmx-completion*.bash || die
 	readme.gentoo_create_doc
 }
 

diff --git a/sci-chemistry/gromacs/metadata.xml b/sci-chemistry/gromacs/metadata.xml
index 44ddb19d1d9d..518711308a02 100644
--- a/sci-chemistry/gromacs/metadata.xml
+++ b/sci-chemistry/gromacs/metadata.xml
@@ -19,6 +19,7 @@
 		<flag name="gmxapi-legacy">Enable installing lagacy headers</flag>
 		<flag name="hwloc">Enable HWLoc lib support</flag>
 		<flag name="lmfit">Use external <pkg>sci-libs/lmfit</pkg></flag>
+		<flag name="nnpot">Allow to use <pkg>sci-libs/caffe2</pkg> for NN Potentials</flag>
 		<flag name="opencl">Enable opencl non-bonded kernels</flag>
 		<flag name="single-precision">Single precision version of gromacs (default)</flag>
 		<flag name="tng">Enable new trajectory format - tng</flag>


             reply	other threads:[~2024-10-19 18:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-19 18:43 Alexey Shvetsov [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-02-03  6:36 [gentoo-commits] repo/gentoo:master commit in: sci-chemistry/gromacs/, sci-chemistry/gromacs/files/ Alexey Shvetsov
2024-12-10 16:19 Alexey Shvetsov
2024-11-23 17:42 Alexey Shvetsov
2024-11-21  8:13 Alexey Shvetsov
2024-10-20 12:15 Alexey Shvetsov
2024-03-26 20:00 Andreas Sturmlechner
2022-02-22 20:58 Alexey Shvetsov
2022-02-21 16:20 Alexey Shvetsov
2021-11-07 20:12 Christoph Junghans
2019-10-24  9:36 Alexey Shvetsov
2017-12-12 20:50 Alexey Shvetsov

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=1729363424.fa7e24cadaf7fb109ea385f8357a916343c846bb.alexxy@gentoo \
    --to=alexxy@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