alexxy/gromacs.git
12 years agoMerge release-4-6 into master
Roland Schulz [Sun, 3 Jun 2012 15:45:26 +0000 (11:45 -0400)]
Merge release-4-6 into master

Conflicts:
src/mdlib/CMakeLists.txt
          change applied to src/gromacs/mdlib/CMakeLists.txt
src/tools/gmx_tune_pme.c
  trivial conflict

Moved:
src/mdlib/fftpack.c & src/mdlib/fftpack.h to src/external/fftpack

Fixed paths in COPYING-OTHER and added boost and gtest/gmock.

Moved the copyright header and list of modifications from fftpack.c into
new README file. Reduces modifications to original file.

Fixed header location in src/gromacs/mdlib/gmx_fft_fftpack.c.

Added macros.h to g_tune_pme (fixing missing min/max)

Change-Id: I9324b1695412e21d16bdcb4d2dc316c53356da5f

12 years agothread_mpi C++11 compatible mutex classes
Sander Pronk [Thu, 31 May 2012 09:58:21 +0000 (11:58 +0200)]
thread_mpi C++11 compatible mutex classes

This brings the master branch thread_mpi up to date, and introduces
a C++11 compatible API for mutexes and lock_guards (found in
thread_mpi/mutex.h).

Partially fixes http://redmine.gromacs.org/issues/948

Change-Id: Ibce48ae10e84bedee9fe641b94a21f6674efcd6b

12 years agoMerge release-4-5-patches into release-4-6
Roland Schulz [Fri, 1 Jun 2012 06:24:10 +0000 (02:24 -0400)]
Merge release-4-5-patches into release-4-6

Changes in 4.5 for removed lines/files in 4.6:
Makefile.am
include/domdec.h
include/domdec_network.h

Trivial conflict:
include/types/commrec.h

Fixed GMX_THREADS into GMX_THREAD_MPI for those added in 4.5 in:
        include/mdrun.h
        src/gmxlib/shift_util.c
        src/mdlib/gmx_fft_fftw3.c

Change-Id: Id37bfbbacc945a7cf184fa21313c05e2680e1fba

12 years agoMerge "Use External BLAS/LAPACK by default" into release-4-6
Christoph Junghans [Fri, 1 Jun 2012 06:04:28 +0000 (08:04 +0200)]
Merge "Use External BLAS/LAPACK by default" into release-4-6

12 years agoMerge "Replace our fftpack version with Numpy's version" into release-4-5-patches
Christoph Junghans [Fri, 1 Jun 2012 05:35:50 +0000 (07:35 +0200)]
Merge "Replace our fftpack version with Numpy's version" into release-4-5-patches

12 years agoReplace our fftpack version with Numpy's version
Roland Schulz [Sun, 27 May 2012 18:07:30 +0000 (14:07 -0400)]
Replace our fftpack version with Numpy's version

Fixes incorrect results for vectors with length of multiples of 12

Fixes #946

Change-Id: I9a110de7334cbb96a72d0ced73ade4d55f665fee

12 years agoMore config.h cleanup.
Teemu Murtola [Thu, 31 May 2012 05:01:18 +0000 (08:01 +0300)]
More config.h cleanup.

Remove defines from config.h for standard types:
 - gid_t, never used.
 - uid_t, added an ifdef around the single use, should always be present
   if getuid() is.
 - off_t, was only used if HAVE_FSEEKO was set.

Also removed the code to check these types from CMake, as well as the
detection code for size_t (define already removed in Icc5bba87).

Change-Id: I2835b0bc0a524a30464230d65a2d873b611ed350

12 years agoMake get_libdir() robust when run from build tree.
Teemu Murtola [Wed, 30 May 2012 09:45:38 +0000 (12:45 +0300)]
Make get_libdir() robust when run from build tree.

get_libdir() now uses the share/top/ directory in the original source
tree if the binary is run from the build tree.  Makes it easier to run
tests.  GMXLIB environment variable can still override this detection.

Change-Id: I74a5d3ba5ff02d68e35ab169b5466d411bad2ae1

12 years agoFix use after free in g_anaeig projection code.
Teemu Murtola [Wed, 30 May 2012 04:18:10 +0000 (07:18 +0300)]
Fix use after free in g_anaeig projection code.

PBC removal structure was deleted immediately after it was initialized,
and used afterwards.

Change-Id: I6126967b34e8de289370dede79cc50a9924ac34d

12 years agoFixed some memory leaks.
Teemu Murtola [Wed, 30 May 2012 04:08:06 +0000 (07:08 +0300)]
Fixed some memory leaks.

- gmx_rmpbc_done() is now symmetric to gmx_rmpbc_init() in that it frees
  also the gmx_rmpbc_t pointer.
- gmx_fio_fclose() frees the memory for the removed t_fileio structure.
- gmxfio functions free t_fileio::fn when they free the structure.

Change-Id: I0d2d667d915109f8a2670aea21326d714ae25adb

12 years agoRemoved dependency on windows.h through commrec.h, domdec.h.
Sander Pronk [Tue, 22 May 2012 15:46:37 +0000 (17:46 +0200)]
Removed dependency on windows.h through commrec.h, domdec.h.

Change-Id: If40506b521a4b4690506465a3f421dab93bc9ce6

