alexxy/gromacs.git
9 years agoMinor update of boost README
Roland Schulz [Wed, 5 Nov 2014 00:01:29 +0000 (19:01 -0500)]
Minor update of boost README

Change-Id: Ib6017efd89225771cea4f56d9e18994c25b8361e

9 years agoAdd more selection unit tests
Teemu Murtola [Thu, 30 Oct 2014 18:45:52 +0000 (20:45 +0200)]
Add more selection unit tests

Add tests for syntax like
  res_com x < 5
  res_com distance from ...  < 5
as these were not covered well with earlier tests.  Subsequent changes
will refactor the code responsible for evaluating these to allow syntax
like "z of com of ...".

Change-Id: I63b60cc2958fcf919a82b809f60465b8444904d2

9 years agoFix more memory leaks in default group creation
Teemu Murtola [Thu, 30 Oct 2014 18:41:14 +0000 (20:41 +0200)]
Fix more memory leaks in default group creation

Free temporary arrays and strings allocated during the processing.
Don't know why these were not spotted in my earlier valgrind run (all of
these fixes are from working with the interactive selection tester).

Remove one unused array that was allocated and freed, but never used.

Change-Id: Ib78b6366bb5230499a77717f36afed652a1ec7fd

9 years agoFix memory leak in default index group creation
Teemu Murtola [Wed, 29 Oct 2014 18:40:34 +0000 (20:40 +0200)]
Fix memory leak in default index group creation

Temporary memory should be deallocated in the scope where it is
allocated, not only within some conditional paths.

Change-Id: I102d2b82ba531c25dd26728729b46c0b99c124e4

9 years agoMerge "Merge release-5-0 into master"
Roland Schulz [Thu, 30 Oct 2014 18:19:22 +0000 (19:19 +0100)]
Merge "Merge release-5-0 into master"

9 years agoMerge release-5-0 into master
Teemu Murtola [Wed, 29 Oct 2014 18:52:16 +0000 (20:52 +0200)]
Merge release-5-0 into master

Conflicts:
    src/external/gmock-1.7.0/CMakeLists.txt
        - took both changes on the same line
    src/gromacs/gmxpreprocess/calc_verletbuf.c
        - took both changes on the same line
    src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda_data_mgmt.cu
        - discarded temporary common.h hack from release-5-0 in favor of
          better solution in master
    src/gromacs/selection/nbsearch.cpp
        - resolved all conflicts in favor of master (were from a
          back-ported change)

Change-Id: I34190b704bcb1c020dcc2a3586a25620fd3c3ccf

9 years agoImprove analysis nbsearch grid mapping
Teemu Murtola [Sat, 23 Aug 2014 03:27:24 +0000 (06:27 +0300)]
Improve analysis nbsearch grid mapping

Now the analysis neighborhood search implements its own version of
put_atoms_in_triclinic_unitcell().  While computing the index of the
correct grid cell, it is relatively easy to produce also the coordinates
that lay within that cell instead of using a separate call.  This
provides two benefits:
 - It avoids rare rounding problems if put_atoms_in_triclinic_unitcell()
   would put the atom right at the edge of the box, but the mapping code
   would consider it outside the box, causing out-of-range grid cell
   index to be generated.
 - It allows to customize the grid mapping more freely (e.g., to create
   grids that are not periodic).

Backported from master with minor changes, fixes #1611.  Kept commit
message the same; the second point will be only relevant for master.

Change-Id: Ib7602fa49a1b8f7882a63843322786b3e51e8e32
(cherry-picked from b3e2e82 in master)

9 years agoEven more refreshing quotes.
David van der Spoel [Tue, 28 Oct 2014 17:43:31 +0000 (18:43 +0100)]
Even more refreshing quotes.

From a variety of source.

Change-Id: If4f9ecc77c0941d460628443491d6b2ce4c6c1a0

