alexxy/gromacs.git
10 years agoMerge release-4-6 into master
Roland Schulz [Wed, 30 Oct 2013 03:03:45 +0000 (23:03 -0400)]
Merge release-4-6 into master

Change-Id: I584e5fb2d70e90e5ac8a1439268ee185b0a4105f

10 years agomdlib: Clean up -Wunused-parameter warnings
Alexey Shvetsov [Thu, 26 Sep 2013 08:00:32 +0000 (12:00 +0400)]
mdlib: Clean up -Wunused-parameter warnings

Change-Id: I555d418ca21e03ba891b0cf9f9eebbe2fb19a316

10 years agocorrected volume with serial NPT replica exchange
Berk Hess [Mon, 28 Oct 2013 14:11:27 +0000 (15:11 +0100)]
corrected volume with serial NPT replica exchange

Replica exchange with replicas run in serial would only update
x and v, not the other state data. This gave incorrect volumes
with NPT replica exchange.
Fixes #1362

Change-Id: Ib726fbb75e800c624ef61f31e76a5d4a4e408b9c

10 years agoRenamed and removed last references to GMX_CRAY_XT3
Mark Abraham [Thu, 3 Oct 2013 18:00:57 +0000 (20:00 +0200)]
Renamed and removed last references to GMX_CRAY_XT3

These systems were around in 2006, so probably out of commission by
now. XT5 had replaced catamount with something else. Not sure about
XT4, which might still be around. In any case, the machinery to test
for Cray's catamount should be named more generally, spam the
CMake status and cache less, and use the standard CMake mechanism
to avoid repeating try_compile().

Change-Id: Ic23b195f500662a6a0c4e27b4dc1c9c647b03fc1

10 years agoFixed memory leak in gmxdump.
Magnus Lundborg [Mon, 28 Oct 2013 14:36:01 +0000 (15:36 +0100)]
Fixed memory leak in gmxdump.

Release memory allocated when reading xtc.

Change-Id: I51ab413e598ce937e836b183b29775bc246055cd

10 years agoimproved the nbnxn buffer size estimate with GPUs
Berk Hess [Wed, 2 Oct 2013 15:43:12 +0000 (17:43 +0200)]
improved the nbnxn buffer size estimate with GPUs

The nbnxn Verlet buffer estimate now takes into account that
constrained atoms rotate, and don't move linearly, around the atom
they are constrained to. This significantly lower the buffer size
estimate for long neighborlist life times (as used with GPUs).
The buffer for most CPU runs is not affected (significantly).
Because of the smaller buffer, mdrun now uses smaller list increase
limits for increasing nstlist when using GPUs. This improves
performance.

Also activated and tested the virtual site effective mass calculation
(vsites were ignored in the drift calculation).

Change-Id: I2cb349f483610eabcc97bfbc23d17f189dec19d6

10 years agoOverview Doxygen pages for analysis framework.
Teemu Murtola [Sat, 28 Sep 2013 19:59:01 +0000 (22:59 +0300)]
Overview Doxygen pages for analysis framework.

Main content:
- General overview page for the whole framework.
- Reorganized the way the documentation for the analysis template is
  generated.
- Separate page for describing the concepts for the analysisdata module
  in more detail.
- Separate page for giving an overview of the selection engine.
  Also minor clean up for related documentation pages.
- Add missing installation rule for analysisdata/modules/lifetime.h.

The module pages could now use some restructuring to reference the
information here and provide relevant details instead of duplicating any
of it.  Left for later.

Change-Id: I159a2d913fe6f9114c60804d30fa3714b23df262

10 years agoSome overview content for Doxygen documentation.
Teemu Murtola [Sat, 28 Sep 2013 03:49:05 +0000 (06:49 +0300)]
Some overview content for Doxygen documentation.

Make the main page more useful by providing some explanation of the
purpose of the documentation and adding a (currently very short) list of
links to more detailed pages, making it easier to start consuming the
documentation.

Added a page that contains some information from the wiki
http://www.gromacs.org/Developer_Zone/Programming_Guide/Library_Structure

Once the documentation is more complete, some wiki pages (including the
above) could go away.

Requires Doxygen >=1.8, because separate Markdown pages are used.

Change-Id: I2bf6e00976b47b0d34c79f4ea09452d40701f753

10 years agoMisc. Doxygen updates for src/gromacs/utility/.
Teemu Murtola [Thu, 26 Sep 2013 19:05:47 +0000 (22:05 +0300)]
Misc. Doxygen updates for src/gromacs/utility/.

Add some missing documentation, fix problems noticed, make the
documentation appear more uniform etc.
The biggest improvement is a better overview of the whole directory.
Some Markdown syntax used (requires Doxygen >=1.8), but not much.

Change-Id: Ib4505219536679b17f323c65a9c3f005b655e229

10 years agoCreate fileio module
Mark Abraham [Tue, 17 Sep 2013 08:07:13 +0000 (10:07 +0200)]
Create fileio module

This patch contains only code motion. There are no functional code
changes. Moves lots of I/O code into src/gromacs/fileio. This means
lots of changes to avoid having everything as a compile-time dependency
of everything else because everything is pulled in via typedefs.h,
etc. Note that src/gromacs/legacyheaders/filenm.h and
src/gromacs/legacyheaders/types/filenm.h have been consolidated into
src/gromacs/fileio/filenm.h.

I/O code in files named stat*[ch] now lives in various new files in
fileio.

Files outside of the module now #include its header files in a proper
way, e.g. #include #include "../fileio/filenm.h" or
"gromacs/fileio/filenm.h" according to whether they are an installed
header, or not. Files within the module are blessed and do not need
that qualifier.

This module installs most of its headers (because they're almost all
inter-dependent; gmxfio_int.h is not installed because it is
only useful internally, vmdio.h is not installed because it
relies on a header from src/external)

Files in new module
* conform to preferred include-guard format.
* have up-to-date copyright headers thanks to Teemu's automatic
  script
* that are installed headers refer to other GROMACS include files via
  relative paths

Moves mdrun trajectory writing into wrapper function.

Removes small pieces of I/O code that was hiding behind "#if 0".

Some pieces of I/O code specific to the gmxpreprocess module have
remained there.

Moved a cppcheck suppression to follow matio.cpp to its new home.

Minor fix to xdrf.h logic, since it is now the subject of a CMake
test.

Refs #1292, #1193, #1137

Change-Id: I820036298d574966d596ab9e258ed8676e359184

10 years agoSimplify code structure for C++ analysis tools
Teemu Murtola [Tue, 22 Oct 2013 04:34:36 +0000 (07:34 +0300)]
Simplify code structure for C++ analysis tools

Move all the code for declaring the actual analysis tool into the source
file, and leave only a stub info object in the headers.  Make the class
declared in the header provide a static factory method to allow this.

This has several benefits:
 - Easier to write and maintain the tools, as all the logic is in one
   file only.
 - Clearer about the intended level of encapsulation of the tools.
 - Makes the tools in the library more closely resemble those written
   using the template.  The only difference now is that the main()
   method is replaced by the info object, and that the info object
   provides the names to pass to TrajectoryAnalysisModule constructor.

