alexxy/gromacs.git
8 years agoMerge remote-tracking branch 'origin/release-5-1' into master
Szilárd Páll [Wed, 20 Jan 2016 20:35:28 +0000 (21:35 +0100)]
Merge remote-tracking branch 'origin/release-5-1' into master

Change-Id: Ic6912d0b297688c0816cc670dd18352305d4b8ee

8 years agoCouple of new quotes
David van der Spoel [Wed, 20 Jan 2016 13:51:27 +0000 (14:51 +0100)]
Couple of new quotes

Change-Id: I6014fd25deca2e02ab206216fbf78ec54fc704ba

8 years agoMade g_tune_pme work with -cpi -deffnm combination
Carsten Kutzner [Thu, 3 Dec 2015 12:18:59 +0000 (13:18 +0100)]
Made g_tune_pme work with -cpi -deffnm combination

Using -deffnm with g_tune_pme would not work with checkpoint restarts
since the file names used for the benchmark output files (-bo...) could clash
with output file names expected by the checkpoint file when appending.
Fixed it by using the -deffnm option only at launch time,
but not for benchmarking.

Also added the -bo and -bx output files to the files that need to be
deleted after the benchmark test run, so that there is slightly less
clutter in the output directory after tuning.

Change-Id: Ibec8553be7ddf482a831308454e2db9e1fc1d8aa

8 years agoPermit customized testing of grompp and mdrun
Mark Abraham [Wed, 12 Mar 2014 14:55:15 +0000 (15:55 +0100)]
Permit customized testing of grompp and mdrun

Being able to pass custom command-line arguments is useful. Nothing
uses this right now, but I've twice wanted it while developing other
tests, so it would be good to have it always available.

Adapted calling code to e.g. not append("mdrun") if they're about to
use callMdrun(), which takes care of that. Doing so is not a problem,
but people will likely use these examples when developing new tests,
so they might as well illustrate the most convenient form to use.

Change-Id: If33bff2596fc828078491af56051202304c7e758

8 years agoAllowed NVML support to be toggled
Mark Abraham [Tue, 12 Jan 2016 14:47:37 +0000 (15:47 +0100)]
Allowed NVML support to be toggled

A new CMake advanced option GMX_USE_NVML takes its default value from
the result of the NVML detection, thus by default NVML support is on
only if the detection succeeds. It can be turned off or on at will,
but when set on, it will give a fatal error if the detection did not
succeed.

Split the NVML section of the install guide into its own paragraph.

Fixes #1835

Change-Id: Ic1bf025fcd807eb701d0b52afe35b11b2d75f402

8 years agoMerge branch release-5-0 into release-5-1
Mark Abraham [Tue, 12 Jan 2016 14:18:06 +0000 (15:18 +0100)]
Merge branch release-5-0 into release-5-1

Change-Id: I49ca6d8edc18c764eff368cd396873385f11ea9c

8 years agoMake GMX_MPI always defined to 0/1
Teemu Murtola [Mon, 11 Jan 2016 16:31:52 +0000 (18:31 +0200)]
Make GMX_MPI always defined to 0/1

Change-Id: Ia9f269ad0d05b0dec5d4fe64468d891ac1597ad4

8 years agoMove flags out of t_trxframe
Teemu Murtola [Fri, 8 Jan 2016 18:56:44 +0000 (20:56 +0200)]
Move flags out of t_trxframe

These are also internal state related to the trajectory reading code,
instead of providing information about a trajectory frame.  Now they are
stored in the trxstatus struct.  This makes t_trxframe only contain
information about the actual trajectory frame, and makes it (in
principle) possible to read different frames into different t_trxframe
instances.

Change-Id: I87cb542bdc78b82969a0b996b411e72c2ba03d80

8 years agoRemove historical times from t_trxframe
Teemu Murtola [Fri, 8 Jan 2016 18:47:00 +0000 (20:47 +0200)]
Remove historical times from t_trxframe

The fields t0 and tf were used for internal bookkeeping for trajectory
reading, so moved them there.  They do not provide useful information
about the current trajectory frame.  Similarly, gmx check will no longer
repeatedly compare the t0 values for each frame.  Values stored to tpf
and tppf were never read, so removed the fields.

Change-Id: I1554a3b64da84efba44f685cbf8eb6cffd9fac19

8 years agoSupport passing tarball MD5 for webpage build
Teemu Murtola [Wed, 6 Jan 2016 19:09:09 +0000 (21:09 +0200)]
Support passing tarball MD5 for webpage build

- Make it possible to pass the source tarball MD5 hash to the build
  script.
- Simplify the logic of when the regressiontests MD5 hash gets into the
  generated web pages: it now goes there exactly when the source MD5 is
  available.

Change-Id: Ib391d8403e4cee1101b8f0fe8a49f0ce8bb164f1

8 years agoRemove vmdplugin from t_trxframe
Teemu Murtola [Fri, 8 Jan 2016 16:05:05 +0000 (18:05 +0200)]
Remove vmdplugin from t_trxframe

This has nothing to do with a trajectory frame, but instead belongs to
the internal state of the trajectory reading code, so moved it there.

Rename the internal structure to gmx_vmdplugin_t to be more in line with
recent naming conventions.

Change-Id: I9db96f4eba0d1497203e625ce25a7d4e72760fc8

8 years agoConvert more config.h defines to 0/1
Teemu Murtola [Sun, 10 Jan 2016 07:43:06 +0000 (09:43 +0200)]
Convert more config.h defines to 0/1

Also, fix one incorrect use of GMX_GPU.

Change-Id: I2409dada6c05e00163de3783781a6e85acadbdda

8 years agoImproved update_coords
Mark Abraham [Thu, 7 Jan 2016 09:08:22 +0000 (10:08 +0100)]
Improved update_coords

BD init code was being checked for every integrator at every step, and
BD and SD init code was being run for every step of those integrators,
so moved that to update_temperature_constants (and called it from
init_update). The reference temperatures for coupling could change
under simulated annealing, so updated that code to call the new
routine.

Used gt as the temperature-coupling-group iteration variable, rather
than n (which is often used in the update code for a per-atom index).

Reduced the scope of some variables in init_stochd.

Added some const correctness for inputrec.

Change-Id: I8da3da018157c6834c2ca04abc65ba6b55a0fe98

8 years agoSupport trajectory analysis with any atom subset
Teemu Murtola [Sat, 28 Nov 2015 19:47:46 +0000 (21:47 +0200)]
Support trajectory analysis with any atom subset

Make tools written for the new C++ analysis framework support analyzing
trajectories that contain an arbitrary subset of atoms.

Part of #1861.

Change-Id: I4a658e953f6f4e3d2ec1151c9c4d405c2e888780

8 years agoSupport frames with atom subsets in selections
Teemu Murtola [Sat, 28 Nov 2015 04:55:52 +0000 (06:55 +0200)]
Support frames with atom subsets in selections