12 years agoMerge "Revised g_tune_pme" into release-4-6
Christoph Junghans [Tue, 29 May 2012 16:26:52 +0000 (18:26 +0200)]
Merge "Revised g_tune_pme" into release-4-6

12 years agoImprove 'g_ana help'.
Teemu Murtola [Wed, 16 May 2012 06:51:50 +0000 (09:51 +0300)]
Improve 'g_ana help'.

- 'g_ana help' now internally uses the new online help classes.
  Without any additional arguments, it still prints out the list of
  commands, and now also list of additional help topics.
- 'g_ana help <command>' prints help for the given command (the same as
  'g_ana <command> -h' for the trajectory analysis modules).
- 'g_ana help selections <subtopic>' can be used to access the general
  help for selections.

IssueID #666.

Change-Id: Id34044842b297591923bef242a93b4ae1ae9e14e

12 years agoGeneric handling of online help topics.
Teemu Murtola [Fri, 11 May 2012 18:08:47 +0000 (21:08 +0300)]
Generic handling of online help topics.

- Added a few simple classes for handling a tree of help topics
  (src/gromacs/onlinehelp/).
- Rewrote the selection help to use the new classes. Required changing
  the help parser slightly to pass all requested help topics in a single
  call to _gmx_sel_handle_help_cmd(). Although this changes the usage of
  the help slightly, did not yet update the help texts.
- Added a way to specify the bison and flex binaries to use for
  regenerate_parser.sh (useful, e.g., if multiple versions are
  installed).

Related to #666.

Change-Id: I318fc0fc42e4af39734a5aa65a503582302ecdd8

12 years agoAdditional features to TextTableFormatter.
Teemu Murtola [Mon, 14 May 2012 05:13:40 +0000 (08:13 +0300)]
Additional features to TextTableFormatter.

Add possibility to print out a table without a header (if there are no
column titles) and possibility to indent the whole table.
Use the new features for formatting the list of commands in
CommandLineModuleManager.

IssueID #666

Change-Id: I2d5aaceaf1c5545ff3be215d27ec30df38fbacde

12 years agoSeparated string formatting used only for help.
Teemu Murtola [Sat, 12 May 2012 03:17:30 +0000 (06:17 +0300)]
Separated string formatting used only for help.

Moved string formatting routines used only in help printing to
src/gromacs/onlinehelp/ from src/gromacs/utility/format.*.
Also moved one function from cmdlinehelpwriter.cpp to the new file.
Subsequent commits will add more content to the new directory and will
use the same string formatting routines.

Added NOMINMAX define for Windows to avoid min/max macros.

Related to #666.

Change-Id: I9b52012df2fc718bc3d68c697140661a241a1467

12 years agoReorganize linear algebra code.
Teemu Murtola [Mon, 21 May 2012 08:25:44 +0000 (11:25 +0300)]
Reorganize linear algebra code.

- Moved gmx_arpack.* and internal BLAS/LAPACK implementations to
  src/gromacs/linearalgebra/.
- Moved all routines that directly depend on these to the same dir.
  Also moved integrally related routines (sparsematrix.*, mtxio.*).
- Some reformatting of headers.
- Adjusted Doxygen settings to resolve warnings in these files.
- Adjusted #include statements to make things compile.

With this, the internal BLAS/LAPACK/ARPACK is completely hidden within
libgromacs, and these headers don't need to be installed.  Removes
dependency on F77_FUNC (and hence on config.h) from installed headers.
Also makes it possible to hide the BLAS/LAPACK/ARPACK symbols if
necessary (not done in this change), such that Gromacs compiled with the
internal versions could be linked into a program that uses external
BLAS/LAPACK without symbol conflicts.

Change-Id: I9b2b1ea9832e307a29f5c5038afe1af5504223d9

12 years agoMerge "Continuing to fix threading on Cygwin" into release-4-5-patches
Christoph Junghans [Mon, 28 May 2012 23:25:59 +0000 (01:25 +0200)]
Merge "Continuing to fix threading on Cygwin" into release-4-5-patches

12 years agoMerge "Improve gmx::test::CommandLine."
Christoph Junghans [Mon, 28 May 2012 23:16:08 +0000 (01:16 +0200)]
Merge "Improve gmx::test::CommandLine."

12 years agoMerge "Improve analysisdata reference checks."
Christoph Junghans [Mon, 28 May 2012 23:15:34 +0000 (01:15 +0200)]
Merge "Improve analysisdata reference checks."

12 years agoMerge "Move common test code to testutils."
Christoph Junghans [Mon, 28 May 2012 23:14:41 +0000 (01:14 +0200)]
Merge "Move common test code to testutils."

12 years agoMerge "Simplify selection parsing methods signature."
Christoph Junghans [Mon, 28 May 2012 23:13:04 +0000 (01:13 +0200)]
Merge "Simplify selection parsing methods signature."

12 years agoMerge "Option parsing through SelectionOptionManager."
Christoph Junghans [Mon, 28 May 2012 23:11:55 +0000 (01:11 +0200)]
Merge "Option parsing through SelectionOptionManager."

12 years agoMerge "Simpler required selection input from a file."
Christoph Junghans [Mon, 28 May 2012 23:11:21 +0000 (01:11 +0200)]
Merge "Simpler required selection input from a file."

