alexxy/gromacs.git
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 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 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 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 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 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 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 "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 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 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

11 years agoIncrease coverate of selection unit tests.
Teemu Murtola [Fri, 22 Jun 2012 06:25:59 +0000 (09:25 +0300)]
Increase coverate of selection unit tests.

Add some tests and adjust existing tests to cover parts of the selection
compiler and evaluation functions that the coverage run showed as not
covered.
Fixed one issue found (can be backported to 4.5 if necessary).

Part of #651.

Change-Id: If92b5b1eb8cf6b3acb510ba43f64fc82b63ab82a

11 years agoFixed gcc inline assembly issue with PIC and older gcc compilers
Erik Lindahl [Thu, 21 Jun 2012 09:38:12 +0000 (11:38 +0200)]
Fixed gcc inline assembly issue with PIC and older gcc compilers

Some gcc versions had problems with the recently introduced inline
assembly for cpuid (clobbering of ebx register), and since we used
a slightly different inline assembly instruction test in cmake we
did not detect it properly. This patch both makes the inline asm
itself much more portable, and we also test with exactly the same
instruction in cmake so we don't set the flag for supporting inline
asm unless we know this instruction works.

Change-Id: Ib479e2706024abb5e3f66d0249291ce55f1257b1

11 years agoMake the selection parser exception-proof.
Teemu Murtola [Wed, 20 Jun 2012 03:47:36 +0000 (06:47 +0300)]
Make the selection parser exception-proof.

The parser now catches and stores any exception that occurs during
parsing, terminates the parser cleanly, and rethrows the exception.

The functions called from the parser are still not exception-safe, and
would require quite some work to make so, because they are code written
originally in C and do a lot of dynamic memory allocation, returning
some of the allocated memory to the caller.  But the generated code
should now work with exceptions.

Fixes #880.

Change-Id: I2d534d106a6fe20d949b3f24b0d7f9980c545fcf

11 years agoUse push parser for selection parsing.
Teemu Murtola [Thu, 14 Jun 2012 04:27:29 +0000 (07:27 +0300)]
Use push parser for selection parsing.

The push parser is new in Bison 2.4 (current parser.cpp files generated
with 2.5), and has two benefits in our case:
- Clearer control flow, since the interactive prompt loop is now outside
  the parser, so it doesn't need to behave like a state machine.
- Allows better exception handling: since it is possible to directly
  return from Flex actions, we should also be able to throw exceptions.
  But without this change, they would go through the generated part of
  the Bison parser, causing memory leaks since the code is generated for
  C.  With this change, the Flex scanner is called directly from C++
  code, eliminating this problem.

Since the Bison and Flex parsers are now decoupled, it should also be
possible to clarify the code further, by having a separate data
structure for parser-specific data instead of using yyscan_t.  For now,
kept the changes to a minimum.

Related to #880.

Change-Id: I43ea11561d3dd0577dd95eae3794ca621953d038

11 years agoAdd string utility functions for suffix handling.
Teemu Murtola [Thu, 14 Jun 2012 04:27:13 +0000 (07:27 +0300)]
Add string utility functions for suffix handling.

Added endsWith() and stripSuffixIfPresent() functions to stringutil.h.
Allows for much clearer and easier-to-write string manipulation code
where this kind of functionality is needed.

Change-Id: I853234ce3d8a11b88ee50225a66e061302e10de7

11 years agoRename format.h to more generic stringutil.h.
Teemu Murtola [Sat, 16 Jun 2012 05:04:49 +0000 (08:04 +0300)]
Rename format.h to more generic stringutil.h.

There were already some string helper functions not directly related to
formatting, and this header is a natural place to add more of such
things.

Change-Id: I46f7bd46393d27e49d46589b8d7b5c2362bcdc8c

11 years agoClean up option and selection flags.
Teemu Murtola [Sat, 9 Jun 2012 11:09:37 +0000 (14:09 +0300)]
Clean up option and selection flags.

