!12 fix build error && test error

From: @chen-jan 
Reviewed-by: @caodongxia 
Signed-off-by: @caodongxia
This commit is contained in:
openeuler-ci-bot 2023-08-08 01:17:09 +00:00 committed by Gitee
commit 59230d8ebe
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 33 additions and 1 deletions

24
gromacs-gcc11.patch Normal file
View File

@ -0,0 +1,24 @@
diff --git a/src/gromacs/awh/biasparams.cpp b/src/gromacs/awh/biasparams.cpp
index f4db497..87e0a40 100644
--- a/src/gromacs/awh/biasparams.cpp
+++ b/src/gromacs/awh/biasparams.cpp
@@ -47,6 +47,7 @@
#include "biasparams.h"
#include <cmath>
+#include <limits>
#include <algorithm>
diff --git a/src/gromacs/mdrun/minimize.cpp b/src/gromacs/mdrun/minimize.cpp
index 8550271..d259b66 100644
--- a/src/gromacs/mdrun/minimize.cpp
+++ b/src/gromacs/mdrun/minimize.cpp
@@ -49,6 +49,7 @@
#include <cmath>
#include <cstring>
#include <ctime>
+#include <limits>
#include <algorithm>
#include <vector>

View File

@ -8,7 +8,7 @@
%endif
Name: gromacs
Version: 2019.3
Release: 3
Release: 4
Summary: Fast, Free and Flexible Molecular Dynamics
License: GPLv2+ and ASL-2.0 and BSL-1.0 and MIT and LGPL-2.1
URL: http://www.gromacs.org
@ -17,6 +17,7 @@ Source1: https://ftp.gromacs.org/pub/manual/manual-%{version}.pdf
Source2: https://ftp.gromacs.org/regressiontests/regressiontests-%{version}.tar.gz
Patch0: gromacs-dssp-path.patch
Patch1: gromacs-issue-2366.patch
Patch2: gromacs-gcc11.patch
BuildRequires: gcc-c++ cmake3 >= 3.4.3 openblas-devel fftw-devel gsl-devel hwloc
BuildRequires: hwloc-devel libX11-devel lmfit-devel >= 6.0 environment-modules
BuildRequires: chrpath
@ -149,6 +150,7 @@ This package single and double precision binaries and libraries.
%setup -q %{?SOURCE2:-a 2} -n gromacs-%{version}%{?_rc}
%patch0 -p1
%patch1 -p1
%patch2 -p1
install -Dpm644 %{SOURCE1} ./serial/docs/manual/gromacs.pdf
rm -r src/external/{fftpack,tng_io,lmfit}
sed -i 's/set(_timeout [0-9]*)/set(_timeout 900)/' src/testutils/TestMacros.cmake
@ -172,6 +174,7 @@ sed -i 's/set(_timeout [0-9]*)/set(_timeout 900)/' src/testutils/TestMacros.cmak
%endif
%global double -DGMX_DOUBLE:BOOL=ON
%global mpi -DGMX_BUILD_MDRUN_ONLY:BOOL=ON -DGMX_MPI:BOOL=ON -DGMX_THREAD_MPI:BOOL=OFF -DGMX_DEFAULT_SUFFIX:BOOL=OFF -DBUILD_SHARED_LIBS:BOOL=OFF
. /etc/profile.d/modules.sh
for p in '' _d ; do
for mpi in '' mpich openmpi ; do
test -n "${mpi}" && module load mpi/${mpi}-%{_arch}
@ -234,6 +237,7 @@ echo "%{_libdir}/openmpi/lib" > %{buildroot}/etc/ld.so.conf.d/%{name}-openmpi-%{
/sbin/ldconfig
%check
export OMPI_ALLOW_RUN_AS_ROOT=1
. /etc/profile.d/modules.sh
for p in '' _d ; do
for mpi in '' mpich openmpi ; do
@ -285,6 +289,10 @@ done
%config(noreplace) /etc/ld.so.conf.d/%{name}-mpich-%{_arch}.conf
%changelog
* Mon Aug 07 2023 chenchen <chen_aka_jan@163.com> - 2019.3-4
- fix build error due to gcc upgrade to gcc 12.3.4
- add variable OMPI_ALLOW_RUN_AS_ROOT=1 for fix test error
* Mon Dec 05 2022 Ge Wang <wangge20@h-partners.com> - 2019.3-3
- Remove runpath