12 years agoMerge "Split option code away from SelectionCollection."
Christoph Junghans [Mon, 28 May 2012 23:10:44 +0000 (01:10 +0200)]
Merge "Split option code away from SelectionCollection."

12 years agoMerge "Merge release-4-6 (commit 'Ic142a690')"
Christoph Junghans [Mon, 28 May 2012 23:09:14 +0000 (01:09 +0200)]
Merge "Merge release-4-6 (commit 'Ic142a690')"

12 years agoMerge "Fixed 'g_ana select' broken by I8806b3e0."
Christoph Junghans [Mon, 28 May 2012 23:07:58 +0000 (01:07 +0200)]
Merge "Fixed 'g_ana select' broken by I8806b3e0."

12 years agoFix editconf real-bool misusage
Roland Schulz [Sun, 27 May 2012 19:26:24 +0000 (15:26 -0400)]
Fix editconf real-bool misusage

Bool variable was declared as real. Caused invalid stack read
in double precision. Could have caused wrong value to be printed
for argument display but couldn't have caused wrong behavior.

Found with AddressSanitizer

Change-Id: I32553b1a898fb3a7f072ae177518dd63fad56dde

12 years agoMerge release-4-6 (commit 'Ic142a690')
Roland Schulz [Sun, 27 May 2012 16:29:15 +0000 (12:29 -0400)]
Merge release-4-6 (commit 'Ic142a690')

This merges changes more than resolving a conflict.
The reason is that Ic142a690 moved the files to a location
not suitable for master.

molfile_plugin.h, vmddlopen.h, vmdio.h, and vmdplugin.h
were in
- "include" before Ic142a690
- "src/gmxlib" after Ic142a690
- "src/gromacs/legacyheaders" in master

Moved all but vmdio.h to "src/external/vmd_molfile"
Moved vmdio.h to "src/gromacs/gmxlib"

Moved vmddlopen.c (in src/gmxlib or src/gromacs/gmxlib) also to
"src/external/vmd_molfile" (was not moved by Ic142a690).

Removed "#ifdef GMX_USE_PLUGINS" from vmddlopen.c
This makes the files in src/external/vmd_molfile identical to
VMD 1.8.6 besides the Copyright notice.

Instead of the #ifdef, only compile vmdio.c and vmddlopen.c if
GMX_USE_PLUGINS is set (in src/gromacs/gmxlib/CMakeLists.txt)

Trivial conflict in:
src/gromacs/mdlib/pull_rotation.c

Change-Id: If9bda639e4f680c09d785b046fc0382c16688beb

12 years agoMerge "added explicit sqrtf to the float version of norm" into release-4-6
David van der Spoel [Sun, 27 May 2012 08:49:56 +0000 (10:49 +0200)]
Merge "added explicit sqrtf to the float version of norm" into release-4-6

12 years agoFix Clang 3.1 warning
Roland Schulz [Sun, 27 May 2012 02:51:05 +0000 (22:51 -0400)]
Fix Clang 3.1 warning

grid_spacing is an integer and thus it was always set to 0

Change-Id: Id10bccdadef8f2630631d638e94bd27d78774536

12 years agoContinuing to fix threading on Cygwin
Mark Abraham [Fri, 25 May 2012 09:45:09 +0000 (19:45 +1000)]
Continuing to fix threading on Cygwin

Fixes #833

Change-Id: I5d577a149ad18b295559f6d87c24dc42bffd281e

12 years agoMake load_vmd_library static
Roland Schulz [Mon, 21 May 2012 18:21:23 +0000 (14:21 -0400)]
Make load_vmd_library static

Was already used only within the same file

Change-Id: I43276424d51021bc8247c04a3c3647f7fc1565f7

12 years agoMade all vmdio headers private
Roland Schulz [Thu, 17 May 2012 22:23:25 +0000 (18:23 -0400)]
Made all vmdio headers private

- Made vmdio struct in trx a pointer
- No need for vmdio to be in the public API

Change-Id: Ic142a6900d0cbc803e8c24139efbfbc072b46c22

12 years agoMerge "fixed [dd] and [TT] typos in documentation of mdrun and gmx_sans" into release-4-6
Roland Schulz [Fri, 25 May 2012 14:47:21 +0000 (16:47 +0200)]
Merge "fixed [dd] and [TT] typos in documentation of mdrun and gmx_sans" into release-4-6

12 years agoMerge "grompp now retains the order of bonds converted to constraints" into release-4-6
David van der Spoel [Fri, 25 May 2012 14:26:50 +0000 (16:26 +0200)]
Merge "grompp now retains the order of bonds converted to constraints" into release-4-6

12 years agofixed [dd] and [TT] typos in documentation of mdrun and gmx_sans
Martin Hoefling [Fri, 25 May 2012 10:09:07 +0000 (12:09 +0200)]
fixed [dd] and [TT] typos in documentation of mdrun and gmx_sans

Change-Id: Ia51f67b2b056f66072875d2c7a366ae4685bf9d4

12 years agoMerge "Fix Clang 3.1 compile error"
Szilárd Páll [Fri, 25 May 2012 09:00:28 +0000 (11:00 +0200)]
Merge "Fix Clang 3.1 compile error"

12 years agoMerge "Fix that sigaction mask wasn't zeroed" into release-4-6
Christoph Junghans [Fri, 25 May 2012 07:17:48 +0000 (09:17 +0200)]
Merge "Fix that sigaction mask wasn't zeroed" into release-4-6