Rename the enums used for flags such that they are more likely unique.
Also a bit of other clean-up to limit the use of the option flags more
into the generic parts.  Removed a few unnecessary flags.  Made
efClearOnNextSet work more correctly for classes that don't use
OptionStorageTemplate, although currently it didn't cause any issues
(noticed some issues while developing SelectionFileOption, but the final
version worked without these fixes).

Change-Id: I78c243c4f73b87b285eb54d6ff3ae42699678962

11 years agoRemove (part of) underscore-prefixed C++ symbols.
Teemu Murtola [Sat, 9 Jun 2012 05:27:03 +0000 (08:27 +0300)]
Remove (part of) underscore-prefixed C++ symbols.

This commit is mostly the result of (using GNU sed syntax)
  sed -i -re 's/\<_([a-zA-Z]+)\>/\1_/g'
on the affected files. Some additional manual renaming was done.
optionsassigner.cpp was manually edited a bit more to update comments
and to remove unnecessary use of bit flags.
Also added a few 'explicit' keywords to constructors.

selection/ and trajectoryanalysis/ directories still contain a lot of
these, but this commit is large enough as it stands.

Change-Id: I7f4bf42ec5d9d762fefcff289e38b6b6b231b82b

11 years agogmx_dyecoupl: check selected groups from user
Martin Hoefling [Wed, 13 Jun 2012 12:29:24 +0000 (14:29 +0200)]
gmx_dyecoupl: check selected groups from user

check if the user accidentally selected the same group twice. Abort
with error, since this will not produce any meaningful results.

Change-Id: Iace69c473e5f1b815e35d20a39845533297ad208

11 years agoNew CPU detection & AVX/SSE code, removed raw assembly files.
Erik Lindahl [Mon, 28 May 2012 18:54:17 +0000 (20:54 +0200)]
New CPU detection & AVX/SSE code, removed raw assembly files.

Removed all raw assembly files and deprecated altivec support.
Removed support for NASM and other assemblers, and replaced
previous SSE detection code with a new module using CPUID instead.
Added detection for SSE2, SSE4.1, AVX 128-bit with FMA, and AVX 256-bit.
Added Cmake detection of build platform based on CPUID, and output this
to the log file. The executables now compare the compile-time platform
and selected acceleration with the run-time platform and most suitable
acceleration and warns the user if they do not match. The compiler
detection code has also been reordered slightly to produce more readable
warnings when OpenMP is not available, and correctly disable pragma
warnings.

Added intrinsics code and math functions for SSE2, SSE4.1, AVX128/256
both in single and double precision. All math functions and permutation
code have been tested & verified. Single precision math functions are
correct apart from the least significant bit, and double precision has
roughly twice the accuracy.

This has forced me to temporarily disable the SSE & Fortran acceleration.
SSE will be added back soon based on new intrinsics-only kernels currently
in testing, and we will test if Fortran still makes sense then.

Finally, the patch includes a modification to gmx_rmsdist where
a regression issue was introduced recently by using sqrtf() for
the norm function. This caused the intel compiler to produce slightly
different results at high optimization leves, which got evident here.

Closes #926 - Raw assembly code has been removed.
Refs #923 - Old kernels removed, new will be added shortly.
Fixes #914 - Cmake now does architecture-speficic optimization.
Fixes #912, #913
Fixes #857 - We detect rdtscp support with CPUID and use it if possible.
Fixes #750
Closes #537, #574 - Altivec is now deprecated.

Change-Id: Icfca5a940762f8d82ae67b59c65b2d2ac683256d

11 years agoRemove unnecessary "move" on shared pointer
John Eblen [Fri, 15 Jun 2012 21:45:02 +0000 (17:45 -0400)]
Remove unnecessary "move" on shared pointer

Change-Id: I79d2d01307c014f4d40cfffc9dbd04067ed4f0fc

11 years agoSimple patch for openmm_wrapper.cpp
Justin Lemkul [Thu, 7 Jun 2012 00:11:26 +0000 (20:11 -0400)]
Simple patch for openmm_wrapper.cpp

