From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 735D0158042 for ; Sat, 19 Oct 2024 18:44:01 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9C899E07E6; Sat, 19 Oct 2024 18:44:00 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8489BE07E6 for ; Sat, 19 Oct 2024 18:44:00 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BE781341B52 for ; Sat, 19 Oct 2024 18:43:59 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2FD951682 for ; Sat, 19 Oct 2024 18:43:58 +0000 (UTC) From: "Alexey Shvetsov" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Alexey Shvetsov" Message-ID: <1729363424.fa7e24cadaf7fb109ea385f8357a916343c846bb.alexxy@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sci-chemistry/gromacs/, sci-chemistry/gromacs/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: sci-chemistry/gromacs/files/gromacs-9999-Fix-build-with-torch.patch sci-chemistry/gromacs/gromacs-9999.ebuild sci-chemistry/gromacs/metadata.xml X-VCS-Directories: sci-chemistry/gromacs/ sci-chemistry/gromacs/files/ X-VCS-Committer: alexxy X-VCS-Committer-Name: Alexey Shvetsov X-VCS-Revision: fa7e24cadaf7fb109ea385f8357a916343c846bb X-VCS-Branch: master Date: Sat, 19 Oct 2024 18:43:58 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: b56b9b42-9f85-4f66-89f0-45e1f4aec25d X-Archives-Hash: 89b4a22e66f4891cce50dda5ae4dfb90 commit: fa7e24cadaf7fb109ea385f8357a916343c846bb Author: Alexey Shvetsov gentoo org> AuthorDate: Sat Oct 19 18:40:05 2024 +0000 Commit: Alexey Shvetsov gentoo 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 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 +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 +--- + 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 @@ Enable installing lagacy headers Enable HWLoc lib support Use external sci-libs/lmfit + Allow to use sci-libs/caffe2 for NN Potentials Enable opencl non-bonded kernels Single precision version of gromacs (default) Enable new trajectory format - tng