Erik Lindahl [Tue, 12 Aug 2014 12:15:30 +0000 (14:15 +0200)]
Avoid using function calls in OpenMP directives
The direct calls to gmx_omp_nthreads_get() that were
included in some OpenMP pragmas caused memory
corruption and later segfaults on PGI compilers. This
is likely a compiler bug, but we can work around it
by assigning the function return value to a variable
that we use in the pragma.
Such variables are unused when OpenMP is not in use, which might
offend some compiler some time, so adding a gmx_unused attribute is
useful. However, uncrustify needs to be taught about our custom
attributes, which is also done here.
Change-Id: I3b482bdc2401b40a043975ffd4a741f65efd0cfc
Berk Hess [Mon, 29 Sep 2014 09:39:43 +0000 (11:39 +0200)]
Domain decomposition now checks the rlist buffer
When a large pair-list buffer, which will appear with large nstlist,
atoms are allowed to displace the buffer size, i.e. a lot, in nstlist
steps. The limit this puts on the DD cell size is now checked.
Also updated cg_move_error, which now no longer prints the old atom
coordinates with the Verlet scheme, where the "old" coordinates are
actually the new ones.
Fixes #1607.
Change-Id: I784afa5ee620b51f555f4d1107f38cbbae2c55d1
Roland Schulz [Sat, 20 Sep 2014 16:30:33 +0000 (12:30 -0400)]
Clarify GCC+Win+AVX warning
Message was accidentally not printed for Cygwin.
Message was printed even for GCC version which are OK.
Change-Id: I4560908317919bc36f33f6e430e6b7a34853ae73
Berk Hess [Thu, 25 Sep 2014 18:35:55 +0000 (20:35 +0200)]
SIMD acceleration for RB dihedrals
RB dihedrals now use SIMD acceleration analogous to proper dihedrals
when no energy and virial is required. This also significantly
improves load balancing (issues) for systems with proper+RB dihedrals.
Refs #1598.
Change-Id: I07000125d19db45fc35e1a0c28149c8a19443680
Mark Abraham [Mon, 29 Sep 2014 15:31:09 +0000 (17:31 +0200)]
Merge "Merge release-4-6 into release-5-0" into release-5-0
Berk Hess [Fri, 26 Sep 2014 18:47:47 +0000 (20:47 +0200)]
Avoid PME tuning decreasing rcoulomb
With mdrun input with the grid much finer than fourier-spacing,
PME tuning could reduce rcoulomb below the starting value.
Fixes #1606.
Change-Id: I3ae7fe38a4240251aadb96336199b306fc7dce40
Roland Schulz [Mon, 29 Sep 2014 14:47:53 +0000 (10:47 -0400)]
Merge release-4-6 into release-5-0
Change-Id: Ie72eccf57febab7b7ac8092ce55988b9cb2737af
Berk Hess [Fri, 26 Sep 2014 18:38:29 +0000 (20:38 +0200)]
Fix calc_grid avoiding PME grid factor 84
Due to an indexing issue, it was unlikely that calc_grid, and thus
grompp, would choose a PME grid of 84*2^n and instead use a factor 96.
For a cubic box, this could increase the FFT cost by a factor 1.5.
Fixes #1605.
Change-Id: I8d6a85a98267af053b66867722fc5626ef907964
Szilárd Páll [Thu, 25 Sep 2014 22:49:12 +0000 (00:49 +0200)]
Fix incorrect assertion statement
Copy-paste bug that was totally harmless as we've always had more
electrostatics than VdW kernel types, but it did render the assertion
incorrect.
Change-Id: I996bef6342cbb9bb8ce8994f38cac61924f6af1f
David van der Spoel [Mon, 22 Sep 2014 11:05:20 +0000 (13:05 +0200)]
Fixes potential bug in neighborsearching.
From put_in_list we first call new_i_nblist, then add some
j particles and then close_i_nblist
In new_i_nblist the number of i particles is typically
increased by one, that is nblist->nri is increased.
However, in case that there are no j particles, the nri
is not decreased again, which can lead to reading garbage
data from e.g. nblist->jjindex. In addition there is a
left-over variable (len) that computes the number of
j particles added, but this value is not used.
Change-Id: I38601a6865f6a4d879bec55246deded40943afb7
Roland Schulz [Mon, 22 Sep 2014 17:31:41 +0000 (13:31 -0400)]
Fix message about incorrect usage of dihedral type 9
The warning printed the wrong type number: 4 instead of 9. Also it
didn't clarify that 9 only combines consecutive lines.
Change-Id: Ie65a050c978f162acf9f9a2329dde286c068438c
Erik Lindahl [Sat, 20 Sep 2014 12:12:02 +0000 (14:12 +0200)]
Fix RelWithDebInfo name bugs, and use full optimization.
Gromacs was previously using a different name (RelWithDebugInfo) in
a few places, which caused the build types not to match, and
flags did not propagate correctly. Second, we now add our own
optimization flags at the end of the flag variables, to make it more
likely they override the CMake default choices. Otherwise, the -O2
flag at the end of the default RelWithDebInfo flags might revert our flags.
Change-Id: I4b7e220fbb2d625416e939e71d44412601394c0f
Mark Abraham [Thu, 18 Sep 2014 09:53:17 +0000 (11:53 +0200)]
Merge branch release-4-6 into release-5-0
Conflicts:
src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda_data_mgmt.cu
Change in release-4-6 was in a function already removed in
release-5-0, so omitted.
Change-Id: I58f745308357211d517ffdb58381ce5fb1a5dceb
Roland Schulz [Tue, 16 Sep 2014 00:08:19 +0000 (20:08 -0400)]
Fix double linkage for tests
cmake automatically adds libraries required by a required library to the
exe linker flags. If the same dependent library is also added for the exe
and it is listed first for the exe, cmake links twice for static libs
(for a cyclic dependency it would be required and cmake can't know).
Under certain conditions (e.g. ICC 15 with static libraries and offload
enabled) this can cause linker errors. We don't have a cyclic dependency
and thus by listing libgromacs after testutils we avoid the potential
problematic double linking. Also fixes that TESTUTILS_LIBS contains
the transitive dependencies, because that is not necessary (they are anyhow
added automatically).
Change-Id: I0327b2dba0538a2c6652c484fd7be7ae4a6cfb5b
Roland Schulz [Fri, 5 Sep 2014 08:26:43 +0000 (04:26 -0400)]
Add missing quotes
Change-Id: Id7568da106b707365c0b30c58a4b7b321f9181f4
Roland Schulz [Fri, 5 Sep 2014 08:28:07 +0000 (04:28 -0400)]
Fix shared libs for Mingw
Change-Id: Ib25e6b2a34080632e1d531da3194680cc8c6825b
Roland Schulz [Wed, 17 Sep 2014 17:39:29 +0000 (13:39 -0400)]
Remove no-inline-max-size and suppress remark
To avoid the remark that inlining isn't possible I added the flag
in
d28edf2a07dcf11. This causes slow compile and should be avoided.
Instead suppress the remark.
TODO (for later): Check whether the additional inlining can improve
permance and consider enable it for release build.
Change-Id: I5866fcc5865fb44ca3dca0cf217e0cab2afbea0c
Roland Schulz [Wed, 17 Sep 2014 00:50:24 +0000 (20:50 -0400)]
Valgrind suppression for OS X 10.9
Change-Id: Ib8d0e6c151ed68a0e80d9d724e167e2838556b2c
Roland Schulz [Wed, 10 Sep 2014 17:06:49 +0000 (13:06 -0400)]
Fix warnings for ICC 15
Also add comment decribing all suppressed warnings
Change-Id: Ib347a2ec1e4b890b8f115c56b1a982f9123a0adf
Mark Abraham [Thu, 11 Sep 2014 12:30:27 +0000 (14:30 +0200)]
Remove documentation references to optimize-fft
The functionality was removed before 5.0 was released
Change-Id: I97d55338f7026b0410c4bdec52a42ac8c24016de
Erik Lindahl [Sun, 7 Sep 2014 18:29:44 +0000 (11:29 -0700)]
Enable static anon namespace workaround on pathscale
The pathscale compilers suffer from the same static
anon namespace bug as the intel ones. Since the bug
is no longer Intel-specific, the INTEL_ prefix in
the macro has been removed.
Change-Id: Id87c9386cb831ba43ae05b2006dcfd0f1bf06be8
Szilárd Páll [Tue, 9 Sep 2014 21:35:26 +0000 (23:35 +0200)]
Fix malformed CUDA version macro check
The CUDA_VERSION macro check is incorrect in two places. The first is
harmless as it is related to legacy CUDA 3.2 version's reporting. The
second occurrence affects the check that enables stream priorities and
due to the incorrect check, with CUDA 5.5 priorities have not been used.
Fixes #1594
Change-Id: Icf781d41549c39b6b913c11bb11d4dc4e9f3be9c
Berk Hess [Tue, 9 Sep 2014 12:35:52 +0000 (14:35 +0200)]
Fixed DD state collection issue
Collecting the cg distribution state to the master (for output
of replica exchange) could go wrong when the DD was out of sync.
This code path was probably never executed.
Change-Id: I14b41c15ddc827a46f7c6448fb7bd90414f8e210
Berk Hess [Mon, 8 Sep 2014 07:36:04 +0000 (09:36 +0200)]
Check for implicit solvent + Verlet scheme
Fixed #1570
Change-Id: I8734c2dc99d3bc3e0a79ae043d86854446f3b495
Roland Schulz [Fri, 5 Sep 2014 18:46:47 +0000 (14:46 -0400)]
Fix build for external boost 1.56.0
exception/detail/attribute_noreturn.hpp has been removed in 1.56. We
shouldn't have used a detail header in the first place. In master
we can use GMX_ATTRIBUTE_NORETURN but 5.0.x it is defined only
for code analysis not for compilers.
Change-Id: I6f26d6ddc62c73f583d324f7c794a499c274b394
Mark Abraham [Fri, 5 Sep 2014 12:21:56 +0000 (14:21 +0200)]
Version bumps after new release
Numbers bumped, -dev tag replaced.
Change-Id: Ie5d579a360e935743e99577e0d01779569156893
Mark Abraham [Fri, 5 Sep 2014 12:20:27 +0000 (14:20 +0200)]
Version 5.0.1
Bumped version numbers to remove -dev tags, bumped regressiontest
md5sum.
Change-Id: I1ec0a9b850a796d44e89025b742521ff48d8f482
Roland Schulz [Wed, 3 Sep 2014 21:48:23 +0000 (17:48 -0400)]
Add Mingw warnings
Change-Id: I8825ee1948fe03be751f09bc87db050f89fa49bd
Erik Lindahl [Wed, 30 Jul 2014 13:06:50 +0000 (15:06 +0200)]
K-computer specific modifications
This commit implements most of the K-computer-
specific changes for Gromacs-5.0. The HPC-ACE
SIMD module has been added since we need the
exponentials for LJPME, and there are also some
fixes to the LJPME nonbonded accelerated group
kernels that prevented them from compiling.
The SIMD unit tests have been modified to avoid
making assumptions about the internal storage
being single or double, since HPC-ACE only
supports double. The toolchain files have
been updated and moved to the platform subdir,
and we now have a separate module to handle
Gromacs-specific flags and settings for K.
Change-Id: I5b832809b5dd52ef4b72f6cd41b1b3da1c036a57
Christoph Junghans [Wed, 3 Sep 2014 23:15:12 +0000 (17:15 -0600)]
cmake: missing quote
Found on my old MacBook, where CMAKE_BUILD_TYPE is empty by default.
Change-Id: Icf63666f4b4c3f18214ba091819b0238d7f4a225
Roland Schulz [Mon, 1 Sep 2014 02:25:26 +0000 (22:25 -0400)]
Fix MingW build
Change-Id: Id6025838e274305266f0f90eda2ddbb48355d792
Erik Lindahl [Tue, 2 Sep 2014 09:01:20 +0000 (11:01 +0200)]
Fixed sc_power==48 crash in single precision
A few summation variables in the free energy kernel
need to be double to avoid overflows for 48th power
softcore interactions.
Fixes #1580.
Change-Id: I3263e9eb83515ebaf9f6c04fd0e57ae179933d4e
Mark Abraham [Wed, 20 Aug 2014 08:20:21 +0000 (10:20 +0200)]
Fix mis-use of fabs in LAPACK
clang-3.5 warns that fabs is not the right approach.
Change-Id: Ib7125fcad2f4fda99abf7b67f296f24d84cb34be
(cherry picked from commit
d9c0e416e180cdd7e0a158d8d9b9e1fe59ef89b7)
Mark Abraham [Tue, 2 Sep 2014 15:40:56 +0000 (17:40 +0200)]
More hacking to get the template to detect and build
Change-Id: Ifa945dedfcd70a571171fb156d5eaad37e1d761c
Roland Schulz [Thu, 28 Aug 2014 19:38:24 +0000 (15:38 -0400)]
Fix that TNG tests were not run
Missing config.h meant there were not run.
Also fix rerun test without zlib. The input is zlib compressed and thus should
only be tested if zlib support is available.
Change-Id: Ia80abcb7584f698512578652621cb16c16e4188a
Erik Lindahl [Tue, 2 Sep 2014 16:58:12 +0000 (18:58 +0200)]
Fixed preprocessor error for AVX_128_FMA simd
Some endifs appear to have been left when we
removed the MSVC-specific macros.
Change-Id: If5dcb9269348f2a34f2c37efb0856925bb473940
Erik Lindahl [Mon, 28 Jul 2014 18:49:22 +0000 (20:49 +0200)]
Fix formatting of fatal errors in g_bar
The lambda value has changed from a floating
point number into a complicated vector, so we
now have a small routine that formats the contents
of this vector for the fatal error routines.
Fixes #1531.
Change-Id: I41f7d27c16a76879d6f1f7dc669655d755c1ce3d
Roland Schulz [Tue, 26 Aug 2014 19:10:10 +0000 (15:10 -0400)]
Fix PRINT_ALLOC_KB output
Only an issue when compiled with -DPRINT_ALLOC_KB
Change-Id: I0fed328ba8e8f943ece3b38f63ce5b6cf84f0f5e
Magnus Lundborg [Tue, 26 Aug 2014 12:02:06 +0000 (14:02 +0200)]
TNG Fix for GMX_DOUBLE builds and where ZLIB is not available.
Also includes a check that the user name can be retrieved
before trying to set it.
Change-Id: I51d4ab2e590752980953d1926d4bea56fe1beffa
Magnus Lundborg [Fri, 29 Aug 2014 09:37:44 +0000 (11:37 +0200)]
Fix data block length when uncompressing TNG data.
Also, if there are no bonds in a molecule do not reserve
memory for them (to avoid a returned NULL pointer).
Change-Id: I06f9ad71711174017a229faec53d6dca08ee99d0
Erik Lindahl [Tue, 2 Sep 2014 06:36:34 +0000 (08:36 +0200)]
Fixed string var expansion in CMake due to CMP0053
CMake policy 0053 means they are deprecating the usage of
@VAR@ in CMakefiles, so CMake-3.0.2 has started to
issue big warnings about this. Replace them with ${VAR}.
Change-Id: I4e63a4eb038edbc27019bfb89c7106e97aa194c2
Magnus Lundborg [Wed, 20 Aug 2014 06:56:12 +0000 (08:56 +0200)]
TNG: Handle large files on 32 bit systems.
Force 64 bit file positions and sizes to make sure that files
>2 GB work.
Change-Id: I70ea7fb96891dfa2d18d6188677e946b3a0a0ac6
Justin Lemkul [Sun, 31 Aug 2014 15:10:33 +0000 (11:10 -0400)]
Updated x-axis label for g_wham.
It was confusing to label it "z" as this is not conventional notation
and several users have interpreted the output as applying only to the
z-axis. This commit updates the x-axis label to be the more conventional
Greek "xi" used for reaction coordinates.
Change-Id: Ib60af7b03155a792792d3496184d298c834389e9
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