The naming of several variables is changed to be consistent with the
latest free energy changes.  Allows mdrun-gpu to be compiled, which
otherwise fails (as reported on gmx-developers).

Change-Id: I497ba07ee6883ef78d23022450f6c3d971b2127e

11 years agoMerge "Remove unnecessary *-impl.h files."
Christoph Junghans [Fri, 15 Jun 2012 00:29:18 +0000 (02:29 +0200)]
Merge "Remove unnecessary *-impl.h files."

11 years agoUpdates to selection online help.
Teemu Murtola [Fri, 8 Jun 2012 15:44:56 +0000 (18:44 +0300)]
Updates to selection online help.

Some of the help topics were outdated after changes introduced by the
linked Redmine issues (some of them even before that).  Improved the
situation a bit and also did some misc. other documentation fixes.

Related to #656 and #666.

Change-Id: I7f18ca4ad8ce2aa5cd808281bab044253ca77f56

11 years agoRemove unnecessary *-impl.h files.
Teemu Murtola [Thu, 31 May 2012 09:34:02 +0000 (12:34 +0300)]
Remove unnecessary *-impl.h files.

Originally, I put all class declarations in headers, but for private
implementation classes used only from one source file, it just leads to
additional maintenance without much benefit.  Moved such class
declarations to the source files (quite a few private implementation
classes are already declared in the source files).

Removed some unnecessary destructors, and had to adjust some includes,
otherwise this change just copy-pastes code around.

Change-Id: Icfb30f88f593806971746d14e3fc0d9b5e7caa96

11 years agoMerge "Merge branch 'release-4-6'"
Christoph Junghans [Wed, 13 Jun 2012 21:17:35 +0000 (23:17 +0200)]
Merge "Merge branch 'release-4-6'"

11 years agoRenamed TestTemporaryFileManager to TestFileManager
Roland Schulz [Tue, 5 Jun 2012 20:55:36 +0000 (16:55 -0400)]
Renamed TestTemporaryFileManager to TestFileManager

Made utility functions static members of class

Change-Id: I706a9c4b5d6e8fe4f121d1e50d229b03f492e49d

11 years agoTestutils improvements for arrays and parameterized tests
Roland Schulz [Mon, 4 Jun 2012 15:48:58 +0000 (11:48 -0400)]
Testutils improvements for arrays and parameterized tests

- For parameterized tests replace / with _ to have all refdata
  xml files in one folder
- Print index in sequence in error message for value/refValue
  mismatch

Change-Id: Ic593b87f9c1e4cf2ea049044e48a705eca0aa839

11 years agoMerge branch 'release-4-6'
Roland Schulz [Wed, 6 Jun 2012 12:13:00 +0000 (08:13 -0400)]
Merge branch 'release-4-6'

Conflicts:
src/gromacs/gmxlib/dihres.c
src/gromacs/legacyheaders/dihre.h
src/gromacs/mdlib/force.c
src/gromacs/mdlib/mdebin.c
src/gromacs/mdlib/sim_util.c
src/programs/mdrun/md.c

Change-Id: I0c5e6d8e57f9f19da73a81737c3105dcd55488ec
Moved:
     src/mdlib/expanded.c ->
       src/gromacs/mdlib/expanded.c

11 years agoMerging in free energy, exp. ensemble, & andersen t-control to 4.6
Michael Shirts [Tue, 17 Jan 2012 14:51:13 +0000 (09:51 -0500)]
Merging in free energy, exp. ensemble, & andersen t-control to 4.6

Conflicts:
src/gmxlib/mvdata.c
src/gmxlib/txtdump.c
src/kernel/readir.c
src/mdlib/sim_util.c
src/tools/gmx_membed.c
include/mdrun.h
src/kernel/md.c
src/kernel/md_openmm.c
src/kernel/md_openmm.h
src/kernel/runner.c
src/mdlib/minimize.c
src/mdlib/tpi.c
src/tools/gmx_membed.c
src/kernel/md.c

Change-Id: Ide69a8dbfb96072d5c55d0a051dc9db788cbe144

11 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