9 years agoAvoid common.h inclusion in CUDA code
Teemu Murtola [Tue, 28 Oct 2014 04:21:59 +0000 (06:21 +0200)]
Avoid common.h inclusion in CUDA code

This is solved nicer in master with I943f90f, but there is little value
in backporting that compared to the effort, since more or less all
changes from there would conflict.  This may fix compilation problems
with some nvcc/boost combinations.

Change-Id: I82a26c60d366bfe5fdbcfd8a17bffdb1139ce017

9 years agoAdd Windows support for host-/username
Roland Schulz [Sun, 19 Oct 2014 17:37:22 +0000 (13:37 -0400)]
Add Windows support for host-/username

Change-Id: I971ffc811bddea8c8663d3d1ce95678eddfd5860

9 years agoMove truncate() wrapper to futil.h
Teemu Murtola [Sun, 19 Oct 2014 09:36:02 +0000 (12:36 +0300)]
Move truncate() wrapper to futil.h

- Isolate platform-dependent file handling code better, removing
  some platform-dependent #ifdefs and #includes from higher-level files.
- Make 'gmx trjconv -trunc' independent of the platform (should now also
  work on Windows).
- Don't leak file handles when truncating on Windows.

Change-Id: I66162978c7b29499c8fc796d15b5f2649abf59dd

9 years agoEncapsulate use of nice()
Teemu Murtola [Sun, 19 Oct 2014 06:55:37 +0000 (09:55 +0300)]
Encapsulate use of nice()

- Instead of platform-specific #ifdefs in otherwise platform-agnostic
  code, encapsulate the call in sysinfo.h/.cpp.
- Make it fully CMake's responsibility to determine whether nice() is
  going to be used.  This could probably be simplified further (even to
  the point of using HAVE_NICE directly), but since I'm not sure how all
  the special cases work, left them as they were, but with TODO
  comments.
- Remove some unused platform-specific #includes.

Change-Id: I9f1172ba2c02bb042574ad5d2b9ccbf5d31a3d6f

9 years agoCollect more platform-specific code to sysinfo.h
Teemu Murtola [Sun, 19 Oct 2014 04:24:36 +0000 (07:24 +0300)]
Collect more platform-specific code to sysinfo.h

Move a few existing functions of this type to sysinfo.* from
basenetwork.* and cstringutil.*.  Mostly this is just code movement, but
there are two changes:
 * getuid() usage is now controlled by HAVE_UNISTD_H instead of
   HAVE_PWD_H, and excluded for MinGW (the latter is just a guess, but
   many other similar calls are excluded for MinGW).
 * Getting the current username uses getlogin_r() instead of getpwuid(),
   following the implementation in tngio.cpp instead of the original
   implementation in cstringutil.c.  If this is OK, then we can get rid
   of HAVE_PWD_H completely.  Alternative would be to make the code use
   getpwuid_r() if the old functionality is more desirable, but that is
   a bit more effort, and requires some testing for platform support, as
   that has not been used before in the code.

This allows removing platform-specific #ifdefs and #includes from
multiple files completely, making these aspects better encapsulated.

While checking the presence of #ifdefs, removed one useless #ifndef
GMX_FAHCORE from tngio.cpp; make_backup() already handles FAHCORE
internally.

Change-Id: I46876635fb254eb9558cce80b34ebe3078425375

9 years agoRename common.h to classhelpers.h
Teemu Murtola [Sat, 18 Oct 2014 04:09:34 +0000 (07:09 +0300)]
Rename common.h to classhelpers.h

This reflects the remaining contents better.  Since basedefinitions.h
was created, it is a more natural home for all truly common definitions,
so the old name no longer makes sense, either.

Change-Id: Ia2aa84e0b9696541f61490312aae9c18f719076f

9 years agoMove basic macros from common.h to basedefinitions.h
Teemu Murtola [Sat, 18 Oct 2014 03:59:19 +0000 (06:59 +0300)]
Move basic macros from common.h to basedefinitions.h