12 years agoFix Clang 3.1 compile error
Roland Schulz [Thu, 24 May 2012 21:57:34 +0000 (17:57 -0400)]
Fix Clang 3.1 compile error

Change-Id: I3cdfed9168c8ea1b1ca29de0efba071e1f73b9e4

12 years agonow mdrun always initializes MPI
Berk Hess [Wed, 23 May 2012 16:23:12 +0000 (18:23 +0200)]
now mdrun always initializes MPI

MPI was only initialized with more than one process. This required
checks everywhere. Now MPI is also initialized with one process.

Change-Id: I4d0f543d5c1ae5a6136a0ba34f0f83ac27604b14

12 years agoMerge "Code cleanup to avoid name collisions" into release-4-6
Teemu Murtola [Thu, 24 May 2012 17:02:36 +0000 (19:02 +0200)]
Merge "Code cleanup to avoid name collisions" into release-4-6

12 years agoImprove gmx::test::CommandLine.
Teemu Murtola [Thu, 24 May 2012 06:39:42 +0000 (09:39 +0300)]
Improve gmx::test::CommandLine.

- Make the class properly copyable for easier use in tests that need to
  manipulate it.
- Make the class manage its memory using std::vector and prevent memory
  leaks if the argv array is modified outside the class (the internal
  state of the class is still not correctly maintained, though).
- Add methods to append arguments.

Needed for #920, but split from the main change to keep it smaller.

Change-Id: I66ebe9d48936d35bce9e0b4fc1d6246d3d5ec07d

12 years agoImprove analysisdata reference checks.
Teemu Murtola [Thu, 24 May 2012 05:12:46 +0000 (08:12 +0300)]
Improve analysisdata reference checks.

The reference checking for AnalysisData objects now supports more
scenarios with multipoint data, i.e., cases where there are point sets
that do not cover all columns.

Supporting changes:
 - Add a TestReferenceChecker::checkPresent() method that allows to
   assign meaning to absence of a reference data item (and to check for
   that).
 - Split common analysisdata XML stylesheet elements to a separate xsl
   file.
 - Add a script for copying the XML stylesheets to the reference data
   directories for easier maintenance.  Master copies of shared
   stylesheets are now kept in src/testutils/.

Needed for #920, but split from the main change to keep it smaller.

Change-Id: I108c013833052c37a4f2e6c73be6161c0dae1c78

12 years agoMove common test code to testutils.
Teemu Murtola [Tue, 22 May 2012 07:14:35 +0000 (10:14 +0300)]
Move common test code to testutils.

- Move test fixture for AbstractAnalysisData classes from analysisdata/
  to testutils/.
- Some renaming to make file and class names more descriptive.
- Move gmx::test::CommandLine from commandline/ to testutils/.

Prerequisite for #920.

Change-Id: I2d4c8aaf87db03fe6c170856ba5b41eae05c483b

12 years agoRevised g_tune_pme
Carsten Kutzner [Tue, 22 May 2012 08:07:42 +0000 (10:07 +0200)]
Revised g_tune_pme

1. Now, g_tune_pme only duplicates mdrun options where necessary,
options not understood by g_tune_pme are simply passed over to mdrun.
2. Users can now set minimum and maximum Coulomb radius iso scaling
factors for rcoulomb and the Fourier grid.
3. As a result of 1 and 2, some cleanup of the code was possible and
unneeded code was removed.
4. For -npme auto, the tool now derives a reasonable number of PME-
only nodes from the .tpr file settings and tests values around this
number.
Change-Id: I88af5d38a61e0409613f5f3fd4272f7f43823f64

12 years agoFix that sigaction mask wasn't zeroed
Roland Schulz [Wed, 23 May 2012 09:30:50 +0000 (05:30 -0400)]
Fix that sigaction mask wasn't zeroed

Change-Id: I84a1f77e6320538730cc367ed722eadf22046a68

12 years agoCode cleanup to avoid name collisions
Roland Schulz [Wed, 23 May 2012 00:30:08 +0000 (20:30 -0400)]
Code cleanup to avoid name collisions

- Adding missing prepropessor guards
- Renaming functions defined using same name as other function
- Removing unused magic.h

Change-Id: I1375097eb7eced2dafb30222c9986ac24f45fb08

12 years agoUse External BLAS/LAPACK by default
Roland Schulz [Tue, 22 May 2012 21:38:12 +0000 (17:38 -0400)]
Use External BLAS/LAPACK by default

Check if Blas/Lapack is available and only use internal
if it isn't found

Updated FindLAPACK to 2.8.8. and included FindBLAS
so that it works without Fortran enabled.

Change-Id: I6d1df8a03196d9c14436d5b70c731d36b4ddf823

12 years agoadded explicit sqrtf to the float version of norm
Szilard Pall [Mon, 21 May 2012 20:33:11 +0000 (22:33 +0200)]
added explicit sqrtf to the float version of norm

Additionally, as inlining is not a concern nowadays, also cleaned up the
code by using iprod in norm.

Change-Id: Iabc237906380f848e16ed158809bf22b1de9ddd0

12 years agoFixed 'g_ana select' broken by I8806b3e0.
Teemu Murtola [Tue, 22 May 2012 03:36:15 +0000 (06:36 +0300)]
Fixed 'g_ana select' broken by I8806b3e0.