Change-Id: Ib545cc1d8900fe88cb58811df2cd4a63a6a99b2f

10 years agoFix NBNxN SIMD reference kernels
Roland Schulz [Wed, 23 Oct 2013 22:12:12 +0000 (18:12 -0400)]
Fix NBNxN SIMD reference kernels

nbfp_stride was added independently by both 25eb0e14 and 5deee8a0.

Removing static is not OK for gcc. Mark will resolve later whether
this was even needed for his upstream work.

Change-Id: I97ea4131163512354b5e339dd19549c3e49e9de2

10 years agoEncapsulate gmx_wallclock_accounting_t into new timing module
Mark Abraham [Sat, 28 Sep 2013 13:45:30 +0000 (15:45 +0200)]
Encapsulate gmx_wallclock_accounting_t into new timing module

Started a timing module where things like gmx_wallcycle.c and
gmx_cyclecounter.c will eventually also live.

Renamed s/runtime/wallclock_accounting/ to avoid ambiguity with
"compile time," "simulation time," etc.

This patch preserves the release-4-6 behaviour of the reported times
with all supported combinations of MPI, thread-MPI, GPUs, OpenMP.  I
think the old behaviour of -ntomp_pme != -ntomp was buggy with respect
to timing, and this patch fixes that.

Change-Id: I22cba17cdf866e17d9d0732de204b85b0ab31994

10 years agoCleaned up run time measurement
Mark Abraham [Wed, 25 Sep 2013 22:25:20 +0000 (00:25 +0200)]
Cleaned up run time measurement

Removed all use of clock(), in favour of using clock_gettime for
per-node timer and (where available) per-thread timer. This is better
than using gettimeofday(), which is deprecated by POSIX. clock() has
no real advantages, and requires us to keep bumping our own counter if
we use it (in particular, on any remaining 32-bit
machines). Eliminated related dead code.

Cleaned up struct gmx_runtime_t and related code by
* renaming variables more descriptively
* removing variables that should be local variables in a function
* eliminating variables associated with using clock()

The behaviour of print_perf is preserved (tested real MPI, thread MPI;
serial looks like it should work also); namely that the "(%)" should
be a crude reflection of machine load.

Change-Id: Icdf506150045bee88cf04200b25cd010a9bb5419

10 years agoAdded documentation for gmx_runtime_t struct
Mark Abraham [Wed, 25 Sep 2013 21:22:50 +0000 (23:22 +0200)]
Added documentation for gmx_runtime_t struct

Now it is clear what should be done to simplify things, noted inline
with TODO comments.

Change-Id: If66157d9fe924ca1f02b6ffbdd4526feb9ac9784

10 years agoMerge branch release-4-6 into master
Mark Abraham [Tue, 22 Oct 2013 16:42:04 +0000 (18:42 +0200)]
Merge branch release-4-6 into master

Conflicts:
CMakeLists.txt
admin/installguide/installguide.tex
cmake/gmxDetectAcceleration.cmake
cmake/gmxSetBuildInformation.cmake
Resolved generally in favour of release-4-6, but some changes in
master branch associated with new CMake functionality was kept in the
expected way. Behaviour detecting hardware (particularly on non-x86
platforms) is not optimal in this commit, but is fixed in
I94e0756856e7.

src/gromacs/gmxlib/checkpoint.c
src/gromacs/legacyheaders/typedefs.h
src/gromacs/mdlib/expanded.c
Resolved in favour of release-4-6 (expanded ensemble fixes)

src/gromacs/mdlib/pme.c
Resolved in favour of release-4-6 (SIMD generalization)

src/gromacs/mdlib/pme_sse_single.h
Deleted (superseded by src/gromacs/mdlib/pme_simd4.h)

src/mdlib/CMakeLists.txt
Relocated new comment to correct place in src/gromacs/CMakeLists.txt
(BUILD_OWN_FFTW fixing)

src/mdlib/nbnxn_cuda/nbnxn_cuda_types.h
Replaced src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda_types.h with this file,
but preserved corrected comments from master branch

src/gromacs/legacyheaders/mdrun.h
src/programs/mdrun/md.c
Resolved in trajectory_writing.c (removed df_history parameter that is
now useless)

Change-Id: I44ffdc7eb15039b98910f6b3f32252f5849ecfce

10 years agofixed recent bug with CUDA texture objects
Berk Hess [Tue, 22 Oct 2013 20:01:32 +0000 (22:01 +0200)]
fixed recent bug with CUDA texture objects

On GPUs with CUDA architecture 3.0, mdrun would exit with an error.
This bug was introduced very recently in 43b41cb8
Fixes #1361

Change-Id: I0c46867b987cbf3c0da3aa9384d985fef1e4aa73

10 years agofixed OpenMP threads being pinned to the same cores
Berk Hess [Tue, 22 Oct 2013 10:02:44 +0000 (12:02 +0200)]
fixed OpenMP threads being pinned to the same cores

Due to the thread id not being a thread-local variable in the OpenMP
loop setting the thread affinities, different OpenMP threads could be
pinned to the same physical cores.
Fixes #1360

Change-Id: I7bc39aef9a8854ec24006895da6005c1326033a3

10 years agoRemove useless warnings from Doxygen logs.
Teemu Murtola [Fri, 18 Oct 2013 19:22:39 +0000 (22:22 +0300)]
Remove useless warnings from Doxygen logs.

Remove warnings about too big include dependency graphs for some files
from the logs; these may cause issues for Jenkins if/when graphviz gets
installed there.

Related to #1239.

Change-Id: Ic20f5939bfa3a0b641f7c372d2f705a8dbd463e7

10 years agoRemove html target from and excessive PDFs for manual
Mark Abraham [Sun, 20 Oct 2013 17:45:41 +0000 (19:45 +0200)]
Remove html target from and excessive PDFs for manual

Change-Id: I0049fcb1f96aa2b2253bf8029f5172bae4747b69

10 years agoUpgrade layout file to support Doxygen >=1.8.
Teemu Murtola [Thu, 26 Sep 2013 15:16:38 +0000 (18:16 +0300)]
Upgrade layout file to support Doxygen >=1.8.

Remove entries in the layout file that cause warnings with Doxygen >=1.8
Split the layout file changes into two parts to allow upgrading Doxygen
without breaking existing builds; after this change, the layout file
does not produce warnings with either version, but needs additional
changes to fully conform to what at least 1.8.5 expects (those included
in Ie265644).  Jenkins needs to be updated for this to be useful; until
that is done, some links etc. in the generated documentation may subtly
break.

Also fixed a stray Doxygen warning with 1.8.5.

Related to #1239.

Change-Id: Ieb7d4441ba8f6e6ffde042e20fc51598b3029439

10 years agoBlueGene/Q Verlet cut-off scheme kernels
Mark Abraham [Mon, 19 Aug 2013 16:33:55 +0000 (18:33 +0200)]
BlueGene/Q Verlet cut-off scheme kernels

The kernels are implemented with small functions whose inlining
is guaranteed by the use of xlc and clang extensions. That's a hack
whose general solution I plan to implement in master branch.

