alexxy/gromacs.git
11 years agoMerge "Fix clang 3.2 warnings."
Roland Schulz [Sat, 28 Jul 2012 21:44:22 +0000 (23:44 +0200)]
Merge "Fix clang 3.2 warnings."

11 years agoFix clang 3.2 warnings.
Teemu Murtola [Fri, 27 Jul 2012 17:39:50 +0000 (20:39 +0300)]
Fix clang 3.2 warnings.

Majority of these were false positives, but the fixes were simple.
Took the simplest route with gtest and edited the source.  We just need
to fix this thing again if/when we update to a newer version if it isn't
fixed upstream.

Change-Id: I5007d26ac9f38c61d5f0258d5bd4ccb7c08f4336

11 years agoMerge remote-tracking branch 'origin/release-4-6' into HEAD
Roland Schulz [Thu, 26 Jul 2012 23:32:43 +0000 (19:32 -0400)]
Merge remote-tracking branch 'origin/release-4-6' into HEAD

Conflicts:
CMakeLists.txt

Change-Id: Icf9d0d92b977e35d42d55f1a077a2cdc8fbad86f

11 years agoMerge changes I33cd59e6,I8a2e539f
Christoph Junghans [Thu, 26 Jul 2012 22:41:06 +0000 (00:41 +0200)]
Merge changes I33cd59e6,I8a2e539f

* changes:
  Draft support for multiple help output formats.
  Improve option initialization in traj. analysis.

11 years agoFix that VMD version check was performed for binary not plugin
Roland Schulz [Tue, 3 Jul 2012 00:05:19 +0000 (20:05 -0400)]
Fix that VMD version check was performed for binary not plugin

Gromacs is not using the VMD binary and thus it is not very
insightful to check the VMD binary version. Also checking the VMD
binary version was potential very slow.
The new code tries to find and load one of the VMD plugins and
check the version of the plugin.

Change-Id: Iba7be9cb742c530ce4edb8963597b8ea467e5520

11 years agoMerge "cmake: allow switch between single and double" into release-4-6
Roland Schulz [Wed, 25 Jul 2012 23:27:56 +0000 (01:27 +0200)]
Merge "cmake: allow switch between single and double" into release-4-6

11 years agoMerge "fix a segfault in sse_mask_init" into release-4-6
Roland Schulz [Wed, 25 Jul 2012 23:24:54 +0000 (01:24 +0200)]
Merge "fix a segfault in sse_mask_init" into release-4-6

11 years agoFix installation rules for man pages: don't install gromacs.7.cmakein
Roland Schulz [Tue, 24 Jul 2012 11:44:07 +0000 (07:44 -0400)]
Fix installation rules for man pages: don't install gromacs.7.cmakein

8c87e60 added gromacs.7.cmakein and didn't add an exclusion rule.

Change to CPackInit.cmake: Removing wrong (incorrect path) and unnessary file in message.

Change-Id: I8fe7436b8164d80ad6db64eb54dc81424cd44e4a

11 years agoAdd default root folder to cpack archives
Roland Schulz [Tue, 24 Jul 2012 11:26:07 +0000 (07:26 -0400)]
Add default root folder to cpack archives

Fixes that source archives had no root folder. If non-default
root folder for binary archives is wanted, this still can be
achived by:
cmake -DGMX_INSTALL_PREFIX={path}/ -DCPACK_INCLUDE_TOPLEVEL_DIRECTORY=0

Fixes #977

Change-Id: Iaf42afd3617873e5c1e5e7cb7c327986efa20fcd

11 years agoMerge remote-tracking branch 'gerrit/release-4-6'
Teemu Murtola [Tue, 24 Jul 2012 04:37:37 +0000 (07:37 +0300)]
Merge remote-tracking branch 'gerrit/release-4-6'

Conflicts:
    src/gromacs/selection/compiler.cpp (resolved in favor of master)

Change-Id: I4d6696dbac8c2cc4dd9fdd1f3b9601bd1856dff0

11 years agoClean up of environment variables
Mark Abraham [Tue, 24 Jul 2012 00:16:27 +0000 (10:16 +1000)]
Clean up of environment variables

In particular, reduce ambiguous usage of "force".

Refs #974

Change-Id: Ia6178ce3392f66451341dd7a4af98312f9e72c0f

11 years agocmake: allow switch between single and double
Christoph Junghans [Thu, 19 Jul 2012 22:34:54 +0000 (16:34 -0600)]
cmake: allow switch between single and double

* only use FFTW_INCLUDE_DIR and FFTW_LIBRARY if user set them
* otherwise do not initialize them
* description will still show up in ccmake as advanced
* fixes #971 (linking error when switching without "make rebuild_cache")

Change-Id: Idfce7d912c3d432f48fd3a7021c8c04d6311569b

11 years agofix a segfault in sse_mask_init
Berk Hess [Tue, 17 Jul 2012 16:50:24 +0000 (10:50 -0600)]
fix a segfault in sse_mask_init

* work array was unaligned in some cases
* fixes #970

Change-Id: I1b474019bf93e6ef6f7cc935aa3f73f2597a91a8

11 years agoMerge "Removed commas from gmx_hbond OpenMP constructs." into release-4-6
Christoph Junghans [Mon, 16 Jul 2012 15:26:35 +0000 (17:26 +0200)]
Merge "Removed commas from gmx_hbond OpenMP constructs." into release-4-6