Move GMX_UNUSED_VALUE and GMX_IGNORE_RETURN_VALUE from common.h to
basedefinitions.h to not force a boost dependency on code that uses only
these macros.  In particular, CUDA code no longer includes common.h and
thus boost, which yet again works around broken boost/nvcc combinations.
basedefinitions.h is also a more natural place for these, as gmx_unused
is already declared there.

Fix one header that included others within an extern "C" block.

Change-Id: I943f90f068987456219ac7aad388258907018692

9 years agoRemove Catamount cmake
Roland Schulz [Sun, 19 Oct 2014 16:23:53 +0000 (12:23 -0400)]
Remove Catamount cmake

Was superseeded in 2006. No Cray XT3 should be around anymore.
Also gets rid of GMX_NO_SYSTEM which was only set by Catamount

Change-Id: Ib3c0450995e395ccdd2935b629da7930d9da5a4a

9 years agoFix C++11 flags for MingW
Roland Schulz [Sun, 19 Oct 2014 16:04:16 +0000 (12:04 -0400)]
Fix C++11 flags for MingW

Also replace all 'WIN32 AND NOT CYGWIN' with 'WIN32'. Since cmake
2.8.4 WIN32 doesn't include CYGWIN.

Change-Id: Ie93fa8a79daabcc3515e00cd1f95b76041417eb6

9 years agoCreate scoped_cptr to replace scoped_ptr_sfree
Roland Schulz [Fri, 17 Oct 2014 06:29:15 +0000 (02:29 -0400)]
Create scoped_cptr to replace scoped_ptr_sfree

Compareed to the previous scoped_ptr_sfree, scoped_cptr has a get
method, a bool-conversion, and allows to specify a custom deleter.

If just a guard is required then the scoped_guard_sfree typedef
can be used which doesn't require to specify a type.

Change-Id: I81cb50c4cf34e2d5a93e9c4b0043afcbc5feb535

9 years agoUsed IWYU to partially clean up some includes
Roland Schulz [Fri, 30 May 2014 05:02:23 +0000 (01:02 -0400)]
Used IWYU to partially clean up some includes

- Used trunk version
- Works well for C and simple C++ files
  - Does not yet work without manual reverting some changes for more complicated
     files e.g. options.cpp (see issues 105, 111, 135, and 138)
- IWYU doesn't check for conditional compiled code. I ran for
  pme.c and wallcycle.c with -DDEBUG_PME/_WCYCLE

Given that one needs to fix a few issues and have to check for #ifdefs it is
still manual work, but I think quite a bit faster and more complete than doing
it manually.

Change-Id: I7c5569693a4b84f481f0f7afd85f0f01c33295cf

9 years agoRemoved f_novirsum reduction in Verlet scheme
Berk Hess [Wed, 15 Oct 2014 11:24:14 +0000 (13:24 +0200)]
Removed f_novirsum reduction in Verlet scheme

There is a reduction over MPI ranks (dd_move_f) for fr->f_novirsum
for the exclusion correction of PME, which should not contribute
to the virial. But with the Verlet scheme this is unnecessary,
since the exclusions fully are handled in the non-bonded kernels.

Change-Id: I65b3dc90cf01de7b33e955074dfa32bd1940f781

9 years agoFix order of ED/swap blocks during checkpoint reading.
Carsten Kutzner [Tue, 14 Oct 2014 08:56:14 +0000 (10:56 +0200)]
Fix order of ED/swap blocks during checkpoint reading.

For some reason the order of reading the swap state and the essential
dynamics (ED) state were mixed up in read_checkpoint(), which lead to
unreadable state files if both ED and swap functionality were used.
This fix changes the order of those blocks to be consistent with
write_checkpoint().

Change-Id: Ie234486b990861decef9e00fc5125f867001f814

9 years agoExtend gmock to turn off socket listener
Mark Abraham [Fri, 17 Oct 2014 15:50:12 +0000 (17:50 +0200)]
Extend gmock to turn off socket listener