Other BG/Q considerations:

Architecture detection now works on A2 core.

Install guide updated.

It is better to use intra-node communicators than not, and ranks
within nodes are correctly detected via querying the BlueGene/Q API,
since the hostname is not useful for the purpose.

It is better to not set GMX_DD_SENDRECV2.

It is better to use the analytical Ewald correction.

In principle, we should version the type of variables and fields named
d2, rl2, rbb2 in nbnxn_search*[ch] to be double on PowerPC and float
everywhere else (each regardless of GROMACS target precision). This
would mean that on PowerPC (where all flops take place in double
precision with free precision-extension upon load) we can be both
cache-efficient by storing bounding boxes in float, and flop-efficient
by not having to generate a round-to-single instruction to compare the
result of subc_bb_dist2_simd4 with the cut-off stored as a
float. Still, a flop per bounding-box distance comparison will not
break the bank.

Enough bgclang support exists for the build to succeed (no platform
file is required), even with OpenMP, but a number of compiler issues
have been reported on llvm-bgq-discuss mailing list.

Change-Id: I98c5791ec3766cdbdcb8a8eb7418d00585727cc0

10 years agoCall atomics from TestAtomic.c
Mark Abraham [Fri, 11 Oct 2013 12:19:17 +0000 (14:19 +0200)]
Call atomics from TestAtomic.c

This exposes more compile-time errors than simply parsing
the definitions. This makes CMake's diagnostics more useful
with respect to atomic operations.

Fixes #1355

Change-Id: Ie1d6f14565700b98988cadc17cb7ac2b78d76ce3

10 years agoFix tMPI_Atomic_memory_barrier for MIC
Roland Schulz [Tue, 8 Oct 2013 20:13:25 +0000 (16:13 -0400)]
Fix tMPI_Atomic_memory_barrier for MIC

MIC doesn't has sfence. It isn't required because the current generation
of MIC is in-order.

Change-Id: I6953bc3168a191a3038408e6ea35025a25509abe

10 years agoMove mdrun trajectory writing into wrapper function
Mark Abraham [Tue, 17 Sep 2013 08:07:13 +0000 (10:07 +0200)]
Move mdrun trajectory writing into wrapper function

Refs #1292, #1193, #1137

Change-Id: I3f19e0995ff7fab465184d5bab8c2683260af853

10 years agoFix typo in g_membed documentation
Mark Abraham [Wed, 16 Oct 2013 16:23:43 +0000 (18:23 +0200)]
Fix typo in g_membed documentation

Suggested by Iman Pouya

Change-Id: I5c77a29b64e61f9da5a663119e149d992141eb21

10 years agoFix SIMD C reference nbnxn kernels
Roland Schulz [Wed, 9 Oct 2013 18:16:52 +0000 (14:16 -0400)]
Fix SIMD C reference nbnxn kernels

Got broken by ace006a86 and 022581b388.
An additional fix for nbnxn 4x8 reference code, broken by c0cf8ce,
is in a separate patch.
Also changed the AVX256 double precision nbfp_stride from 4 to 2.

Refs #1173

Change-Id: If3b3291a7ff765acc19c29f834e856cc9798d47e

10 years agoRestarting from checkpoint no longer reinitializes WL weights.
Michael Shirts [Wed, 2 Oct 2013 23:59:06 +0000 (19:59 -0400)]
Restarting from checkpoint no longer reinitializes WL weights.

Fixes a problem where mdrun was reinitializing the initial Wang-Landau
delta for expanded ensemble simulations, because the flag turning it
off was stored the expanded ensemble data structure (not saved in cpt)
instead of the df_history structure (is saved in checkpoint).  In the
process, some moderate encasulaton of the df_history structure and
the expanded ensemble methods.

Fixes #1350

Change-Id: I13492a7a9773fcb417fcd0ee106d851d9838ce25

10 years agoRemove latex help export.
Teemu Murtola [Wed, 18 Sep 2013 03:12:53 +0000 (06:12 +0300)]
Remove latex help export.

The decision in I7e56a011 was to drop Appendix D from the manual.
This commit removes the latex help export code that supported that.
This makes it easier to manage change in wman.cpp, since now all the
markup substitution code operates in the same environment.

Related to #685 and #969.

Change-Id: Iaeb5b82e288e3120ebe6ae38c0e5c3aca892194a

10 years agoMove manual repo into code repo, and make it build
Mark Abraham [Fri, 11 Oct 2013 15:38:38 +0000 (17:38 +0200)]
Move manual repo into code repo, and make it build

Supersedes I12066943a1. Contains all the manual content from
Ic1f74befee88. Manual history is lost - nobody was super
keen on keeping it, and the git repos still exist if we
care later on.

If the user opts in with cmake .. -DGMX_BUILD_MANUAL=on, this patch
detects whether a manual build is possible. If so, creates a make
target called "manual" which will build the PDF manual in the manual
sub-directory. The manual is never automatically made, and the
supporting detection is never automatically run. Thus, a normal
GROMACS user or developer never has any problems.

Appendix D (compendium of man pages) is removed. The header of chapter
7 always contained advice on where to get that content. That advice
is updated.

Also
* streamlined manual CMakeLists.txt for new context
* removed outdated \gmxmajor{} LaTeX macro
* noted some TODOs for future work

Refs #1177

Change-Id: I7e56a01182fbd9803222c8d47cb8a9c88d7b932a

10 years agoavoid division by zero in SIMD angles and dihedrals
Berk Hess [Fri, 11 Oct 2013 13:42:14 +0000 (15:42 +0200)]
avoid division by zero in SIMD angles and dihedrals

The SIMD accelerated angle and dihedral code did not (correctly)
check for dividing by zero, which can happen with aligned bonds.
Fixes #1351

Change-Id: I326f90fca87ab5cca493204de4a58655465634ca

10 years agoturning off expanded ensemble for all integrators but md-vv.
Michael Shirts [Mon, 2 Sep 2013 03:35:46 +0000 (23:35 -0400)]
turning off expanded ensemble for all integrators but md-vv.

Broke at some point, and somewhat tricky to turn back on
correctly for other integrators at this point; target for
5.0 when it should be more straightforward.

fixes #1321

Change-Id: I599b308800411e0cea111ffd280487037d613755

10 years agofixed a half bin misalignment in gmx_vanhove -or
Berk Hess [Wed, 2 Oct 2013 12:27:07 +0000 (14:27 +0200)]
fixed a half bin misalignment in gmx_vanhove -or

Change-Id: Ia800861912d50f5047742bcb1bb51e753920968f

10 years agoFixes a problem with pair type 2 interactions with free energy
Michael Shirts [Sat, 5 Oct 2013 18:28:12 +0000 (14:28 -0400)]
Fixes a problem with pair type 2 interactions with free energy

Pair type 2 interactions, which should remain on regardless
of couple-intramol=yes, were being turned off. Currently, when free
energies were turned on, they were just ignored, because the (empty)
pair one 1 type list was copied over them.  This fix adresses
this problem by adding onto the list instead of copying it over.

