Maxim Koltsov [Sun, 12 Oct 2014 08:58:33 +0000 (12:58 +0400)]
Add initial support for python bindings
Add minimal SIP-based bindings required to implement trajectory analysis
module in Python and run it
Mark Abraham [Sat, 20 Sep 2014 10:48:41 +0000 (12:48 +0200)]
Fixed minor issue with NPT conserved energy
The value of the number of degrees of freedom in a group is a real,
but it was being truncated to an integer before promoting it back to a
real. This is wrong, whether or not the number can reasonably be
non-integral. This only affected the conserved energy quantity,
not the kinetic or total energy used for coupling and output.
Change-Id: I5fcb6428dc0e333cabd79262cc2a9cffa5fec03a
Mark Abraham [Thu, 11 Sep 2014 10:01:14 +0000 (12:01 +0200)]
Clean up cshake() and resolve old issues
C++ conversion in Id190e36 exposed some "interesting" use of the
variable toler caused by an ancient bug that has since been resolved.
Investigation showed that variable never meant anything to do with a
tolerance!
Renamed a bunch of variables for clarity and consistency. Documented
the core function. Clarified code comments and manual sections
accordingly.
Added some unit tests while trying to understand what things were
actually going on.
Refs #1255
Change-Id: I5b5eee0b8f3f4761ce9cb681dbdb0d4526a6761d
Roland Schulz [Sun, 21 Sep 2014 22:03:17 +0000 (18:03 -0400)]
Allow runAsMainSingleModule to be called more than once
Call finalizeForCommandLine even if an exception is thrown so that it is
OK to call runAsMainSingleModule again. This allows this (and the calling
runAsMain as e.g. used in the template) be called from some framework which
doesn't reset globals.
Change-Id: I9eff770e06feef90f99ec0445bd294816f8b6a0a
Mark Abraham [Wed, 27 Aug 2014 12:15:24 +0000 (14:15 +0200)]
Move pair-interaction code into listed-forces module
Did C++ conversion, added Doxygen, renamed functions to reflect that
they are now local to a source file, and put them into an anonymous
namespace.
Made glatnr() local to the listed-forces module.
Converted IS_LISTED_LJ_C to static function and made it local
to bonded module.
Removed temporary cycle-warning suppression.
Change-Id: If3a3045021fe7a3f1d67d14f2294551fc41b5422
Teemu Murtola [Fri, 19 Sep 2014 19:45:34 +0000 (22:45 +0300)]
More robust handling for installed headers
- Remove unnecessary first parameter from gmx_install_headers():
it is possible to deduce the installation destination from the
current CMake directory. This eliminates the possibility of typos in
this parameter that would break the installed headers.
- Make the gmx_install_headers() function also generate a global list of
installed headers, which is then used to generate a file with this
list, instead of globbing this information from the
cmake_install.cmake files. This ensures that obsolete files in the
build tree should not affect the outcome.
Change-Id: I4d27accaebc14438acc5d290b25258b561ca04ea
Mark Abraham [Tue, 23 Sep 2014 04:50:34 +0000 (06:50 +0200)]
Unite code for handling listed pairs
Some implementation details are closer to the other listed
interactions than the group-kernel non-bondeds. This functionality
will also survive the death of the group kernels, so may as well be
separated now.
This is pure code motion, to prepare for transition to the
listed-forces module.
Had to add an #include guard to a not-really-related file.
Some not-quite related clean-up in nonbonded.h
Added temporary cycle suppression until this moves into the
listed-forces module
Change-Id: Ie8865f5ca1a4512d75e70e4b7f25b90f6ed019ec
Mark Abraham [Wed, 1 Oct 2014 20:02:02 +0000 (22:02 +0200)]
Merge release-5-0 into master
Conflicts:
CMakeLists.txt
Version numbers not bumped; fixed to use the right
name for RelWithDebInfo.
cmake/gmxCFlags.cmake
Fixed to use the right name for RelWithDebInfo.
src/gromacs/listed-forces/bonded.cpp
New RB SIMD function in bonded.cpp had unused variables, now
eliminated
src/gromacs/mdlib/domdec.cpp
Bug fixes from release-5-0 incorporated. std::max now used in code
newly arrived from release-5-0.
md.cpp had no conflict, but fr->nbv->bUseGPU had to
be replaced by use_GPU(fr->nbv) to work in master branch.
Change-Id: I65326b691745111fbdaa9435be6c92fa1acf6e7d
Mark Abraham [Wed, 1 Oct 2014 12:31:12 +0000 (14:31 +0200)]
Version bumps after new release
Numbers bumped, -dev tag replaced.
Change-Id: I9aa220cc837b126ad694786178901db336d7121d
Mark Abraham [Wed, 1 Oct 2014 08:39:40 +0000 (10:39 +0200)]
Version 5.0.2
Removed -dev tags from versions. regressiontest repo has not changed
since 5.0.1, but somehow the hash differs from the one used then.
Change-Id: I0f632262e4dd11875479d4f6a0c932169a699eb9
Carsten Kutzner [Tue, 30 Sep 2014 09:40:52 +0000 (11:40 +0200)]
Allow gmx tune_pme to skip the check for command-line health
Therefore, this patch adds the "-check" command line option, which is
TRUE by default, but can be switched to FALSE in problematic cases.
Documented its main use case in the error message that it would
circumvent.
Also corrected a few typos.
Fixes part of #1609
Change-Id: Id1cadd620438c36c123ff075c9a98ea7d1534d4d
Erik Lindahl [Sat, 5 Jul 2014 21:00:20 +0000 (23:00 +0200)]
Add Power8 VSX SIMD support
This adds the low-level SIMD implementation
for IBM VMX, which is present on both
Power7 and Power8. It passes unit tests with
both gcc-4.9 and IBM xlc on Power7 (which is
always big endian), and with gcc 4.8 and 4.9
on Power8 running linux in little-endian mode.
It is not yet enabled automatically since we
still lack nbnxn kernels for this architecture.
Extended the Doxygen suppressions for gmx_cpuid() to the whole file,
since wildcards in suppressions.txt were not working, we we don't
understand what doxygen bug is responsible, and there's not actually
any Doxygen documentation in that file.
Change-Id: I06570992cd3a98c0debf5ff25100d68d55d0f8fb
Szilard Pall [Fri, 26 Sep 2014 09:53:35 +0000 (11:53 +0200)]
Fix incorrect LJ cut-off with GPU + PME tuning
Due to the mismatch of the macro used in generating and implementing the
twin cut-off CUDA kernels (used with PP-PME load balancing), the VdW
cut-off check was not generated and the (larger) electrostatics cut-off
was enforced instead, causing incorrect results with PME tuning.
Fixes #1603
Change-Id: I43ae19968b30843cfe407e927a5cf0bd35c62881
Berk Hess [Fri, 5 Sep 2014 08:29:04 +0000 (10:29 +0200)]
Avoid DLB with overloaded PME ranks
When separate PME ranks have more load than the PP ranks, DLB can
not improve improve performance. It will actually make it worse,
because the PME x/f redistribution time goes up. Now with -dlb=auto
DLB is not turned on in this situation.
Also DLB is not activated during PME tuning with GPUs and separate
PME nodes, since it then nearly always deteriorates the performance.
Change-Id: I1f5e649a9562fdca9ba538196f41a12feb0a4a24
Berk Hess [Thu, 11 Sep 2014 13:02:14 +0000 (15:02 +0200)]
Added GPU local wait to load balancing
The GPU local wait time was not included in the load imbalance timing.
This could lead to incorrect load imbalance reporting and dynamic
load balancing, especially with CUDA stream priorities.
Note that we can't accurately measure the GPU time, when it finishes
during dd_move_f.
Change-Id: If4bb0f867593450cc025c8593672b0569397b1d6
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
Rossen Apostolov [Mon, 8 Sep 2014 12:47:26 +0000 (14:47 +0200)]
Converted swap module to C++.
Change-Id: I904c142bb9ee20cf13a01219fb4066d18a802a2c
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
Mark Abraham [Sun, 14 Sep 2014 15:39:30 +0000 (17:39 +0200)]
Renamed bonded module as 'listed-forces'
This name is more in line with all the functionality that might end up
in this module, because they all share the same implementation
property that there's a small list of atoms participating in each
individual interaction, and we don't treat them in the non-bonded or
PME code. Examples: bonded, 1-4, various restraints
Added basic Doxygen support for this module, which makes the existing
documentation visible and the new include sorting functional. Added
basic Doxygen for many functions, but not thirty-plus actual "compute
this kind of interaction" functions (to come later).
Fixed various higher-level code and documentation to refer more
accurately to listed interactions (e.g. GMX_FORCE_LISTED, ewcsLISTED).
Also removed an unecessary extern "C" for restcbt.h, and removed
unecessary include of genborn.h for bonded.h
Change-Id: If2271eab53a952058b0ed9ff92bd7a326c1797cd
Mark Abraham [Mon, 10 Mar 2014 12:29:26 +0000 (13:29 +0100)]
Refactor mdrun integration tests
Future work will need the ability for such a test to call mdrun more
than once and compare the results. This means that a test fixture
object needs to be able to keep track of the separate files in an
orderly way. Created SimulationRunner to manage the setup and calls to
grompp and mdrun, somewhat like an implementation
class. MdrunTestFixture now owns a single such object. Created
MdrunTestFixtureBase to be the common point for managing issues of
controlling the execution environment of mdrun, so that future work
can derive classes from it that use more than one SimulationRunner.
Change-Id: Ic2ab82b3bacb01f9bf77de67909567352fc2d306
Roland Schulz [Thu, 11 Sep 2014 01:08:59 +0000 (21:08 -0400)]
Fix ICC warnings
- 111: statement is unreachable
- 181: printf/scanf argument type invalid
Change-Id: I28477bdd5734f34ae4deed09b9cddce922469f81
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
Teemu Murtola [Tue, 23 Sep 2014 04:18:12 +0000 (07:18 +0300)]
Reorganize CPack management
- Move all CPack variable setting to a separate file to reduce clutter
in the main CMakeLists.txt.
- Move calling CPack to the end of the build system, since this allows
gathering information for CPack from other parts. Also some other
CPack features (like identifying the existing components) works better
there.
- Instead of hard-coding the generated directories to include in the
source package, add a helper function that can be called from the code
that actually does the generation. This makes it a lot easier to
understand how this works from just reading the CMake code.
- Add some TODOs for further improvements.
Change-Id: I2ca76f0f3b3e848527f2340b4aab1d62a5de8328
Teemu Murtola [Sun, 21 Sep 2014 13:40:19 +0000 (16:40 +0300)]
Generate man pages and completions by default if possible
Make GMX_BUILD_HELP a tristate option to support three different use
cases:
- OFF: never build anything (default for source distributions, where
everything is already generated)
- ON: always build everything as part of the ALL target, give an error
if anything fails.
- AUTO: try to build man pages and completions as part of the ALL
target, and install the result if successful; if it fails, some
warnings will be given, but build will still be otherwise functional.
This allows making the default AUTO for builds from a git repo, making
the shell completions and man pages work automatically also in such
cases (as long as the build host can run the compiled executables).
HTML help is generated only with GMX_BUILD_HELP=ON, since it is
currently in somewhat of a flux what will happen to it, and most people
will not notice it missing, either.
Change-Id: Id7a69b1b912381a2f1ad3678b82cbaa01cba8479
Mark Abraham [Fri, 15 Aug 2014 00:42:42 +0000 (02:42 +0200)]
More quotes
From speakers, their slides and participants at ATPESC2014
Change-Id: Iae2b9f823a8b86995875a02c783df70d42f4727d
Teemu Murtola [Mon, 22 Sep 2014 17:56:51 +0000 (19:56 +0200)]
Merge "Merge release-5-0 into master"
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 [Wed, 3 Sep 2014 22:09:49 +0000 (00:09 +0200)]
More quotes
... which brings us above 500 ones.
Change-Id: Ie980bb8e8fc258ab46fb31791bfcc4e50417a6bb
Roland Schulz [Sun, 21 Sep 2014 17:38:26 +0000 (13:38 -0400)]
Merge release-5-0 into master
Conflicts:
src/gromacs/CMakeLists.txt (adjacent changes)
Change-Id: I6e5b35508b3f6f6d805a2a539e49decdef28012b
Teemu Murtola [Sun, 21 Sep 2014 11:11:48 +0000 (14:11 +0300)]
Introduce a variable to identify in-source build
This makes it easier to find all conditionals that test for it (in case
someone may want to fix those), and makes the CMake code easier to read.
Change-Id: Ic7df20cd9829080005d021e101c4559143bb3cc1
Teemu Murtola [Sun, 21 Sep 2014 03:59:08 +0000 (06:59 +0300)]
Skip man/html/completion generation if not needed
Make the man/html/completion targets use a stamp file to mark when they
were done, and do no rerun them if dependencies have not changed (most
notably, do not rerun them if nothing has changed, or if only test code
has changed).
Change-Id: I510e55cb4b4c798dfce2cc7d95d66d30e3e802c4
Teemu Murtola [Sat, 20 Sep 2014 04:14:02 +0000 (07:14 +0300)]
Remove duplication in version info target creation
Now the custom target created for the git version info generation uses
gmx_add_custom_output_target(), removing comments etc. that were
duplicated in both places and clarifying the code. The custom target
created with gmx_configure_version_file() now also integrates with the
dependency resolution mechanism used by gmx_add_custom_output_target().
Change-Id: I868264498c014041f551df8819fb2b568d85bc30
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
Erik Lindahl [Thu, 28 Aug 2014 06:31:35 +0000 (12:01 +0530)]
Added a bunch of new and old quotes.
Change-Id: Ife6d142451ca150a24dc4140a1b65740d4051dae
Teemu Murtola [Sat, 20 Sep 2014 05:40:01 +0000 (08:40 +0300)]
Fix patterns for .gitattributes
In different contexts, git treats a trailing wildcard pattern
differently, and in .gitattributes it does not apply recursively.
A double star would, but at least the last time I tried, it did not work
with the version of git that runs on Jenkins.
Change-Id: Iac53b755a2931e8cd3ccdb6169346b0631715986
Roland Schulz [Thu, 21 Aug 2014 16:16:09 +0000 (12:16 -0400)]
Minor performance improments
Mostly useful as lesson learned.
1) The double precision constant forces the compiler to convert
the single precision variable to double, then do the multiplication
in double and then convert back. Using the single precsion
constant in double reduces the accuracy (the calculation is still done
double but the constant has only single precision).
2) Using a temporary array instead of a temporary scalar causes ICC14 to
generate an extra store.
Change-Id: Ib320ac2ae4ff80ce48277544abff468c483cc83a
Teemu Murtola [Sun, 14 Sep 2014 04:34:46 +0000 (07:34 +0300)]
Proper dependencies for Doxygen build rules
Now Doxygen build rules only get triggered if a relevant source file has
been changed. This reduces the need for the -fast targets, and makes it
easier to consume these targets, e.g., in Jenkins without triggering
multiple builds of the XML documentation.
Add CMake helper functions to make using custom commands easier. These
could be used elsewhere in the build system as well to isolate the
complexity into these functions, but that will be done in separate
changes.
Change-Id: I3411853da1948cd85e80df12b0c51df7d748f8d7
Teemu Murtola [Fri, 15 Aug 2014 11:41:05 +0000 (14:41 +0300)]
Fix histogram resampling output bin positions
The reported bin positions were off by half of the original bin size
from what they actually contained. This was apparent when the RDF code
started actually using the code.
Change-Id: I651c1f1359430047acc83ca15e9c31087b22d845
Teemu Murtola [Sat, 13 Sep 2014 18:11:13 +0000 (21:11 +0300)]
Embed module dependency graph in Doxygen docs
The module dependency graph generated by the dep-graphs target is now
embedded into the Doxygen documentation as a separate page (in the lib
and full variants). Building these flavors of documentation now
requires the depgraphs to be built first, which in turn depends on the
doxygen XML output. Added various -fast targets that skip these
dependencies, with the cost of potentially producing some warnings about
missing stuff.
Change-Id: Id3314c598d79588c429fe57108349edf42de3b6b
Teemu Murtola [Thu, 14 Aug 2014 18:49:19 +0000 (21:49 +0300)]
Add support for cumulative histograms
Now the final, averaged histograms computed by the analysisdata
histogram modules can also be made cumulative. This is needed to
preserve some functionality of 'gmx rdf' when moving to the C++
framework. For now, only the unit test is using the function.
Change-Id: Iaf7175dd904f9a615b8bd887d677aa8dc1e10f0d
Teemu Murtola [Thu, 14 Aug 2014 02:59:28 +0000 (05:59 +0300)]
More precise analysisdata histogram accumulation
Accumulate histograms within a frame as 64-bit integers (if possible) or
as double-precision values to support cases like RDFs where there can be
a very large number of points contributing to the histogram.
Add a supporting class that could be used in other analysis modules as
well to make them capable of parallel processing (at least the
AnalysisDataFrameAverager could be adapted to use this approach).
Also, make the definition of "parallelization factor" the same here
and in datastorage.*, adapting a simpler definition.
Change-Id: I63deed99d3c0d3c168d11ab0d85981f1ed6fee8d
Teemu Murtola [Sat, 13 Sep 2014 03:59:28 +0000 (06:59 +0300)]
Misc. Doxygen build system improvements
- Only generate the installed header list once after CMake is run.
It cannot change unless CMake is run again. This wasn't particularly
slow earlier either, but now it can be added as a dependency also in
the -fast targets without any impact on the behavior.
- Do not update the Doxyfile-common each time CMake is run if
GMX_COMPACT_DOXYGEN=ON.
- Partition the Markdown pages into subdirectories based on the
documentation level where they should appear. Exclude things from
the documentation based on the directory, not individually.
- Use a CMake function to create the various Doxygen targets to remove
some duplication.
- Some cleanup in the directories.cpp and misc.cpp documentation files.
- Some cleanup to use consistent casing throughout CMakeLists.txt.
Change-Id: I30de6f36841f25260700ec92284762e989f66507
Erik Lindahl [Fri, 4 Jul 2014 11:36:13 +0000 (13:36 +0200)]
Add Power/PowerPC VMX SIMD support
This adds the low-level SIMD implementation
for IBM VMX, which is present on Power 6 and
later (and PowerPC after PPC970). This will
not generate nbnxn kernels yet, so it is not
enabled by default. Unit tests pass on Power8,
where I also had to work around some vec_lvsl()
issues due to the new little-endian PowerPC
architecture. IBM has some quirks in their
implementation of fnmadd, which occasionally
returns negative zero when IEEE754 would expect
positive zero. This should not cause any problems
in normal Gromacs use, and to avoid problems in
SIMD-math I have changed some operations there to
use fmadd, with swapped signs of constants instead.
This might even save a cycle on some platforms.
Change-Id: I71a70b8807d5bfdba18da887adbcfc97ce3c8cc3
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 22:04:10 +0000 (18:04 -0400)]
Merge release-5-0 into master
Change-Id: I44d8158c68dd1804b8456c096b86f52a979c0261
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
David van der Spoel [Wed, 17 Sep 2014 14:43:01 +0000 (16:43 +0200)]
Merge release-5-0 into master
Change-Id: I862e73932dea368b5bac883eb1bf5725314efd2d
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
Roland Schulz [Sun, 14 Sep 2014 06:16:11 +0000 (02:16 -0400)]
Remove unnecessary cppcheck include-path
Change-Id: I974b3b58818df3815f75a2ba41d8682ad2c77d84
Mark Abraham [Wed, 10 Sep 2014 06:55:49 +0000 (08:55 +0200)]
Teach git that some files are binary
This stops things like git grep on short strings finding and showing
diffs from binary files.
Change-Id: I877211accfab3e8132d4cec1f671df790d0500f8
Teemu Murtola [Sun, 31 Aug 2014 03:54:50 +0000 (06:54 +0300)]
Extend support for float/double tolerances in testing
Comparisons based only on ULP are awkward when comparing quantities
computed in single and double precision when the accuracy of the
algorithm / implementation does not vary significantly with the
precision. For example, the total energy when using an Ewald method
will vary with precision, but an acceptable result has nothing to do
with the precision in which it is computed.
Add relativeToleranceAsFloatingPoint to permit expressing the tolerance
as a floating-point number to mean a relative tolerance, but the
implementation is still expressed in ULP. Make the tolerance class
support different tolerances for single and double precision numbers to
allow this, as well as for other flexibility.
Add tests for the various tolerance construction functions.
Chang variables containing ULP values to be gmx_uint64_t.
Change-Id: I25f7ddf8f4f9a5f1317b1cafd0159d8dd7d62b8c
Teemu Murtola [Fri, 12 Sep 2014 18:56:32 +0000 (21:56 +0300)]
Declare __STDC_*_MACROS in gmxpre.h
These free up code that needs, e.g., GMX_INT64_MAX from hard-to-satisfy
constraints on the include order. More details in the comments in
gmxpre.h.
Also clarify our requirements for C99 support in the install guide.
Change-Id: I371c3a79244340764b320ae36183dd8926fe0f94
Mark Abraham [Thu, 10 Jul 2014 13:07:49 +0000 (15:07 +0200)]
Minor changes to mdrun -h descriptions
Hopefully these are easier to understand. The suggested application
for -pinoffset is covered in the new mdrun performance section
of the user guide, on release-5-0 branch.
Change-Id: I7bc6172a70c39c02f6ca6db17e26b08d2ca3b444
Teemu Murtola [Fri, 12 Sep 2014 04:28:48 +0000 (07:28 +0300)]
Run include order check in doc-check
Now the doc-check target also checks that all files conform to the
include ordering produced by the include sorter.
Add support into the include sorter for only checking the ordering
without changing anything, and partially improve things such that the
full contents of the file are no longer required for some parts of the
checking. There seems to be no performance impact for now from storing
all the file contents in memory, so did not go through this, but the
partial changes also improve readability of the code.
Add support to gmxtree for loading the git attributes, to know which
files not to check for include ordering.
Change-Id: I919850dab2dfa742f9fb5b216cc163bc118082cc
Roland Schulz [Thu, 11 Sep 2014 15:02:46 +0000 (11:02 -0400)]
Fix sorting and doxygen
Change-Id: I3f0124dee1b569275fe2889dedb9778bb3cc6b9d
Teemu Murtola [Thu, 11 Sep 2014 17:44:38 +0000 (20:44 +0300)]
Improve uncrustify.sh return code handling
Apparently, the exit code for the script does not work on Jenkins.
I can only guess whether this is caused by different bash (with some
differences in the support for set -o pipefail) or git versions (with
different behavior of the --exit-code flag in combination with the other
flags), or something else, but these changes seem to make it work.
Apply uncrustify with reformat_all.sh to fix any issues that have been
slipped through so far.
Change-Id: I005eed88f839014f38992826ad7b984b8ad3597e
Teemu Murtola [Fri, 25 Jul 2014 04:02:44 +0000 (07:02 +0300)]
Include directive sorter
To facilitate discussion on how we want to sort the includes, the tool
supports a few different styles (with a --style option) that at least
roughly correspond to what has been proposed in #1557 or related
discussions. Can be removed later when the final style is agreed on.
Having an automatic sorter also allows relatively easily using other
tools that may sort the includes as part of their operation (the
automatic sorter can just be run afterwards).
Made gmxtree.py aware of the location of the list of installer headers,
removing the need to pass the file on the command line. This simplifies
manual invocation (in particular for the include sorter).
It only sorts a list of consecutive #include lines, possibly separated
by empty lines. Comments between the lines or #ifdefs are left alone,
and only includes on both sides sorted independently. This is by
design, as it keeps the script relatively simple, and also allows using
comments or similar to override the sorting for special cases. Some
manual formatting may be required to make files with heavy use of
conditinal includes to look nice (to move headers to the appropriate
side of the #ifdefs), but after that, the tool should work quite well.
Add a git attribute to allow easily applying the script in combination
with a file list produced by admin/reformat_all.sh, and extend
reformat_all.sh such that it can be be run as
admin/reformat_all.sh includesort -B=<builddir>
to sort all files with the attribute.
Related to #1557.
Change-Id: I362d7c5131a2e6952bbededfd51da4c4e1fc4a7e
Teemu Murtola [Thu, 11 Sep 2014 02:59:11 +0000 (05:59 +0300)]
Add gmx_getpid()
This allows getting rid of all conditional includes and some conditional
compilation in two different source files.
Change-Id: I3095843a2155b087730362a4f3ef409ccf24018c
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
Mark Abraham [Thu, 4 Sep 2014 20:21:35 +0000 (22:21 +0200)]
Convert domdec code to C++
Used std:: versions of at least some calls to min, max, sqrt and pow,
eliminated unused variables, used a named floating-point constant,
used a static_cast to make clear that we intend to truncate to integer
in one place, made some iteration variables local to their block,
protected some uses of fplog and fshift.
Eliminated some redundant #ifdef GMX_MPI, changed the range of others
to declare variables only where used.
Converted some neighbour-search constants to be static const real,
rather than macros, with the side effect of not having to deal
with overloaded std::sqrt for constants.
Introduced one work-around (duplicating the code of add_ifunc) for
dealing with the way that nral is a complicated function of
ftype. Static analysis was not being consistent in the way it was
choosing code paths with possible values of nral in different
functions. Co-locating two loops over nral resolves the issue.
Added assertions that help static analysis understand that settles are
kinds of constraints and that sane things happen elsewhere, so that
code paths that look like they might be called when only
inter-charge-group settles exist are actually well formed.
Added yet more assertions to reassure the analyzer that we handle
memory allocation with charge-group linking correctly.
Clarified a PBC-related variable name.
Change-Id: I5d1cf06c866098d183d7fe5aa023a292ca3d109b
Teemu Murtola [Tue, 9 Sep 2014 18:27:36 +0000 (21:27 +0300)]
Move _GNU_SOURCE to gmxpre.h
This makes life simpler in files that require it, and removes clutter
from there. The only (minor) disadvantage is that it is now defined
everywhere, so people who develop on a system where it has effect may
accidentally introduce additional function calls that depend on the
define. But Jenkins should catch those easily.
Change-Id: Ia4ed8b5d189138694076705ded695d818bbc73e3
Teemu Murtola [Sun, 7 Sep 2014 17:48:36 +0000 (20:48 +0300)]
Sort includes outside src/gromacs
Change-Id: I7efefc3835d1a5974886ef680a9fb0ddce11ee3e
Teemu Murtola [Sat, 6 Sep 2014 16:43:24 +0000 (19:43 +0300)]
Sort all includes in src/gromacs
Used:
admin/reformat_all.sh --pattern=src/gromacs includesort -B=../build
after building the doc-check target (whose dependencies are needed for
the sorter).
Change-Id: Icde0fb5cb5bc082fb4381d4cba1211329bad3fa5
Teemu Murtola [Mon, 8 Sep 2014 14:09:39 +0000 (17:09 +0300)]
Use absolute include paths in nbnxn kernels
Currently, the WIP automatic include sorter expects these files to be
included as paths relative to src/, and so does doc-check after changes
done for the include sorter. Change the generator source files to
account for this, and regenerate the kernels. Can be improved in the
future.
Make the kernel generator work even if the current working directory is
not the same as the script directory.
Change-Id: Ibc603dd0c85291f0c8fede394d9fa35b39c3a0a4
Teemu Murtola [Sat, 6 Sep 2014 04:03:02 +0000 (07:03 +0300)]
Manually sort some includes in src/gromacs
Sort manually includes in files where there are #ifdefs within the
include statements and the automatic sorter does not do a good job
because of this.
This commit does this for files found in src/gromacs/. Files from other
locations will be done in a separate change if there are any.
Fix nbnxn_cuda.h to work without requiring code to include
nbnxn_pairlist.h first.
Change-Id: I26fa1a28ea9094a62c826d8ee65ddabac345da68
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
Erik Lindahl [Wed, 9 Jul 2014 19:14:29 +0000 (21:14 +0200)]
Improve performance of MIC exponential
The limited precision is due to argument scaling
rather than the exponential function lookup, so
instead of iterating we can improve the accuracy
with a simple correction step, similar to what
was done for the recent AVX-512ER implementation.
Change-Id: If55e7c4cefac5022e7211dfa56686cb9ee03a54a
David van der Spoel [Tue, 9 Sep 2014 05:55:17 +0000 (07:55 +0200)]
Remove .tpa, .tpb, .tpx, .trj files. Part of #1500.
Change-Id: Ia055cbf5311bf8780ca826c767207e5172d1b7e2
Justin Lemkul [Thu, 14 Aug 2014 23:04:34 +0000 (19:04 -0400)]
Added flat-bottom cylindrical restraints in x and y.
The code previously only allowed the long axis of the cylinder
to be aligned along z. This patch allows the cylinder to be
aligned along any axis.
Old topologies and .tpr files will still work for all geometries with
g values from 2 to 5, as 2 is now just a synonym for a z-directional
cylinder. The new values are g=6 for x, g=7 for y, and g=8 for z.
The manual has been updated to reflect these changes.
Introduced a new static function that computes forces and energy for the
flat-bottom restraint.
Refs #1577
Change-Id: I40e0bd35225170e13a18ee54f6798470e697f29d
Roland Schulz [Wed, 10 Sep 2014 04:16:09 +0000 (00:16 -0400)]
Merge release-5-0 into master
Conflicts:
CMakeLists.txt
only version changes not needed in master
src/gromacs/utility/gmxassert.h
better fix already in master
Change-Id: I8af70d807972758149e9f69b420d528269e9bebd
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
Rossen Apostolov [Mon, 8 Sep 2014 14:07:37 +0000 (16:07 +0200)]
Converted groupcoord to C++.
Change-Id: I8b840ccd3261fabaeb702302821d36279473e1dd
Rossen Apostolov [Wed, 3 Sep 2014 09:54:39 +0000 (11:54 +0200)]
Converted fft files to C++.
Change-Id: I33609cb7019b216f1f675110ecc37bdd882dcfa5
Erik Lindahl [Wed, 2 Jul 2014 12:15:32 +0000 (14:15 +0200)]
Add 64-bit AArch64 asimd SIMD support
This adds the low-level SIMD implementation
for the 64-bit ARM AArch64 architecture in
single and double precision. We use the
asimd (advanced SIMD) nomenclature that is
also present in the CPU flags, but this is
the same as AArch64-neon, and present on all
AArch64 hardware. Just as for the 32-bit ARM
Neon support in the parent patch this will not
generate kernels yet, and for this reason we do
not yet enable AARCH64_ASIMD by default. Unit
and regression tests pass on AArch64 hardware
with gcc-4.9.
Change-Id: I67b2615d30e2038af480270f934a6d2788c3ed7b
Erik Lindahl [Tue, 1 Jul 2014 08:59:57 +0000 (10:59 +0200)]
Add 32-bit ARM Neon SIMD support
This adds the low-level SIMD implementation
for 32-bit ARM Neon instructions. We will still
not generate nbnxn kernels for it; that is coming
in a future update. For this reason we will also
not enable ARM_NEON automatically in GMX_SIMD yet.
The port passes our unit tests on
tcbl04.theophys.kth.se (ARMv7).
Change-Id: I61f771970777e82fcef757ab6915e07061912957
Berk Hess [Mon, 8 Sep 2014 07:36:04 +0000 (09:36 +0200)]
Check for implicit solvent + Verlet scheme
Fixed #1570
Change-Id: I8734c2dc99d3bc3e0a79ae043d86854446f3b495
Teemu Murtola [Sun, 27 Jul 2014 04:42:53 +0000 (07:42 +0300)]
Support custom default extension for FileNameOption
Add FileNameOption.defaultType() to allow changing the default extension
used for file types that accept multiple extensions. About 1% of the
existing t_filenm declarations seem to use such a feature.
Make parse_common_args() deduce the value for this from the value of
t_filenm.fn, if it contains an extension.
Extend unit tests to cover these cases.
Change-Id: Idf8d1c6b70b88d58bbf12398bd16f57412eab065
Teemu Murtola [Sun, 27 Jul 2014 04:31:56 +0000 (07:31 +0300)]
Remove unnecessary extensions in t_filenm defaults
Several tools had an extension specified for the default file name in
t_filenm, but that extension matched either the only accepted extension
for the file type, or to the default extension for that type.
To keep the code more uniform, remove those unnecessary declarations.
This leaves <10 instances where t_filenm specifies a non-default
extension for the default file name (which doesn't currently work).
Probably some of those could also be removed, but at least a few are
justified, so a subsequent commit will add support for that.
Change-Id: I28053b6b407783b515144aad5351f27bbc2b6ba7
Teemu Murtola [Tue, 26 Aug 2014 16:28:43 +0000 (19:28 +0300)]
More consistent default handling for StringOption
For enumerated StringOptions, the enum indexes were not always
consistently handled. Added a few tests for the behavior, and fixed it.
Now the storeEnumIndex() option works consistently in that if the caller
specifies an initial value for the variable, and there is no other
default, the caller-provided value is preserved. Also, the stored enum
index is properly updated if a default value is provided through a value
in the output variable.
Fixes #1586
Change-Id: Ib9d24e977dbfde6b23ba90271574cdd43c70c1bd
Teemu Murtola [Wed, 3 Sep 2014 04:08:10 +0000 (07:08 +0300)]
Update template/README
Add a link to Doxygen documentation about the template, and replace
outdated information about the build system with a link to a more
up-to-date description in the Doxygen documentation.
The links are to the nightly Doxygen build for now and for simplicity,
but in principle could be replaced by links to deployed documentation
for a release once that happens.
Change-Id: I0e9085aa77ab9e473405a8d3619d92fbb4ae255c
Roland Schulz [Sun, 24 Aug 2014 06:56:12 +0000 (02:56 -0400)]
Remove some include order dependencies
Add explicit #include statements to headers that need definitions from
other headers, instead of relying on the including code to include those
headers earlier. This allows reordering and refactoring #include
statements without breaking the compilation in unrelated pieces of code.
This set of changes is sufficient to make things compile after applying
the WIP automatic include sorter with the default order; other ordering
may expose more such dependencies.
Change-Id: I52536bca8930f1c489b084327071f090eec8a445
Roland Schulz [Fri, 5 Sep 2014 20:23:19 +0000 (16:23 -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. Use Gromacs
own noreturn attribute.
Also:
- rename GMX_ATTRIBUTE_NORETURN to gmx_noreturn to match unused,
restrict, and inline
- moved gmx_noreturn to basedefinitions.h
- defined gmx_noreturn for MSVC.
- always use attribute at the beginning not the end, to make it work
with MSVC (also is more consistent)
Change-Id: Ieaeec03182be9a9d248bb460dae389270e806045
Roland Schulz [Sun, 6 Jul 2014 21:47:19 +0000 (17:47 -0400)]
Simplify AVX integer load/store
Also has the potential to improve performance on some architectures
(if there is a domain crossing penalty - not sure whether any AVX capable
generation has a penalty).
Change-Id: Icc7b136571fc9ad1dbabeabe446c93e8816ec678
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
Teemu Murtola [Tue, 19 Aug 2014 03:38:10 +0000 (06:38 +0300)]
Remove unnecessary config.h includes
Now that all the blanket definitions that need to appear everywhere are
in gmxpre.h, remove unnecessary uses of config.h. Kernel files left
alone for now.
Change-Id: I1e0e7b1f842c5182334687ad86afaee176e31bf2
Teemu Murtola [Fri, 5 Sep 2014 18:55:55 +0000 (21:55 +0300)]
Move some defines to gmxpre.h for thread-MPI
Thread-MPI requires TMPI_WAIT_FOR_NO_ONE to be defined consistently in
all code that may use structs that use TMPI_YIELD_WAIT_DATA, and there
are several of those structs. Moved the definition for this macro to
gmxpre.h, so that it should be defined everywhere and not cause
surprises. Rationale for not moving any other defines (some are used by
thread_mpi/include/*) is given in comments, and if/when thread-MPI is
going to disappear sooner or later, there hopefully will not be much
more code introduced that would depend on it and would require a more
robust mechanism, or warrant changing thread-MPI itself.
Change-Id: Ic9f1c2c63fee183e65506f06fdc84d10cc5f97b9
Teemu Murtola [Thu, 4 Sep 2014 18:45:56 +0000 (21:45 +0300)]
Another batch of added config.h
Include config.h explicitly in most places where it is used instead of
relying on getting the definitions from "somewhere".
Change-Id: I3c6702cea59fca10226a13714c8ffddc482c224a
Teemu Murtola [Fri, 5 Sep 2014 17:44:03 +0000 (20:44 +0300)]
Make doc-check fail the build on warnings
This makes it easier to run it in Jenkins, even if it makes it work
inconsistently compared to the Doxygen targets.
Change-Id: Ifc469fb598f1f3287bc1a5dded231b304023a810