diff --git a/.gitignore b/.gitignore index fde8ec0..200ac23 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,4 @@ manual-4.0.pdf /manual-5.1.pdf /gromacs-5.1.1.tar.gz /manual-5.1.1.pdf +/gromacs-bec9c8757e59cae58fc61ed841c0bb73c84079db.tar.gz diff --git a/gromacs-README.fedora b/gromacs-README.fedora index b06ec76..7e345c4 100644 --- a/gromacs-README.fedora +++ b/gromacs-README.fedora @@ -1,19 +1,22 @@ -Thu Dec 20 2012 -Susi Lehtola +Wed Feb 24 2016 +Dominik Mierzejewski +Some notes about the Fedora GROMACS package: -Some notes about the GROMACS Fedora package: - -- In order to prevent name clashes with other software, all -binaries have been renamed to start with g_ . For instance -grompp is now g_grompp and mdrun is now g_mdrun. +- Per upstream change, since version 5.1, we're no longer shipping +any g_* binaries or symlinks. All functionality is now available +in the main gmx binary. For instance, g_anadock is replaced with +gmx anadock. - All binaries are available in single and dual precision. The binaries with the _d suffix are double precision versions. -For instance g_mdrun is single precision and g_mdrun_d is double +For instance, gmx is single precision and gmx_d is double precision. -- MPI enabled binaries are in gromacs-mpi. These contain, too, -both single and double precision versions. Single precision -versions have _mpi suffix, double precisin versions _mpi_d suffix. -For instance g_mdrun_mpi and g_mdrun_mpi_d. +- MPI enabled binaries are compiled for both MPICH and OpenMPI +and available in gromacs-mpich and gromacs-openmpi subpackages, +respectively. These, too, contain both single and double precision +versions. Single precision versions have _mpich (_openmpi) suffix, +while double precision versions have _mpich_d (_openmpi_d) suffix. +For instance g_mdrun_mpich (g_mdrun_openmpi) and g_mdrun_mpich_d +(g_mdrun_openmpi_d). diff --git a/gromacs-dssp-path.patch b/gromacs-dssp-path.patch index 0ea4f19..a9b2d1c 100644 --- a/gromacs-dssp-path.patch +++ b/gromacs-dssp-path.patch @@ -1,7 +1,7 @@ -diff -up gromacs-5.0.5/src/gromacs/gmxana/gmx_do_dssp.c.dssp gromacs-5.0.5/src/gromacs/gmxana/gmx_do_dssp.c ---- gromacs-5.0.5/src/gromacs/gmxana/gmx_do_dssp.c.dssp 2015-05-06 23:18:00.000000000 +0200 -+++ gromacs-5.0.5/src/gromacs/gmxana/gmx_do_dssp.c 2015-06-14 01:10:16.556983504 +0200 -@@ -441,7 +441,7 @@ int gmx_do_dssp(int argc, char *argv[]) +diff -up gromacs-a7093a73959458a1f4aa4e384104a5515a4f2863/src/gromacs/gmxana/gmx_do_dssp.cpp.dssp gromacs-a7093a73959458a1f4aa4e384104a5515a4f2863/src/gromacs/gmxana/gmx_do_dssp.cpp +--- gromacs-a7093a73959458a1f4aa4e384104a5515a4f2863/src/gromacs/gmxana/gmx_do_dssp.cpp.dssp 2016-02-23 22:23:54.000000000 +0100 ++++ gromacs-a7093a73959458a1f4aa4e384104a5515a4f2863/src/gromacs/gmxana/gmx_do_dssp.cpp 2016-02-24 11:06:12.982692034 +0100 +@@ -445,7 +445,7 @@ int gmx_do_dssp(int argc, char *argv[]) "calling the dssp program. If you do not have the dssp program,", "get it from http://swift.cmbi.ru.nl/gv/dssp. [THISMODULE] assumes ", "that the dssp executable is located in ", @@ -10,7 +10,7 @@ diff -up gromacs-5.0.5/src/gromacs/gmxana/gmx_do_dssp.c.dssp gromacs-5.0.5/src/g "set an environment variable [TT]DSSP[tt] pointing to the dssp", "executable, e.g.: [PAR]", "[TT]setenv DSSP /opt/dssp/bin/dssp[tt][PAR]", -@@ -586,7 +586,7 @@ int gmx_do_dssp(int argc, char *argv[]) +@@ -590,7 +590,7 @@ int gmx_do_dssp(int argc, char *argv[]) if ((dptr = getenv("DSSP")) == NULL) { diff --git a/gromacs-gtest-issue705.patch b/gromacs-gtest-issue705.patch new file mode 100644 index 0000000..f7a0f12 --- /dev/null +++ b/gromacs-gtest-issue705.patch @@ -0,0 +1,23 @@ +diff -up gromacs-bec9c8757e59cae58fc61ed841c0bb73c84079db/cmake/gmxCFlags.cmake.gtest705 gromacs-bec9c8757e59cae58fc61ed841c0bb73c84079db/cmake/gmxCFlags.cmake +--- gromacs-bec9c8757e59cae58fc61ed841c0bb73c84079db/cmake/gmxCFlags.cmake.gtest705 2016-03-18 16:05:26.000000000 +0100 ++++ gromacs-bec9c8757e59cae58fc61ed841c0bb73c84079db/cmake/gmxCFlags.cmake 2016-03-21 19:37:46.623380637 +0100 +@@ -123,6 +123,9 @@ macro (gmx_c_flags) + GMX_TEST_CFLAG(CFLAGS_COPT "-funroll-all-loops" + GMXC_CFLAGS_RELEASE) + GMX_TEST_CFLAG(CFLAGS_NOINLINE "-fno-inline" GMXC_CFLAGS_DEBUG) ++ # Workaround GTest bug https://github.com/google/googletest/issues/705. ++ GMX_TEST_CFLAG(CFLAGS_NO_DEL_NULL "-fno-delete-null-pointer-checks" ++ GMXC_CFLAGS_RELEASE) + endif() + # g++ + if(CMAKE_COMPILER_IS_GNUCXX) +@@ -142,6 +145,9 @@ macro (gmx_c_flags) + GMX_TEST_CXXFLAG(CXXFLAGS_COPT "-funroll-all-loops" + GMXC_CXXFLAGS_RELEASE) + GMX_TEST_CXXFLAG(CXXFLAGS_NOINLINE "-fno-inline" GMXC_CXXFLAGS_DEBUG) ++ # Workaround GTest bug https://github.com/google/googletest/issues/705. ++ GMX_TEST_CXXFLAG(CXXFLAGS_NO_DEL_NULL "-fno-delete-null-pointer-checks" ++ GMXC_CXXFLAGS_RELEASE) + endif() + + # icc diff --git a/gromacs-opencl.patch b/gromacs-opencl.patch deleted file mode 100644 index 785de04..0000000 --- a/gromacs-opencl.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up gromacs-5.1/src/programs/mdrun/tests/moduletest.cpp.opencl gromacs-5.1/src/programs/mdrun/tests/moduletest.cpp ---- gromacs-5.1/src/programs/mdrun/tests/moduletest.cpp.opencl 2015-06-22 15:17:54.000000000 +0200 -+++ gromacs-5.1/src/programs/mdrun/tests/moduletest.cpp 2015-09-23 23:01:35.456564790 +0200 -@@ -220,7 +220,7 @@ SimulationRunner::callMdrun(const Comman - #ifdef GMX_MPI - # ifdef GMX_GPU - # ifdef GMX_THREAD_MPI -- int numGpusNeeded = g_numThreads; -+ int numGpusNeeded = 1; - # else /* Must be real MPI */ - int numGpusNeeded = gmx_node_num(); - # endif diff --git a/gromacs-sphinx-no-man.patch b/gromacs-sphinx-no-man.patch new file mode 100644 index 0000000..68b43ee --- /dev/null +++ b/gromacs-sphinx-no-man.patch @@ -0,0 +1,12 @@ +diff -up gromacs-bec9c8757e59cae58fc61ed841c0bb73c84079db/docs/conf.py.sphinx-no-man gromacs-bec9c8757e59cae58fc61ed841c0bb73c84079db/docs/conf.py +--- gromacs-bec9c8757e59cae58fc61ed841c0bb73c84079db/docs/conf.py.sphinx-no-man 2016-03-18 16:05:26.000000000 +0100 ++++ gromacs-bec9c8757e59cae58fc61ed841c0bb73c84079db/docs/conf.py 2016-03-24 10:26:42.361145156 +0100 +@@ -302,7 +302,7 @@ latex_documents = [ + + # One entry per manual page. List of tuples + # (source start file, name, description, authors, manual section). +-execfile('conf-man.py') ++#execfile('conf-man.py') + + # If true, show URL addresses after external links. + #man_show_urls = False diff --git a/gromacs-vsx.patch b/gromacs-vsx.patch deleted file mode 100644 index bddba91..0000000 --- a/gromacs-vsx.patch +++ /dev/null @@ -1,41 +0,0 @@ -diff -up gromacs-5.1/src/gromacs/simd/impl_ibm_vsx/impl_ibm_vsx.h.vsx gromacs-5.1/src/gromacs/simd/impl_ibm_vsx/impl_ibm_vsx.h ---- gromacs-5.1/src/gromacs/simd/impl_ibm_vsx/impl_ibm_vsx.h.vsx 2015-08-13 13:48:09.000000000 +0200 -+++ gromacs-5.1/src/gromacs/simd/impl_ibm_vsx/impl_ibm_vsx.h 2015-08-24 10:07:34.819414371 +0200 -@@ -260,7 +260,7 @@ - #define gmx_simd_min_d(a, b) vec_min(a, b) - #if defined(__GNUC__) && !defined(__ibmxl__) && !defined(__xlC__) - /* gcc up to at least version 4.9 does not support vec_round() in double precision. */ --# define gmx_simd_round_d(a) ({ __vector double res; __asm__ ("xvrdpi %0,%1" : "=ww" (res) : "ww" ((__vector double) (a))); res; }) -+# define gmx_simd_round_d(a) ({ __vector double res; __asm__ ("xvrdpi %x0,%x1" : "=wd" (res) : "wd" ((__vector double) (a))); res; }) - #else - /* IBM xlC */ - # define gmx_simd_round_d(a) vec_round(a) -@@ -334,8 +334,8 @@ - - #if defined(__GNUC__) && !defined(__ibmxl__) && !defined(__xlC__) - /* gcc-4.9 is missing double-to-float/float-to-double conversions. */ --# define gmx_vsx_f2d(x) ({ __vector double res; __asm__ ("xvcvspdp %0,%1" : "=ww" (res) : "ww" ((__vector float) (x))); res; }) --# define gmx_vsx_d2f(x) ({ __vector float res; __asm__ ("xvcvdpsp %0,%1" : "=ww" (res) : "ww" ((__vector double) (x))); res; }) -+# define gmx_vsx_f2d(x) ({ __vector double res; __asm__ ("xvcvspdp %x0,%x1" : "=wd" (res) : "wf" ((__vector float) (x))); res; }) -+# define gmx_vsx_d2f(x) ({ __vector float res; __asm__ ("xvcvdpsp %x0,%x1" : "=wf" (res) : "wd" ((__vector double) (x))); res; }) - #else - /* f2d and d2f are indeed identical on xlC; it is selected by the argument and result type. */ - # define gmx_vsx_f2d(x) vec_cvf(x) -@@ -438,7 +438,7 @@ gmx_simd_cvtt_d2i_ibm_vsx(gmx_simd_doubl - const __vector unsigned char perm = {4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15, 8, 9, 10, 11}; - gmx_simd_dint32_t ix; - -- __asm__ ("xvcvdpsxws %0,%1" : "=ww" (ix) : "ww" ((__vector double) (x))); -+ __asm__ ("xvcvdpsxws %x0,%x1" : "=wa" (ix) : "wd" (x)); - - return vec_perm(ix, ix, perm); - } -@@ -449,7 +449,7 @@ gmx_simd_cvt_i2d_ibm_vsx(gmx_simd_dint32 - const __vector unsigned char perm = {4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15, 8, 9, 10, 11}; - gmx_simd_double_t x; - ix = vec_perm(ix, ix, perm); -- __asm__ ("xvcvsxwdp %0,%1" : "=ww" (x) : "ww" ((__vector signed int) (ix))); -+ __asm__ ("xvcvsxwdp %x0,%x1" : "=wd" (x) : "wa" (ix)); - return x; - } - #endif diff --git a/gromacs.spec b/gromacs.spec index 9d1af3e..ef7da34 100644 --- a/gromacs.spec +++ b/gromacs.spec @@ -1,10 +1,23 @@ +%global git 1 +%global commit bec9c8757e59cae58fc61ed841c0bb73c84079db +%global shortcommit %(c=%{commit}; echo ${c:0:7}) + %ifnarch s390 s390x %global with_openmpi 1 %else %global with_openmpi 0 %endif %global execstack_excludearch aarch64 ppc64 ppc64le s390 s390x -%global opencl_excludearch aarch64 armv7hl ppc64 ppc64le s390 s390x +%ifnarch aarch64 armv7hl ppc64 ppc64le s390 s390x +%if 0%{?fedora} > 23 +# https://bugzilla.redhat.com/show_bug.cgi?id=1307869 +%global with_opencl 0 +%else +%global with_opencl 1 +%endif +%else +%global with_opencl 0 +%endif %global simd None %ifarch x86_64 @@ -28,23 +41,35 @@ %endif Name: gromacs -Version: 5.1.1 -Release: 2%{?dist} +Version: 2016 +Release: 0.1.20160318git%{shortcommit}%{?dist} Summary: Fast, Free and Flexible Molecular Dynamics License: GPLv2+ URL: http://www.gromacs.org +%if %{git} +Source0: https://github.com/gromacs/gromacs/archive/%{commit}/gromacs-%{commit}.tar.gz +# required for building the manual +BuildRequires: %{_bindir}/bibtex +BuildRequires: %{_bindir}/convert +BuildRequires: %{_bindir}/dvips +BuildRequires: %{_bindir}/latex2html +BuildRequires: %{_bindir}/makeindex +BuildRequires: %{_bindir}/pdflatex +BuildRequires: python2-sphinx +%else Source0: ftp://ftp.gromacs.org/pub/gromacs/gromacs-%{version}.tar.gz Source1: ftp://ftp.gromacs.org/pub/manual/manual-%{version}.pdf +%endif Source6: gromacs-README.fedora # fix path to packaged dssp # https://bugzilla.redhat.com/show_bug.cgi?id=1203754 Patch0: gromacs-dssp-path.patch -# fix compilation on ppc64(le) with VSX SIMD -# http://redmine.gromacs.org/issues/1808 -Patch1: gromacs-vsx.patch -# fix gmxManageOpenCL.cmake syntax error and MPI tests -Patch2: gromacs-opencl.patch +# http://redmine.gromacs.org/issues/1911 +# https://github.com/google/googletest/issues/705 +Patch1: gromacs-gtest-issue705.patch +# fix building documentation +Patch3: gromacs-sphinx-no-man.patch BuildRequires: cmake BuildRequires: atlas-devel >= 3.10.1 BuildRequires: boost-devel @@ -53,7 +78,7 @@ BuildRequires: gsl-devel BuildRequires: libxml2-devel BuildRequires: libX11-devel BuildRequires: motif-devel -%ifnarch %{opencl_excludearch} +%if %{with_opencl} BuildRequires: ocl-icd-devel BuildRequires: opencl-headers # use CPU-based OpenCL implementation for build @@ -169,7 +194,7 @@ This package contains libraries needed for operation of GROMACS. %package openmpi Summary: GROMACS Open MPI binaries and libraries Requires: gromacs-common = %{version}-%{release} -%ifarch %{opencl_arches} +%if %{with_opencl} Requires: gromacs-opencl = %{version}-%{release} %endif Requires: gromacs-openmpi-libs = %{version}-%{release} @@ -223,7 +248,7 @@ You may need it if you want to write your own analysis programs. %package mpich Summary: GROMACS MPICH binaries and libraries Requires: gromacs-common = %{version}-%{release} -%ifnarch %{opencl_excludearch} +%if %{with_opencl} Requires: gromacs-opencl = %{version}-%{release} %endif Requires: gromacs-mpich-libs = %{version}-%{release} @@ -304,11 +329,16 @@ This package provides scripts needed to run GROMACS with csh and a completion script. %prep +%if %{git} +%setup -q -n gromacs-%{commit} +%patch3 -p1 -b .sphinx-no-man +%else %setup -q +install -Dpm644 %{SOURCE1} ./serial/docs/manual/manual.pdf +%endif %patch0 -p1 -b .dssp -%patch1 -p1 -b .vsx -%ifnarch %{opencl_excludearch} -%patch2 -p1 -b .opencl +%if 0%{?fedora} > 23 +%patch1 -p1 -b .gtest705 %endif mkdir {serial,mpich,openmpi}{,_d} @@ -330,21 +360,24 @@ export LDFLAGS="-L%{_libdir}/atlas" -DGMX_BUILD_UNITTESTS:BOOL=ON \\\ -DGMX_LAPACK_USER=satlas \\\ -DGMX_SIMD=%{simd} \\\ - -DGMX_X11=ON -%ifnarch %{opencl_excludearch} +%if %{with_opencl} # OpenCL is available for single precision only -%global single -DGMX_GPU=ON -DGMX_USE_OPENCL=ON +%global single -DGMX_GPU:BOOL=ON -DGMX_USE_OPENCL:BOOL=ON %endif -%global double -DGMX_DOUBLE=ON -%global mpi -DGMX_BUILD_MDRUN_ONLY=ON -DGMX_MPI=ON -DGMX_THREAD_MPI=OFF -DGMX_DEFAULT_SUFFIX=OFF +%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 %if %{with_openmpi} %{_openmpi_load} for p in '' _d ; do -SUFFIXCONF="-D GMX_BINARY_SUFFIX=${MPI_SUFFIX}${p} -D GMX_LIBS_SUFFIX=${MPI_SUFFIX}${p}" cd openmpi${p} -%cmake %{defopts} %{mpi} $SUFFIXCONF $(test -n "$p" && echo %{double} || echo %{?single}) .. +%cmake \ + %{defopts} \ + %{mpi} \ + -DGMX_BINARY_SUFFIX=${MPI_SUFFIX}${p} -DGMX_LIBS_SUFFIX=${MPI_SUFFIX}${p} \ + $(test -n "$p" && echo %{double} || echo %{?single}) \ + .. make VERBOSE=1 %{?_smp_mflags} cd .. done @@ -353,9 +386,13 @@ done %{_mpich_load} for p in '' _d ; do -SUFFIXCONF="-D GMX_BINARY_SUFFIX=${MPI_SUFFIX}${p} -D GMX_LIBS_SUFFIX=${MPI_SUFFIX}${p}" cd mpich${p} -%cmake %{defopts} %{mpi} $SUFFIXCONF $(test -n "$p" && echo %{double} || echo %{?single}) .. +%cmake \ + %{defopts} \ + %{mpi} \ + -DGMX_BINARY_SUFFIX=${MPI_SUFFIX}${p} -DGMX_LIBS_SUFFIX=${MPI_SUFFIX}${p} \ + $(test -n "$p" && echo %{double} || echo %{?single}) \ + .. make VERBOSE=1 %{?_smp_mflags} cd .. done @@ -363,11 +400,26 @@ done for p in '' _d ; do cd serial${p} -%cmake %{defopts} $SUFFIXCONF $(test -n "$p" && echo %{double} || echo %{?single}) .. +%cmake \ + %{defopts} \ + -DGMX_X11=ON \ + $(test -n "$p" && echo %{double} || echo %{?single}) \ + .. make VERBOSE=1 %{?_smp_mflags} cd .. done +%if %{git} +cd serial +%cmake \ + %{defopts} \ + -DGMX_X11=ON \ + %{?single} \ + -DGMX_BUILD_MANUAL:BOOL=ON -DGMX_BUILD_HELP:BOOL=ON \ + .. +LD_LIBRARY_PATH=$PWD/lib make VERBOSE=1 completion install-guide man manual +cd .. +%endif %install %if %{with_openmpi} @@ -403,7 +455,7 @@ done mkdir -p %{buildroot}%{_docdir}/gromacs install -pm 644 AUTHORS COPYING README %{buildroot}%{_docdir}/gromacs # Install manual & packager's note -install -cpm 644 %{SOURCE1} %{buildroot}%{_docdir}/gromacs/manual.pdf +install -cpm 644 serial/docs/manual/gromacs.pdf %{buildroot}%{_docdir}/gromacs/manual.pdf install -cpm 644 %{SOURCE6} %{buildroot}%{_docdir}/gromacs/README.fedora pushd %{buildroot} @@ -478,13 +530,14 @@ done %config(noreplace) %{_sysconfdir}/bash_completion.d/gmx-completion* %{_bindir}/GMXRC %{_bindir}/GMXRC.bash -%{_mandir}/man1/gmx*.1* +%{_mandir}/man1/gromacs.1* %{_datadir}/%{name} %exclude %{_datadir}/%{name}/template +%if %{with_opencl} %exclude %{_datadir}/%{name}/opencl -%ifnarch %{opencl_excludearch} %files opencl +%doc docs/OpenCLTODOList.txt %{_datadir}/%{name}/opencl %endif @@ -528,6 +581,11 @@ done %{_bindir}/GMXRC.csh %changelog +* Fri Mar 18 2016 Dominik 'Rathann' Mierzejewski - 2016-0.1.20160318gitbec9c87 +- update to git master branch +- disable OpenCL for now (due to pocl FTBFS #1307869) +- use BOOL with all boolean cmake options + * Wed Feb 03 2016 Fedora Release Engineering - 5.1.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild diff --git a/sources b/sources index 6ca1ea4..ec82378 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -5c075141aa69dc4859cad0a55e61d35e gromacs-5.1.1.tar.gz -cfee4ae37a1bd5ff928eba1242770c2a manual-5.1.1.pdf +57240732fb260c0f7ee397a4a8362043 gromacs-bec9c8757e59cae58fc61ed841c0bb73c84079db.tar.gz