Fixes #1315

Change-Id: I240479a8dc083f7a355917ed9f74f4337fa3448f

10 years agomake use of CUDA stream priorities
Szilard Pall [Fri, 4 Oct 2013 00:33:04 +0000 (02:33 +0200)]
make use of CUDA stream priorities

CUDA 5.5 introduced steam priorities with 2 levels. We make use of this
feature by launching the non-local non-bonded kernel in a high priority
stream. As a consequence, the non-local kernel will preempt the local
one and finish first. This will improve performance in multi-node runs
by reducing the possibility of late arrival of non-local forces.

Change-Id: I4efc65546e4135f12006c0422e1fca42a788129f

10 years agoFix/improve installation directory logic.
Teemu Murtola [Sun, 4 Aug 2013 03:55:20 +0000 (06:55 +0300)]
Fix/improve installation directory logic.

With the move to relative install paths (recommended by CMake), logic
that relied on the *_INSTALL_DIR variables for something else than
locations for the CMake install() command got broken.  Explicitly added
CMAKE_INSTALL_PREFIX there.

Also improve the approach for customizing the installation directories:
 - GMXLIB is now GMX_LIB_INSTALL_DIR, and a proper cache variable.
 - Added a GMX_DATA_INSTALL_DIR to customize the directory under which
   the data files get installed under share/.  Use this also in the code
   that searches for the data directory instead of hardcoding several
   guesses.

Related, moved the logic of falling back to a hard-coded library
directory into get_libdir(); it was duplicated in two places.

Resolves part of #1271: creating a binary package with CPack and
installing it somewhere else than in the CMAKE_INSTALL_PREFIX
used to create it still breaks all the logic touched here.  Also using
DESTDIR with 'make install' breaks it (but that has never worked).

Change-Id: I0271a8152f87dd59a229c9d0eca976404f974ea8

10 years agouse CUDA texture objects when supported
Szilard Pall [Wed, 18 Sep 2013 19:59:36 +0000 (21:59 +0200)]
use CUDA texture objects when supported

CUDA texture objects are more efficient than texture references, their
use reduces the kernel launch overhead by up to 20%. The kernel
performance is not affected.

Change-Id: Ifa7c148eb2eea8e33ed0b2f1d8ef092d59ba768e

10 years agointroduced general 4-wide SIMD support
Berk Hess [Thu, 1 Aug 2013 12:34:22 +0000 (14:34 +0200)]
introduced general 4-wide SIMD support

PME spread+gather and the nbnxn search bounding box checks use
4-wide SIMD (as opposed to arbitrary width SIMD). This SSE code
has now been replaced by macros from gmx_simd4_macros.h.
pme_sse_single.h has been renamed to pme_simd4.h
This change is mainly refactoring; it only adds PME spread+gather
AVX acceleration in double precision plus a few FMA instructions.

Change-Id: Ia5e02295bb281a2e23d57f4c165f555de6744064

10 years agoIntroduced MPI initialization counter
Mark Abraham [Tue, 1 Oct 2013 14:47:22 +0000 (16:47 +0200)]
Introduced MPI initialization counter

Normal GROMACS code needs to initialize and finalize MPI. Code that
uses GROMACS as a client (e.g. external code, possible GROMACS test
code) needs GROMACS to work normally and not make erroneous calls to
the MPI library. For example, this would allow a single test binary
to call MPI-enabled mdrun repeatedly to test a range of test cases.

Change-Id: I546518923561a13e3973f90182fa31129ab1e6ae

10 years agofixed nbnxn 4x8 pair search without AVX
Berk Hess [Thu, 10 Oct 2013 10:53:05 +0000 (12:53 +0200)]
fixed nbnxn 4x8 pair search without AVX

This bug was introduced recently.
Note that nbnxn 4x8 without AVX was only possible when manually
changing the code to use plain-C reference SIMD.

Change-Id: I5effe4076bc5ff270ebeb366f9c2b8a13c256025

10 years agoRemove some unused variables from MD loop
Mark Abraham [Tue, 8 Oct 2013 23:26:02 +0000 (01:26 +0200)]
Remove some unused variables from MD loop

Change-Id: I2722e8adcad9f0d1f2f108d7e6bc859b8034266d

10 years agoImprove markup substitution in HelpWriterContext.
Teemu Murtola [Thu, 30 Aug 2012 03:48:19 +0000 (06:48 +0300)]
Improve markup substitution in HelpWriterContext.

- substituteMarkup() replaced with an interface that also does line
  wrapping at the same time.  Allows more complex line wrapping that
  can also depend on the input markup, and clarifies responsibilities in
  the code.
- Make TextTableFormatter use the new interface, removing explicit
  substituteMarkup() calls from elsewhere in the code.
- Structure the substitution to allow easy addition of more output
  formats.

Related to #685 and #969.

Change-Id: Id34be9489aa3a90d94cd87f8936b030bc21f1c98

10 years agoHTML export from the wrapper binary.
Teemu Murtola [Thu, 5 Sep 2013 03:25:19 +0000 (06:25 +0300)]
HTML export from the wrapper binary.

Implement HTML output format for 'gmx help -export'.
Fix an issue that caused 'mdrun -man html' to segfault.
Move the HTML header and footer generation out of wman.cpp and clean it
up (close incomplete tags, remove the date, etc.).

Clean up the layout of the online manual (on the file system) by putting
the generated files into a separate directory.  Also generate an
alphabetical list of programs into its own file instead of directly on
the front page.  By-topic list is currently missing.

Left out installation rules for now; can be reinstantiated once #1242
and the general approach to the whole online manual is clearer.

Will fix hyperlinks etc. in the generated output in separate change(s).

Related to #685, #969, and #1242.

Change-Id: Iaf8fc28d563f05a8e00c7c52d58b91cd1dabf369

10 years agoFixed triggering of CPU acceleration-scheme detection
Mark Abraham [Sun, 6 Oct 2013 16:45:23 +0000 (18:45 +0200)]
Fixed triggering of CPU acceleration-scheme detection

Recent patch Ic8f674e5ac29 fell afoul of the way the CPU acceleration
scheme needs to protect itself from re-running try_run() detection by
noticing when the suggestion variable is already defined.

Change-Id: Ifb528a072610b775384f397155a9daba8c293b64

10 years agoFurther consolidation of commrec initialization
Mark Abraham [Sat, 28 Sep 2013 23:19:02 +0000 (01:19 +0200)]
Further consolidation of commrec initialization

* renamed init_par_threads to reinitialize_commrec_for_this_thread,
  because that's what it does.
* minor consolidation of the two commrec construction functions
* removed useless and untrue comments

Change-Id: I109af71e548012b72388d3ce3e5e8353110e43b3

10 years agoMore consolidation of MPI initialization
Mark Abraham [Sat, 28 Sep 2013 22:52:27 +0000 (00:52 +0200)]
More consolidation of MPI initialization

* renamed init_par to init_commrec, like it does
* relocated some functions (or their content) from main* to network*
  or init.cpp

Now it is clear how to consolidate further parallel initialization
code.

Change-Id: I31e78d702b6d1fc1498d059722688a23ab1409df