11 years agoMerge "Enforced rotation: PBC/restart fix" into release-4-6
Christoph Junghans [Mon, 16 Jul 2012 15:25:35 +0000 (17:25 +0200)]
Merge "Enforced rotation: PBC/restart fix" into release-4-6

11 years agoDraft support for multiple help output formats.
Teemu Murtola [Sun, 15 Jul 2012 09:51:07 +0000 (12:51 +0300)]
Draft support for multiple help output formats.

- Added a HelpWriterContext class. An instance is now passed to all
  methods that write help text.  In addition to keeping track of the
  output format, it also allows other context information to be kept
  (e.g., for formatting reasonable cross-references; earlier I had to
  remove those that were in the selection help because static text was
  not appropriate for all situations).
- Moved current output format specific methods to be members of this
  class.
- Adjusted using methods to work as before for console output, but did
  not yet implement any additional output formats.  All methods with
  console-specific code now throw a NotImplementedError to make it easy
  to find them once #969 is decided.

Once there has been some discussion on the markup and output formats
in #969, this approach can be extended to actually implement it.
No matter which of the alternatives is chosen, the parts in this commit
are useful, but the decisions made in #969 affect the direction to which
the implementation should be extended.

Prerequisite for #969.

Change-Id: I33cd59e6f3b5450db99e0e1afba4a2d1b9e30e29

11 years agoTake first description if programs.txt has more than one entry
Roland Schulz [Wed, 11 Jul 2012 19:31:33 +0000 (15:31 -0400)]
Take first description if programs.txt has more than one entry

26bd5f7ac took the last description of programs.txt. I wasn't
aware at the time that programs.txt can have more than one
description for one program. I think this is not a particularly
good to allow more than one description, and then somewhat
arbitrary take the first one. But this is how mknroff.pl behaved
and I don't want to change more then needed at this point.

Change-Id: Ia4fba1b1a66baab8b409fbb3932ee099cec80298

11 years agoMerge "Autogenerate gromacs.7 from programs.txt" into release-4-6
David van der Spoel [Sun, 15 Jul 2012 12:44:04 +0000 (14:44 +0200)]
Merge "Autogenerate gromacs.7 from programs.txt" into release-4-6

11 years agoAdding missing entries in programs.txt
Roland Schulz [Tue, 10 Jul 2012 16:49:32 +0000 (12:49 -0400)]
Adding missing entries in programs.txt

Change-Id: I323524d32f07409c02de6066a24e73fb8a966481

11 years agoRemoved commas from gmx_hbond OpenMP constructs.
Teemu Murtola [Sun, 15 Jul 2012 09:44:39 +0000 (12:44 +0300)]
Removed commas from gmx_hbond OpenMP constructs.

Commas between clauses within #pragma omp caused compilation to fail
with some compilers (e.g., gcc 4.2 on OS X 10.5), even with OpenMP
disabled.

Change-Id: I089d67a6442a745faa3bf5e3be1c779855725a67

11 years agoMerge release-4.5-patches into HEAD
Roland Schulz [Fri, 13 Jul 2012 13:04:58 +0000 (09:04 -0400)]
Merge release-4.5-patches into HEAD

Conflicts:
src/mdlib/mdebin.c
src/mdlib/minimize.c
src/tools/gmx_hbond.c
src/tools/gmx_tune_pme.c

Change-Id: I114f1ab4d58c9ccca0261e8588b61c39feaae874

11 years agoFlat-bottomed position restraints
Jochen Hub [Fri, 22 Jun 2012 15:56:48 +0000 (17:56 +0200)]
Flat-bottomed position restraints

Conflicts:
src/gromacs/gmxlib/bondfree.c
src/gromacs/gmxlib/tpxio.c
src/gromacs/mdlib/sim_util.c

Change-Id: I89feae17d1304bc9acde61c9303e9f9fdd4d04e8

11 years agoImprove option initialization in traj. analysis.
Teemu Murtola [Wed, 11 Jul 2012 08:25:03 +0000 (11:25 +0300)]
Improve option initialization in traj. analysis.

All methods that add options to an options object now take an externally
provided options object.  This both simplifies the calling code,
allowing them to control the lifetime of the objects, as well as the
implementing code, since they no longer need to have an internal options
object just for the purpose of returning it.  With the old interface, it
was also impossible to get a reference to the options object more than
once; with the new, the caller has much more flexibility.

Change-Id: I8a2e539fa5abefe696a26919b8591691a1cccc61

11 years agoExtended g_wham to allow the selection of the pull groups to be applied in WHAM
Jochen Hub [Wed, 20 Jun 2012 18:54:40 +0000 (20:54 +0200)]
Extended g_wham to allow the selection of the pull groups to be applied in WHAM

Also did a lot of minor cleanup and documentation to move to C++.

Change-Id: I4c2ac3bbc9c7d8247d9423997027f1c79761e74b

11 years agoAdding missing entries in programs.txt
Roland Schulz [Tue, 10 Jul 2012 16:32:05 +0000 (12:32 -0400)]
Adding missing entries in programs.txt

Change-Id: I3b7879fc93d9b3a7c5eed5f14825331a12589b25

11 years agoUse relative rpath to support relocatable binary packages
Roland Schulz [Tue, 10 Jul 2012 07:28:24 +0000 (03:28 -0400)]
Use relative rpath to support relocatable binary packages

Change-Id: I7ec8707acf021b0f168691014fb0ba2f68ae29a6