- Instead of just computing the highest atom index required for
  evaluating the selections, compute all the atom indices.
- Use these to check that the input frame actually contains the
  necessary atoms.
- Add basic tests for one positive and a few negative cases.

Part of #1861.

Change-Id: If4c2d031f638f56d81ca4c7844dffa242f863af8

8 years agoSupport arbitrary subset trajectories in poscalc.*
Teemu Murtola [Thu, 26 Nov 2015 19:52:50 +0000 (21:52 +0200)]
Support arbitrary subset trajectories in poscalc.*

- Make low-level selection code work with trajectories that contain an
  arbitrary subset of the topology atoms, instead of just the first N.
- Add an entry to t_trxframe to represent such trajectories.
- Add some basic tests.  Negative cases crash with an assert, so not
  tested (should get caught higher up).

This should cover all of selection evaluation, but various consistency
checks need to be adjusted as well (will be done in a child change).

Related to #1861.

Change-Id: I727c79a38e39fb9142976875ab3311e7b1172a55

8 years agoMake file names in fatal error messages more robust
Teemu Murtola [Fri, 8 Jan 2016 11:27:40 +0000 (13:27 +0200)]
Make file names in fatal error messages more robust

Hard-coding the use of CMAKE_SOURCE_DIR in trying to produce reasonable
relative paths in the messages did not work if CMake and/or the compiler
produced relative paths for __FILE__.

Replace this with a function that hardcodes some knowledge about the
Gromacs source tree layout to produce a relative path wrt. the source
tree root, and falls back to returning just the file name instead of the
full absolute path.

Change-Id: I8da98b4b0e4b694b1c67cbf7c567bbb4a7058b7a

8 years agoDo not warn about missing OpenMP with GMX_GPU=OFF
Teemu Murtola [Sun, 10 Jan 2016 07:30:20 +0000 (09:30 +0200)]
Do not warn about missing OpenMP with GMX_GPU=OFF

Recent change started warning about inefficient use of GPU acceleration
with GMX_OPENMP=OFF, even if GMX_GPU was explicitly turned off.  Fixed.

Change-Id: I5603573868c15e6722b6d8afbb877582d827e2ab

8 years agoMore config.h macros to 0/1
Teemu Murtola [Sat, 9 Jan 2016 05:37:00 +0000 (07:37 +0200)]
More config.h macros to 0/1

Also, remove a few unused ones.

Change-Id: I1ce3f3345173a5fdfe7aa772008a3206b2118f46

8 years agoConvert some config.h macros to use 0/1
Teemu Murtola [Sat, 9 Jan 2016 04:55:53 +0000 (06:55 +0200)]
Convert some config.h macros to use 0/1

Also, remove unused GMX_USE_OPENCL.

Change-Id: Ib8d0b35560cd3dc8648c46351697d738d7d99adb

8 years agosplit NBNXN CUDA kernels into four compilation units
Szilárd Páll [Mon, 31 Mar 2014 23:48:10 +0000 (01:48 +0200)]
split NBNXN CUDA kernels into four compilation units

The CUDA nonbonded kernels are no longer included into nbnxn_cuda.cu,
but are built in four different compilation units (w/wo energy, w/wo
pruning) when this is supported/possible; since we only support CUDA
>=v5.0, the condition is: that CC >=3.0 devices have to be targeted.

Note that with CC 2.x devices all current CUDA compilers including 7.0
generate incorrect kernel code (hence the criterion above).

Switching back to using single compilation unit happens automatically
whenever nvcc-flags are auto-generated (as {sm,compute}_20 is added
by default).
Switching manually can be done using the
GMX_CUDA_NB_SINGLE_COMPILATION_UNIT cmake option.

Fixes #1444

Change-Id: If4eeaa5b58a35c5cd59babd20ef1179c7f27782e

8 years agoFix PME load balancing skipping a setup
Berk Hess [Mon, 4 Jan 2016 14:06:46 +0000 (15:06 +0100)]
Fix PME load balancing skipping a setup

During stage 0 of the PME tuning we only time every second setup.
In stage 1 only a reduced range of setups is considered. If the tpr
setup (setup index 0) was not part of this reduced range, the first
setup in the range would never be timed. This could lead to choosing
a non-bonded cut-off that was longer than optimal.

Fixes #1880

Also fixed two conditionals (but this had no effect on the settings).

Change-Id: Id9f361d23e3294e41553b39ae8e8f37ceb80bbe5

8 years agoImprove tpr header version handling
Mark Abraham [Wed, 9 Sep 2015 19:09:14 +0000 (21:09 +0200)]
Improve tpr header version handling

We always read/write the version and generation from/to the .tpr
header, but only membed was using a value read from the .tpr I/O
routines. Since it doesn't need to do that, we can simplify things.

Change-Id: I066d80f17b761363a2fff5682d1340cf83a01667

8 years agoMerge branch release-5-1
Mark Abraham [Fri, 8 Jan 2016 01:35:59 +0000 (02:35 +0100)]
Merge branch release-5-1

Ported the change from enum_name returning UNDEFINED to "no name
defined" to the new implementation.

Change-Id: I39ded9be8a49d3ff7de7c5e7c9d05eefbd385727

8 years agoFix some mdrun header dependencies
Mark Abraham [Thu, 7 Jan 2016 17:21:59 +0000 (18:21 +0100)]
Fix some mdrun header dependencies

md_support.h, sim_util.h and update.h should not depend on each other
since any symbols they declare can be forward-declared by the others.

Updated some names for types - in particular, gmx_update_t is now a
struct, rather than an opaque pointer to a struct.

Also removed two orphaned function declarations used by the
now-removed SD2 integrator.

Change-Id: I84c0f8d7b90b5f68bbf940e5854834bb9d000c9f

8 years agoAvoid more C++ bindings for MPI
Mark Abraham [Thu, 7 Jan 2016 17:31:11 +0000 (18:31 +0100)]
Avoid more C++ bindings for MPI

This avoids picking up the C++ bindings from SGI's MPT.

Change-Id: Ie8d30a6d59f04a6b69ac9ccf29aa5db631a2b3cb

8 years agoDocument how potential-switch works
Mark Abraham [Tue, 5 Jan 2016 18:20:40 +0000 (19:20 +0100)]
Document how potential-switch works

Adjusted the notation in the force-switch section to make clear the
difference between the two.

Change-Id: Iadd62faefe94726fd33a0d429950e9525b23bf98

8 years agoStop using UNDEFINED as name of a symbol
Mark Abraham [Thu, 7 Jan 2016 10:51:15 +0000 (11:51 +0100)]
Stop using UNDEFINED as name of a symbol

Apparently SGI's MPT MPI library defines this symbol, breaking the
compilation. We don't need to use it anyway.