10 years agoClean up CTest usage.
Teemu Murtola [Sat, 14 Sep 2013 18:48:35 +0000 (21:48 +0300)]
Clean up CTest usage.

- Remove use of backwards-compatibility Dart include; we are not using
  such dashboards.
- Move CTest include to the top of the main CMakeLists.txt.  This clears
  a lot of confusion about how BUILD_TESTING works, as it is declared by
  CTest.  Previously it worked because include(Dart) also declared it.
- The memory check suppression file needs a different treatment.  That
  also seems to have worked only because CTest was included twice.

Change-Id: I418997bfe01a0f3d90f40558a4dbba10f4744af7

10 years agoReorganize static/shared library management.
Teemu Murtola [Sun, 26 May 2013 18:36:08 +0000 (21:36 +0300)]
Reorganize static/shared library management.

The logic was scattered throughout the main CMakeLists.txt file, with
some very confusing logic (e.g., depending on the platform, the same
variable could be declared in completely different parts of the file).
Now all the logic is gathered in the same block, where it should be easy
to move into a separate file.

Change-Id: I102a80fe2847ebecafd5225e05d0e22ccd237bdd

10 years agoCMake helper for tracking cache variable changes.
Teemu Murtola [Fri, 24 May 2013 15:37:40 +0000 (18:37 +0300)]
CMake helper for tracking cache variable changes.

Used the new macro for controlling when to output various status
messages, making the output more useful to see that user-made changes
really had the desired effect.

Change-Id: I21b791ab8e4f3c8d22981b2315db96e8983c0b26

10 years agoRemove unused shift_util.c.
Teemu Murtola [Sat, 14 Sep 2013 12:11:13 +0000 (15:11 +0300)]
Remove unused shift_util.c.

There was a single function (set_shift_consts()) that was called, but it
only set some static variables that never got used.

Change-Id: I4305b345c0025e90e19aad70b46ab481696c1994

10 years agoImprove diagnostics with empty selections.
Teemu Murtola [Wed, 25 Sep 2013 18:33:24 +0000 (21:33 +0300)]
Improve diagnostics with empty selections.

Two independent fixes to make empty selections work better:
 - Some empty selections could assert or give internal errors, because
   evaluation of some types of expressions for zero atoms was not
   working.  Fixed by removing the asserts/checks.  The check for empty
   selections should now produce useful diagnostics for these cases.
 - Fix the check for empty selections to work for all types of selection
   option input.  Previously, it only worked if the selection was
   provided on the command line, but not if it was provided from a file
   or through interactive input.

Fixes a problem reported on the gmx-users list.  Only fixed in master
since the problem is only with selections that are nearly always
incorrect.  Also, the empty selections check makes the fix much more
useful there.

Change-Id: Ic3e086e637493fc5fefe4594d4407c5a6c53bc8b

10 years agoMan page export from the wrapper binary.
Teemu Murtola [Tue, 3 Sep 2013 04:11:38 +0000 (07:11 +0300)]
Man page export from the wrapper binary.

Implement nroff output format for 'gmx help -export'.
Move the header/footer generation out of wman.cpp.
The generation is now off by default.  Can be reinstantiated if someone
comes with a good approach for the case where the compiled binaries
don't run on the build host (e.g., compiling AVX256 binaries on a SSE4.1
host).

Related to #685 and #969.

Change-Id: I17725e3a487470bea8f6db2a59da31139e70621e

10 years agoFix parallel build for GMX_BUILD_OWN_FFTW
Christoph Junghans [Wed, 31 Jul 2013 19:46:58 +0000 (13:46 -0600)]
Fix parallel build for GMX_BUILD_OWN_FFTW

* only works for cmake >=2.8.8
* cmake 2.8.7 has a bug in add_library, but
  cmake 2.8.[0123] have other problem, cmake-2.8.[456]
  still don't build in parallel
* fix from https://gerrit.gromacs.org/#/c/1675/12
* hardcode libdir to fix build on OpenSuse

Change-Id: I74315880f71fd4384084819ccc686072f7cad4f5

10 years agoUse filenm.c data for FileNameOption.
Teemu Murtola [Mon, 30 Sep 2013 14:34:15 +0000 (17:34 +0300)]
Use filenm.c data for FileNameOption.

Expose the necessary data (through functions) from filenm.c so that
FileNameOption can use it.  Removes the need to duplicate the file name
extensions (potentially also other stuff in the future) for the period
that both coexist.

Part of #642.

Change-Id: I0b375da494d6e9c8a0fe6a38d9e1f27078ab9726

10 years agoFix warnings with Doxygen 1.8.5.
Teemu Murtola [Thu, 26 Sep 2013 03:40:32 +0000 (06:40 +0300)]
Fix warnings with Doxygen 1.8.5.

This version of Doxygen seems to have a bug in handling \internal on the
same line as \brief, causing it to concatenate the first word from the
next paragraph (i.e., the detailed description) into the \internal
keyword.  If this isn't a Doxygen command, then it complains about
unknown keyword like \internalThis.

Split the \internal to a separate line where necessary to fix this, or
removed the \internal completely if the documentation was already
excluded based on some other rule (e.g., the entity being within an
anonymous namespace or within \cond internal).

Also exclude generater selection/parser.cpp from the Doxygen parsing,
since it contains various stuff (a lot of macro expansion) that is
difficult for Doxygen to understand without a lot of effort.

Also some minor other fixes and cleanup.

Change-Id: I2069dadb95fa2a5f338a5f4f77825cb4426502ec

10 years agoFixes reaction field free energy bug
Berk Hess [Sun, 29 Sep 2013 04:59:57 +0000 (00:59 -0400)]
Fixes reaction field free energy bug

Version 4.6 introduced an error in the reaction-field correction
force term for perturbed interactions. A factor r_softcore^2 was
missing. The force calculation code is now slightly reorganized
and comments added to avoid such issues in the future.
Fixes #1318

Change-Id: I9105139f8975495c323008ce202cde517a69281a

10 years agoBroke some useless dependencies
Mark Abraham [Sat, 28 Sep 2013 22:51:17 +0000 (00:51 +0200)]
Broke some useless dependencies

g_disre does not need t_commrec or t_forcerec

Change-Id: I626487b777f4c18152741a74bd18053eda11c6b2

10 years agoSplit MPI initialization from t_commrec construction
Mark Abraham [Fri, 27 Sep 2013 17:07:06 +0000 (19:07 +0200)]
Split MPI initialization from t_commrec construction

Change-Id: I24d5488f0f21eb0528d32f08e1d4a22bf45e95ec

10 years agoSilence clang warnings
Mark Abraham [Sun, 29 Sep 2013 17:29:07 +0000 (19:29 +0200)]
Silence clang warnings

Pre-release clang 3.4 warns that the types of lout[23] variables
is not the real * expected with GMX_MPI_REAL.

Change-Id: Id3ca4567f5eb642ead0cb4ce8d48dafbb92c303a

10 years agoChange name of gmxdump to dump and gmxcheck to check
David van der Spoel [Sat, 28 Sep 2013 20:13:41 +0000 (22:13 +0200)]
Change name of gmxdump to dump and gmxcheck to check