The loop for creating the output for -om is now even simpler and easier
to understand.

Change-Id: If1bb1eb09c40562a90effcfffb4da32de28d0a7a

12 years agogrompp now retains the order of bonds converted to constraints
Berk Hess [Mon, 21 May 2012 17:07:09 +0000 (19:07 +0200)]
grompp now retains the order of bonds converted to constraints

With the constraint mdp option grompp used to write tpr files where
the order of the constraints was reversed with respect to the order
of the bonds. This reordering has been removed.

Change-Id: I094c5001ccad1e80f46b61c4fbcfa400fd5c1e74

12 years agore-introduced fix for real/double issue in gmx_density
Berk Hess [Thu, 17 May 2012 22:07:46 +0000 (00:07 +0200)]
re-introduced fix for real/double issue in gmx_density

The float density histogram could overflow for large data sets.
A fix replaced 3 of the 4 pointers to floats by pointers to doubles, leading
to compilation issues. In two steps these replacements were reverted.
Now all 4 pointers have been replaced.

Change-Id: I0d8e38d27ac5c469480ff731ad191d869f5d890f

12 years agoRemove unused defines from config.h, part 3.
Teemu Murtola [Sun, 20 May 2012 18:33:01 +0000 (21:33 +0300)]
Remove unused defines from config.h, part 3.