Change-Id: I2b795252937339de49a75ba497c6741ec8019a74

8 years agoRemove fields used only for SD2
Mark Abraham [Thu, 7 Jan 2016 09:02:46 +0000 (10:02 +0100)]
Remove fields used only for SD2

Change-Id: I998f579ccd1e4cbd8dccf2f49115b1eec1fe9c2b

8 years agoBackport md-vv fixes
Mark Abraham [Thu, 7 Jan 2016 09:18:07 +0000 (10:18 +0100)]
Backport md-vv fixes

This corrects non-Trotter md-vv temperature-coupling behaviour, and
fixes the first step of md-vv pressure-coupling volume integration
after restarts.

Refs #1883

Change-Id: I8d807c8430bf4c18b0a4800af62d7f10839b7d59

8 years agoRemove SD2 integrator
Mark Abraham [Thu, 24 Dec 2015 10:24:38 +0000 (21:24 +1100)]
Remove SD2 integrator

This integrator has known problems, and is in all ways inferior to
sd. It has no tests, and was deprecated in GROMACS 5.0. There are no
plans to replace it.

Old checkpoint files written by sd2 integrators will no longer be
readable, but this is not a problem since continuing an MD simulation
across minor versions is not supported, and sd2 has no replacement
implementation anyway.

Refs #1137

Change-Id: I71b688a67a80e1f55134e81dab7a11a66942cff4

8 years agoMade normal modes work with shells and vsites
David van der Spoel [Wed, 30 Sep 2015 18:06:13 +0000 (20:06 +0200)]
Made normal modes work with shells and vsites

Implement shells and vsites in normal mode analysis (do_nm routine)
and analysis of eigenvalues and frequencies. The normal mode analysis
is done on real atoms only and the shells are minimized at each step
of the analysis.

Fixes #879

Change-Id: Iac127f51ef4ebd246c9d2417e039778b5952122f

8 years agoFixes two problems related to restarts for vv.
Michael Shirts [Tue, 29 Dec 2015 03:13:26 +0000 (20:13 -0700)]
Fixes two problems related to restarts for vv.

The first problem is more serious; in addition to causing problems
with restarts in most cases for vv + either berendsen or v-rescale,
temperature coupling was called twice, which makes the distribution of
kinetic energies too broad (but with the correct average).  Affected
vv + either v-rescale berendsen T-controls, other choices were unaffected.

In the second problem, the initial step after restarts with vv +
v-rescale and berendsen temperature control had too high a pressure
because an empty virial matrix that was only filled with MTTK pressure
control.  The effects of this bug are very small; it only affected the
volume integration for one step on restarts.

Refs #1883

Change-Id: I8d807c8430bf4c18b0a4800af62d7f10839b7d59

8 years agoFix spurious gcc warning
Mark Abraham [Mon, 4 Jan 2016 09:00:14 +0000 (10:00 +0100)]
Fix spurious gcc warning

tab_elemsize cannot actually be used when undefined, but gcc thinks it
might be, just like tabscale, so we can just initialize it.

Change-Id: I8b44a1abff8e98bd983e15458e49e55f93677a13

8 years agoUpdate packaging build
Teemu Murtola [Sat, 2 Jan 2016 12:26:53 +0000 (14:26 +0200)]
Update packaging build

Use write_package_info() to create the summary file to centralize that
logic into releng.  This makes it much easier to create builds that use
the tarball as the input.

Change-Id: Iaae962e1476a226a496db122a3ccd6fab579ab94

8 years agoFix logic for DD missing-interactions check
Mark Abraham [Tue, 5 Jan 2016 11:45:39 +0000 (12:45 +0100)]
Fix logic for DD missing-interactions check

The logic for the active part of this check got broken in 90aa9d65e0c3
before v4.5.  Historically, there was no significant effect, because
all that patch changed is that we sum a double whose result won't
always be read. For all integrators, there's eventually a call where
CGLO_ENERGY is set and the sum is read, so the check is active and
works correctly. Thus, the worst-case result was that interaction(s)
were missing and not flagged until the next global-energies
communication step.

However, cleanup for #1793 moved the responsibility for the check out
to do_md, exposing the fact that for VV integrators (only),
CGLO_ENERGY isn't set for the "global signalling + leapfrog" call to
compute_globals. Thus the sum wasn't read, so the check failed when
totalNumberOfBondedInteractions still had the value -1 with which it
was initialized. Apparently, the regressiontests don't have enough
coverage of VV integrators to find this.

This also made me realise that this DD check has also been inactive
for the calls to compute_globals after initial DD, DD after replica
exchange, and DD during reruns, because none of those cases set
CGLO_ENERGY.

Fixes #1882. Refs #1793.

Change-Id: I0b5cc448175873ec0e5cee3c3d5023654b4f1b27

8 years agoremove duplicate macros and enable Wundef in CUDA
Szilard Pall [Thu, 2 Jul 2015 18:38:14 +0000 (20:38 +0200)]
remove duplicate macros and enable Wundef in CUDA

Commit adbada4 left a checks of the host-side undefined __CUDA_ARCH__
undefined macro behind in nbnxn_cuda.cu as well as some unused macros.
This change cleans up these leftovers.

Additionally, this change enables -Wundef for CUDA files, but only for
CUDA >=v7.5 as prior versions come with a header that uses a macro check
without checking.

As the host-side code still includes kernels with __CUDA_ARCH__ which is
not defined in the host compilation pass, we need create our own copy
of this arch macro in a new header that is meant to contain CUDA
arch-specific stuff.

Refs #1855

Change-Id: Ibab891eaee11ea8952a67125f7ac4cc620b88d1c

8 years agoUse EXPECT_TRUE and EXPECT_FALSE in new SIMD tests
Mark Abraham [Sun, 3 Jan 2016 17:20:54 +0000 (18:20 +0100)]
Use EXPECT_TRUE and EXPECT_FALSE in new SIMD tests