In order not to have to type
gmx gmxdump
gmx gmcheck
the second gmx was removed from the command name.
Added check in cmdlinemodulemanager.cpp for binaries starting with gmx.
Change-Id: I7db4faf8ae57688388b1e5263a7117c2bdb570c8

10 years agoallow compilation to optimize for CUDA compute cap. 3.5
Szilard Pall [Thu, 26 Sep 2013 10:45:55 +0000 (12:45 +0200)]
allow compilation to optimize for CUDA compute cap. 3.5

Enabling optimizations targeting compute capability 3.5 devices
(GK110) slightly improves performance of both PME and RF kernels.
This requires a hint for the compiler optimization indicating
the maximum number of threads/block and minimum number of
blocks/multiprocessor. This change allows nvcc >=5.0 to generate
code for CC 3.5 devices and switches to including PTX 3.5 code
(instead of 3.0) in the binary.

Change-Id: If7e14d31165bc05859250db7468bf6bd8c186264

10 years agoRemove obsolete efHAT and src/ngmx/dlgtest.
Teemu Murtola [Fri, 27 Sep 2013 19:46:29 +0000 (22:46 +0300)]
Remove obsolete efHAT and src/ngmx/dlgtest.

Change-Id: Ica584c307b72c49dc8fdfae3f23e9a3e705f2736

10 years agoFixes bug in processing virtual_sitesn in grompp.
David van der Spoel [Sat, 28 Sep 2013 11:52:47 +0000 (13:52 +0200)]
Fixes bug in processing virtual_sitesn in grompp.

Fixes #1343

Change-Id: Ia1d39199a12292ef86d086a6c1bb5f1a0bdb5d35

10 years agoCorrected info text. -center --> -boxcenter
Jarvist Moore Frost [Thu, 22 Aug 2013 19:36:06 +0000 (20:36 +0100)]
Corrected info text. -center --> -boxcenter

Change-Id: I99901047fcde55f9714c81d3182a3778f290ebac

10 years agoUse git version info in Doxygen.
Teemu Murtola [Sat, 28 Sep 2013 04:19:30 +0000 (07:19 +0300)]
Use git version info in Doxygen.

The Doxygen documentation now gets labeled with the exact source
version, using the same logic as in the git version info generation.

Added an option to not search for the remote hash in
gmxGenerateVersionInfo.cmake, since this is by far the most expensive
operation, and it is not really necessary for the Doxygen part.

Also some minor cleanup of the CMake script.

Change-Id: I36dd0b7a811d5e48c818bf36a669320cedec6e9e

10 years agoFixed limitations in g_cluster
Manuel Luitz [Tue, 27 Aug 2013 16:08:29 +0000 (18:08 +0200)]
Fixed limitations in g_cluster

Old version produced wrong output for large trajectories with more
than 46340 frames. The reason was that the number of RMSD matrix
entries which is the square number of frames was stored as int which
caused a MAX_INT overflow. By changing it to gmx_large_int_t, g_cluster
is now able to handle trajectories with up to 3e9 frames.

Also freed leaking temporary buffers.

Change-Id: I8acfb0cedae9ddde207f39cb627ad2ea9fbbb9e6

10 years agologic fix for free energies with mdrun -rerun
Michael Shirts [Mon, 2 Sep 2013 01:24:22 +0000 (21:24 -0400)]
logic fix for free energies with mdrun -rerun

It was taking the wrong logical path when it checks whether
delta_lambda = 0 when doing mdrun -rerun

fixes #1330

Change-Id: I3dadbb546b4376fae72c1b00c0684450bf77396f

10 years agoDrop md5sum check for GMX_BUILD_OWN_FFTW
Christoph Junghans [Wed, 31 Jul 2013 19:52:40 +0000 (13:52 -0600)]
Drop md5sum check for GMX_BUILD_OWN_FFTW

The old version gave a confusing error message about a wrong md5sum if
the download failed.

The new version no longer checks an md5sum at all, which avoids the
need to test a CMake version. It also gives an explicit warning and
instructions on how to proceed safely.

CMake bug reported at http://www.cmake.org/Bug/view.php?id=14330
Noted TODO to revisit if that bug gets fixed.

Noted TODO in master branch to show this warning only the first time a
suitable cached variable is set.

Change-Id: I403896505b178251087d71f95362c3754cd4a2de

10 years agoUn-duplicate gmx_gettime code
Mark Abraham [Wed, 25 Sep 2013 20:29:06 +0000 (22:29 +0200)]
Un-duplicate gmx_gettime code

Change-Id: I564e6445b27e152feec0da8e98f8d990b8734875

10 years agoMerge "Merge branch release-4-6"
Teemu Murtola [Thu, 26 Sep 2013 19:00:11 +0000 (21:00 +0200)]
Merge "Merge branch release-4-6"

10 years agoMerge branch release-4-6
Mark Abraham [Wed, 25 Sep 2013 09:16:18 +0000 (11:16 +0200)]
Merge branch release-4-6

Conflicts:
src/gromacs/gmxlib/bondfree.c
src/gromacs/legacyheaders/bondf.h
src/gromacs/legacyheaders/pme.h
src/gromacs/mdlib/pme.c
src/programs/mdrun/runner.c

Conflicts all resolved in favour of release-4-6 branch,
except where the master-branch removal of unused parameters
was correct.

Change-Id: Ib32a52b97b5443b86b4f0e4d575767990dc6c47e

10 years agog_tune_pme: Clean up -Wunused-parameter warnings
Alexey Shvetsov [Thu, 26 Sep 2013 07:50:02 +0000 (11:50 +0400)]
g_tune_pme: Clean up -Wunused-parameter warnings

Change-Id: Ib46eae156dbb693b013657a017a729888b4ba286
Signed-off-by: Alexey Shvetsov <alexxy@omrb.pnpi.spb.ru>
10 years agoMade MW of the Vsite particle type.
David van der Spoel [Wed, 25 Sep 2013 12:00:31 +0000 (14:00 +0200)]
Made MW of the Vsite particle type.

grompp checks whether particles that are not shells or vsites have
a positive mass. Since MW is used in TIP4P etc. as a massless particle
it should have the appropriate particle type.

Change-Id: I45d0af3230949be8b07a45d131bc10d9d39d945e

10 years agoprograms: clean up -Wunused-parameter warnings
Alexey Shvetsov [Thu, 25 Jul 2013 23:31:25 +0000 (03:31 +0400)]
programs: clean up -Wunused-parameter warnings

Clean up rest of warnings in programs

Change-Id: Ieed9d732e893eb5cfb14af9d8367bae7c7976f13
Signed-off-by: Alexey Shvetsov <alexxy@omrb.pnpi.spb.ru>
10 years agoRemove mdrun -ionize feature
Mark Abraham [Tue, 17 Sep 2013 06:58:53 +0000 (08:58 +0200)]
Remove mdrun -ionize feature

Refs #1292

Change-Id: Ic3b8bf33265304f903fcba749fe41d4f00386d1d