On Linux, you'd generally expect this feature to work, but on Cray the
linker warns that the use of getaddrinfo() would require linking a
shared library at runtime. That never happens because we don't use the
socket listener feature, but we don't want people stressing over that
at build time.

Change-Id: I9c358a2923d7563809d471f2ea1767cf2e8bbe25

9 years agoMove code to what will become the ewald module
Mark Abraham [Thu, 2 Oct 2014 13:30:38 +0000 (15:30 +0200)]
Move code to what will become the ewald module

Moved PME implementation, PME load-balancing code and basic Ewald code
into new module.  PME is the major component, but they share a little
bit of infrastructure and might one day pass the same tests (or test
each other) so there's some value to being together.

Moved legacyheaders/pme.h to module, split it into pme.h and
pme-internal.h, and moved the definition of splinevec into the only
source file that used it. pme-internal.h is intended as a temporary
measure - a place to put details that are internal to the module -
while developing some internal structure with more normal
module/file.{cpp,h} layout.

Moved legacyheaders/coulomb.h to the new module and named it
ewald/ewald-util.h, since it pretty much declares functions defined in
the former ewald-util.c (now ewald/ewald-util.c). Both files will
disappear in future clean up, though.

The internal structure of this module is still messy, but some
clean-up will follow. Then C++ conversion and Doxygen.

Renamed files to use '-' rather than '_', because I like using fewer
keystrokes.

Removed a useless extern on calc_ewaldcoeff_lj() declaration.

Introduced new cyclic dependency (and doc-check suppression) on mdlib,
because the PME-PP load-balancing needs to let mdlib/nbnxn_cuda know
about the changed parameters. It also uses some functions that are
currently declared in pme-internal.h, so there's no single-step
solution, even if nxn was already a module. In the long term, a PME
load-balancing module that talks to the ewald and nxn modules through
their library interfaces makes good sense, but we can't do that right
now.

Change-Id: I6ddd5579b6e52812d8fb110b4950a207b159ea4a

9 years agoConverted many integrator-loop files to C++
Mark Abraham [Sat, 20 Sep 2014 10:59:41 +0000 (12:59 +0200)]
Converted many integrator-loop files to C++

Moved code from mdlib/init.c to other locations, to avoid creating an
init.cpp file that was freaking out the ASAN build, perhaps via linker
filename clash with utility/init.cpp. Renamed gmxlib/mvdata.c to
mdlib/broadcaststructs.cpp since that makes sense now.

Converted min and max to std:: varieties, and provided explicit
template specifications where required. Used std::sqrt to help the
compiler do automatic template type deduction.

Used static_cast<int> to suppress warnings about comparison between
signed and unsigned integers, and conversion of double to int where
that is the intention of the code.

Converted a few variables between int, real and double to correctly
reflect the intention of the code.

Fixed use of double for number of steps completed, which should be
gmx_int64_t. Formally, this is a bug in release-5-0, but you'd have to
do 2^53 steps to notice it.

Used const real to define constants so that the std::pow overloads
on Windows can work smoothly.

Added some width specifiers on environment-variable scanf calls
to avoid problems.

Removed many unused variables.

Added inline cppcheck suppressions for writes to variables that are
only read when OpenMP is being used. A recent change introduced such
variables to work around compilers that have bugs if you call a
function inside the #pragma omp, but those variables are unused if the
compilation does not use OpenMP.

Added C++ guard to free-energy kernel header.

Change-Id: Id190e36758fa6aef68b14e5c9b78eacfb0a86949

9 years agoReorganizing analysis of correlation functions.
David van der Spoel [Wed, 21 May 2014 14:38:25 +0000 (16:38 +0200)]
Reorganizing analysis of correlation functions.

Moved routines computing correlation functions and
fitting to those in a special subdirectory not
dependent on gmxana. The autocorrelation now functions
as it should (previously there were issues with long
time correlations).