gcc 4.7.3 has a bug that means it warns about converting false to a
pointer type (see https://github.com/google/googletest/issues/322), so
we should just use the normal approach in GoogleTest and avoid
problems.

Change-Id: Ic700ded4a645af1e45fc66fde8fffae692ce33ec

8 years agoFix unnecessary SIMD warning
Erik Lindahl [Thu, 31 Dec 2015 12:12:52 +0000 (13:12 +0100)]
Fix unnecessary SIMD warning

The change to warn about possible crashes had the
side effect of always warning about SIMD architectures
since the second block caught the matching case too.

Change-Id: I7017df387721d62bef0101f99a8c99522e3dddb7

8 years agoChange GMX_DOUBLE to be always defined
Mark Abraham [Mon, 16 Nov 2015 16:29:35 +0000 (17:29 +0100)]
Change GMX_DOUBLE to be always defined

Also documented use of precision-related CMake variables

There may be some references in the SIMD documentation that still
refer to GMX_DOUBLE being defined, but we should solve that
separately, given the other changes at the moment.

Some abuse that un-defined GMX_DOUBLE was hard-coding some use of
single precision in mdebin_bar.cpp, so made that explicit.

Removed GMX_CPT_BUILD_DP, which can now be replaced by GMX_DOUBLE.

Removed some #ifdef in QM code, because floating-point arguments to
printf are automatically promoted to double. scanf still needs
versioning, though.

Refs #1855

Change-Id: I59b6874739d528603a86e0b6ab9bcadd67fdd3fa

8 years agoFix xlc+CUDA workaround in gmxManageNvccConfig
Szilard Pall [Wed, 30 Dec 2015 16:42:29 +0000 (17:42 +0100)]
Fix xlc+CUDA workaround in gmxManageNvccConfig

The string replace invocation contained obvious syntax errors.

Change-Id: Id0998a08587ba01d4acdd74aa6b03f0d437092fa

8 years agoReport used defines in check-source
Teemu Murtola [Wed, 30 Dec 2015 05:33:47 +0000 (07:33 +0200)]
Report used defines in check-source

If check-source complains about missing config.h include, it will now
also report the names of defines it thinks are used in the file (up to
three, with dots indicating more than three).

Change-Id: I5abe00291d049e155fb28806bf4e59c9dd5385f4

8 years agoCorrect vector check of gmx check
Berk Hess [Tue, 24 Nov 2015 10:20:55 +0000 (11:20 +0100)]
Correct vector check of gmx check

The check of vector components relative to the RMS vector component
incorrectly scaled the absolute tolerance instead of the relative.
Also different vectors were compared in several different ways.
Now all vectors are checked with the same procedure.

Change-Id: If7c188c9ce433fbd4aa9bb5051197de4bfa6edaf

8 years agoPackaging build script for web site
Teemu Murtola [Sun, 27 Dec 2015 11:51:19 +0000 (13:51 +0200)]
Packaging build script for web site

Extend the documentation.py script to create a tarball of the
documentation when run as JobType.RELEASE.  This does essentially the
same thing as Build_website_5_1, except that it reuses the existing
script.  A few build targets that are otherwise part of the
documentation build are skipped with this job type, since they are
included in the source packaging build instead.

Change-Id: Ic44d544ef3015b3de59af880a3e6edc502b080c7

8 years agoReduce inputrec.h dependencies
Teemu Murtola [Mon, 28 Dec 2015 20:02:54 +0000 (22:02 +0200)]
Reduce inputrec.h dependencies

Remove all #includes for inputrec.h from headers, and add corresponding
includes to source files that need it.

The main benefit is that now the remaining C code no longer depends on
inputrec.h.

Change-Id: I6a8768243f11d401394995ed2e22cba295de06d5

8 years agoCreate invertmatrix.h
Mark Abraham [Wed, 9 Sep 2015 13:09:52 +0000 (15:09 +0200)]
Create invertmatrix.h

Named matrix-inversion routines less cryptically. "ur0" meant that the
upper-right triangle was all zero, because the matrix was a
well-formed box-vector matrix, per docs in vec.h. Added unit tests and
Doxygen. There's not actually a maths module yet, but it's better
than it used to be.

Change-Id: I4fe53acef07c6710c3a6ee49fc344d312694cf2c

8 years agoMerge branch release-5-1
Mark Abraham [Mon, 28 Dec 2015 00:24:52 +0000 (11:24 +1100)]
Merge branch release-5-1

Change-Id: Ife0732459cf9d438347c94b88efb5aca7a81bca1

8 years agoExtended SIMD, implementation for Intel MIC
Erik Lindahl [Mon, 6 Jul 2015 20:10:43 +0000 (22:10 +0200)]
Extended SIMD, implementation for Intel MIC

Passes both unit and regression tests in both single and double
with icc-16 and MPSS 3.5, although the unit tests result in a
bunch of warnings about undefined preprocessing identifiers in GTEST.

Change-Id: If032d760322ff397596090172871f3faba74048d

8 years agoImprove text writing in help output
Teemu Murtola [Tue, 22 Dec 2015 20:33:07 +0000 (22:33 +0200)]
Improve text writing in help output

- Use new facilities in TextWriter for ensuring consistent line breaks
  in the output, removing the need to carefully track where empty lines
  are written out to produce valid reStructuredText and to not produce
  too many empty lines in console output.  Replace most explicit
  newlines with ensureEmptyLine() and friends.
- Use TextWriter consistently in the help writing, making the caller
  responsible of creating the single writer used for the output.  This
  makes all the output share the same writer (and thus the same state),
  and removes the need to access the underlying stream for the writer.

Change-Id: I9d6a54dbb1dbb64fbd6ac95667d6ed9988288a60

8 years agoFix G++ 4.7.0
Roland Schulz [Fri, 25 Dec 2015 18:18:10 +0000 (13:18 -0500)]
Fix G++ 4.7.0

Used e.g. by MIC MPSS

Change-Id: I21e6a07f3d1778ee138321ad96759e4c53479f52

8 years agoSource packaging with new releng
Teemu Murtola [Fri, 25 Dec 2015 14:23:18 +0000 (16:23 +0200)]
Source packaging with new releng

Add build script for creating the source package using the new releng
scripts.  Simplify the approach used by configuring the default
package_source target to only create the tarball we want.  Otherwise,
this is a straightforward conversion of Source_tarball_5_1 job, with
some simplifications.

Change-Id: I3b09162f3647b9ec9f0120ff6284f27d72bf216f

8 years agoFurther vec.h cleanup
Teemu Murtola [Thu, 24 Dec 2015 13:52:11 +0000 (15:52 +0200)]
Further vec.h cleanup

Now that vec.h is C++ code, replace gmx_cxx_const with a simple const,
and use inline instead of gmx_inline.

Change-Id: I9c60ccaec39c304fd5063541f7a9faff6d6abe58

8 years agoFix some OpenCL issues
Mark Abraham [Tue, 8 Dec 2015 03:01:33 +0000 (04:01 +0100)]
Fix some OpenCL issues

Added routine to convert error codes into more helpful
diagnostics. Called it in one place that needed some troubleshooting,
but an overhaul of OpenCL error handling is needed (in master branch).

Introduced new OpenCL control variable to indicate when there is a
non-local event upon which it is valid to wait, since it is an error
to wait upon an ocl_event that was never returned by an API call.

Converted mdrun integration tests to rely on the improved automated
resource assignment in 5.1, because that copes better with the
limitations of the OpenCL implementation.

Worked around limitation where real MPI + OpenCL can't use more than
one GPU on a node, by disabling GPU support for that test case.

Fixed inappropriate use of mdrun -nt, where the number of thread-MPI
ranks was intended.

Updated install guide.

Fixes #1871

Change-Id: I11e6b2bdb6f7f91489f3ec0d671081d99661fa62

8 years agoReorganized domdec initialization
Berk Hess [Tue, 2 Dec 2014 20:51:15 +0000 (21:51 +0100)]
Reorganized domdec initialization

The number of external domain decomposition initialization calls
has been reduced from 5 to 2. The zone setup has been moved up,
in preparation for vacuum support for the Verlet scheme.
The number of PME ranks now get passed to init_domain_decomposition
as an argument instead of setting cr->npmenodes in mdrun.cpp.
Removed the (buggy) option for sorting cgs less frequently.
Also added const qualifiers for parameters in all domdec functions.

Change-Id: Icf320ff3b9c86b782ddbde5ed6dd5013dff8c2a8

8 years agoAvoid using aligned member variables in SIMD tests
Erik Lindahl [Sat, 26 Dec 2015 11:21:50 +0000 (12:21 +0100)]
Avoid using aligned member variables in SIMD tests

gcc fails to align types to 64-byte boundaries when targeting AVX-512,
and we have seen this for other cases too, so use vectors with
properly aligned allocation on the heap instead.

Change-Id: I7f2984f72f0c520838c90c9cf4b66f45ffba4848

8 years agoMake moleculetype case sensitive
Alexey Shvetsov [Wed, 25 Nov 2015 11:25:49 +0000 (14:25 +0300)]
Make moleculetype case sensitive

This is useful in case you have more than 36 chains
in your system with chain IDs set. PDB allows to use both
uppercase letters, lowercase letters and numbers for chain
identifiers. Now we can use the maximum of 62 chains.

We search for a case sensitive match first and if not found, for a
unique case insensitive match. The latter is done to not break old
topology files. The couple-moltype option is now case sensitive.

Change-Id: Ibbc7116740d573780020227a5a526e149bb9c5fe

8 years agoImprove documentation on OpenCL issue with NVIDIA
Szilard Pall [Fri, 18 Dec 2015 15:58:34 +0000 (16:58 +0100)]
Improve documentation on OpenCL issue with NVIDIA

Added reference to the known to be buggy OpenCL runtime versions (r349)
and version of the single release that has been shown to not exhibit the
issues.

Change-Id: I2a1d9bee988824df22d3b1e5a362a653c1d041cc
TODO: Wait for feedback from NVIDIA before merge.

8 years agoClean up vec.h
Teemu Murtola [Wed, 23 Dec 2015 14:55:43 +0000 (16:55 +0200)]
Clean up vec.h

- Remove cos_angle_no_table() and unitv_no_table(), since they are now
  essentially identical to the normal versions.
- Replace all uses of cos_angle_no_table() with gmx_angle(), since all
  were used in a numerically unstable way.
- Replace uses of m_rveccopy() with copy_rvecn(), which does the same
  thing.
- Move some functions that are not related to operations on rvec/friends
  to other files.
- Remove #includes made unnecessary by the above changes, and add them
  to source files that previously got them transitively.
- Remove extern "C" guards from the header, since it anyways does not
  compile as C.

Change-Id: I933e7257601ee6f0e9ccf516e0bdcb1a85834a51

8 years agoMoved responsibility for f_global
Mark Abraham [Sat, 12 Dec 2015 10:30:10 +0000 (21:30 +1100)]
Moved responsibility for f_global

This was only used when writing a trajectory, so made it local to the
code and data structures there.

Change-Id: I2e39ab1c7cfd9809eaa10e37376e4d079a465394

8 years agoShell code cleanup
Mark Abraham [Sat, 12 Dec 2015 12:22:12 +0000 (23:22 +1100)]
Shell code cleanup

Relocated some shell-related data and code to its source file.

Removed calls to shell code from DD routines, since it isn't
supported.

Removed confusing code that meant that the initial prediction of shell
positions for non-continuation runs was actually done twice.

Used std::int64_t for a variable that was using a double for fear of
integer overload.

Change-Id: I95b01d20fceea6643b21b79d2d39d25c1090c8f4

8 years agoExtended SIMD, implementation for IBM Power7/8 VSX
Erik Lindahl [Mon, 6 Jul 2015 21:57:31 +0000 (23:57 +0200)]
Extended SIMD, implementation for IBM Power7/8 VSX

Adds the extended/v2 SIMD layer. This version has been
tested on big-endian Power7 and little-endian Power8 with
gcc-4.9 in both single and double. The inline assembly
for gcc has been improved based on the proposals in
redmine.

Fixes #1808.

Change-Id: I0e52e847a5925a0329ae4be0cb04eb9fe6122fd9

8 years agoIBM Power6 VMX extended SIMD
Erik Lindahl [Wed, 6 May 2015 23:32:19 +0000 (01:32 +0200)]
IBM Power6 VMX extended SIMD

This is mostly for reference since VMX is one of the most difficult SIMD
instruction sets (only aligned memory ops), and because some embedded
PowerPC platforms might still use the clunkier VMX/Altivec SIMD.
Tested with gcc-4.9 on Power7 big-endian hardware.

Change-Id: Id254fd3e0fb814757474827cebf264b3825fcf74

8 years agoExtended SIMD, impl for Arm Neon and 64-bit Neon Asimd
Erik Lindahl [Mon, 6 Jul 2015 20:32:41 +0000 (22:32 +0200)]
Extended SIMD, impl for Arm Neon and 64-bit Neon Asimd

Tested with gcc-4.9 and 5.3, using Neon on Jetson
TK1 and TX1 (both in 32-bit mode) and Neon asimd on
APM X-Gene (64-bit mode).

Change-Id: I4b9f0da49b1dda3b199eeec8e45688d49a43783e

8 years agoAdd functionality to TextWriter
Teemu Murtola [Sun, 20 Dec 2015 18:54:24 +0000 (20:54 +0200)]
Add functionality to TextWriter

Make TextWriter track the status of the output stream such that it is
possible to provide methods that ensure the next output starts at the
beginning of a line or after an empty line, without adding extra line
breaks if they are already present.  This makes it simpler to produce
clean output when multiple places in the code write to the same writer.

Change-Id: I73b18d33b790f0c1d6882fa05aca912e39157621

8 years agoExtended SIMD, implementation for BlueGene/Q
Erik Lindahl [Mon, 6 Jul 2015 21:23:40 +0000 (23:23 +0200)]
Extended SIMD, implementation for BlueGene/Q

Tested with bgclang in both single and double precision.
bgclang has fixed a bug (reported by us) in the nightly
release 20150511; this influenced the single precision
load operations, which previously generated incorrect
code. xlc cannot be used for now, since Gromacs requires
C++11 support.

Change-Id: If25ddb703b6c3786bf5144e2a69244177b16d610

8 years agoExtended SIMD implementation for 256-bit AVX and AVX2
Erik Lindahl [Tue, 28 Apr 2015 21:02:39 +0000 (17:02 -0400)]
Extended SIMD implementation for 256-bit AVX and AVX2

Added support for nonbonded kernel utilities,
gather-transpose and transpose-store operations. Most
routines have been optimized to reduce cross-lane
shuffling which is more expensive on Haswell (AVX2).

Change-Id: Ia9b3733051410355ed9d4a68cbdb9646c9d3e41d

8 years agoNext-generation SIMD, for SSE2, SSE4.1 and 128-bit AVX
Erik Lindahl [Thu, 23 Apr 2015 10:07:55 +0000 (12:07 +0200)]
Next-generation SIMD, for SSE2, SSE4.1 and 128-bit AVX

This adds the same functionality that was previously done for the
reference SIMD implementation This includes all the 128-bit x86
flavors, since SSE4.1 and AVX-128 only overrides a few SSE2
instructions/functions. Performance appears to be identical to the
state before the new SIMD code on x86 when using SSE2. For the most
performance-sensitive functions I expect we will later test a few
different alternative implementations once we can benchmark the
routines inside actual kernels using them.

Change-Id: I59d5741df345b38745f9a6d1ea3a4d27b0a66034

8 years agoFix most warnings with Doxygen 1.8.10
Teemu Murtola [Fri, 18 Dec 2015 19:56:34 +0000 (21:56 +0200)]
Fix most warnings with Doxygen 1.8.10

- Fix several \copydoc uses.
- Work around problems where inherited virtual functions within
  templates did not get documentation from their parent (this used to
  work with Doxygen 1.8.5).
- Doxygen now writes relative paths to xml output, so adjust the Python
  scripts used to parse them to accept both.

Change-Id: I56ca8d6af44e042f96bf2cb0efc923ca9ebac8df

8 years agoMerge release-5-1 into master
Berk Hess [Sat, 19 Dec 2015 14:27:09 +0000 (15:27 +0100)]
Merge release-5-1 into master

Mostly trivial conflicts, some C++ fixes in perf_est.cpp.

Change-Id: Iacdc7629deeef20db9554f9a880681d1ae6f1e10

8 years agoBring performance estimation up to date
Berk Hess [Mon, 30 Nov 2015 16:50:19 +0000 (17:50 +0100)]
Bring performance estimation up to date

The performance estimation code for estimating the PME/PP load
and the optimal DD grid setup used outdated numbers.
We now estimate using actual cycle counts on Haswell and esimate
for other architectures through a scaling factor that takes into
account the SIMD width and FMA.
The DD grid automation now ignores PBC cost for exclusions with
the Verlet scheme and the for angles and dihedrals with SIMD.

The effect of this is a more reliable PME load estimate that's
now a factor 1.4 to 1.7 higher on Haswell.
The DD grid automation will now often choose a setup that better
matches the PME `decomposition and reduce the PME redist cost.

Change-Id: I5daa6a6856f2b09ba6d17fda0eea800b816d21e4

8 years agoFix compiler warning in cpuinfo for non-x86 architectures
Erik Lindahl [Fri, 18 Dec 2015 12:30:45 +0000 (13:30 +0100)]
Fix compiler warning in cpuinfo for non-x86 architectures

To make the code cleaner executeX86CpuID() is always defined,
but we should make sure to always return a result code even
on non-x86 (even though it will never be called there).

Change-Id: Ic302945c7794576aa931250a513120c72be62d21

8 years agoUpdate versioning for new scheme
Teemu Murtola [Thu, 17 Dec 2015 10:44:07 +0000 (12:44 +0200)]
Update versioning for new scheme

Make versioning use the new YYYY[.P] scheme that was decided quite a
while back.

Also, remove the literal "VERSION" prefix from the return value of
gmx_version() to give caller better control for deciding on the usage of
the version string.

Change-Id: I1ed171502a4a900c87988faabf48fafeef735c4f

8 years agoRemoved topology pointers from DD struct
Berk Hess [Wed, 25 Nov 2015 09:31:53 +0000 (10:31 +0100)]
Removed topology pointers from DD struct

The reverse topology struct in the domain decomposition data used
pointers to the global and local topologies for printing errors.
Since the call now the error function can now pass those pointers,
these pointers no longer need to be copied.
Also added const qualifiers to some data structures.

Change-Id: I5d2236982748214591aa5d19f77f0ab8d27553ab

8 years agoSimplified energy-summation code
Mark Abraham [Mon, 3 Aug 2015 22:13:23 +0000 (00:13 +0200)]
Simplified energy-summation code

We need to check that the DD has the correct number of bonded
interactions being handled across all domains. The old check would
happen at every call for computing energies, which was unnecessary
because the number of domain-local bonds can change only at DD
steps. It also required log file, global state and global topology to
be passed into every call to global_stat to handle the rare error case.

This patch moves the check for correct DD of bonded interactions up to
do_md, where it can be scheduled to happen only once per DD lifetime.
global stat now does not need to be passed parameters that only needed
for reporting in the case of a failed check.

The dispersion correction code now gets the global number of atoms
from a field in forcerec. This should really be set up when a
dispersion-correction object was created, but this approach will do
for now (particularly because dispersion correction code is probably
being called too often, so there's bigger problems to fix).

Together, mdrun energy-summation code no longer needs to be passed the
global topology, reducing code complexity.

Fixed documentation of global_stat.

Refs #1793

Change-Id: I595b4eff8f4cbb0bbaf295c386041a0966e4a094

8 years agoMove calcgrid.* to fft/
Teemu Murtola [Wed, 16 Dec 2015 11:27:25 +0000 (13:27 +0200)]
Move calcgrid.* to fft/

One more file out of gmxlib/.  These are related to selecting an FFT grid
size, and contain some numbers coming from performance measurements, so
fft/ should be a natural place.

Change-Id: I386965665a92bc47d4c0c3ca0201a6a4b13b5886

8 years agoAdd one element to state rvec arrays
Berk Hess [Fri, 11 Dec 2015 13:37:09 +0000 (14:37 +0100)]
Add one element to state rvec arrays

Because the next generation SIMD interface can use (unaligned) 4-wide
SIMD loads to load rvecs from the state, we need one extra element
allocated at the end of the arrays.

Note: This is a temporary, fragile code that should be replaced.
One can easily forgot to allocate an extra element in state and
someone could pass an rvec pointer not from state to one of the
routines that uses SIMD loads.

Change-Id: Ib359355909c3e380ebd36a3ec2a3015a3cb6c9b8

8 years agoNext-generation SIMD module, reference implementation
Erik Lindahl [Sun, 1 Nov 2015 21:01:15 +0000 (22:01 +0100)]
Next-generation SIMD module, reference implementation

This moves the SIMD implementation to C++, and extends it
to put all architecture-specific code in the SIMD module
and make the nonbonded kernels fully generic. A number
of other features has also been added, with the hope that
we should be able to largely freeze the features after
this expansion.
- SIMD variables are now always unique types, and all
  names have been changed to C++ standard in the gmx
  namespace.
- All SIMD functions are now functions and not defines.
- Function names have been modified to correspond as much
  as possible to the C++ standard library for normal
  floating-point types.
- The alignment routines have been removed and replaced
  with the AlignedAllocator and GMX_ALIGNED() attribute
  for stack variables. The latter is now defined on all archs,
  either to MSVC- or GNU-specific versions or the C++11
  standard alignas/alignof, with a new basedefinition test
  that will catch at least some bad alignment routines.
- About 10 higher-level routines have been added to
  perform the operations necessary for full-SIMD-width
  nonbonded kernels.
- There are new defines to indicate that wide SIMD
  implementations support half-SIMD-width operations, and
  a handful of utility functions that are required to
  use this in the nonbonded kernels.
- Masked operations for multiply, reciprocals and
  inverse square roots have been added. In the future
  this will make it possible to improve the kernel
  efficiency, in particular on platforms with native
  support for masked operations.
- We no longer use defines to check availability
  of the basic integer SIMD type, but implementations
  that do not support this at all should implement it
  through the floating-point types, i.e. it will always
  be present from the user perspective.
- A transpose operation has been added for SIMD4.
- Gather/scatter operations have been added for
  triplets. This will make it easier to use SIMD
  even for routines with non-SIMD-friendly data layout.
- Memory alignment asserts are used when compiling with
  asserts enabled.
- The nbnxn kernels no longer use any architecture-
  specific files, but rely entirely on the simd module.

This also fixes a float-to-double conversion bug
for Xeon Phi that was detected with a new unit test
for the conversions. Those routines have never been
used in GROMACS, so it is harmless.

Change-Id: Ic882df80b21e8a70a9585c2dc4dd1e87fae1a9d8

8 years agoC++ math function cleanup
Erik Lindahl [Thu, 29 Oct 2015 17:13:59 +0000 (18:13 +0100)]
C++ math function cleanup

math/functions.h now implements a number of old and new math
functions with either float, double, or integer arguments.
Manual SIMD versions of 1/sqrt have been tested with gcc and icc
on x86, Power8, Arm32 and Arm64, but with correct 'f' suffixes
on constants there is only 10-15% performance difference, so for
now we always use the system versions to avoid having this file
depend on config.h. Functions for third and sixth roots have
been introduced to replace many of our pow() calls, and the code
has been cleaned up to use the new functions.

Refs #1111.

Change-Id: I74340987fff68bc70d268f07dbddf63eb706db32

8 years agoMove main.*, splitter.*, gmx_omp_nthreads.* to mdlib
Teemu Murtola [Mon, 14 Dec 2015 19:02:10 +0000 (21:02 +0200)]
Move main.*, splitter.*, gmx_omp_nthreads.* to mdlib

Remove unused #includes for these headers, and remove some incorrect
uses, which showed that they are not actually used outside mdrun.
listed-forces -> mdlib dependency becomes slightly stronger with this,
but internal structure of mdrun code anyways needs a lot of work to
remove the dependency cycles.

Change-Id: If326c8da5a732ee725aa16ffad0ec72f9fefb371

8 years agoMove readinp.* and warninp.* to fileio/
Teemu Murtola [Mon, 14 Dec 2015 18:43:26 +0000 (20:43 +0200)]
Move readinp.* and warninp.* to fileio/

These are related to reading certain file formats, so they naturally fit
there.

Change-Id: Ie39f853be580d2d0cf7f2ffd989aaaf2b7c82eb0

8 years agoMove hardware detection to hardware/
Teemu Murtola [Mon, 14 Dec 2015 18:25:41 +0000 (20:25 +0200)]
Move hardware detection to hardware/

This may not be the best place for all of the code, since there are
also, e.g., functions that return information about implementation
limitations of mdrun, and for checking mdrun input parameter
consistency.  But it would make sense for as much of the actual
detection code as possible to be in a single location, and this would be
the most natural place.

There are several cyclic dependencies suppressed for now to get forward
with breaking up gmxlib/.

Change-Id: Ie73d0a18530082d3a2b9f26a655706b33bf58a8a

8 years agoMove some mdrun code out of gmxlib/
Teemu Murtola [Sun, 13 Dec 2015 10:20:21 +0000 (12:20 +0200)]
Move some mdrun code out of gmxlib/

- Move sighandler.* to mdlib, since it is specific to mdrun.
- Move thread_affinity.* to mdrunutility, since it is only used from
  runner.cpp.  Convert existing comments to rudimentary Doxygen
  documentation to avoid check-source and Doxygen warnings.

Change-Id: I83d431497480bcfa2b2edf8f347708a0c1832005

8 years agoMove gpu_utils etc. out of gmxlib
Teemu Murtola [Sun, 13 Dec 2015 08:07:20 +0000 (10:07 +0200)]
Move gpu_utils etc. out of gmxlib

Make gpu_utils/ a top-level directory in an effort to break up gmxlib,
and merge cuda_tools/ and ocl_tools/ there to avoid multiple very small
modules.  Remove complicated globbing from the build system in favor of
listing the source files explicitly.

Change-Id: Id48a3ac89e1fa8fd8b8cf6eb8b9512a7d4519f97

8 years agoInstall baseversion.h
Teemu Murtola [Mon, 14 Dec 2015 19:20:54 +0000 (21:20 +0200)]
Install baseversion.h

At least gmx_version() could be useful for external code.

Change-Id: I62c8e3af728f3ff844a5e1e611ed96927d44d676

8 years agoOpenCL code cleanup
Szilard Pall [Sat, 5 Dec 2015 02:06:29 +0000 (03:06 +0100)]
OpenCL code cleanup

Removed leftover comments and dead code, added some notes on what needs
to be reviewed later and fixed formatting in a few really bad cases.

Only in one cases did minor refactoring by moving some code into a
function (nbnxn_ocl_init_const) to eliminate some leftover TODOs and
make the code more in sync with the CUDA code structure.

Change-Id: I69d4a5a85bcadfa6f97282c02016fea31e52729a

8 years agoCreate separate module for trajectory data
Teemu Murtola [Fri, 11 Dec 2015 10:38:13 +0000 (12:38 +0200)]
Create separate module for trajectory data

Move trx.h from fileio/ to a new trajectory/ module, and rename it to be
more descriptive.  This directory can then evolve to have the basic data
structures and operations on trajectory information, similarly to the
topology module for structure information.  This removes a
pbcutil <-> fileio cyclic dependency, and also makes the selection code
independent of fileio.

Moved energy.h from mdtypes/ to the same place, since it is used for
representing energy information during the trajectory.  This makes
mdtypes at least slightly more mdrun-specific.

Part of #1854.

Change-Id: I4c266d78daefc3be9adefb56cd7cce8d9548634b

8 years agoRemoved unused mdrun option -dn
Berk Hess [Thu, 10 Dec 2015 19:55:40 +0000 (20:55 +0100)]
Removed unused mdrun option -dn

Change-Id: I1814258c9f7e60e3ef4fef0f6def918d2bf50e4a

8 years agoMove disre.* and orires.* to listed-forces/
Teemu Murtola [Fri, 11 Dec 2015 07:21:49 +0000 (09:21 +0200)]
Move disre.* and orires.* to listed-forces/

This removes topology -> gmxlib dependency, and moves code out of gmxlib
to a more appropriate location.

Convert existing comments to very rudimentary Doxygen documentation to
avoid Doxygen warnings.

Part of #1854.

Change-Id: I1aa56dd8f14eff90e035f1c69d59bb19a8dcb7ed

8 years agoMove ifunc.* to topology/
Teemu Murtola [Fri, 11 Dec 2015 06:58:10 +0000 (08:58 +0200)]
Move ifunc.* to topology/

This does not solve the main cyclic dependency that comes from
interaction_function definition depending on all the functions that
evaluate the interactions, but it does centralize this dependency to
topology: pbcutil -> gmxlib dependency is now removed.

Part of #1854.

Change-Id: Iaed05348cf663db7faeb7154a2838ea84d8bde1b

8 years agoMove put_atoms_in_box_omp() to sim_util.*
Teemu Murtola [Fri, 11 Dec 2015 07:01:30 +0000 (09:01 +0200)]
Move put_atoms_in_box_omp() to sim_util.*

This contributed to pbcutil -> gmxlib cyclic dependency, and it could
anyways be better to have mdrun-specific code outside the generic
modules.

Change-Id: Ibc453a290dc124b1f83adf0c3385e9907581e377

8 years agoRemove topology -> fileio dependency
Teemu Murtola [Thu, 10 Dec 2015 19:29:43 +0000 (21:29 +0200)]
Remove topology -> fileio dependency

There is no particular reason why .ndx reading/writing would need to use
gmxfio.h for I/O, instead of the simpler routines from futil.h.  For
now, removing the use of gmxfio.h makes the dependencies much cleaner.

Part of #1854.

Change-Id: I86ed5dea88a230fbd337acb3a47048c9ab6e7fbe

8 years agoBroke up copyright.*
Mark Abraham [Wed, 11 Nov 2015 21:23:35 +0000 (22:23 +0100)]
Broke up copyright.*

Split unrelated content into binaryinformation.* and pleasecite.*, and
move them to utility/.  This removes functionality from fileio that does
not really belong there, and helps in removing cyclic dependencies.

One new cyclic dependency suppressed for now; it will disappear with
simplification of gmx_invsqrt().

Part of #1415.

Change-Id: I65f07768d46852783d30cf1a28dd22d614dde125

8 years agoRequire Nose-Hoover with MTTK
Mark Abraham [Mon, 30 Nov 2015 22:25:40 +0000 (23:25 +0100)]
Require Nose-Hoover with MTTK

Nothing else was ever supported, and could segfault if reference
temperatures in the .mdp file were zero because there was no
thermostat.

Change-Id: Id0dc1302832c306d43dc809f032b850236849580

8 years agoAdResS: lost performance tweak
Christoph Junghans [Mon, 30 Nov 2015 18:06:05 +0000 (11:06 -0700)]
AdResS: lost performance tweak

Change-Id: I164bc6a60f62d117fef83844da74c3707455a980

8 years agoFix bug with pull group weights
Berk Hess [Fri, 11 Dec 2015 15:36:43 +0000 (16:36 +0100)]
Fix bug with pull group weights

Using pull-group?-weights would set all pull indices to 0.

Fixes #1878

Change-Id: Iff4c4ef9814313f948fbec3279d5815ce96216ef

8 years agoStop global communication depending on integrator
Mark Abraham [Mon, 23 Nov 2015 16:01:00 +0000 (17:01 +0100)]
Stop global communication depending on integrator

In 488464e7, we removed the iterative case for the md-vv
integrator. This exposed a bug that I suspect has been there ever
since the first implementation of md-vv. Whether we do reduction on
the force virial should depend only on whether the main loop asked for
it, because we're planning to calculate quantities that need it,
e.g. pressure. Further discussion on Redmine.

Fixes #1858

Change-Id: I0fbce62a9732dac186aec687445dcb848151c4fd

8 years agoMerge "Merge branch 'origin/release-5-1'"
Teemu Murtola [Fri, 11 Dec 2015 06:27:45 +0000 (07:27 +0100)]
Merge "Merge branch 'origin/release-5-1'"

8 years agoMerge branch 'origin/release-5-1'
Mark Abraham [Thu, 10 Dec 2015 01:36:16 +0000 (12:36 +1100)]
Merge branch 'origin/release-5-1'

Change-Id: Ib28050b54b93ee5eabb12414a92424987b769693

8 years agoSplit txtdump.*, part 2
Teemu Murtola [Thu, 3 Dec 2015 20:06:47 +0000 (22:06 +0200)]
Split txtdump.*, part 2

Move basic txtdump.* to utility.  To avoid introducing more cyclic
dependencies, move some contents closer to declaration of the types
being dumped:
- Move pr_inputrec() to mdtypes/inputrec.*.
- Move pr_*() functions operating on vectypes.h types to math/vecdump.*.

One additional cycle suppressed for now; on the other side, this removes
nearly all pbcutil -> fileio and topology -> fileio dependencies,
getting us closer to removing those cycles.

Add basic comments for remaining txtdump.h functions to avoid Doxygen
warnings.

Change-Id: I8ec5b34f6d5af8e63f9716e782943e75cb06b5b5

8 years agoSplit txtdump.*, part 1
Teemu Murtola [Thu, 3 Dec 2015 19:22:37 +0000 (21:22 +0200)]
Split txtdump.*, part 1

- Move routines to print various data structures to the file that
  declares the data structure, mostly to topology/.
- Rename pr_header() to pr_tpxheader() to clarify its use.
- Remove unused pr_commrec() and some commented-out code.
- Remove unnecessary uses of txtdump.h.

This helps avoiding dependency cycles coming from this (because in its
old form, any code that wanted to use these routines for, e.g., debug
output, would need to be above all the data structures for which this
printing was supported).  Also, it makes it easier to find the code that
needs changing because of a data structure change easier when it is
close to the declaration of the data structure.

Follow-up commit will move txtdump.* out of fileio to resolve existing
cyclic dependencies, but split that into a separate commit to keep the
size manageable.

Change-Id: I2665f6d25cd095f4c7d11d32bcaec38601ff8d8b