10 years agoRemove General Coupling Theory stuff
Mark Abraham [Tue, 17 Sep 2013 06:47:28 +0000 (08:47 +0200)]
Remove General Coupling Theory stuff

Also update mdp_opt.html and src/contrib to no longer refer to
defunct xmdrun machinery. This commit will prevent compilation of
src/contrib/prfn.c, but that is slated for removal in I842a92ec41.

Refs #1292

Change-Id: I8e06d3395787545ae5aba5334acfc57b7d8683c3

10 years agothread_mpi: Clean up -Wunused-parameter warnings.
Teemu Murtola [Wed, 25 Sep 2013 18:14:30 +0000 (21:14 +0300)]
thread_mpi: Clean up -Wunused-parameter warnings.

Clean up rest of thread_mpi warnings.
Also clean up some whitespace in thread_mpi.

Change-Id: I02c15ac5f1f402e6d04cd120292f5dd6748e89af

10 years agoCMake helper for dependent cache variables.
Teemu Murtola [Fri, 24 May 2013 15:16:41 +0000 (18:16 +0300)]
CMake helper for dependent cache variables.

Added somewhat extended version of cmake_dependent_option() and used
that for declaring cache variables that are only used if some condition
is satisfied.  Again, not a big change in functionality, but makes
things work more uniformly, and makes it easier to add such options and
not need to think how to implement all the details.

Some dependent options remain that are not yet using the new macros.

Change-Id: I72f4bd19d24c06475bc7f55b6bd561381e5776aa

10 years agoFix bug in (long) neighborlist SIMD padding when adding to previous list
Erik Lindahl [Tue, 24 Sep 2013 22:28:29 +0000 (00:28 +0200)]
Fix bug in (long) neighborlist SIMD padding when adding to previous list

Gromacs-4.6 introduced SIMD padding in the neighborlists, which works
fine for normal simulations. However, when the neighborlist gets long
and we end up adding a second batch of particles we need to remove the
previous padding, which was not done until now. This will typically only
occur when the list per node is large, e.g. when using long cutoffs
(>2nm) with only a single core. Normal simulations should not have been
affected by it (which is also why we did not find it until now).

Fixes #1341.

Change-Id: Ie64ab6c0313a8dc0d3545a5e7d610f24adae4438

10 years agooptimized generic SIMD invsqrt
Berk Hess [Wed, 18 Sep 2013 15:39:00 +0000 (17:39 +0200)]
optimized generic SIMD invsqrt

The function gmx_invsqrt_pr now uses one instruction less when
FMA is not supported in hardware.
Fixes #1333

Change-Id: Idace7296b88a8ecc0331e22d5bb3088753c478de

10 years agoRemove old generated HTML files.
Teemu Murtola [Wed, 11 Sep 2013 03:52:08 +0000 (06:52 +0300)]
Remove old generated HTML files.

Related to #1242.

Change-Id: Ic641c8ee09325d5abf124a94ed2a1c1b525cda31

10 years agoRemove src/contrib/prfn.c and related code.
Teemu Murtola [Tue, 17 Sep 2013 17:53:03 +0000 (20:53 +0300)]
Remove src/contrib/prfn.c and related code.

The generated file list hadn't probably been updated in more than a
decade.  It this is necessary at some point, it's easier to reimplement
it at that time than to keep it hanging around now.

Change-Id: I842a92ec416bc5232e54fa8567d540c7af751c24

10 years agoMerge "Merge branch 'release-4-6'"
Teemu Murtola [Mon, 23 Sep 2013 18:20:24 +0000 (20:20 +0200)]
Merge "Merge branch 'release-4-6'"

10 years agoRemove obsolete tools.
Teemu Murtola [Mon, 23 Sep 2013 03:52:31 +0000 (06:52 +0300)]
Remove obsolete tools.

If the user runs one of these tools, print a message directing them to a
wiki page with information about replacements.

Change-Id: I6d213cb28b77de3acd5bb7b66145dea16cb4d833

10 years agofixed multiple distance restraints with OpenMP
Berk Hess [Wed, 7 Aug 2013 15:33:25 +0000 (17:33 +0200)]
fixed multiple distance restraints with OpenMP

Distance restraints with multiple pairs (the same label) are no
longer split over multiple OpenMP threads. Some (beneficial)
reorganization of the bonded thread division was required to do this,
most importantly: removed calc_one_bond_foreign.
Fixes #1316

Change-Id: I88d8eafede5cbc26c19026a9272639e652f7abd7

10 years agoCMake helper for multichoice options.
Teemu Murtola [Fri, 24 May 2013 09:46:20 +0000 (12:46 +0300)]
CMake helper for multichoice options.

Add a helper routine to create CMake input options with multiple
choices.  In addition to creating the cache variable, it does
case-insensitive checking of user input, and transforms the input to
uppercase.  It also automatically adds the list of allowed values to the
description and to the error message if the input is not valid.

Doesn't change the behavior much (except for CMake GUI that may honor
the STRINGS property; it appears ccmake doesn't), but makes the code
easier to maintain: changing the list of values in one place propagates
everywhere except to the actual logic of using the variable, and the
code behaves more uniformly for all of these values.

Change-Id: Ic8f674e5ac29c19bac7c846b1970689f71dc2384

10 years agoMoved ngmx to C++, renamed it to view.
David van der Spoel [Sat, 31 Aug 2013 12:44:53 +0000 (14:44 +0200)]
Moved ngmx to C++, renamed it to view.

Part of #673
Moved all files to src/programs/view and made executable
part of the gmx binary as "gmx view".
Removed warnings.
Replacing min and max by std::min and std::max.
Removed warning in asize macro.
Changed typedef enums to C++ enums.
Changed gmx_bool to bool.
Removed g_showcol, g_xrama, xstat, test_ngmx_dialog

Change-Id: I88fc541e27705c498703006f461dd2b9b1e6a3f5

10 years agoRemove repeat sfree(state->nosehoover_xi)
Mark Abraham [Thu, 19 Sep 2013 16:28:21 +0000 (18:28 +0200)]
Remove repeat sfree(state->nosehoover_xi)

I2acb48b829c introduced a repeat sfree of nosehoover_xi,
this patch removes the old one. As reported by Christian Wennberg.

Change-Id: Ifef1096f23c595873ae7a35f0fad688783ab1ed8

10 years agoMerge branch 'release-4-6'
Mark Abraham [Fri, 20 Sep 2013 12:35:43 +0000 (14:35 +0200)]
Merge branch 'release-4-6'