Replaced Levenberg-Marquardt algorithm by another implementation
from http://apps.jcns.fz-juelich.de/doku/sc/lmfit,
under a FreeBSD license. This code is in src/external/lmfit.

Added Doxygen comments to all headers.

Fixed wordcount algorithm in xvgr.c

The routines many_auto_correl and many_cross_correl
are optimized using OpenMP.

Change-Id: Ifbe003437db36e35d606cd942bb38deeef86ea64

9 years agoCheck config.h usage in doc-check
Teemu Murtola [Sun, 5 Oct 2014 18:56:07 +0000 (21:56 +0300)]
Check config.h usage in doc-check

Make the doc-check target check that config.h is included if and only if
it is needed by the source file.  Add suppressions for locations where
this is currently not the case.

Change-Id: I6110e9887d4df3c4644f20003faa3120ea9048ea

9 years agoUse analysis nbsearch in insert-molecules
Teemu Murtola [Sun, 28 Sep 2014 03:51:52 +0000 (06:51 +0300)]
Use analysis nbsearch in insert-molecules

Advantages:
 - This reduces the amount of code by ~90% compared to what addconf.c
   has, making it significantly easier to understand.
 - Now the tool is independent of potential changes in the
   mdrun-specific neighborhood search.
 - Memory leaks related to addconf.c are gone.
 - The neighborhood search is terminated as soon as one pair within the
   cutoff is found, potentially making it faster. This likely offsets
   any performance differences between the nbsearch implementations.
   The unit tests are ~35% faster.
 - Confusing mdrun-specific output related to the neighborhood
   searching is gone. This includes notes that "This file uses the
   deprecated 'group' cutoff_scheme" and references to Coulomb or VdW
   tables and cutoffs.

Change-Id: Iba82858b9a2b43b6e10a49cd3964b99b22996166

9 years agoMerge release-4-6 into release-5-0
Mark Abraham [Mon, 13 Oct 2014 10:02:59 +0000 (12:02 +0200)]
Merge release-4-6 into release-5-0

Change-Id: I08dc9d5e776480e7686a159cfcd981ba46c510ad

9 years agoFix misidentification of dot in path name
Roland Schulz [Thu, 9 Oct 2014 01:20:47 +0000 (21:20 -0400)]
Fix misidentification of dot in path name

Commit df876d6c7b5 added support for custom default extensions
but it didn't work correctly for directory names containing dots.

Change-Id: I427f694a36496bd8a6f59e3083feb5b8269a62c4

9 years agoClean up gmx insert-molecules
Teemu Murtola [Sat, 27 Sep 2014 16:48:52 +0000 (19:48 +0300)]
Clean up gmx insert-molecules

- Remove unnecessary code.
- Clarify control flow and responsibilities of different functions.

The only functional changes should be that:
 - Random numbers are now used in different order because of some
   reorganization.
 - The insertions happen at a slightly different place even with the
   same random numbers (now the generated random number sets the center
   of the inserted system instead of corner location).
 - The insertion positions are equally likely everywhere in the box,
   instead of a somewhat arbitrary rejection criterion that rejected
   some positions at the edges.
 - The -allpairs option is gone.
Child change will provide a proper fix for the latter by getting rid of
the mdrun-specific neighborhood searching and all the memory leaks that
the code in addconf.c brings.

Change-Id: Ia82ebb8ea8296dd468a9a56c33a3cb737a5ec9dd

9 years agoMake 'gmx insert-molecules' tests test output
Teemu Murtola [Mon, 29 Sep 2014 18:46:11 +0000 (21:46 +0300)]
Make 'gmx insert-molecules' tests test output

The tests now actually test the output for regression, and provide an
easy way to check the output files using the reference data framework.
Convert the tests to use CommandLineTestBase for a more uniform
approach.  Add a title to the test system to avoid generating random
titles for the output.

Change-Id: I3b1e6242922bf24ab4c254e6e0a53531af84c9df