- C89 defines size_t in stddef.h, even for free-standing
  implementations, we probably don't need to define our own fallback
  (and it probably doesn't work in any case).
- F77_FUNC_, the underscored version is not used anywhere.  Left it's
  definition in CMakeLists.txt as commented.
- TMPI_WINDOWS_NUMA_API, not used in source files nor in CMake.
- HAVE_LIBM and GMX_LARGEFILES, not used in any source file.
- HAVE_?MMINTRIN_H, not used anywhere.
- restrict, not used anywhere, and the check was broken.

Change-Id: Icc5bba87973c7a086a01be486a5785faee4c5cad

12 years agoRemove unused defines from config.h, part 2.
Teemu Murtola [Sun, 20 May 2012 05:40:38 +0000 (08:40 +0300)]
Remove unused defines from config.h, part 2.

Remove defines that were detected in CMake, but never used, not within
the source files nor within CMake.  Some more of this type remain, but
these seem clear.
Also removed TestRetSigType.c, since the related test is already gone.

Change-Id: I219f9d571b9da06844745a735de631d7c3dc33f9

12 years agoRemove unused defines from config.h, part 1.
Teemu Murtola [Sun, 20 May 2012 05:23:56 +0000 (08:23 +0300)]
Remove unused defines from config.h, part 1.

Removed defines that were never used, and neither were they set in
CMake.  Also removed CPLUSPLUS, since it is not used.

Change-Id: I5b1ec59c2cff594a1ff48ff4c888cae84ee9280e

12 years agoSimplify selection parsing methods signature.
Teemu Murtola [Sat, 19 May 2012 06:29:04 +0000 (09:29 +0300)]
Simplify selection parsing methods signature.

Selection parsing methods in SelectionCollection now return the list of
parsed selections instead of using an output variable.  This makes it
more obvious from the signature alone how the methods should be used.
Also, the ability to append to an existing vector was not used in any
code currently (except in tests), and the code to do that with the new
signature is still simple.

Change-Id: I344e4c15367e956b4294d18f56f4da34ccf42e27

12 years agoOption parsing through SelectionOptionManager.
Teemu Murtola [Sat, 19 May 2012 04:58:34 +0000 (07:58 +0300)]
Option parsing through SelectionOptionManager.

Make the rest of interaction between selection option implementation and
SelectionCollection go through SelectionOptionManager, i.e., make
SelectionOptionStorage::convertValue() call a method in
SelectionOptionManager instead of exposing the SelectionCollection
directly.  Cleans up the design a bit.  Also some include clean-up.

Change-Id: I60208a6de4c0f1dd5f89e7728f1e4ce4663c8c7b

12 years agoSimpler required selection input from a file.
Teemu Murtola [Fri, 18 May 2012 18:59:56 +0000 (21:59 +0300)]
Simpler required selection input from a file.

Now a selection file option (-sf) assigns the contents of the file to
required selection option(s) that haven't yet been assigned if it has no
other context.  Main benefit is that a plain '-sf file.dat' (without any
other selection options specified) assigns the contents of file.dat to
required selections, similarly to how it worked in 4.5.

Resolves the main open issue for #656, error message and help
improvements remain.

Change-Id: I6311b548ab21ecf0f489f2743e2750411f86b3ff

12 years agoSplit option code away from SelectionCollection.
Teemu Murtola [Fri, 18 May 2012 08:32:56 +0000 (11:32 +0300)]
Split option code away from SelectionCollection.

Move code required for selection option implementation from
SelectionCollection to a separate SelectionOptionManager class.
Simplified the selection request handling code in the process, but
otherwise this commit mainly moves code around without changing any
functionality (except for small changes required to use the new class
in code using the selections).

This makes the responsibilities in the code clearer, since
SelectionCollection is now completely independent of any options
implementation.  It also simplifies the involved classes, since
the options handling (which will become even more involved with #656)
no longer complicates the core of the selection module.

Related to #656.

Change-Id: Iac24a2f9392c8cc2421edef3f212ddb462e864b3

12 years agoMerge remote-tracking branch 'origin/release-4-6'
Roland Schulz [Fri, 18 May 2012 01:00:16 +0000 (21:00 -0400)]
Merge remote-tracking branch 'origin/release-4-6'

Conflicts:
include/membed.h
src/gromacs/legacyheaders/membed.h
src/kernel/membed.h

All 3 conflicts old names. Renamed to src/programs/mdrun/membed.h
with content of src/kernel/membed.h from 4.6

Change-Id: I64654ce18162fa7887f17a7c565bc5783c3a1238

12 years agoRename BOOL to EBOOL
Roland Schulz [Fri, 18 May 2012 00:00:22 +0000 (20:00 -0400)]
Rename BOOL to EBOOL

- All other ENUM_NAME functions start with E
- BOOL can easily collide with other names (e.g. on Windows)

Change-Id: I6cb9438386dfb0c93299dfc5a161e4294e7834a3

12 years agoMerge "Fixing more clang warnings" into release-4-6
Teemu Murtola [Thu, 17 May 2012 15:15:25 +0000 (17:15 +0200)]
Merge "Fixing more clang warnings" into release-4-6

12 years agomv membed.h from include to src/kernel
Maarten Wolf [Wed, 16 May 2012 08:16:43 +0000 (10:16 +0200)]
mv membed.h from include to src/kernel

,because membed function calls are not part of gmxlib
Created an abstract datatype gmx_membed_t in include/types
mv all struct declaration to file that uses them (membed.c)
made membed init print conditional on MASTER(cr)

Change-Id: I8bb23403415f1c35a31f06c2fb0fae2148ee15f6

12 years agoUtility class for temporary unit testing files.
Teemu Murtola [Wed, 16 May 2012 17:32:04 +0000 (20:32 +0300)]
Utility class for temporary unit testing files.

Added a utility class for constructing unique names for per-test
temporary files and for automatically removing them at test teardown.

Change-Id: I4ddf4a39d399518b8764be0af41bb423269e245c

12 years agoAdd C++ methods for accessing binary name etc.
Teemu Murtola [Mon, 14 May 2012 09:29:05 +0000 (12:29 +0300)]
Add C++ methods for accessing binary name etc.

- Add a ProgramInfo class that can be used to access global information
  about binary name etc. Move some path manipulation code from
  CommandLineModuleManager to the new class, resolving a TODO item.
- Make initialization methods of this class also call the relevant
  methods in statutil.h.
- Call the new initialization methods in unit tests and in g_ana.
- Use the new method for accessing program names in C++ code.
- Fix ShortProgram() such that it does not segfault if
  set_program_name() has not been called (not needed after the above
  changes, but still better this way).
- Add statutil.c methods that use global storage to valgrind suppression
  list.

Change-Id: I74c906aa5188d2dc4f0e1f6edab89e36393724f3

12 years agoRemove libtool-specific hacks from oenv.c.
Teemu Murtola [Mon, 14 May 2012 05:26:58 +0000 (08:26 +0300)]
Remove libtool-specific hacks from oenv.c.

When did I9b54f82a, didn't notice that the same code was duplicated in
oenv.c.

Change-Id: Ic1c8840ee2cbab5229b3e4c7f74ac26b8c6e181a

12 years agoMerge "Merge 'origin/release-4-6' into master"
Roland Schulz [Wed, 16 May 2012 15:56:51 +0000 (17:56 +0200)]
Merge "Merge 'origin/release-4-6' into master"

12 years agoMerge 'origin/release-4-6' into master
Roland Schulz [Fri, 11 May 2012 14:36:02 +0000 (10:36 -0400)]
Merge 'origin/release-4-6' into master

Conflicts:
src/gromacs/genversion.sh
src/kernel/CMakeLists.txt
src/programs/mdrun/mdrun.c
src/programs/mdrun/runner.c

Change-Id: Ifa85592226e84dea08d707ef1a76ee3020ed3bc3

12 years agoFixing more clang warnings
Roland Schulz [Sun, 13 May 2012 03:49:24 +0000 (23:49 -0400)]
Fixing more clang warnings

Change-Id: I1359503f61e1fa003c078c98a99420249b915e9c

12 years agoMerge "Membed code merge from release-4-6"
Teemu Murtola [Tue, 15 May 2012 19:07:36 +0000 (21:07 +0200)]
Merge "Membed code merge from release-4-6"

12 years agoFix clang warning introduced by new clang version.
Teemu Murtola [Mon, 14 May 2012 06:25:48 +0000 (09:25 +0300)]
Fix clang warning introduced by new clang version.

Change-Id: Ic7eede951558237a8f03c3c1b69876848c37d0e7

12 years agoMembed code merge from release-4-6
Maarten Wolf [Fri, 11 May 2012 09:09:07 +0000 (11:09 +0200)]
Membed code merge from release-4-6

After backporting "membed to mdrun" from master to release-4-6
(commit 3dcc9c8d5) code update was necessary to match gromacs
coding standards. After Gerrit approval, these changes are now
merged into master.

Conflicts:
src/programs/mdrun/membed.c
src/tools/gmx_membed.c

Change-Id: Ib1566a677b46e91052f74800dd4f4d16d1bc3b41

12 years agoMerge "Backporting "moving membed to mdrun" from master" into release-4-6
Christoph Junghans [Wed, 9 May 2012 21:08:35 +0000 (23:08 +0200)]
Merge "Backporting "moving membed to mdrun" from master" into release-4-6

12 years agoMerge "Detect module name from symlinks."
Christoph Junghans [Wed, 9 May 2012 20:58:02 +0000 (22:58 +0200)]
Merge "Detect module name from symlinks."

12 years ago[tools] g_sans - add OpenMP based parallelism
Alexey Shvetsov [Tue, 8 May 2012 18:17:50 +0000 (22:17 +0400)]
[tools] g_sans - add OpenMP based parallelism

This commit adds OpenMP based parallelism for
calc_radial_distribution_histogram function

Also it adds check for mcover parameter which should be -1 or (0,1]

Change-Id: Ic14267782c69c25364b69a91719cb451fd8e3a89
Signed-off-by: Alexey Shvetsov <alexxy@omrb.pnpi.spb.ru>
12 years agoSimplify build system for unit tests.
Teemu Murtola [Wed, 9 May 2012 08:11:06 +0000 (11:11 +0300)]
Simplify build system for unit tests.

- Now that gtest and gmock are build from bundled sources, there should
  be no reason to allow disabling just gmock from the tests (at least
  not strong enough reason compared to the complexity it brings to
  writing the tests and maintaining the build system).
- Make libxml2 mandatory for building any unit tests.  Again,
  simplifies the build system significantly.  Even before this change,
  very few of the unit tests were built without libxml2.

Closes #935.

Change-Id: I8ec5552661860ca43a00d70957fd82d69dcdf739

12 years agoDetect module name from symlinks.
Teemu Murtola [Wed, 9 May 2012 07:12:52 +0000 (10:12 +0300)]
Detect module name from symlinks.

This makes it possible to create, e.g., a symlink named g_select and
point it to g_ana; executing the symlink will work exactly like 'g_ana
select'.

Closes #672.

Change-Id: Ia27069466bea19b1203370c35b9ecdacfe0cdd98

12 years agoMerge "Print list of modules with 'g_ana help'."
Christoph Junghans [Tue, 8 May 2012 20:00:08 +0000 (22:00 +0200)]
Merge "Print list of modules with 'g_ana help'."

12 years agoBackporting "moving membed to mdrun" from master
Maarten Wolf [Fri, 27 Aug 2010 12:40:26 +0000 (14:40 +0200)]
Backporting "moving membed to mdrun" from master

commit 1: cherry pick 45181651
Moved g_membed functionality to mdrun
commit 2: cherry pick 21a84994
Moved g_membed functionality to mdrun bug fix
commit 3: cherry pick 34471042
added gmx_membed.c to CMakeLists.txt for mdrun
commit 4: cherry pick 1a72f4c8
membed renaming and adding tools wrapper again
commit 5:
Fixes necessary after membed to mdrun cherry picking
commit 6: cherry pick a52f8c45
bugfix #697 for g_membed
commit 7:
deleted unused code, changed fclose to ffclose in membed.c

Change-Id: Ia3ba001b338cadcadc9b2bf1f4c728c5ffc1414b

12 years agoMerge "Remove g_luck."
Teemu Murtola [Tue, 8 May 2012 11:54:14 +0000 (13:54 +0200)]
Merge "Remove g_luck."

12 years agofixed mdrun -cpi SD and pcoupl initialization
Berk Hess [Tue, 8 May 2012 09:21:56 +0000 (11:21 +0200)]
fixed mdrun -cpi SD and pcoupl initialization

With mdrun -cpi and no previous output files present SD and pressure
coupling were initialized incorrectly, leading to minor differences
at the start of a simulation. Fixes #939

Change-Id: I1ea3797ceb39760341c7c11cf74425c02dcaf235

12 years agoPrint list of modules with 'g_ana help'.
Teemu Murtola [Tue, 8 May 2012 05:33:25 +0000 (08:33 +0300)]
Print list of modules with 'g_ana help'.

IssueIDs #666 and #672.

Change-Id: I001966ab3ba44c59b0186456a6467322b3b3d26d

12 years agoUse gmx::File throughout CommandLineHelpWriter.
Teemu Murtola [Fri, 4 May 2012 08:27:43 +0000 (11:27 +0300)]
Use gmx::File throughout CommandLineHelpWriter.

Added necessary methods to gmx::File to write basic text files, and use
those for writing the command-line help instead of accessing the
underlying file handle directly.

Change-Id: Iff680d0b5b193fc785f8deec85befdf040bec909

12 years agoFixing more Clang warnings
Roland Schulz [Tue, 8 May 2012 02:19:12 +0000 (22:19 -0400)]
Fixing more Clang warnings

Change-Id: Ic2189579eaaa262d4907d912d59a3e78274bd4ed

12 years agoMerge "Generic handling for multiple cmd-line modules."
Roland Schulz [Tue, 8 May 2012 02:43:38 +0000 (04:43 +0200)]
Merge "Generic handling for multiple cmd-line modules."

12 years agoMerge "Helper class for command-line utility tests."
Roland Schulz [Tue, 8 May 2012 01:53:28 +0000 (03:53 +0200)]
Merge "Helper class for command-line utility tests."

12 years agoMerge "Print default file names for command-line help."
Roland Schulz [Tue, 8 May 2012 01:10:58 +0000 (03:10 +0200)]
Merge "Print default file names for command-line help."

12 years agoMerge "Set project version to 5.0-dev."
Roland Schulz [Tue, 8 May 2012 00:10:27 +0000 (02:10 +0200)]
Merge "Set project version to 5.0-dev."

12 years agoMerge branch 'gerrit/release-4-5-patches' into release-4-6
Teemu Murtola [Mon, 7 May 2012 14:22:50 +0000 (17:22 +0300)]
Merge branch 'gerrit/release-4-5-patches' into release-4-6

Conflicts:
CMakeLists.txt
cmake/gmxGenerateVersionInfo.cmake

Change-Id: I82c2429f9b1d8441edb19f6287dbbe446fc07233

12 years agoGeneric handling for multiple cmd-line modules.
Teemu Murtola [Mon, 7 May 2012 09:36:43 +0000 (12:36 +0300)]
Generic handling for multiple cmd-line modules.

Added generic methods for multiple independent modules within a single
command-line tool, and modified g_ana to use this.

By itself, does not change the external behavior significantly, but
makes it easier to implement parts of #666 and #672.
The wrapper binary in #685 should also be easy to implement using this
approach.

Change-Id: I3058bf5db2cbb7c7a1f9e4c87dd2db8f9727fe82

12 years agoHelper class for command-line utility tests.
Teemu Murtola [Mon, 7 May 2012 06:55:12 +0000 (09:55 +0300)]
Helper class for command-line utility tests.

Split functionality for converting const char * arrays into
(argc, argv) from CommandLineParserTest into a separate utility class.
Allows using the functionality in other unit tests as well.

Change-Id: I2034c497799811b1d8ed7907e8ed9395bbb0363d

12 years agoRemove libtool-specific hacks from statutil.c.
Teemu Murtola [Mon, 7 May 2012 06:41:52 +0000 (09:41 +0300)]
Remove libtool-specific hacks from statutil.c.

Since autoconf is no longer supported, there is no need to keep these.

Change-Id: I9b54f82ab9198420aa4fcc40dbacd4f1ed0d2191

12 years agoPrint default file names for command-line help.
Teemu Murtola [Mon, 7 May 2012 03:56:55 +0000 (06:56 +0300)]
Print default file names for command-line help.

Print the value set with defaultValueIfSet() for a file name option in
the command-line help if no other value is provided for the option.

- The value is formatted by the AbstractOptionStorage::formatValue()
  pure virtual method when a special index is provided.
- OptionStorageTemplate implements handling of this special index, and
  provides a new pure virtual method formatSingleValue() to do the
  actual formatting, which no longer needs to know where the value comes
  from.
- Adjust the concrete option storage classes to the changes.

IssueID #666.

Change-Id: I8b51262042415f314bd5d4c8da51e6e31cfe3b21

12 years agoSet project version to 5.0-dev.
Teemu Murtola [Sat, 5 May 2012 06:59:05 +0000 (09:59 +0300)]
Set project version to 5.0-dev.

At some point, there used to be strings like 3.9.99-dev, but now
release-4-6 branch has 4.6-dev, so this is in line with that.
But the release-4-5-patches branch has 4.5.5-dev, which isn't
consistent... In any case, this should make the version string clearly
distinguishable for master.

Change-Id: Idec8f5b9e2d308cad596343d1d9177370f8b7fda

12 years agoClean up cmake version generation.
Teemu Murtola [Fri, 4 May 2012 06:59:46 +0000 (09:59 +0300)]
Clean up cmake version generation.

- Use comparisons like ("${VAR}" STREQUAL "") for testing for empty
  strings (other variants may fail in certain scenarios).
- Add some other quotes to avoid CMake errors in unusual situations.
- Remove trailing whitespace.

Related to #888.

Change-Id: Ifd1a87f0e929b4cb62db56d70ca469b73075fc2c

12 years agoDrop support for pre-1.5.3 git for version info.
Teemu Murtola [Fri, 4 May 2012 06:49:56 +0000 (09:49 +0300)]
Drop support for pre-1.5.3 git for version info.

Did not touch the autoconf version, since that will anyways be obsolete
in 4.6.

Related to #888.

Change-Id: Ic7d890959e2e9a614f5d39a453c45671c3b56df4

12 years agoFix cmake version info generation.
Teemu Murtola [Fri, 4 May 2012 05:05:28 +0000 (08:05 +0300)]
Fix cmake version info generation.

Use the same logic in the cmake version info generation script as is
used in the shell script for autoconf.

Fixes #888.

Change-Id: I2a06d175a1e04e25d38b917d907cdae429743099

12 years agoRemoved autoconf version info generation.
Teemu Murtola [Sat, 5 May 2012 06:06:19 +0000 (09:06 +0300)]
Removed autoconf version info generation.

Since autoconf is no longer supported, there is no need for this shell
script either.

IssueID #645

Change-Id: I5607d52817122dfdf9ea33e784a50abc7941ba0e

12 years agoRemove g_luck.
Teemu Murtola [Thu, 3 May 2012 16:22:06 +0000 (19:22 +0300)]
Remove g_luck.

Also removed any references found with grepping for "luck" in the tree.
With this, there is nothing left in src/kernel/.

Closes #637.

Change-Id: I4f1f229ea7f9a98eed94aa2b891112b3db2bd062