Conflicts:
src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_simd_2xnn.c
src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_simd_2xnn.h
src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_simd_2xnn_includes.h
src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_simd_2xnn_inner.h
src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_simd_2xnn_outer.h
src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_simd_4xn.c
src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_simd_4xn.h
src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_simd_4xn_includes.h
src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_simd_4xn_inner.h
src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_simd_4xn_outer.h
src/mdlib/CMakeLists.txt
src/mdlib/nbnxn_kernels/nbnxn_kernel_simd_2xnn.c
src/mdlib/nbnxn_kernels/nbnxn_kernel_simd_2xnn_inner.h
src/mdlib/nbnxn_kernels/nbnxn_kernel_simd_2xnn_outer.h
src/mdlib/nbnxn_kernels/nbnxn_kernel_simd_4xn.c
src/mdlib/nbnxn_kernels/nbnxn_kernel_simd_4xn_inner.h
src/mdlib/nbnxn_kernels/nbnxn_kernel_simd_4xn_outer.h
src/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_simd_2xnn.c
src/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_simd_2xnn_inner.h
src/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_simd_2xnn_outer.h
src/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_simd_4xn.c
src/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_simd_4xn_inner.h
src/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_simd_4xn_outer.h
All resolved in favour of release-4-6, per I0da1faf351def

There was no merge conflict in
src/gromacs/gmxlib/nonbonded/nb_free_energy.c, but Ic7ba3cc26be and
Ia8202ee90 had duplicated the same clean-up of doubly assigned
variables (e.g. Vc), but in different ways. The version in Ia8202ee90
has been retained.

Change-Id: Ia0ec22b7fc16b2be6817b007e52c8b4832549360

10 years agoDescribed another way g_tune_pme might reasonably fail
Mark Abraham [Sun, 25 Aug 2013 22:28:10 +0000 (00:28 +0200)]
Described another way g_tune_pme might reasonably fail

Change-Id: Ibb75f40a17b81934ae768a57d5e4fb11d07cdc2d

10 years agoFix total time measurement with separate PME nodes
Mark Abraham [Sun, 25 Aug 2013 16:06:16 +0000 (18:06 +0200)]
Fix total time measurement with separate PME nodes

The runtime counter needs to be passed to the PME code so that
PME-only nodes can have their time included in the statistics.

Fixes #1325

Change-Id: I13effaa185b1290e41bdd642c607ff75ab8db929

10 years agoCMake cleanup.
Teemu Murtola [Sun, 28 Jul 2013 04:38:48 +0000 (07:38 +0300)]
CMake cleanup.

- Remove unused config.h defines and some detection code for them.
- master always has a C++ compiler, so remove unnecessary checks for
  CMAKE_CXX_COMPILER_LOADED.
- Remove unused/unnecessary CMake code.
- Some whitespace cleanup.

Change-Id: If24b3fe07b0598bbd69eec55c5aabf5debb7fc89

10 years agoMerge branch 'release-4-6'
Teemu Murtola [Fri, 20 Sep 2013 03:23:30 +0000 (06:23 +0300)]
Merge branch 'release-4-6'

Merged up to the nbnxn kernel split (i.e., left the current last commit
in release-4-6 yet unmerged).

Conflicts:
    CMakeLists.txt
        (master had changed indentation and added code in suffixing that
         was moved in release-4-6)
    src/gromacs/gmxlib/statutil.cpp
        (code changed in 4.6 removed from master)
    src/gromacs/mdlib/expanded.c (took both changes)
Extra changes:
    src/gromacs/mdlib/nbnxn_search.c (added back a cppcheck suppression)

Change-Id: Ib1d95e53d69714404e594de45442b41d48b5c584

10 years agoMake uncrustify.sh more verbose on errors.
Teemu Murtola [Sat, 14 Sep 2013 11:36:37 +0000 (14:36 +0300)]
Make uncrustify.sh more verbose on errors.

Capture the output of uncrustify instead of silencing it, and print it
out if uncrustify fails to run for any reason.

Change-Id: Iaefd89b586feb7e3148ad48a2b0f65d69ca7ac17

10 years agoFixed reading history_t from checkpoint
Mark Abraham [Tue, 30 Apr 2013 15:57:14 +0000 (17:57 +0200)]
Fixed reading history_t from checkpoint

The use of the wrong reading function prevented reading any checkpoint
file with distance restraints, (and probably any with orientation
restraints, too) because the stored lengths of the arrays could not be
read.

Additionally, the way a t_state is allocated on the stack and most of
the GROMACS code base assumes structures have been allocated on the
heap (and set to zero) by snew() makes the problem worse. Noted that
this is evil and must go away some time.

Fixes #1174

Change-Id: Ic8240f80c17272a1499421233689ed4b2c640ba3

10 years agoFixed g_tune_pme assumption that MPI is available
Mark Abraham [Fri, 9 Aug 2013 15:36:02 +0000 (17:36 +0200)]
Fixed g_tune_pme assumption that MPI is available

Refactored function with two distinct parts into two functions. This
makes it easy to call the part that checks that mdrun works only when
that check is necessary. Now g_tune_pme -np 512 -nobench works on
machines like BlueGene/Q where you might only be able to get the MPI
environment via the queuing system. g_tune_pme -nobench should work as
a stand-alone.

Fixes #1319

Change-Id: I7237800a1c67664c9253e5422a7b3f12f4ebd62f

10 years agoUniform code path for writing out console help.
Teemu Murtola [Sun, 8 Sep 2013 17:34:42 +0000 (20:34 +0300)]
Uniform code path for writing out console help.

Now both 'gmx help <module>' and 'gmx <module> -h' trigger exactly the
same code path, making things a lot easier to work with.
Some notable things:
 - Moved the responsibility to parse the -hidden argument into the
   wrapper binary, from where it gets passed down in
   CommandLineHelpContext.  Quite a few files are touched by this.
 - The -h option now causes all other options to the module get ignored.
   g_tune_pme requires some other approach to deal with option
   validation, but even adding a separate command-line option for only
   this purpose is probably better than the multiple code paths that
   were there before this change.
 - Related to the above, the help output could be significantly
   simplified, since it no longer depends on the command-line.
 - Removed the -verbose option that caused the options to be printed
   during a normal run.  Possible to add back if people want it, but it
   simplifies things if it isn't needed.

Related to #685 and #969.

Change-Id: Ibe735711f650eafaecf28ffb1ed92da97dcb81b6

10 years agoFramework for help export from wrapper binary.
Teemu Murtola [Thu, 5 Sep 2013 03:22:08 +0000 (06:22 +0300)]
Framework for help export from wrapper binary.

- Add a separate CommandLineHelpContext.  This class layers extra
  information on top of a HelpWriterContext, specific for command-line
  help export.
- Add a global instance of the above to be able to pass it into
  write_man() through functions unaware of its existence.  Make
  write_man() use the instance if present.
- Add -export option for 'gmx help', and an interface that needs to be
  implemented to export a particular format.

Related to #685 and #969.

Change-Id: Ica16895f8136a09bc5995812c4da5363d097c2b1

10 years agomade free energy PME kernel 40% faster
Berk Hess [Thu, 29 Aug 2013 12:41:39 +0000 (14:41 +0200)]
made free energy PME kernel 40% faster

Also removed double assignments and unused variables.

Change-Id: Ia8202ee90f70da86474cc946707f016d8ad69286

10 years agoRemove forcefield-scan feature
Mark Abraham [Mon, 16 Sep 2013 10:41:21 +0000 (06:41 -0400)]
Remove forcefield-scan feature

Refs #1292

Change-Id: I05d8dec45665d5dc3b72b72d312240abbd2983c7