9 years agoGeneralize command-line unit testing machinery
Teemu Murtola [Mon, 29 Sep 2014 05:10:28 +0000 (08:10 +0300)]
Generalize command-line unit testing machinery

Move machinery for unit testing a command-line program with input and
output files from trajectoryanalysis tests to testutils, and make it a
bit more general.

Existing code using IntegrationTestFixture could be also adapted to use
this (perhaps by making IntegrationTestFixture inherit from
CommandLineTestBase), but that is left for another change.

Change-Id: I3dd9f9667f727be30cf26a6b9d22dd6d44dfef9e

9 years agoFixed minor issue with NPT conserved energy
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

9 years agoClean up cshake() and resolve old issues
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

9 years agoFixes issue with vsiten and Verlet buffers
Berk Hess [Fri, 3 Oct 2014 12:00:38 +0000 (14:00 +0200)]
Fixes issue with vsiten and Verlet buffers

Commit 0336ab2d only fixed part of the vsiten issue in the Verlet
buffer calculation code. Parameters were read from incorrect memory
locations, which could lead to a segmentation fault or incorrect
masses for vsiten particles. It unlikely that this affected results.
Part of #1579.

Change-Id: I76cdb94e34194d2f6d49d98a49486ce1df76d91a

9 years agoFix trjconv -split not closing files
Mark Abraham [Mon, 6 Oct 2014 17:48:43 +0000 (19:48 +0200)]
Fix trjconv -split not closing files

With long trajectories, the number of file handles will run out.

Change-Id: I9f6e20ddb836250431460ff6ed918ec74f2699ee

9 years agoAllow runAsMainSingleModule to be called more than once
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

9 years agoMove pair-interaction code into listed-forces module
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

9 years agoMore robust handling for installed headers
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

9 years agoUnite code for handling listed pairs
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

9 years agoMerge release-5-0 into master
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

9 years agoVersion bumps after new release
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

9 years agoVersion 5.0.2
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

9 years agoAllow gmx tune_pme to skip the check for command-line health
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

9 years agoAdd Power8 VSX SIMD support
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

9 years agoFix incorrect LJ cut-off with GPU + PME tuning
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

9 years agoAvoid DLB with overloaded PME ranks
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

9 years agoAdded GPU local wait to load balancing
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

9 years agoAvoid using function calls in OpenMP directives
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

9 years agoDomain decomposition now checks the rlist buffer
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

9 years agoClarify GCC+Win+AVX warning
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

9 years agoSIMD acceleration for RB dihedrals
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

9 years agoMerge "Merge release-4-6 into release-5-0" into release-5-0
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

9 years agoAvoid PME tuning decreasing rcoulomb
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

9 years agoMerge release-4-6 into release-5-0
Roland Schulz [Mon, 29 Sep 2014 14:47:53 +0000 (10:47 -0400)]
Merge release-4-6 into release-5-0

Change-Id: Ie72eccf57febab7b7ac8092ce55988b9cb2737af

9 years agoFix calc_grid avoiding PME grid factor 84
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

9 years agoConverted swap module to C++.
Rossen Apostolov [Mon, 8 Sep 2014 12:47:26 +0000 (14:47 +0200)]
Converted swap module to C++.

Change-Id: I904c142bb9ee20cf13a01219fb4066d18a802a2c

9 years agoFix incorrect assertion statement
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

9 years agoRenamed bonded module as 'listed-forces'
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

9 years agoRefactor mdrun integration tests
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

9 years agoFix ICC warnings
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

9 years agoFixes potential bug in neighborsearching.
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

9 years agoReorganize CPack management
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

9 years agoGenerate man pages and completions by default if possible
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

9 years agoMore quotes
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

9 years agoMerge "Merge release-5-0 into master"
Teemu Murtola [Mon, 22 Sep 2014 17:56:51 +0000 (19:56 +0200)]
Merge "Merge release-5-0 into master"