11 years agoMerge remote-tracking branch 'origin/release-4-6' into HEAD
Roland Schulz [Tue, 10 Jul 2012 04:46:15 +0000 (00:46 -0400)]
Merge remote-tracking branch 'origin/release-4-6' into HEAD

Conflicts:
admin/mknroff.pl (deleted)
share/template/CMakeLists.txt (added both)
src/CMakeLists.txt (trivial)
src/gromacs/gmxlib/oenv.cpp (see next)
src/gromacs/gmxlib/statutil.cpp (change moved to
           src/gromacs/utility/programinfo.cpp)
src/kernel/CMakeLists.txt (added gmx_add_man_page
           to programs/*/CMakeLists.txt)
src/kernel/mk_ghat.c (was deleted. no change)
src/ngmx/CMakeLists.txt (trivial)

Change-Id: Ic8c69541f8d801e3b1d32b26e886cf0602c34cf4

11 years agoAllow usage of relative install paths
Roland Schulz [Sun, 8 Jul 2012 16:56:05 +0000 (12:56 -0400)]
Allow usage of relative install paths

Relative install paths is recommended(*) and required by some
cpack generators (e.g. NSIS). Using relative install paths should
always work, but to take no risks the absolute install paths are
still the default.

*) http://www.cmake.org/pipermail/cmake/2008-May/021663.html

Change-Id: Ie656d5fcfa62f9c7e0fee605c90251084a421a72

11 years agoMerge "Fixed bug in sfactor.c that makes g_rdf -sq give wrong results." into release...
Christoph Junghans [Mon, 9 Jul 2012 23:44:01 +0000 (01:44 +0200)]
Merge "Fixed bug in sfactor.c that makes g_rdf -sq give wrong results." into release-4-5-patches

11 years agoFixed bug in sfactor.c that makes g_rdf -sq give wrong results.
Jochen Hub [Mon, 9 Jul 2012 19:46:02 +0000 (21:46 +0200)]
Fixed bug in sfactor.c that makes g_rdf -sq give wrong results.

The number of neutrons is not any more in sfactor.dat, but the
respective sscanf line in sfactor.c has still a placeholder for it.
Consequently, the Cromer-Mann parameter were read incorrectly.

I left the element n (for number of neurons) in gmx_structurefactors_t
for now, but the variable is at present not used.

Fixes Bug #919

Change-Id: I20a78b0b1cf4bf2271ba0ce8c785d900502d7656

11 years agoFix memory error with complex boolean selections.
Teemu Murtola [Fri, 22 Jun 2012 06:25:59 +0000 (09:25 +0300)]
Fix memory error with complex boolean selections.

Backported from dd3a102.

Conflicts:
src/gmxlib/selection/compiler.c

Fixes #968.

Change-Id: If92b5b1eb8cf6b3acb510ba43f64fc82b63ab82a

11 years agoExtension completion for FileNameOption.
Teemu Murtola [Sun, 8 Jul 2012 05:27:43 +0000 (08:27 +0300)]
Extension completion for FileNameOption.

- Make FileNameOption to complete extensions for input files, like the
  old file options did.
- Add descriptions for all file name options to improve the help output.
- Make defaultValueIfSet() really appear in the help output: it worked
  only in the case the option value was not stored.
- Adjust the reference for command-line help tests to match the new
  output.

Part of #642.

Change-Id: I4a749e3e82a42a6e64e0a78c91120f96a00381b9

11 years agoAutogenerate gromacs.7 from programs.txt
Roland Schulz [Sat, 7 Jul 2012 03:25:08 +0000 (23:25 -0400)]
Autogenerate gromacs.7 from programs.txt

Change-Id: I958906dc9967155bccd3f43e5a6882632a829951

11 years agoEnforced rotation: PBC/restart fix
Carsten Kutzner [Fri, 15 Jun 2012 12:43:35 +0000 (14:43 +0200)]
Enforced rotation: PBC/restart fix

... for rot groups consisting of >1 molecule. This commit fixes a problem with checkpoint-restarts
when using a rotation group consisting of more than a single molecule.

Change-Id: I7378047b5cd0909b864a62200ded747682f627a1

11 years agoBetter invalid option value handling.
Teemu Murtola [Thu, 28 Jun 2012 09:04:31 +0000 (12:04 +0300)]
Better invalid option value handling.

- Give an error when trying to give an empty string as a value for a
  numeric option, as well as when the given value overflows/underflows
  the target variable.
- Don't give extra errors (e.g., about too few valid values) when a
  value for an option was invalid.
- Make assignment more atomic: if there was an error in a set of values,
  ignore other values.

Change-Id: I30fd471f6d65246b4215a5ee775f0d16492a21d0

11 years agoMerge "Remove remaining underscore-prefixed C++ symbols."
Roland Schulz [Fri, 6 Jul 2012 10:41:15 +0000 (12:41 +0200)]
Merge "Remove remaining underscore-prefixed C++ symbols."

11 years agoMerge "Set common output directory for binaries"
Roland Schulz [Fri, 6 Jul 2012 10:33:36 +0000 (12:33 +0200)]
Merge "Set common output directory for binaries"

11 years agoRemove remaining underscore-prefixed C++ symbols.
Teemu Murtola [Fri, 6 Jul 2012 05:19:14 +0000 (08:19 +0300)]
Remove remaining underscore-prefixed C++ symbols.

More of the same as in e39fb5f (I7f4bf42e), no manual editing.
The C++ code should now consistently use underscore suffixes instead of
prefixes for member variables.

Change-Id: I94ae31da201cc23d1a0d87e5ec1251b30c085cc0

11 years agoBugfix for the segfault that occurs with g_hbond -hbm -contact.
Erik Marklund [Fri, 6 Jul 2012 07:32:32 +0000 (09:32 +0200)]
Bugfix for the segfault that occurs with g_hbond -hbm -contact.

Fixes #967

Change-Id: I23968ca45683b5867f919bf32e588058bd391c67

11 years agoMerge "Test framework for TrajectoryAnalysisModules."
Teemu Murtola [Fri, 6 Jul 2012 05:10:20 +0000 (07:10 +0200)]
Merge "Test framework for TrajectoryAnalysisModules."

11 years agoTest framework for TrajectoryAnalysisModules.
Teemu Murtola [Wed, 23 May 2012 07:14:50 +0000 (10:14 +0300)]
Test framework for TrajectoryAnalysisModules.

- Add a test fixture that makes it simple to test analysis tools that
  are implemented as TrajectoryAnalysisModule subclasses (moduletest.*).
- Add tests using the new fixture for most of the functionality of the
  Select module.
- Minor adjustment to reference data test fixture to make it more usable
  in this context.
- Move all dataset registration calls to trajectory analysis module
  constructors from initAnalysis().  Also moved static initialization of
  the datasets, in particular calls to setMultipoint().
  In addition to enabling the tests to access the datasets before any
  initialization of the module is done, this also makes the modules
  easier to use for other interfacing than the command-line runner.

Main part of #920, may need some additional features.

Change-Id: I67e123f8361fe7710e936d9b4a880e65a3dc89c5

11 years agoAdding FFT Unit Tests
Roland Schulz [Tue, 5 Jun 2012 01:38:14 +0000 (21:38 -0400)]
Adding FFT Unit Tests

Change-Id: I3de741e6c66ac1e611d78962606253a3c903cbef

11 years agoDon't prevent GMX_PREFER_STATIC_LIBS with BUILD_SHARED_LIBS
Roland Schulz [Thu, 5 Jul 2012 23:08:41 +0000 (19:08 -0400)]
Don't prevent GMX_PREFER_STATIC_LIBS with BUILD_SHARED_LIBS

In general it seems better to not overwrite the user requested
settings unless the settings are not possible.
In this case the combination makes sense for binary packages.
Static external libraries make them easier to distribute and
shared gromacs libraries make them much smaller.

Change-Id: Icb9c4dfa2e7d211ab6bd2efcb2f2437504a87cfe

11 years agoSet common output directory for binaries
Roland Schulz [Tue, 3 Jul 2012 01:49:43 +0000 (21:49 -0400)]
Set common output directory for binaries

This causes all binaries to be placed in "bin" in the build
directory and all libraries in the "lib". This makes it easier
to call binaries without installing.

Change-Id: I9dd7b5bde06b1ff9b0e7e9171854198bb8c1d749

11 years agoMerge "Extract doxygen documentation for static symbols."
Christoph Junghans [Thu, 5 Jul 2012 21:00:15 +0000 (23:00 +0200)]
Merge "Extract doxygen documentation for static symbols."

11 years agoBuild man-pages instead of distributing them in the source
Roland Schulz [Wed, 4 Jul 2012 01:55:29 +0000 (21:55 -0400)]
Build man-pages instead of distributing them in the source

One less thing to do manual for releasing the code. And thus
avoiding to accidental releasing which old version of man-pages.

Writing copyright notice to stderr for all programs (was inconsistent)
and caused copyright notice to be displayed during build.

The CPack source package continues to contain the man pages pre-build.
CPack verifies that they are genenerated before building the source
package.

Added .isreposource to distinquish code obtained from git from code
downloaded as CPack source package.

Related to #645, #854, #735
Fixes #878

Change-Id: I7d7145fb99d3f1991d0f3992ca4f3ea20668dd9a

11 years agoMerge "Improve ProgramInfo and use it everywhere."
David van der Spoel [Thu, 5 Jul 2012 20:13:24 +0000 (22:13 +0200)]
Merge "Improve ProgramInfo and use it everywhere."

11 years agoExtract doxygen documentation for static symbols.
Teemu Murtola [Sat, 30 Jun 2012 09:35:16 +0000 (12:35 +0300)]
Extract doxygen documentation for static symbols.

The full doxygen documentation now includes documentation for static
methods.  Fixed warnings from undocumented static methods in documented
files.

Change-Id: Ib77dc8e19882c6b2f4a1a97a4fcab63277aae211

11 years agoMerge "Fix most doxygen warnings."
Christoph Junghans [Thu, 5 Jul 2012 19:53:55 +0000 (21:53 +0200)]
Merge "Fix most doxygen warnings."

11 years agoMerge "Don't rerun checks and be quiet 2nd time cmake is run" into release-4-6
Christoph Junghans [Thu, 5 Jul 2012 19:45:36 +0000 (21:45 +0200)]
Merge "Don't rerun checks and be quiet 2nd time cmake is run" into release-4-6

11 years agoMerge "Allow also FindMPI for cmake<2.8.5" into release-4-6
Christoph Junghans [Thu, 5 Jul 2012 19:42:15 +0000 (21:42 +0200)]
Merge "Allow also FindMPI for cmake<2.8.5" into release-4-6

11 years agoMerge "Finalized and extended Szilard's openMP cleanup of gmx_hbond.c:" into release-4-6
Christoph Junghans [Thu, 5 Jul 2012 19:26:41 +0000 (21:26 +0200)]
Merge "Finalized and extended Szilard's openMP cleanup of gmx_hbond.c:" into release-4-6

11 years agoDon't rerun checks and be quiet 2nd time cmake is run
Roland Schulz [Tue, 26 Jun 2012 19:23:38 +0000 (15:23 -0400)]
Don't rerun checks and be quiet 2nd time cmake is run

Change-Id: I86f8cb4dfb73898e74d320ae8ef3676e62ebde51

11 years agoFinalized and extended Szilard's openMP cleanup of gmx_hbond.c:
Erik Marklund [Thu, 28 Jun 2012 19:02:00 +0000 (21:02 +0200)]
Finalized and extended Szilard's openMP cleanup of gmx_hbond.c:

* Changed HAVE_OPENMP into GMX_OPENMP
* Fixed incorrect use of OpenMP API functions
* Made variables shared by default in parallel sections
  This also avoids problems with stderr being a macro in certain
  implementations, which caused compilation errors on some systems
  when stderr occurs explicitly in pragmas.
* Protected a block where reallocation of hbdata occurs with a critical section
* Cleaned out some output that was commented out anyway.
* Removed redundant preprocessor directives

Change-Id: I452ab2e873434086e6bc616d9d24a8d890147220

11 years agoMerge "Add FindGROMACS.cmake to template's CMakeLists.txt" into release-4-6
Roland Schulz [Wed, 4 Jul 2012 05:18:46 +0000 (07:18 +0200)]
Merge "Add FindGROMACS.cmake to template's CMakeLists.txt" into release-4-6

11 years agoMerge "Fixed bug in free energy calculation for Morse potentials" into release-4-6
Roland Schulz [Wed, 4 Jul 2012 05:16:56 +0000 (07:16 +0200)]
Merge "Fixed bug in free energy calculation for Morse potentials" into release-4-6

11 years agoRemove unused FFT functions
Roland Schulz [Tue, 5 Jun 2012 03:36:01 +0000 (23:36 -0400)]
Remove unused FFT functions

Change-Id: Ic3fd21579f6dcf7e57084c5a9beed4637a8cae6a

11 years agoFix most doxygen warnings.
Teemu Murtola [Fri, 29 Jun 2012 12:07:49 +0000 (15:07 +0300)]
Fix most doxygen warnings.

This makes it much more convenient to work locally with Doxygen.  Even
though Jenkins ignored these warnings, if you ran Doxygen locally, it
produced a long list of warnings in the log file, making it difficult to
spot if new warnings had appeared.

Also improved the Doxygen configuration files to have common settings in
a shared file that is then included from the actual configuration files.

Change-Id: Ic57576e2cb89f6d0e5929981553b48a61435c26c

11 years agoFixes for FFT libraries
Roland Schulz [Mon, 4 Jun 2012 15:56:42 +0000 (11:56 -0400)]
Fixes for FFT libraries

- Updated documentation
- Added gmx_fft_cleanup for any cleanup after using FFT
    (removing memory leak otherwise caused by FFTW)
- Replaced TMPI_THREAD_MUTEX_INITIALIZER with tMPI::mutex
    (otherwise tmpi leaks memory)

Change-Id: If3e9012da14ebf74d87d4d4647c2f17bd8380fc1

11 years agoset default for rcoulomb, rvdw and rlist to -1
Berk Hess [Mon, 2 Jul 2012 17:08:41 +0000 (19:08 +0200)]
set default for rcoulomb, rvdw and rlist to -1

To avoid users using the default values and to force them to think
about the cut-offs, all default values are now -1.
This also avoids grompp notes with the new Verlet scheme,
where the rlist value can be generated automatically.

Change-Id: I99bc7eee76953d06767f9c9916d1c9289badf74f

11 years agoImprove ProgramInfo and use it everywhere.
Teemu Murtola [Mon, 4 Jun 2012 09:03:50 +0000 (12:03 +0300)]
Improve ProgramInfo and use it everywhere.

- The ProgramInfo class now stores the full command line.
  Moved functionality to add quotes to arguments with spaces from
  gmx::test::CommandLine to ProgramInfo.
- ProgramInfo initialization is now protected by a mutex for
  completeness.
- oenv.c and statutil.c now use ProgramInfo internally to store/return
  the binary name and command line.  Removes duplicate implementations
  of this functionality.  Required changing the return values of
  ProgramInfo methods from std::string values to const references.
- Removed many unnecessary #include directives from these two files.
- Fixed warnings that were produced from these files when switching them
  to C++ compilation (one cppcheck warning suppressed for now).
- Add a temporary hack for Windows to try to make get_libdir() work for
  tests that are run through CTest.

Helps with #950.

Change-Id: I1bfd4231b8b7055d0a014b41be67a7c1c99e36b0

11 years agoError/exception handling improvements.
Teemu Murtola [Mon, 4 Jun 2012 05:10:09 +0000 (08:10 +0300)]
Error/exception handling improvements.

- Change formatErrorMessage() to printFatalErrorMessage() that directly
  prints the error message for an exception into a FILE (typically
  stderr) instead of creating a std::string.  This makes it possible to
  handle out-of-memory errors internally within the function.
  The function is much easier to use if we can guarantee that it never
  throws.
- Add basic handling of std::bad_alloc into the above function.
- Resolve clang warnings in the function.
- Add a macro for conveniently catching all exceptions at C++ - C
  boundary and reporting them as fatal errors.
- Initialize ProgramInfo in all C++ binaries.

Related to #838.

Change-Id: I77c355480485f563c57b6c6ea9b07a8ce7f433a8

11 years agoAlways build thread_mpi threading into libgromacs.
Teemu Murtola [Mon, 4 Jun 2012 10:18:04 +0000 (13:18 +0300)]
Always build thread_mpi threading into libgromacs.

This allows using basic thread synchronization primitives without
conditional compilation.
Adjusted the build system to build only the basic thread synchronization
files instead of full thread_mpi if GMX_THREAD_MPI is off.
This required splitting tMPI_Malloc and friends from tmpi_init.c into a
separate file (since tmpi_init.c depends on most other files), and also
moving TMPI_COMM_WORLD to the new file.
Also removed a few unused variables from atomic.h to avoid cppcheck
warnings.

Part of #948.

Change-Id: I3c6bd2cf084acd4a4e881b99a07bc3a4c878727e

11 years agoFixed L-BFGS trajectory output.
Elton Carvalho [Thu, 28 Jun 2012 15:13:03 +0000 (17:13 +0200)]
Fixed L-BFGS trajectory output.

This bug made mdrun ignore nstxout and nstfout when running l_bfgs.
When calling write_traj, MDOF_X|MDOF_F was given as mdof_flags to write
the trajetory, thus ignoring do_x and do_f evaluated on the previous
lines.

Fixes #905.

Change-Id: Id3ff7b090efd23fd28d8c27ea99992d1647f1ed6

11 years agoMerge "Minor formatting and consistency changes to txtdump.c" into release-4-6
Szilárd Páll [Tue, 3 Jul 2012 09:35:35 +0000 (11:35 +0200)]
Merge "Minor formatting and consistency changes to txtdump.c" into release-4-6

11 years agoDo not print disabled pressures and virials
Christoph Junghans [Mon, 2 Jul 2012 20:20:10 +0000 (14:20 -0600)]
Do not print disabled pressures and virials

* For some methods pressure and virial calculation is disabled
* md.bVir and md.bPress was added in
d870cd31bee97e277f48ba982da85303bce98611
* At this point only AdResS has md.bVir=md.bPress=FALSE

Change-Id: I6abe24a5c286d20dcf554831ade9540674df9d77

11 years agoFixed bug in free energy calculation for Morse potentials
David van der Spoel [Sat, 30 Jun 2012 13:18:31 +0000 (15:18 +0200)]
Fixed bug in free energy calculation for Morse potentials

Introduced recently when FEP was added to the Morse potential.

Change-Id: I90edfd13835637c872af31f2c7abf900ce8a8e5f

11 years agoAdd FindGROMACS.cmake to template's CMakeLists.txt
Christoph Junghans [Fri, 29 Jun 2012 20:18:17 +0000 (14:18 -0600)]
Add FindGROMACS.cmake to template's CMakeLists.txt

Change-Id: Id5adec8aa057f1d56021b06aaedd35dab108ead7

11 years agoMinor formatting and consistency changes to txtdump.c
Michael Shirts [Fri, 29 Jun 2012 17:35:59 +0000 (11:35 -0600)]
Minor formatting and consistency changes to txtdump.c

Change-Id: I2992a927ccf49b407fa985eb2283c37818bbd2a5

11 years agoCorrected checkpoint version issues with free energy changes.
Michael Shirts [Fri, 29 Jun 2012 17:28:37 +0000 (11:28 -0600)]
Corrected checkpoint version issues with free energy changes.

Change-Id: If9494aa0bdbd6f83cc2a8a57a5c7e399aaa787f4

11 years agoMerge "Fixed adress kernel for double precision" into release-4-6
Sebastian Fritsch [Fri, 29 Jun 2012 10:05:18 +0000 (12:05 +0200)]
Merge "Fixed adress kernel for double precision" into release-4-6

11 years agoFixed adress kernel for double precision
Christoph Junghans [Thu, 28 Jun 2012 17:27:58 +0000 (11:27 -0600)]
Fixed adress kernel for double precision

Change-Id: I5145ced14d59f7186dd8ef47fe6877fe00cbd94b

11 years agoAllow also FindMPI for cmake<2.8.5
Roland Schulz [Thu, 28 Jun 2012 16:29:02 +0000 (12:29 -0400)]
Allow also FindMPI for cmake<2.8.5

Using FindMPI instead of mpi-wrapper makes it easier to compile
with CUDA. While FindMPI of cmake<2.8.5 is unreliable it depends
on the OS whether it works. With this change FindMPI is attemted
if no mpi wrapper is used and if it fails, mpi-wrapper or cmake
upgrade is recommended.

Change-Id: I20c0ac3958724feecaaef5c20279d340ecca4b1a

11 years agoMerge "Fix MPI build for MPI library without mpi wrapper" into release-4-6
Christoph Junghans [Thu, 28 Jun 2012 16:22:44 +0000 (18:22 +0200)]
Merge "Fix MPI build for MPI library without mpi wrapper" into release-4-6

11 years agoRemove more underscore-prefixed C++ symbols.
Teemu Murtola [Thu, 28 Jun 2012 04:34:52 +0000 (07:34 +0300)]
Remove more underscore-prefixed C++ symbols.

More of the same as in e39fb5f (I7f4bf42e), no manual editing this time.
Now only trajectoryanalysis/modules/ contains these, will change that
separately as doing it here would create conflicts with I67e123f8.

Change-Id: Ic730a5f906b365212cd20da7b27d9c7b79316053

11 years agoFix MPI build for MPI library without mpi wrapper
Roland Schulz [Wed, 27 Jun 2012 07:31:12 +0000 (03:31 -0400)]
Fix MPI build for MPI library without mpi wrapper

Some MPI library (e.g. MPICH and OpenMPI on Windows) don't
contain any MPI wrappers and thus 417d0afff broke the support for
those MPI libraries.

This change uses the FindMPI module if the compiler is not a
mpi wrapper and cmake >= 2.8.5. Requiring mpi wrappers for
cmake < 2.8.5 avoids reintroducing the problems of #851.

To avoid any confusion of different behavior with older and newer
versions of cmake, all documentation should recommend the mpi wrapper
approach, which works for all versions. The FindMPI approach should
only be discussed for advanced users (to support e.g. Windows).

As a side effect this change makes it more convinient to use with
cmake>=2.8.5. No need to speciy mpi wrapper and less problems with
nvcc.

Fixes #958

Change-Id: Ic53d8125c5a58edc6789fe16f2b710e7e2568d4f

11 years agofixes typo gmx_omp introduced by 697bcdc
Szilard Pall [Tue, 26 Jun 2012 11:30:59 +0000 (13:30 +0200)]
fixes typo gmx_omp introduced by 697bcdc

Also removes an unnecessary include and replaces a few remaining
HAVE_OPENMP-s with GMX_OPENMP.

Change-Id: I8a92a5f1849d170951719b29b17e0ec6134ee556

11 years agoMerge "Make C++11 test quiet after the first cmake run."
Christoph Junghans [Wed, 27 Jun 2012 16:27:14 +0000 (18:27 +0200)]
Merge "Make C++11 test quiet after the first cmake run."

11 years agoMerge "Use VERSION_LESS in the version detection code."
Christoph Junghans [Wed, 27 Jun 2012 16:13:45 +0000 (18:13 +0200)]
Merge "Use VERSION_LESS in the version detection code."

11 years agoUse VERSION_LESS in the version detection code.
Teemu Murtola [Wed, 27 Jun 2012 05:44:24 +0000 (08:44 +0300)]
Use VERSION_LESS in the version detection code.

There was a comment in the cmake script that suggested this, and it is
already used elsewhere in the cmake code.

Change-Id: Ic63c52510d37b864f2f39c8bc2f3806783405cc2

11 years agoFix for boost version check added by 6b4c9bc
Roland Schulz [Tue, 26 Jun 2012 20:40:01 +0000 (16:40 -0400)]
Fix for boost version check added by 6b4c9bc

Change-Id: I96fdece894d0e0c767aee156f5e00016bf14a0e1

11 years agoUpdate CPack package version.
Teemu Murtola [Tue, 26 Jun 2012 19:27:58 +0000 (22:27 +0300)]
Update CPack package version.

Updated also the CPack package version to 5.0.

Change-Id: I7ba4af3fb697527e5007c5bc09df8543e5f371d5

11 years agoMake C++11 test quiet after the first cmake run.
Teemu Murtola [Tue, 26 Jun 2012 19:46:44 +0000 (22:46 +0300)]
Make C++11 test quiet after the first cmake run.

Change-Id: I08b03aad4980d748d67acc6cc48150afea6f6deb

11 years agoMerge "Make sure that found Boost version is new enough"
Roland Schulz [Tue, 26 Jun 2012 19:35:32 +0000 (21:35 +0200)]
Merge "Make sure that found Boost version is new enough"

11 years agoFix that rerunning cmake gives the same result as 1st run
Roland Schulz [Tue, 26 Jun 2012 18:50:55 +0000 (14:50 -0400)]
Fix that rerunning cmake gives the same result as 1st run

- SetBuildInformation: strip was missing for 3 of 6 CPU_* variables
  Not sure why this caused only for the first run an extra newline.
  Extra newline doesn't change the build but causes unnessray
  complete rebuild.
- IsFinite: The cached value of whether one of the 3 isfinite
  function was found wasn't set the 2nd time. Thus after reruninng
  cmake the isfinite function wasn't used anymore.

Change-Id: I988763e6b26cc5bae62c4da66cc7b30f2f93c128

11 years agoMerge "Merge remote-tracking branch 'origin/release-4-6'"
Teemu Murtola [Tue, 26 Jun 2012 13:47:13 +0000 (15:47 +0200)]
Merge "Merge remote-tracking branch 'origin/release-4-6'"

11 years agoMake sure that found Boost version is new enough
Roland Schulz [Mon, 25 Jun 2012 21:57:39 +0000 (17:57 -0400)]
Make sure that found Boost version is new enough

FindBoost only checks the first time cmake is run that the
available boost version is at least the required boost version.
If Boost_INCLUDE_DIR is already set from a prior cmake run,
the version isn't checked again. And thus it tries to use the
older external version.

Change-Id: I9897b49c895bb0263d7013b74afb54b921d077d6

11 years agoMerge "Fix gmx_fatal for serial compilation" into release-4-6
Roland Schulz [Tue, 26 Jun 2012 01:32:58 +0000 (03:32 +0200)]
Merge "Fix gmx_fatal for serial compilation" into release-4-6

11 years agoMerge "Merge remote-tracking branch 'gerrit/release-4-6'"
Christoph Junghans [Tue, 26 Jun 2012 00:08:14 +0000 (02:08 +0200)]
Merge "Merge remote-tracking branch 'gerrit/release-4-6'"

11 years agointroduce gmx_omp wrapper for the OpenMP API
Szilard Pall [Fri, 15 Jun 2012 15:03:41 +0000 (17:03 +0200)]
introduce gmx_omp wrapper for the OpenMP API

The gmx_omp_* OpenMP API wrappers should be used instead of directly
calling OpenMP functions. Therefore, gmx_omp.h should be included
instead of omp.h so OpenMP API functions don't need #ifdef-ing.

Additionally, moved GMX_OPENMP from command-line define to config.h.

Change-Id: If30f433946fef908c26a29f1bff3671580e90629

11 years agofixed segv/hang with EM and foreign lambda values
Berk Hess [Mon, 25 Jun 2012 09:39:03 +0000 (11:39 +0200)]
fixed segv/hang with EM and foreign lambda values

Energy minimization with nstcalcenergy=-1, foreign lambda values
and no separate dhdl.xvg output file called malloc with negative count.
Fixes #962

Change-Id: I3d6b636ddba80fc2ae400590c48642c217325293

11 years agoadded check for log fp!=NULL when disabling acceleration
Berk Hess [Mon, 25 Jun 2012 08:03:11 +0000 (10:03 +0200)]
added check for log fp!=NULL when disabling acceleration

Change-Id: I79d16574b6c4cb039afa01240e7d3aa816b3f337

11 years agoMerge "Remove MPI define for FAH" into release-4-6
Christoph Junghans [Sun, 24 Jun 2012 20:26:37 +0000 (22:26 +0200)]
Merge "Remove MPI define for FAH" into release-4-6

11 years agoMerge remote-tracking branch 'origin/release-4-6'
Roland Schulz [Sun, 24 Jun 2012 17:35:21 +0000 (13:35 -0400)]
Merge remote-tracking branch 'origin/release-4-6'

Change-Id: I0c181ad8eb86d0cd130ea27b0cd896f5db581ab5

11 years agoMerge "Fix mdp_opt formatting of expanded ensemble" into release-4-6
Michael Shirts [Sun, 24 Jun 2012 17:27:15 +0000 (19:27 +0200)]
Merge "Fix mdp_opt formatting of expanded ensemble" into release-4-6

11 years agoMerge remote-tracking branch 'gerrit/release-4-6'
Teemu Murtola [Sun, 24 Jun 2012 17:00:12 +0000 (13:00 -0400)]
Merge remote-tracking branch 'gerrit/release-4-6'

Moved files added to include/ to src/gromacs/legacyheaders/ and
files added to src/gmxlib/ to src/gromacs/gmxlib/.

Conflicts:
    CMakeLists.txt
    src/config.h.cmakein

Conflicts for files removed from master:
    cmake/gmxTestInlineASM.cmake (resurrected)
    cmake/TestInlineASM_gcc_x86.c (no conflict, resurrected)
    src/gmxlib/CMakeLists.txt
        (changes applied to src/gromacs/CMakeLists.txt and
        src/gromacs/gmxlib/CMakeLists.txt)

Conflicts for files removed from release-4-6:
    src/gromacs/gmxlib/nonbonded/nb_kernel_ia32_sse/*
    src/gromacs/gmxlib/nonbonded/nb_kernel_ia32_sse2/*
    src/gromacs/gmxlib/nonbonded/nb_kernel_ia64_double/*
    src/gromacs/gmxlib/nonbonded/nb_kernel_ia64_single/*
    src/gromacs/gmxlib/nonbonded/nb_kernel_ppc_altivec/*
    src/gromacs/gmxlib/nonbonded/nb_kernel_x86_64_sse/*
    src/gromacs/gmxlib/nonbonded/nb_kernel_x86_64_sse2/*
    src/gromacs/legacyheaders/gmx_sse2_double.h
    src/gromacs/legacyheaders/gmx_sse2_single.h

Change-Id: I6202a89a802a8fd3e1788df95eac408cf60f3456

11 years agoFix mdp_opt formatting of expanded ensemble
Roland Schulz [Sun, 24 Jun 2012 15:07:04 +0000 (11:07 -0400)]
Fix mdp_opt formatting of expanded ensemble

Was introduced with c7a82654f2e. Broke the build of the manual
because dl tag wasn't closed.

Change-Id: I86afd4a2bdc638fb910cb0afa827b3f56447bb36

11 years agoRemove MPI define for FAH
Roland Schulz [Sun, 24 Jun 2012 05:11:58 +0000 (01:11 -0400)]
Remove MPI define for FAH

FAH will use with 4.6 the standard GMX_MPI define instead of MPI.
This removes problems with C++ compile.

This fixes #849 and is related to #853.

Change-Id: I63bfc14400cda096350aba9a94a676e9c0952d56

11 years agoFix illegal usage of MPI_Comm_create
Roland Schulz [Thu, 21 Jun 2012 16:28:36 +0000 (12:28 -0400)]
Fix illegal usage of MPI_Comm_create

Bug was introduced by 8cd25f0d45567
Illegal to call MPI_Comm_create with different group arguments

Change-Id: Ia70f81862fa50b03ab127e8796226369f6732942

11 years agoMerge "Simple patch for openmm_wrapper.cpp" into release-4-6
Christoph Junghans [Fri, 22 Jun 2012 21:04:20 +0000 (23:04 +0200)]
Merge "Simple patch for openmm_wrapper.cpp" into release-4-6