Magnus Lundborg [Tue, 15 Jul 2014 13:54:49 +0000 (15:54 +0200)]
When writing TNG include file closing in wallcycle.
If there is an unwritten frame set when closing a TNG file
it will be written to disk. This includes compressing the
data (when writing compressed output), which can take a
significant amount of time if the system is large.
This should be included in the wallcycle count to make it
more fair.
Change-Id: Ida43fe73b8bc1b0c1326e286a4bff647410da45f
Mark Abraham [Fri, 4 Jul 2014 14:05:27 +0000 (16:05 +0200)]
Fix and document issues with template.cpp
Boost is a requirement for the template, so the FindGROMACS.cmake
needs machinery to deal with that. It will now find the Boost internal
to GROMACS.
pkg-config generally helps (if available and GMXRC is sourced), and
that use is now documented in the README.
Finding the GROMACS libraries and headers is also a requirement. This
now works whether or not the user has sourced GMXRC or has pkg-config
installed. The user can over-ride this with CMAKE_PREFIX_PATH if they
want to.
The template needs to use the same compiler and compiler flags for
post-C++98 support, and this is now documented in the README. In
master branch, some of these issues are side-stepped, so take due care
when merging.
Fixes #1554
Change-Id: Id30cf5149ead4a3f719499e37776a00f08309afc
Mark Abraham [Mon, 1 Sep 2014 18:56:21 +0000 (20:56 +0200)]
Merge "Merge branch release-4-6 into release-5-0" into release-5-0
Mark Abraham [Sun, 17 Aug 2014 22:10:32 +0000 (22:10 +0000)]
Fixes and updates to BlueGene/Q support
Stopped hard-coding compilers, since these vary between sites. Moved
compiler suppressions to gmxCFlags to follow standard practice better.
Permitted use of software invsqrt, even though you don't want to use
it.
Suppressed several kinds of false-alarm warnings with whole-of-source
compiler suppressions. I would preferred to keep the suppressions as
file-level compiler flags, but the way we compile our list of source
files for libgromacs makes this inconvenient, and the compiler would
not accept the PBC-related suppression as a pragma, either. Build is
now finally free of warnings (so long as you don't use the built-in
LAPACK with bgclang-3.5). Restructured some helper functions that
return strings whose getters might throw, so that there is a return
value that will keep compilers happy in all cases.
Change-Id: I7158e165575934be2b76beee7c10f860ccf58b76
Mark Abraham [Mon, 1 Sep 2014 16:22:23 +0000 (18:22 +0200)]
Merge branch release-4-6 into release-5-0
Conflicts:
CMakeLists.txt
Left version stuff in release-5-0 alone, because they should be
unaffected by release-4-6 version bumps.
Change-Id: I000cba25affa818b9e4283e85ae8cdf61f7c53a1
Mark Abraham [Mon, 1 Sep 2014 16:20:15 +0000 (18:20 +0200)]
Merge "Merge branch release-4-6 into release-5-0" into release-5-0
Erik Lindahl [Thu, 21 Aug 2014 06:35:41 +0000 (08:35 +0200)]
Added negative zero preprocessor constants
We had some discussions already when we started using negative
zero that it could be fragile on some compilers, and apparently
PGI is one of them. Maybe not the most important target, but it
makes sense to have a common constant in one place, and it can
also save some cycles in tight loops to clearly separate float
from double versions so we avoid extra precision conversions.
Change-Id: Id30a536b4f99f0310bfb2ec5185275c466cf5e07
David van der Spoel [Sat, 30 Aug 2014 14:17:38 +0000 (16:17 +0200)]
Fixes issue with vsiten and verlet buffers.
A loop counter for a loop over vsiten did not take into
account that multiple entries make up one vsiten
particle. Part of #1579.
Change-Id: Ic9a79e89ea9ef8f9f529c9d4a6c5cf05f65e9c7d
Mark Abraham [Fri, 29 Aug 2014 13:47:10 +0000 (15:47 +0200)]
Version bump after 4.6.7
Change-Id: I1f2e73c2b94f31b67e65bf7cf188fb542391ab4d
Mark Abraham [Thu, 28 Aug 2014 14:22:11 +0000 (16:22 +0200)]
Merge branch release-4-6 into release-5-0
Conflicts:
src/gromacs/fileio/gmxfio.c
Used new release-4-6 code calling renamed md5 functions
src/gromacs/gmxana/gmx_covar.c
Used gmx_ffclose, not ffclose, for file opened with xvgropen.
Change-Id: If6f9cb61bf7eab06dfdc61a03ad89ed38d599382
Berk Hess [Fri, 15 Aug 2014 09:20:28 +0000 (11:20 +0200)]
Fixed two PME issues with MPI+OpenMP
Change
272736bc partially fixed #1388, but broke the more general
case of multiple MPI communication pulses in PME. Change
272736bc
incorrectly changed tx1 and ty1. This change has been reverted.
Change
27189bba fixed the incorrect PME grid reduction with multiple
thread grid overlap in y. But it broke the, much more common, case
where the y-size of the PME grid is not divisible by the domains in y.
This change, incorrectly, changed buf_my.
Now buf_my is set to the correct value, which solves both issues.
Fixes #1578.
Refs #1388 and #1572.
Change-Id: Id2d7d013a3b8cdc04eda1fb026567088a38ec81f
Berk Hess [Tue, 19 Aug 2014 08:10:48 +0000 (10:10 +0200)]
Fixed bugs in vsiteN with OpenMP
Fixes #1579.
Change-Id: I42d234f4ad6a94e8f7b6b8236ea119860dd9f7ab
Berk Hess [Fri, 22 Aug 2014 10:37:49 +0000 (12:37 +0200)]
Initialize unused velocity constraint components
With domain decomposition, velocity components for communicated
atoms could be uninitialized. These components were never used, but
this could lead to valgrind warnings and floating point exceptions.
Fixes #1576.
Change-Id: Ic673680699578ddf62c2d240342138cbc16490c8
Teemu Murtola [Sun, 8 Jun 2014 04:22:47 +0000 (07:22 +0300)]
Backport of 'Remove unused figures from share/html/'
from master branch. Some of the flowchart images are also unused, but
left them there for completeness.
Change-Id: Ia47f9ac62f865f60c6f1998f407d62c9ba6c66f2
Mark Abraham [Thu, 10 Jul 2014 12:52:15 +0000 (14:52 +0200)]
Generalize markdown configuration machinery
This implementation scales a bit better as we increase the number of
markdown files. It may even be easier to understand! Preserves
existing top-level targets, and general behaviour. The full ARGN
functionality is not yet used, but it will be shortly.
Introduced stub user guide, with HTML and PDF build.
Change-Id: I198f273a08f81035694c3efefd35a5b2f2af7f0d
Mark Abraham [Mon, 7 Jul 2014 07:43:13 +0000 (09:43 +0200)]
Unify documentation for webpage build
The new webpage build can be run either from a code repo (for
development), or from the unpacked source tarball (for actual
deployment). The latter is useful to ensure the documentation reflects
the tarball, and because the tarballs and their md5sum values must be
available for building the webpage. A Jenkins flow job can build the
tarballs and then construct the webpage for automated delivery. The
machinery is active only if GMX_BUILD_WEBPAGE is set (and other pieces
in place), so will be transparent to normal users.
Created configurable top-level index.md inside the new docs top-level
directory. Various components have moved into this directory, but each
can still be built independently.
Imported some basic (but pandoc-specific) CSS from
https://gist.github.com/ryangray/
1882525
Made a new top-level index.md, and made it build HTML with Pandoc and
use the CSS. Later, we can consider making the whole static site build
work with some generator, e.g. to make links automatically.
Established CMake variables for configuring the webpage build with
the names of tarballs and their md5sum values. Builds from the repo
don't include this part of the webpage.
Moved the install guide into the new docs directory. Minor fixes to
header levels. Generated PDF install guide also. Used
PANDOC_EXECUTABLE instead of hard-coded "pandoc." Made it use the
CSS.
Moved reference manual build into the new docs directory, and linked
its default setting to GMX_BUILD_WEBPAGE.
Moved old html guide content into the new docs directory. This still
installs in the old way. Fixed broken links for xpm2ps and grompp.
Added rudimentary hdb.html to fix missing link target. Removed text
that linked to ancient material that no longer semes to exist.
Moved doxygen generation into the new docs directory. The useful
output now goes directly to build/docs/html, and logs to
build/docs/doxygen.
Bumped copyright years to keep uncrustify script happy.
Bumped top-level CMakeLists.txt and CPackInit.cmake to check for the
new correct paths when building tarballs.
Added config file for linkchecker to help automate checking
the links all work.
Refs #1242
Change-Id: I8e5cf98b2997b76f56b24f45262c9c9eebf9900e
Mark Abraham [Mon, 4 Aug 2014 22:42:26 +0000 (22:42 +0000)]
Fix zlib usage with TNG
Using zlib for TNG requires also that the the #include file can be
found, and this can be in a non-standard path. One part of this commit
should be rolled back into the TNG repo.
Change-Id: Iaa70ddd4f5471e405404148e6e83067d5ea52a27
Magnus Lundborg [Tue, 19 Aug 2014 15:26:00 +0000 (17:26 +0200)]
Fixed TNG memory alignment problem and reset pointers.
This is a temporary fix to the memory alignment problems on some
platforms. In the main TNG repository the whole I/O system is
rewritten to address this problem. This fix is to avoid the
problems without making too large changes.
There are also some pointers that were not reset after memory
was freed. This is also fixed in here.
This commit does not correspond to any commit in the TNG
repository.
Fixes #1542, #1546, #1547 and #1559.
Change-Id: I90a6406cccbc43fd57d4423c2b661019cf7763e8
Erik Lindahl [Fri, 8 Aug 2014 20:36:48 +0000 (22:36 +0200)]
Add _GNU_SOURCE=1 to find clone() with PGI
The PGI C++ compiler would not find clone()
in sched.h unless _GNU_SOURCE is set, and
it shouldn't hurt any other platforms if
we add it by default for gmock.
Change-Id: Id9446622bb49e17efd80ea1508e0ee40b48acdbe
Roland Schulz [Wed, 16 Jul 2014 01:45:49 +0000 (21:45 -0400)]
Change error to warning for missing OMP_NUM_THREADS
Setting the default number of OpenMP threads using -ntomp works too. Using ntomp
allows to use the regressiontests. A proper fix should be done in master because
it requires larger code changes.
Change-Id: Ic47cebc9da6cf1b0624a1383d7ce23f93bd26dbe
Erik Lindahl [Tue, 12 Aug 2014 18:11:40 +0000 (20:11 +0200)]
Fix matrix pointer dereference bug in update.c
The PGI compiler found a bug where an if-statement
checked against a dereferenced pointer rather than
the pointer itself being non-NULL.
Change-Id: If08977b818f28e1c78c35222d0f4efe6ae6aad65
Erik Lindahl [Mon, 28 Jul 2014 18:33:42 +0000 (20:33 +0200)]
Enable SIMD register calling convention with gmx_simdcall
Cmake now checks if the compiler supports __vectorcall or
__regcall calling convention modifiers, and sets gmx_simdcall
to one of these if supported, otherwise a blank string.
This should enable 32-bit MSVC to accept our SIMD routines
(starting from MSVC 2013), and with ICC it can at least in
theory improve performance slightly by using more registers
for argument passing in 64-bit mode too. Presently this is
only useful on x86, but the infrastructure will work if we
find similar calling conventions on other architectures.
Fixes #1541.
Change-Id: I7026fb4e1fb6b88c8aa18b060a631cbb80231cd4
Erik Lindahl [Tue, 19 Aug 2014 12:29:57 +0000 (14:29 +0200)]
Add cycle counters for 64-bit ARM
The gcc code has been tested on actual ARM64
hardware, but the MSVC one is only implemented
from the MSVC manual.
Change-Id: I13aac4d65345c684b6ddc5812ca9c3fcbe27b81a
Erik Lindahl [Tue, 12 Aug 2014 13:04:59 +0000 (15:04 +0200)]
Shorten plugin configuration message
This is just a minor note, so make sure it fits in a
single line rather than drawing attention to itself.
Change-Id: I086f3a90fdcdb92aa5920c27cc9176bae8c9bce4
Roland Schulz [Mon, 18 Aug 2014 00:36:05 +0000 (20:36 -0400)]
Add Intel command line warning
Fixes that build was printing a warning for scanner.cpp.
Related to #1483
Change-Id: I8a30fce82ab7ef0bfe735630b1ce4d9bb636b36d
Erik Lindahl [Mon, 11 Aug 2014 13:27:53 +0000 (15:27 +0200)]
Fix Portland compiler warnings
The PGI compiler finds several unreachable code
parts, mainly due to multiple return statements
being used. For most places this is just a
cosmetic fix to get rid of warnings, but functions
that are performance-sensitive should only have
a single return statement since the return
instruction causes a pipeline stall on many
architectures. This patch also fixes a warning
about an unused variable.
Change-Id: Ibf1c9e9dd1cdf29fc59c84afa4348e02bed270e6
Berk Hess [Mon, 11 Aug 2014 16:11:17 +0000 (18:11 +0200)]
Halved the cost of the pull communication
With DD the PBC reference coordinates are now only communicated
after DD repartitioning. This reduces the number of MPI_alltoall
calls from 2 to 1 per step, which can significantly improve
performance at high parallelization.
Added a cycle counter for pull potential.
Added checks for zero pull vectors to avoid div by 0.
Change-Id: Ib89ba9e14eaa887f59a5087135580bc29a20d7d0
Roland Schulz [Thu, 7 Aug 2014 23:04:12 +0000 (19:04 -0400)]
Don't build tests until they are run
There is no advantage to normal users, to build the tests until the
user decides to run them. Also avoids that the user thinks that
Gromacs doesn't compile on his platform if there is only a problem
with the testing framework.
Added a GMX_DEVELOPER_BUILD option which restores the old behavior.
Change-Id: Ifda2184eb45bf58b8798f21a29aea19bef57c690
Mark Abraham [Tue, 8 Jul 2014 20:39:52 +0000 (22:39 +0200)]
Fix gmx tune_pme with LJ-PME
Extend the range of vdwtype for which tune_pme will scale rvdw. This
makes tune_pme worth using with LJ-PME.
Change-Id: Iec702ae984cd062d47970380c0ca41f82e4c31d2
Mark Abraham [Wed, 9 Jul 2014 20:36:31 +0000 (22:36 +0200)]
Fix wallcycle counting with md-vv, sd and sd2
Previously the coordinate update for the first half of velocity Verlet
and (where applicable) the second half of the SD integrators was left
out of the walltime accounting, and showed up in the "Rest"
section. With this fix, the number of "update" steps reported depends
on exactly which flavour of which integrator is in use, because
there's also some number of calls to do constraining and/or energy
communication. Those numbers vary with either the flavour of
integrator, or the number of iterations MTTK actually needs.
Change-Id: Ib294455b7277caf89018c413d6c1c0ebf93c6ddb
Teemu Murtola [Fri, 8 Aug 2014 04:07:19 +0000 (07:07 +0300)]
Disable analysisdata generic tests if not compilable
If Google Test claims that typed tests are not supported, exclude the
analysisdata generic tests that use this functionality from compilation
(since they wouldn't compile). Instead, add a dummy test that at least
shows a developer who runs the unit test executable directly that
something is missing (the ctest run still passes without any messages).
Change-Id: Iba9bcc4b993e5213fe48e24d52b09474e5801fa8
Carsten Kutzner [Fri, 15 Aug 2014 14:44:44 +0000 (16:44 +0200)]
Fixed output of eigenvalues in g_covar. Fixes #1575
Commit
972032bfb8cd38 introduced a bug that would lead to eigenvalues
only written to .xvg file if "-last" is explicitly stated on the
command line. Otherwise no eigenvalues would appear in the .xvg file.
The eigenvalues are written in a loop from '0' to 'end', but since
'end' is initialized with '-1', the loop would never be executed.
This patch moves the code that computes 'end' one block upwards
before the output to file.
Change-Id: I738c9dd77ff9e6e2daae89b6d2063755dfba88af
Berk Hess [Mon, 11 Aug 2014 12:26:22 +0000 (14:26 +0200)]
Corrected SIMD math overflow documentation
Added more details to the SIMD pmecorr and exp documentation.
Corrected the source of the PME-LJ kernel overflow.
Change-Id: If3f5a27a3bb49ebb67fc24d43ed849e75175cf3c
Stefan Fleischmann [Fri, 8 Aug 2014 15:14:17 +0000 (17:14 +0200)]
Avoid stack overflow on Windows with CMake > 2.8.10.2
CMake used to add "/STACK:
10000000" to the default linker flags. That
was removed in version 2.8.11-rc1. The default value used by MSVC is
apparently too small because mdrun crashes with a stack overflow when
built on Windows with MSVC or ICC and CMake newer than 2.8.10.2.
The issue is already fixed in GROMACS 5.0 and master by I1e9858ae3. This
is a backport for release-4-6 of that commit.
Change-Id: Ib9238e513da8e86049d9e56c82262055d3c8b349
Erik Lindahl [Sun, 10 Aug 2014 23:24:26 +0000 (01:24 +0200)]
Make internal BLAS/LAPACK messages less noisy
BLAS and LAPACK are close to insignificant to Gromacs, so
avoid multi-line noisy warnings about "fallback" solutions;
those will just worry users and make them spend time investigating
under what conditions it might play a role, when we really don't
care much for BLAS/LAPACK performance. Message has been
changed to short inconspicuous status lines when we are using
built-in versions.
Change-Id: I9f1b0c769907521d5cb6325c8d67cd61ca8a803a
Erik Lindahl [Wed, 30 Jul 2014 12:34:32 +0000 (14:34 +0200)]
Improve Gromacs portability
This patch addresses a few general portability issues
that we have experienced at least on Fujitsu compilers
(K computer) and (partly) for Pathscale x86 compilers.
- I have added a generic compiler definition fallback
for boost, so it will work on unidentified compilers.
- There is now a define for gmock-1.7.0 to handle
the case where wcscasecmp() is not available. We use
this by default since it is not important for us.
- If we do not find atomics for sparc64 we now warn and
fall back on mutexes rather than the compile dying.
- The compiler flag checks have been updated from
cmake-3.0, and more warning checks added.
- Since some non-GCC compilers set _GNUC_ for
compatibilty, we do not assume all such compilers
support tr1, but use the internal tr1/tuple definition
in Gmock by default.
- Before using the sched.h affinity functions, we now
check that all the functions we need are supported,
rather than just one of them.
Change-Id: I31b7f0f46a9d03a627c73a0789b4a9b24fa860ee
Erik Lindahl [Fri, 8 Aug 2014 21:37:49 +0000 (23:37 +0200)]
Replace __LP64__ with check for pointer size
The __LP64__ define is not set e.g. on PGI compilers,
so instead we use a portable way of checking for
pointer size based on defines from stdint.h.
Change-Id: Ib2dd6e45c2b168add07f5478d59aec487a91ab9e
Berk Hess [Wed, 30 Jul 2014 12:59:17 +0000 (14:59 +0200)]
Added checks for TPI + Verlet scheme
Change-Id: I040f4cc9dbb8ff25ed97d18cca0b4a2c1e7014b0
Roland Schulz [Tue, 5 Aug 2014 02:05:04 +0000 (22:05 -0400)]
Check MD5sum for regressiontest
Because we decided it is important for FFTW we should do it for
the tests too. Is only done for non -dev versions.
Change-Id: Id7d1ee027bd302ad7cb10f46d93b0f435872c67e
Roland Schulz [Sun, 10 Aug 2014 01:59:35 +0000 (21:59 -0400)]
Merge release-4-6 into release-5-0
Conflicts:
CMakeLists.txt (version bump ignored)
Change-Id: I4ba0209b5f69b6470470530662a0b27390a02771
Erik Lindahl [Wed, 30 Jul 2014 12:46:57 +0000 (14:46 +0200)]
Fix portability issue with ArrayRef initializer overloading
Some compilers (in particular the Fujitsu compilers that are
derived from an earlier version of Clang) will not allow
overloading functions where one version uses a pointer to a
type, and the other a vector iterator to the same type - likely
because they have implemented iterators with pointers.
Regardless of what the C++ standard says, we need this working
on K computer, so this patch replaces the overloaded
initializers with non-member functions that create an ArrayRef
or ConstArrayRef either from pointers, an array,
or iterators.
Change-Id: I4c4e327c869920cc08e3f955e88cb3a5b28c7e87
Erik Lindahl [Tue, 5 Aug 2014 10:15:39 +0000 (12:15 +0200)]
Changed names of test files to avoid Fujitsu compiler bug
The Fujitsu compilers use an older version of the Clang
parser where certain static class initializers (e.g. strings)
are put in a static initializer function stub named after
the file and class. When the first such class has identical
names in two different files where the last part of the
name is identical, this will result in clashing symbols
at link time. Working around this would require an extra
(unused) class definition in each file that would pollute the
code, so for now we merely rename the files where it occurs
and hope that the compilers will be fixed (a bug report has
been submitted).
Change-Id: If552a06950facb0cdbb6e34e0b324aafa6083ae8
Berk Hess [Mon, 4 Aug 2014 12:18:36 +0000 (14:18 +0200)]
Fix hang with LJ-PME and empty domains
With LJ-PME and DD domains with 0 atoms and LJ-PME mdrun could hang.
Fixes #1571.
Change-Id: Ie205954c4f5e1a52df846a69972f735867eea15d
Roland Schulz [Tue, 29 Jul 2014 23:37:19 +0000 (19:37 -0400)]
Workaround for ICC 14
Problem was only present with BUILD_SHARED_LIBS=no
Change-Id: Ieb4377d819aa5eff3d139cdbe55775989118a738
Teemu Murtola [Sun, 3 Aug 2014 14:32:31 +0000 (17:32 +0300)]
Verify MD5 sum for FFTW download
Since ExternalProject provides confusing error messages with MD5
checking enabled, add a custom download step that works as expected.
When passed a local file as the URL, ExternalProject does the MD5
verification just fine, so the code now downloads the tarball in a
custom step and then passes that local file to ExternalProject.
This allows removing the lengthy security warning that appeared there if
one was just following the quick-and-dirty installation instructions,
and likely only confused novice users. While this change may not
improve overall security significantly, it hopefully allows everyone to
agree to remove that warning and thus improve the end-user experience.
Change-Id: I9ac5a30ae5858b7a6557ccb2d981cc909457d020
Berk Hess [Sat, 2 Aug 2014 08:53:31 +0000 (10:53 +0200)]
Fixed PME bug with high OpenMP thread count
PME energies and forces could be incorrect with combined MPI+OpenMP
parallelization. This would, only, happen when
pmegrids->nthread_comm[YY] >= 2, which can only occur with high OpenMP
thread count with multiple large prime factors.
It's unlikely that this issue affected production runs.
Fixes #1572.
Change-Id: I03b38c279c8f8ab2e111dad0976edad88b3ea93b
Erik Lindahl [Thu, 31 Jul 2014 14:32:30 +0000 (16:32 +0200)]
Added tests for denormal and underflow for simd exp()
The SIMD math functions are not expected to handle
the denormal range correctly, but it should at least
be clamped to zero rather than producing garbage
values. No changes required to the math function,
so it appears to pass these tests as-is.
Change-Id: I841c2948c81f6b62f42e60ff30ffd5e4f77926fa
Berk Hess [Thu, 31 Jul 2014 11:08:34 +0000 (13:08 +0200)]
Avoid division by 0 in nbnxn_search
Note that this issue did not affect any results.
Change-Id: I3c454783484c416b50808b9512e14072cb749784
Christian Wennberg [Mon, 28 Jul 2014 16:06:36 +0000 (18:06 +0200)]
Fix overflow in LJ-PME nbnxn kernels
The SIMD exp function in the LJ-PME nbnxn kernels could overflow
for pair distances far beyond the cut-off. Added a mask to avoid this.
Fixes #1552
Change-Id: Id87710f3815b341f53a69df0a2990d0bb4edfa74
Roland Schulz [Fri, 25 Jul 2014 22:36:17 +0000 (18:36 -0400)]
Fix build of binary package
Commit a00437 accidentally changed that the source-package error is also
printed for binary packages. Because it defined
CPACK_SOURCE_PACKAGE_FILE_NAME which we used to detect source-package.
This now uses CPACK_INSTALL_CMAKE_PROJECTS which is hopefully future-proof.
It also adds a proper warning for binary packages.
Change-Id: I842655755bed1c448f30db435a85ad1ca5844a60
Roland Schulz [Tue, 1 Jul 2014 08:54:42 +0000 (04:54 -0400)]
Add unit test for random/Threefry
Change-Id: I5f9d60c594c0d7a6925b829658119d2fdea5d113
Roland Schulz [Tue, 1 Jul 2014 10:35:53 +0000 (06:35 -0400)]
Remove Random123/features
Remove all auto-detection and replace with hard-coded
values and gmx_inline.
The purpose is that it now should compile on any hardware /
compiler. Correctness is guaranteed (as is custom in all
of Gromacs) by unit tests (separate commit).
Change-Id: I7e75ff38f7288e87817d42582ae844c1d38ef369
Erik Lindahl [Sun, 27 Jul 2014 08:54:33 +0000 (10:54 +0200)]
Fix selection of xtc groups not starting at index 0
The code to select atoms to write to the xtc file
only looped over the number of atoms selected for
output rather than all atoms. This meant that xtc
group selections that were not located at the start
of the atom indices would not be written correctly.
Fixes #1561.
Change-Id: I48886a75c682e38122dadcb2f752507b14b308fe
Roland Schulz [Sun, 13 Jul 2014 00:34:41 +0000 (20:34 -0400)]
Workaround for ICC 14 bug
ICC name-mangling is incorrect for static variable in static
member in anonymous namespace.
Fixes #1558
Change-Id: Ie861224bcc61df2f26025d1dd106bcab827308bb
Roland Schulz [Thu, 10 Jul 2014 01:11:50 +0000 (21:11 -0400)]
Fix Cygwin+Shared-Libs+FFTW
Cygwin doesn't have or require fPIC
Change-Id: If1af6f070e2cd0457f429a155e92014af51c0c33
Roland Schulz [Tue, 1 Jul 2014 08:53:53 +0000 (04:53 -0400)]
Add support for int64 in refdata
Change-Id: Ia5fedbe7593d9630a095eaf1cb6d69f0c1223ee0
Roland Schulz [Tue, 22 Jul 2014 03:35:00 +0000 (23:35 -0400)]
Fix GMX_BUILD_OWN_FFTW for Cygwin
CMAKE_BINARY_PREFIX doesn't exist and thus the previous version added just
an extra slash which doesn't work under Cygwin.
Change-Id: I285f93020d0818515fff3f2cfbf41662f03190d0
Roland Schulz [Wed, 16 Jul 2014 00:13:01 +0000 (20:13 -0400)]
Fix GMX_NONBONDED_NUM_THREADS!=GMX_PAIRSEARCH_NUM_THREADS
Change-Id: I7d5416fa299e244244d7bf48e785090da2e0b6d0
Teemu Murtola [Thu, 10 Jul 2014 03:39:59 +0000 (06:39 +0300)]
Fix HTML help and man pages for commands with dashes
Replace one case of "gmx-something" to "gmx something" conversion with
explicit construction of the latter from its component parts.
The other instance does not (easily) have the component parts available,
so only the first dash is removed when converting between
"gmx-something" and "gmx something". Add an assert for the condition
that this requires to remain functional.
Change-Id: I5bfbd1acae440af93b3b7b50a25d8782a7e60c8a
Erik Lindahl [Sat, 12 Jul 2014 08:10:36 +0000 (10:10 +0200)]
Avoid clang/32 optimization affecting IEEE endian detection
This turns the detection code into a c++ file, moves the
structure to a global one and adds volatile specifiers.
This should hopefully prevent any standard-adhering
compiler from touching the data.
Change-Id: I6f4b86ddf6b0567655466e0877bb1ba39a45ce4e
Erik Lindahl [Fri, 11 Jul 2014 08:16:27 +0000 (10:16 +0200)]
Make AVX2 check more robust
Apparently the GNU assembler version 2.20 supported some
parts of AVX2 (in particular the FMA floating-point ops),
which caused our cmake test to pass. This patch changes
it to test the integer addition instead, which isn't
supported in as-2.20 in my tests.
Change-Id: I79e516639fc78d1590d306f486eb027962388543
Teemu Murtola [Thu, 10 Jul 2014 10:57:32 +0000 (13:57 +0300)]
Fix HTML links that contain file extensions
- Consider '-' and '_' as part of a word when replacing links, so that
convert-tpr and make_ndx are considered single words, and the
extensions there are not converted into links.
- Do links.dat replacement before program links, so that the URL in the
above program name links is not processed.
Change-Id: I0ce204d3adedc56e57c1e1cd150a63d21c442eab
Roland Schulz [Thu, 10 Jul 2014 01:36:31 +0000 (21:36 -0400)]
Fix xml2 link check rerun
gmx_check_if_changed logic had a typo and thus check wasn't rerun
if LIBXML2_INCLUDE_DIR or LIBXML2_LIBRARIES changed.
Change-Id: I838f32fd6e9b62480acc4eafc4bf3d657477d09d
Mark Abraham [Sat, 5 Jul 2014 22:25:11 +0000 (00:25 +0200)]
Name the tarball how we like it
This names the tarball and the top-level directory how
GROMACS usually does it. Previously, I'd been renaming
stuff manually.
Change-Id: I485c4a4c711064a3a0ca2343ec696375cbc3de96
Mark Abraham [Thu, 3 Jul 2014 14:30:04 +0000 (16:30 +0200)]
Quieten repeated cmake runs
We should not hassle the user about optional libraries that were not
found the first time. If the user wants to detect ones found in a
different place, then they can unset the relevant cache variables to
re-trigger detection and/or related output.
Change-Id: I266268dccc46da5b098d3d5640798cbee7ee6fd0
Roland Schulz [Sun, 6 Jul 2014 04:40:14 +0000 (00:40 -0400)]
Fix Cygwin build
Doesn't work with AVX but I suspect this to be Cygwin's/GCC's fault.
GCC Bug 61730
Change-Id: I171e8414a8d65800804226034604a9973770bfdd
Erik Lindahl [Mon, 7 Jul 2014 11:43:58 +0000 (13:43 +0200)]
Make IEEE754 check more robust
This change should prevent compilers from
optimizing away the structure used for checking
strings in the binary by also using it to produce
a return values. There are now also clearer
warnings, and if IEEE754 cannot be detected we
fall by to using the OS versions of erf/erfc()
in double precision. Fixes compiles on Power7.
Change-Id: I8ed834d5b87baf33e03725d2ab93a60a76c34a12
Teemu Murtola [Sun, 6 Jul 2014 04:04:57 +0000 (07:04 +0300)]
Make selections ignore \r in input
Now the selection engine treats \r (as well as various other space
characters) the same as a space. Added a unit test for this.
There is an extra trailing space in some cases that may be more common
with \r\n than otherwise, but that is a separate, mostly cosmetic
issue.
Fixes #1555
Change-Id: I78dfe8e477133b98a98fecf1fad243262f9b30c8
Mark Abraham [Sat, 5 Jul 2014 12:24:28 +0000 (14:24 +0200)]
Fix tarball and install, particularly for INSTALL
Getting the INSTALL file generated from the markdown, into the tarball
via CPack and not otherwise installed is a bit tricky. I did this
manually for 5.0, but this automates things. CPack source archives use
a mechanism that acts on whole directories. So we put INSTALL into its
own output directory (as we do for generated HTML), and the
directory-globbing mechanism takes care of it fine. Added some
documentation for why we need to do this.
Added more CPack-time checks that the tarball will be complete.
Prevented installation of .gitattributes.
Change-Id: I77c645faf7b292a085165bdd1598741dae6972a5
Mark Abraham [Mon, 7 Jul 2014 13:28:38 +0000 (15:28 +0200)]
Version bump after 4.6.6 release
Change-Id: Ifac0db3a07caba28c123d233b54356a1db0d79ba
Magnus Lundborg [Tue, 1 Jul 2014 10:09:14 +0000 (12:09 +0200)]
Fix bug causing reading next frame not to stop.
Corresponds to commit
e6e85d562829bca in the TNG repo.
Change-Id: I89ee3e7649c4cf832798d9e2ce61b397a1757579
Magnus Lundborg [Mon, 30 Jun 2014 08:06:02 +0000 (10:06 +0200)]
Fix tng_num_frame_sets_get() with no frame sets.
When there are no frame sets the function returned an error.
This corresponds to commit
6f7862c7406b in the TNG repository.
Fixes #1540
Change-Id: I3df04d84ebd8fcdc6be76a446efa3209df363d23
Teemu Murtola [Sun, 29 Jun 2014 05:00:45 +0000 (08:00 +0300)]
Reinstantiate unsorted index group check
In most contexts, providing an index group with duplicate atoms or atom
indices not in ascending order results in the selection getting silently
evaluated incorrectly. The selection engine now detects this case and
gives a fatal error, hopefully reducing confusion if such a case arises.
The case where an unsorted index group is provided as a sole value of a
selection is still supported.
Change-Id: I0b647a26d9a1b47da10c84bdd3d073412d166a75
Roland Schulz [Thu, 3 Jul 2014 16:17:39 +0000 (12:17 -0400)]
Add running tests to install-guide
At least on architectures we don't test, it is necessary that the user
runs the tests. Because we don't have a way to query whether it is a
tested architecture every user should run the tests.
Also add a warning if unit tests cannot be build because libmxl2 wasn't
found.
Partial fix for #1548
Change-Id: I8b87cc77f909d5cf2a4ee70151096312e3191af2
Teemu Murtola [Tue, 1 Jul 2014 04:05:41 +0000 (07:05 +0300)]
Update some installation-related docs
- Add comments for installation-related variables in CMake, in
particular the RPATH section that has caused some confusion.
- Document those few variables that can be used to alter the
installation tree structure in the install guide.
- Reword some parts in the install guide about CMake iteration.
- Remove GMX_INSTALL_PREFIX, as there are other approaches to get the
desired result with CPack that are less confusing. This variable
wasn't documented or probably used anywhere outside some dormant
Jenkins jobs.
Change-Id: I199b06d905b45961313ed9fa44ae82e5987be0fe
Teemu Murtola [Tue, 1 Jul 2014 04:17:21 +0000 (07:17 +0300)]
Adjust include directory order for some corner cases
Always add headers found from the source/build tree to the beginning of
the list of include paths, such that they are preferred over those
potentially found in other non-system directories.
Fixes #1539
Change-Id: Id79634073fea5b10f250128db8ab08019a7f9e21
Mark Abraham [Sat, 28 Jun 2014 17:13:50 +0000 (19:13 +0200)]
Fix GMock to work on MSVC
This duplicates the logic of GMock's (pre-release) commit r675 in
order that GROMACS can build and test without problems on all MSVC
versions.
Change-Id: I8a7188d2d34fdfa2753a71291d8528e5c9753c6d
Mark Abraham [Sun, 29 Jun 2014 20:51:47 +0000 (22:51 +0200)]
Version bump for 5.0
Change-Id: I7ef67766e28e7ac65f9e027e61bfb9f13809d543
Mark Abraham [Sun, 29 Jun 2014 18:16:06 +0000 (20:16 +0200)]
Add forgotten licenses to COPYING
Change-Id: I3c9beffae164d0c0260d121af29db051b60ca159
Mark Abraham [Sat, 28 Jun 2014 19:57:18 +0000 (21:57 +0200)]
Refer to "mixed" precision in user-facing documentation
GROMACS has used mixed precision for many years, so we may as well be
accurate about it. In the code, we should continue to refer to single
precision for aspects of the implementation, but mdrun should not
be referred to as running in "single precision."
Also removed useless install-guide section from manual.
Change-Id: I3c26acedcdb391de50bdcb6a5e913ea0cfc32845
Berk Hess [Sun, 29 Jun 2014 09:31:14 +0000 (11:31 +0200)]
Take LJ-PME into account for table spacing
The table spacing for the grid correction for Ewald interactions
only took Coulomb and not LJ into account. Note that with default
settings LJ tables can use a coarser spacing than Coulomb.
Change-Id: Ib0f831a2177bcf10ad9e03c6764cc155e89abdbb
Erik Lindahl [Fri, 27 Jun 2014 09:04:29 +0000 (11:04 +0200)]
Fixed free energy with LJ-PME
First, Only the normal LJ part of the potential was
shifted for LJ-PME with potential-shift
modifier in the free energy kernel,
and not the Ewald component. This had an effect
of roughly 0.05% on the total energy. Second,
Berk found that the verlet nbnxn SIMD LJ-PME kernel
had an issue that caused the potential and force
to be slightly off. With this patch, both
potential and force match the non-free-energy
kernel perfectly with at lambda=0.
Change-Id: I4bc53ce1bdb96ba06656b86470dbf8dbd1e81972
Mark Abraham [Thu, 5 Jun 2014 17:20:56 +0000 (19:20 +0200)]
Convert install guide to markdown
Adds `make install-guide` to make both a plain-text INSTALL for the
tarball, and a monolithic HTML install guide for uploading to the
website. Intended for processing with pandoc, but I don't think
there's any pandoc-specific extensions used. Naturally, if the build
system doesn't have pandoc, then this make target is not available,
just like the other documentation features.
Added more description about various SIMD instruction sets,
portability, and how to use compilers and the GMX_SIMD setting.
Added summary of important CMake options for typical GROMACS
installations.
This now does some variable interpolation to keep accuracy up without
active maintenance, so setting some such variables gets changed a bit.
Mentioned more optional build components
Minor textual changes to the install guide.
Fixes #1440. Refs #1242
Change-Id: Iff8e165759fbf8cc5199c8447e912403b8a79a17
Mark Abraham [Sun, 29 Jun 2014 09:46:03 +0000 (11:46 +0200)]
Merge "Merge release-4-6 into release-5-0" into release-5-0
Berk Hess [Wed, 5 Mar 2014 22:24:30 +0000 (23:24 +0100)]
Updated LJ-PME documentation
Added a description of the more accurate treatment of the LJ
combination rule treatment for LJ-PME.
Also updated the Verlet support table.
Removed old figure describing the quality of an old approximation no
longer available in the code.
Added some usage suggestions.
Change-Id: If671536bced4a404caab10b7aa386f8f88f95c46
Rossen Apostolov [Thu, 19 Jun 2014 09:48:16 +0000 (11:48 +0200)]
Use cosistent style when referring to force fields.
Refs #677.
Change-Id: I386c6d9782c88d5af929a3230cd3beb06f2cfbd2
Teemu Murtola [Sun, 29 Jun 2014 04:39:59 +0000 (07:39 +0300)]
Remove some hardcoded selection string buffers
This removes some arbitrary limitations on the length of the input
string. The error handling would still be in the need of a bigger
overhaul (all of these were in the error handling parts).
Fixes #1538, related to #655.
Change-Id: I1112b5ccae526cf3b8fd079bbabf8d7f61e52635
Roland Schulz [Sun, 29 Jun 2014 07:32:16 +0000 (03:32 -0400)]
Merge release-4-6 into release-5-0
Change-Id: I89230f8a117d9636570e573b7b2657c79aea51c0
Roland Schulz [Sun, 29 Jun 2014 05:17:34 +0000 (01:17 -0400)]
Fix detection of i386 in tmpi
The i386 without underscore is not recommended for new code and is not
defined if -std=... (other than gnu...) is passed on the command line.
__i386__ is already present for GCC 3.2 so there is no need for the old
name. Also we use __i386__ in other places in the code already.
We dont pass such a flag by default for 4.6, but the user could.
In 5.0 this fixes tmpi if the compiler supports c++11 and we pass
std=c++11.
Fixes #1533
Change-Id: I615cb91d3e3196a90fa4ba03fa183bf47af5d444
Erik Lindahl [Tue, 24 Jun 2014 20:54:45 +0000 (22:54 +0200)]
Enable rtp angle/dihedral entries not connected by bonds
pdb2gmx has previously silently ignored any angles or
torsions not connected by bonds. This patch adds code
to mark with RTP/hackblock entries that have been
assigned in this search, and afterwards we add those
that have not yet been matched. In particular, this makes
it possible to have angles or torsions in RTP entries
even if those atoms are not connected by bonds.
Fixes #1276.
Change-Id: I61c3c3954ef8c4cd59956d88b73c6a69c1a66c65
Michael Shirts [Sun, 1 Dec 2013 01:06:10 +0000 (20:06 -0500)]
Allow printing potential energies to dhdl.xvg file
Previously, only total energies were printed out to the dhdl.xvg
file. In many cases, it is more useful to print out just
the potential energies. For example, when doing mdrun -rerun,
and comparing to output run without rerun, the velocities may not
be identical, which makes it difficult to compare the total
energies between runs when computing free energies and other
observables. dhdl-print-energy can now be 'no', 'total',
or 'potential'. The alternative 'kinetic' should generally not
be needed, since that can be done analytically in all cases.
Backwards compatible in the .tpr since gmx_bool is an int. The
old false value will be interpreted as 'no', and the 'yes' value
as 'total' energy, which will reproduce the old behavior.
Fixes #1329
Change-Id: I16828ef07c46bcfc61fe03744cbf251c00160636
David van der Spoel [Sat, 28 Jun 2014 07:33:55 +0000 (09:33 +0200)]
Fixes #1532, SEGV in g_current.
Unfortunately the tool does not do anything useful at this point
in time it seems, it just produces one graph that is non-zero
Change-Id: Ie991b8200628253ab308d36cb5afc80138b1acff
Roland Schulz [Sun, 29 Jun 2014 05:22:10 +0000 (07:22 +0200)]
Merge "Merge branch 'release-4-6' into release-5-0" into release-5-0
Mark Abraham [Sat, 28 Jun 2014 18:59:54 +0000 (20:59 +0200)]
Merge branch 'release-4-6' into release-5-0
Conflicts:
CMakeLists.txt
Left CMake version condition in favour of new fix from release-4-6;
actual settings logic from release-5-0.
Change-Id: I493571b2aca74647a7547d5c2d9463679bdd858a
Roland Schulz [Sat, 28 Jun 2014 04:58:55 +0000 (00:58 -0400)]
Fix error for no 64bit file support
Because the cache was set the error wasn't shown after
rerunning cmake.
Change-Id: I9def74eaecd02d2f2bfc6c40b7954404e2890717
Erik Lindahl [Mon, 23 Jun 2014 14:35:20 +0000 (16:35 +0200)]
Fixed CMAP generation for alanine dipeptide special residue
Fix CMAP to work for residues not detected as proteins, and
make sure we correctly process single-residue entries that
have residue-internal CMAP definitions. In particular, this
is important for the default alanine dipeptide special
residues (ALAD) in Charmm27.
Fixes #824.
Change-Id: I5538b26175f12dcac983491323b5b6ee303c8434
Magnus Lundborg [Mon, 23 Jun 2014 10:07:23 +0000 (12:07 +0200)]
Update TNG build system
GROMACS can now find and use a copy of TNG installed on the system.
The default is still to compile the version shipped with GROMACS.
That compilation is now handled using the BuildTNG.cmake script, so
there is no duplication between the GROMACS and TNG CMake code that
builds TNG, and the result is fully portable with all supported
environments and CMake versions.
Moved TNG handling into src/gromacs/CMakeLists.txt where it is
actually used.
Bumped the version of the TNG library to 1.6. Corresponds to commit
ba9aea42b01 in the TNG repository.
Renamed md5 things with GROMACS prefixes, so that there is no internal
name clash with the md5 things in TNG, and no client of libgromacs can
get unexpected behaviour.
Updated GMX_USE_TNG=off to work, and silenced unused-parameter
warnings associated with that setting.
Refs #1453 (partial fix)
Fixes #1520
Change-Id: I7ac9b578e45b8e75c67c9df9440eed968a3a9371
Mark Abraham [Tue, 20 May 2014 14:52:37 +0000 (16:52 +0200)]
Use parallel terminology more consistently
In user-facing docs, log and debug output, we should be consistent.
(Later, in master, we can fix the code and comments). Definitions:
* core: hardware that actually executes instructions
* socket: a group of cores sharing (e.g.) L3 cache
* node: a group of sockets not needing a network connection
to run in parallel
* thread: vague - an instruction stream (but should not be used
if one of the foregoing is more appropriate)
* rank: an MPI rank (of either flavour), thus containing at least
one thread
* process: in mdrun, regarding parallelism, only used when
needing to distinguish real MPI from tMPI
(These, or similar, will end up in some user docs shortly.)
The goal is to express ourselves in the most relevant abstraction, not
all of them. For example, we should talk about the number of OpenMP
threads per MPI rank without observing that there are two kinds of
implementations of MPI, unless we need to draw a relevant distinction
between those two kinds of implementations.
Where debug output seems more like dumping a data structure than
describing logical state, I've left the names in strings referring to
the members of the data structure (e.g. cr->nodeid, which refers to
the MPI rank).
Changed variable name in gmx_check_thread_affinity_set() from ncpus to
nthreads_hw_avail to make clear that the associated change to the
debug string is correct.
Doubtless there are still uses of "process" that should refer to
"rank," but we use "process" to mean very many different things, so it
is hard to use sed-like tools effectively. Ideally, clang libTooling
would make it easy to find only uses that are present in strings, but
I don't have time to learn how to do that now.
Change-Id: I4dc39dff8be81a30ce803d7833dc305d29d8d188
ngoga [Fri, 6 Dec 2013 09:30:15 +0000 (10:30 +0100)]
Default SD integrator is now sd1 by Nicu Goga
The default SD integrator is now sd1, sd2 is deprecated. grompp
and mdrun both warn about sd2, and recommend sd.
The new sd1 integrator was developed by Herman Berendsen and
implemented by Nicu Goga.
Without constraints the sd1 integrator is nearly unchanged.
With constraints the new sd1 integrator is now as accurate as normal
MD with a leap-frog integrator, whereas the sd2 integrator will give
a slightly too high temperature.
Fixes #1496
Change-Id: I02b4537b05742ed499a84b625c4d4bf8994c0304
Teemu Murtola [Sat, 28 Jun 2014 06:51:00 +0000 (09:51 +0300)]
Remove overeager selection index group check
The check for sorted groups in selections was a bit too eager, and
prevented use of many index groups that would previously have been
perfectly valid for, e.g., g_bond, with gmx distance. Remove the
check. Instead, fix the case where unsorted group is passed as the
value of a selection, and add tests for that.
Will reinstantiate the check later in another form, as currently
unsorted index groups get silently accepted and treated in a more or
less random manner in all other cases. However, this change provides
a usability improvement that could be nice to have, even if I don't
immediately have time to implement the check.
Change-Id: I86e935d8bd08e63a9e3d01fb5a4084d96c5b7006