9 years agoFix message about incorrect usage of dihedral type 9
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

9 years agoMore quotes
Erik Lindahl [Wed, 3 Sep 2014 22:09:49 +0000 (00:09 +0200)]
More quotes

... which brings us above 500 ones.

Change-Id: Ie980bb8e8fc258ab46fb31791bfcc4e50417a6bb

9 years agoMerge release-5-0 into master
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

9 years agoIntroduce a variable to identify in-source build
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

9 years agoSkip man/html/completion generation if not needed
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

9 years agoRemove duplication in version info target creation
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

9 years agoFix RelWithDebInfo name bugs, and use full optimization.
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

9 years agoAdded a bunch of new and old quotes.
Erik Lindahl [Thu, 28 Aug 2014 06:31:35 +0000 (12:01 +0530)]
Added a bunch of new and old quotes.

Change-Id: Ife6d142451ca150a24dc4140a1b65740d4051dae

9 years agoFix patterns for .gitattributes
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

9 years agoMinor performance improments
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

9 years agoProper dependencies for Doxygen build rules
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

9 years agoFix histogram resampling output bin positions
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

9 years agoEmbed module dependency graph in Doxygen docs
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

9 years agoAdd support for cumulative histograms
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

9 years agoMore precise analysisdata histogram accumulation
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

9 years agoMisc. Doxygen build system improvements
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

9 years agoAdd Power/PowerPC VMX SIMD support
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

9 years agoMerge branch release-4-6 into release-5-0
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

9 years agoFix double linkage for tests
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

9 years agoAdd missing quotes
Roland Schulz [Fri, 5 Sep 2014 08:26:43 +0000 (04:26 -0400)]
Add missing quotes

Change-Id: Id7568da106b707365c0b30c58a4b7b321f9181f4

9 years agoFix shared libs for Mingw
Roland Schulz [Fri, 5 Sep 2014 08:28:07 +0000 (04:28 -0400)]
Fix shared libs for Mingw

Change-Id: Ib25e6b2a34080632e1d531da3194680cc8c6825b

9 years agoMerge release-5-0 into master
Roland Schulz [Wed, 17 Sep 2014 22:04:10 +0000 (18:04 -0400)]
Merge release-5-0 into master

Change-Id: I44d8158c68dd1804b8456c096b86f52a979c0261

9 years agoRemove no-inline-max-size and suppress remark
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

9 years agoMerge release-5-0 into master
David van der Spoel [Wed, 17 Sep 2014 14:43:01 +0000 (16:43 +0200)]
Merge release-5-0 into master

Change-Id: I862e73932dea368b5bac883eb1bf5725314efd2d

9 years agoValgrind suppression for OS X 10.9
Roland Schulz [Wed, 17 Sep 2014 00:50:24 +0000 (20:50 -0400)]
Valgrind suppression for OS X 10.9

Change-Id: Ib8d0e6c151ed68a0e80d9d724e167e2838556b2c

9 years agoFix warnings for ICC 15
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

9 years agoRemove unnecessary cppcheck include-path
Roland Schulz [Sun, 14 Sep 2014 06:16:11 +0000 (02:16 -0400)]
Remove unnecessary cppcheck include-path

Change-Id: I974b3b58818df3815f75a2ba41d8682ad2c77d84

9 years agoTeach git that some files are binary
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

9 years agoExtend support for float/double tolerances in testing
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

9 years agoDeclare __STDC_*_MACROS in gmxpre.h
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

9 years agoMinor changes to mdrun -h descriptions
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

9 years agoRun include order check in doc-check
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

9 years agoFix sorting and doxygen
Roland Schulz [Thu, 11 Sep 2014 15:02:46 +0000 (11:02 -0400)]
Fix sorting and doxygen

Change-Id: I3f0124dee1b569275fe2889dedb9778bb3cc6b9d

9 years agoImprove uncrustify.sh return code handling
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