alexxy/gromacs.git
11 years agoMerge release-4-5-patches into release-4-6
Roland Schulz [Mon, 26 Nov 2012 20:04:19 +0000 (15:04 -0500)]
Merge release-4-5-patches into release-4-6

Conflicts (both trivial):
CMakeLists.txt
src/config.h.cmakein

Change-Id: I363ce1c09c68c2be5aa926e893011d43c8ed3337

11 years agoMerge "Clean up some mathematical constants" into release-4-6
Roland Schulz [Mon, 26 Nov 2012 20:00:33 +0000 (21:00 +0100)]
Merge "Clean up some mathematical constants" into release-4-6

11 years agoMerge "Use stat for gmx_is_file. Fix get_libdir with symlinks." into release-4-5...
Erik Lindahl [Mon, 26 Nov 2012 19:55:01 +0000 (20:55 +0100)]
Merge "Use stat for gmx_is_file. Fix get_libdir with symlinks." into release-4-5-patches

11 years agomade nbnxn analytical Ewald consistent
Berk Hess [Mon, 26 Nov 2012 14:43:39 +0000 (15:43 +0100)]
made nbnxn analytical Ewald consistent

The recent addition of nbnxn analytical Ewald kernels switched those
kernels on for local interactions, but not for non-local domains.
This performance bug has been fixed.

Change-Id: I28abc822ee8f1cf8f7dbb5c516703145400441b2

11 years agoClean up some mathematical constants
Mark Abraham [Thu, 22 Nov 2012 14:48:29 +0000 (15:48 +0100)]
Clean up some mathematical constants

Replaced some hard-coded floats with unified constants in include/maths.h,
and made most places refer to them. Also added note that care is needed
about float-sized constants in CUDA code.

Change-Id: Icf1ec0b81179792d5e6d4d4ab9b38af3a38d7770

11 years agoMade the linear extrapolation in g_bar non-default behavior
Sander Pronk [Thu, 22 Nov 2012 17:28:02 +0000 (18:28 +0100)]
Made the linear extrapolation in g_bar non-default behavior

g_bar currently resorts to linear extrapolation of dH/dl if
it doesn't find covering foreign lambda deltaH values. This is
dangerous because the most likely case of this being used is when
the user forgets to set foreign lambdas.

This commit adds an option -extp to g_bar that the user must
explictily set to enable the linear extrapolation. If not, and
there is no foreign_lambda path, g_bar prints an error message
with details of what to do.

Change-Id: Ib39f964b4f43f79379f00a3331ea4dc88183ed63

11 years agoMerge "Extended build information output and reference build type" into release-4-6
Erik Lindahl [Mon, 26 Nov 2012 13:30:00 +0000 (14:30 +0100)]
Merge "Extended build information output and reference build type" into release-4-6

11 years agoFixes #1035 NaN in g_cluster output.
David van der Spoel [Mon, 26 Nov 2012 11:17:13 +0000 (12:17 +0100)]
Fixes #1035 NaN in g_cluster output.

Now always initializes the masses of the atoms to prevent
division by zero downstream.

Change-Id: I1b38ccc7982d4340ed068535f7b7dd8e75e1a4c4

11 years agoadded nbnxn analytical Ewald correction kernels
Berk Hess [Thu, 22 Nov 2012 12:15:07 +0000 (13:15 +0100)]
added nbnxn analytical Ewald correction kernels

In single precision on Bulldozer these kernels are 15% faster than
the quadratic-spline table correction, on Sandy Bridge 2%.
These kernels are only selected with AVX in single precision.

Change-Id: I1c3eb3b24b5570107fe3fa0c4b03fe5e215c79c8

11 years agoExtended build information output and reference build type
Teemu Murtola [Sat, 24 Nov 2012 05:14:35 +0000 (07:14 +0200)]
Extended build information output and reference build type

mdrun -version (and -version flag for other binaries as well) now
contains more information about what was compiled in, as well as
compiler information and versions of external libraries used.
Also added C++ compiler information to mdrun log output.
When GPU builds are enabled there is also version information
about CUDA SDK, nvcc, driver and runtime.

A new "Reference" build type has been added to CMake. This turns
off lots of options and should be used when generating reference
values for our regression tests.

Change-Id: I7532bebdaeb1207c4f6e69d422b0f13da83e3960

11 years agoUse stat for gmx_is_file. Fix get_libdir with symlinks.
Roland Schulz [Sat, 24 Nov 2012 05:07:35 +0000 (00:07 -0500)]
Use stat for gmx_is_file. Fix get_libdir with symlinks.

In commit 4e057440520c1 I used lstat instead of stat confusing the
two. The commit tried to fix the misidentification of directories.
There is no need to distinquish between symlinks and files (and
thus break it if a binary is a symlink).

Change-Id: Ie964e826729a35f11516fb3d002ebc01cbb7a564

11 years agoMerge "removed group non-boneded call with verlet scheme" into release-4-6
Roland Schulz [Fri, 23 Nov 2012 20:09:32 +0000 (21:09 +0100)]
Merge "removed group non-boneded call with verlet scheme" into release-4-6

11 years agoMerge "improve FindGROMACS.cmake" into release-4-6
Roland Schulz [Fri, 23 Nov 2012 20:07:44 +0000 (21:07 +0100)]
Merge "improve FindGROMACS.cmake" into release-4-6

11 years agoForce C++ linking of the gpu_utils
Roland Schulz [Sun, 11 Nov 2012 20:30:50 +0000 (15:30 -0500)]
Force C++ linking of the gpu_utils

As the gpu_utils module contains some exception handling (in memtestG80)
we need to force C++ linking of this library. This allows us to remove
the --add-needed linker flag which was not the appropriate solution for
the otherwise failing linking due to the following ld error:
undefined reference to symbol '__cxa_throw@@CXXABI_1.3'

Change-Id: I333b5506abdee2f790781a6524c475c56db6eac0

11 years agoMerge "Updates to CMake treatment of OpenMP" into release-4-6
Szilárd Páll [Fri, 23 Nov 2012 01:56:36 +0000 (02:56 +0100)]
Merge "Updates to CMake treatment of OpenMP" into release-4-6

11 years agoremoved group non-boneded call with verlet scheme
Szilard Pall [Thu, 22 Nov 2012 18:03:16 +0000 (19:03 +0100)]
removed group non-boneded call with verlet scheme

With the verlet scheme non-bonded calculations are started from
do_force_cutsVERLET(), unlike in the case of group scheme which does
this in do_force_lowlevel(), one level lower. However, the conditional
that prevented do_force_lowlevel() to call do_nonbonded() with verlet
was incorrect leading to an unnecessary, but more or less harmless
do_nonbonded() call. This commit corrects the behavior and also moves
the check inside do_force_lowlevel().

Additionally, a subcounter start call was missing with GB, this has also
been corrected.

Change-Id: If593fd577a5647e6047b5698d4505c1a2d611e05

11 years agoUpdates to CMake treatment of OpenMP
Mark Abraham [Sat, 17 Nov 2012 20:41:25 +0000 (21:41 +0100)]
Updates to CMake treatment of OpenMP

Change-Id: I369cd3466c47c7ebbad2f2b1d893112ef15581f3

11 years agoMerge changes I88f0dcef,I86b2a8cf,I70fb7e6d into release-4-6
Roland Schulz [Fri, 23 Nov 2012 00:11:14 +0000 (01:11 +0100)]
Merge changes I88f0dcef,I86b2a8cf,I70fb7e6d into release-4-6

* changes:
  Fix for icc 13 optimization-related issue and TIP4P kernel update.
  Implemented RMS-based force tolerance in gmxcheck
  Fixed LJ-14 error in free energy

11 years agoFix for icc 13 optimization-related issue and TIP4P kernel update.
Erik Lindahl [Thu, 22 Nov 2012 20:24:06 +0000 (21:24 +0100)]
Fix for icc 13 optimization-related issue and TIP4P kernel update.

Worked around icc enthusiastic memory optimization in SSE4.1 kernels,
and corrected TIP4P-TIP4P RFCut kernels to also cut user-table interactions
in order to make them produce identical results to the generic
kernels.

Change-Id: I88f0dcefe5fee0e184e276c7498c50b84cb0bffa

11 years agoimprove FindGROMACS.cmake
Christoph Junghans [Thu, 22 Nov 2012 21:15:17 +0000 (14:15 -0700)]
improve FindGROMACS.cmake

* added install dirs as hints
* added code to detect gmx 4.6 beside 4.0, 4.5 and 5.0
* print version found in templates' CMakeLists.txt

Fixes #1046

Change-Id: I3ba527ab0c517d964fab06ec7f2919d10b25fdf1

11 years agoImplemented RMS-based force tolerance in gmxcheck
Erik Lindahl [Thu, 22 Nov 2012 18:21:37 +0000 (19:21 +0100)]
Implemented RMS-based force tolerance in gmxcheck

This patch reduces the number of false force errors
in trajectory comparisions significantly by scaling
the absolute tolerance by the RMS of the force
components. In addition, this also makes the abstol
argument independent of units. This new routine is
used for forces, virials and pressure, but not
coordinates or velocities.

Change-Id: I86b2a8cfe0612a2e7ec45f425d71b501c5d333be

11 years agoFixed LJ-14 error in free energy
Erik Lindahl [Thu, 22 Nov 2012 17:28:45 +0000 (18:28 +0100)]
Fixed LJ-14 error in free energy

This bug was introduced when I implemented the new separate
1,4-evaluation of free energies, and failed to take the
now-included 6.0 & 12.0 prefactors in c6 & c12 into account.
The net effect is merely that it altered the softcore power
slightly, which caused it to deviate somewhat from the reference
value in the regression testing.

Change-Id: I70fb7e6da7186b0f10b654d060e1e1275f3676e9

11 years agoSpeed up mdlib compilation by reordering file globs
Mark Abraham [Thu, 22 Nov 2012 13:42:59 +0000 (14:42 +0100)]
Speed up mdlib compilation by reordering file globs

Change-Id: I5672fe6001b19e872636a06c6ed15281e00d0ab2

11 years agounset MPI detection leftover cache variables
Szilard Pall [Thu, 22 Nov 2012 03:33:57 +0000 (04:33 +0100)]
unset MPI detection leftover cache variables

The MPI_INFO_BIN and MPINAME_BIN variables can be left in the cache
as non-advanced variables because these are results of find_file search.

Change-Id: Id4978ab75680eab6246f25e02e3785412b6d75ac

11 years agoMerge "Fix g_msd -mol" into release-4-6
Christoph Junghans [Tue, 20 Nov 2012 16:29:05 +0000 (17:29 +0100)]
Merge "Fix g_msd -mol" into release-4-6

11 years agoMerge "Fixes bug in g_hbond that makes it produce fatal error." into release-4-5...
Christoph Junghans [Tue, 20 Nov 2012 16:27:31 +0000 (17:27 +0100)]
Merge "Fixes bug in g_hbond that makes it produce fatal error." into release-4-5-patches

11 years agoFixes bug in g_hbond that makes it produce fatal error.
David van der Spoel [Tue, 20 Nov 2012 10:58:18 +0000 (11:58 +0100)]
Fixes bug in g_hbond that makes it produce fatal error.

Rather than crashing with a range check error when there
are no hydrogen bonds the code now prints to stderr and
continues normally.

Change-Id: Idc9fddf8bfac9989bc1aa3a9c552b08580f99949

11 years agoFix CXX/C mismatch of flag/macro for gmxCFlags
Roland Schulz [Mon, 19 Nov 2012 21:44:15 +0000 (16:44 -0500)]
Fix CXX/C mismatch of flag/macro for gmxCFlags

Change-Id: Ieb87927e24688a29af284b46be3359bbc57d8891

11 years agoMerge release-4-5-patches into release-4-6
Roland Schulz [Tue, 20 Nov 2012 02:17:30 +0000 (21:17 -0500)]
Merge release-4-5-patches into release-4-6

Conflicts:
src/tools/gmx_tune_pme.c

Change-Id: I924851995261a7777def8a5dea168597aabf0e0d

11 years agoFix CXX/C mismatch of flag/macro for gmxCFlags
Roland Schulz [Mon, 19 Nov 2012 21:44:15 +0000 (16:44 -0500)]
Fix CXX/C mismatch of flag/macro for gmxCFlags

Change-Id: Ieb87927e24688a29af284b46be3359bbc57d8891

11 years agoMerge changes Ibc555d88,Iaf6f3051 into release-4-6
Roland Schulz [Mon, 19 Nov 2012 21:30:52 +0000 (22:30 +0100)]
Merge changes Ibc555d88,Iaf6f3051 into release-4-6

* changes:
  Fix GMX_TEST_CFLAG bug with acceleration flags
  Fix bugs in gmxCFlags

11 years agoMerge "SSE4.1 single-precision kernels" into release-4-6
Mark Abraham [Mon, 19 Nov 2012 21:05:05 +0000 (22:05 +0100)]
Merge "SSE4.1 single-precision kernels" into release-4-6

11 years agoMinor updates to CMake usage
Mark Abraham [Sat, 17 Nov 2012 20:40:10 +0000 (21:40 +0100)]
Minor updates to CMake usage

Change-Id: Ie917ccd041c7576afb82ddef7b82598f462c7548

11 years agoAdd CMAKE_PREFIX_PATH to cmake-gui
Roland Schulz [Sat, 17 Nov 2012 20:00:37 +0000 (15:00 -0500)]
Add CMAKE_PREFIX_PATH to cmake-gui

CMAKE_PREFIX_PATH didn't show up in ccmake, because it wasn't in
the cache by default. Given that it is the easiest way to specify
external dependendencies it should show up. Also prior one had to go
to the advanced settings to specify the path to FFTW. Modified
the FFTW message to explain that CMAKE_PREFIX_PATH is also an
option. This makes it possible to set it (if it isn't found
automatically)without having to open the advanced settings.

Change-Id: Ib36ab004aac8f65d2a145d67b72b8c8f4fa065c8

11 years agoSSE4.1 single-precision kernels
Erik Lindahl [Thu, 15 Nov 2012 23:09:11 +0000 (00:09 +0100)]
SSE4.1 single-precision kernels

Kernels using SSE4.1 instructions on modern Intel and AMD x86 CPUs.
These are not a whole lot faster than SSE2 right now in default
interactions, but for generalized born they probably are due to
better selection instructions. Padding and other properties are
similar to the SSE2 kernels just commited.

Change-Id: I3d6c09c70d16006128320ca24079f7f3851a882e

11 years agoMerge "Remove double declaration in headers" into release-4-6
Roland Schulz [Mon, 19 Nov 2012 14:32:40 +0000 (15:32 +0100)]
Merge "Remove double declaration in headers" into release-4-6

11 years agoalways mark as advanced leftover FindCUDA variables
Szilard Pall [Thu, 15 Nov 2012 22:26:47 +0000 (23:26 +0100)]
always mark as advanced leftover FindCUDA variables

If the user turned off GMX_GPU after a failed configure pass, some
variables were still left behind. Now these variables are marked as
advanced unconditionally.

Change-Id: Ia20ad5a164b6a8b43801ad1d83bc03332da5f6c1

11 years agoFix GMX_TEST_CFLAG bug with acceleration flags
Roland Schulz [Sat, 17 Nov 2012 20:26:44 +0000 (15:26 -0500)]
Fix GMX_TEST_CFLAG bug with acceleration flags

If a cmake error occured (e.g. fftw not found) between a flag being
tested (e.g. -msse4.1) and the flags being set, then those flags
weren't set. Neither on the first run with the error, nor later
because in later runs GROMACS_C_FLAGS_SET would already be set.

Fixes #1037

Change-Id: Ibc555d885bab5bec04a1aa5b10f06351e6aa6f38

11 years agoFix bugs in gmxCFlags
Roland Schulz [Sat, 17 Nov 2012 20:20:20 +0000 (15:20 -0500)]
Fix bugs in gmxCFlags

The first argument to GMX_TEST_CFLAG needs to be unique, otherwise the
test is skipped and the respective options never gets added.

Change-Id: Iaf6f30511735b5b9459520ca72ed5eda6b3b5ec5

11 years agoRename remaining GMX_ACCELERATION to GMX_CPU_ACCELERATION
Roland Schulz [Fri, 16 Nov 2012 22:41:48 +0000 (17:41 -0500)]
Rename remaining GMX_ACCELERATION to GMX_CPU_ACCELERATION

366c49a438150 renamed this variable but forgot these three.

Change-Id: Iad653e2deaa2fc7cb218bffab84c6833ff8b3d56

11 years agoRemove double declaration in headers
Roland Schulz [Fri, 16 Nov 2012 01:27:44 +0000 (20:27 -0500)]
Remove double declaration in headers

Change-Id: Ibaaee5b8bb8c6b3f4cf12c34efd2229f346a838f

11 years agoMerge "Added grompp warning" into release-4-6
David van der Spoel [Sat, 17 Nov 2012 07:12:14 +0000 (08:12 +0100)]
Merge "Added grompp warning" into release-4-6

11 years agoMerge "Remove rest of the xml support" into release-4-6
David van der Spoel [Sat, 17 Nov 2012 07:04:48 +0000 (08:04 +0100)]
Merge "Remove rest of the xml support" into release-4-6

11 years agoMerge "Removing Zn and Ar non-OPLS atom types" into release-4-6
Roland Schulz [Sat, 17 Nov 2012 06:36:07 +0000 (07:36 +0100)]
Merge "Removing Zn and Ar non-OPLS atom types" into release-4-6

11 years agoAdded grompp warning
Mark Abraham [Wed, 5 Sep 2012 01:40:05 +0000 (11:40 +1000)]
Added grompp warning

Don't silently allow the user to combine velocity generation and an
unconstrained start.

Change-Id: I62f9f917fe583dfccdddfb5f9fad82a17e15ca25

11 years agoRemoving Zn and Ar non-OPLS atom types
Roland Schulz [Sat, 10 Nov 2012 19:25:26 +0000 (14:25 -0500)]
Removing Zn and Ar non-OPLS atom types

Some parameters were clearly wrong and the source of them was
not documented. They can be added back in but then the source
needs to be documented.

Add source for Fe2+.

Leaving Cu2+, Fe2+ and SI given their source is documented.

Fixes #957

Change-Id: I82a5b7ae4a54ab2aeb5690cea6256146a9819250

11 years agoRemove rest of the xml support
Christoph Junghans [Fri, 16 Nov 2012 22:06:23 +0000 (15:06 -0700)]
Remove rest of the xml support

* xml_io was removed in bfab7b6030da6cec449429454e2fa9a720474838

Change-Id: If78d923f292cd5f547d88dfa07c42ec31a797c82

11 years agoMerge "Removes unused files" into release-4-6
David van der Spoel [Fri, 16 Nov 2012 21:31:03 +0000 (22:31 +0100)]
Merge "Removes unused files" into release-4-6

11 years agoSSE2 single-precision kernels
Erik Lindahl [Tue, 13 Nov 2012 22:21:13 +0000 (23:21 +0100)]
SSE2 single-precision kernels

New single-precision x86 kernels rewritten to use intrinsics
instead of raw assembly. SSE2 is now our lowest-supported
accelerated instruction set on x86. We generate kernels for
the same interaction choices as the plain c kernels, but
have not enabled Buckingham interactions SSE kernels since
that would generate a whole lot more kernels that would only
be use in rare circumstances. The neighborsearching routine
has also been updated to optionally generate lists that
are padded up to the simd width, which is set by each
kernel when we initialize the neighborlist.

Change-Id: Ic51078e10e7f1f29af3d33e256177806ec208646

11 years agoRemoves unused files
Roland Schulz [Thu, 15 Nov 2012 21:27:42 +0000 (16:27 -0500)]
Removes unused files

These files are never compiled

Change-Id: I5ccb808b4021b3c081b947ff3a559bb798babbed

11 years agoreduced the cost of the nbnxn OpenMP nb-force reduction
Berk Hess [Wed, 14 Nov 2012 10:10:23 +0000 (11:10 +0100)]
reduced the cost of the nbnxn OpenMP nb-force reduction

The cost of the nbnxn non-bonded force reduction, used with OpenMP
on the CPU, increased linearly with the number of OpenMP threads.
Now blocks of this array are only reduced when a thread writes
forces to it.

Change-Id: I06acf772b7951ad3166d22be2e5876e3e5084bc0

11 years agoMerge "Test that compiling and linking of AVX works" into release-4-6
Christoph Junghans [Thu, 15 Nov 2012 22:24:35 +0000 (23:24 +0100)]
Merge "Test that compiling and linking of AVX works" into release-4-6

11 years agoVerify that FFTW can be used with shared libraries
Roland Schulz [Sat, 10 Nov 2012 12:00:52 +0000 (07:00 -0500)]
Verify that FFTW can be used with shared libraries

Fixes #740

Change-Id: If55f9bde72b1b2ce783c2a86a9bf0170a159c266

11 years agofixed incorrect 1-4 energies with OpenMP + energy groups
Berk Hess [Thu, 15 Nov 2012 10:19:18 +0000 (11:19 +0100)]
fixed incorrect 1-4 energies with OpenMP + energy groups

The OpenMP bonded thread data structure allocated too few energy group
elements with more than 1 energy group. This would lead to incorrect
1-4 interaction energies when atoms beyond the first energy group
were involved in 1-4 interactions (but sampling itself was correct).
Potentially this could also lead to memory corruption.
All this could only happen with more than 1 OpenMP thread.

Change-Id: Ib6b91862eaaddaafc0c609961219e01c7be0f9eb

11 years agoFindFFTW: Keep checking pkg_config until fftw is found
Roland Schulz [Wed, 14 Nov 2012 18:54:12 +0000 (13:54 -0500)]
FindFFTW: Keep checking pkg_config until fftw is found

Prior pkg_config didn't work when PKG_CONFIG_PATH was changed
after initial cmake run.

Change-Id: I7c067bdb634577c7847421f187b4893aa52ff511

11 years agofixed nbnxn x86 SIMD non-bonded performance regression
Berk Hess [Wed, 14 Nov 2012 15:23:59 +0000 (16:23 +0100)]
fixed nbnxn x86 SIMD non-bonded performance regression

Commit f40969c2 broke the LJ combination detection,
which effectively made all runs use the full combination rule
matrix for x86 SIMD kernels. This is now corrected.

Change-Id: I1073801546fde23e6a53199120246697a7c61b5f

11 years agoRemoved some unnecessary instructions, and fixed a bug in GB kernel
Erik Lindahl [Tue, 13 Nov 2012 14:50:03 +0000 (15:50 +0100)]
Removed some unnecessary instructions, and fixed a bug in GB kernel

The force-only kernels do not have to load all parts of the table,
which saves a few instructions. This patch also fixes a small error in the
chain-rule force introduced in the new generalized-born kernels. There
will soon be automatic tests for the GB kernels, but not today...

Change-Id: Ib9f8b2294ba98bdcbc040f6563a2889c3a9f47a0

11 years agoTest that compiling and linking of AVX works
Roland Schulz [Sun, 11 Nov 2012 22:52:17 +0000 (17:52 -0500)]
Test that compiling and linking of AVX works

Older assemblers don't have support for AVX

Related to #1021

Change-Id: If8da47f9458c592d5408c7322280ffacce81145d

11 years agoAllow to disable usage of rdtscp
Roland Schulz [Wed, 31 Oct 2012 02:50:34 +0000 (22:50 -0400)]
Allow to disable usage of rdtscp

The usage of rdtscp couldn't be overwritten by the user, which
which is a problem if the build host supports it but the execution
host doesn't. Adding flag GMX_DISTRIBUTABLE_BUILD which disables
rdtscp and can in the future be used for any other features
which are non-critical and makes binary non-distributable.

Change-Id: I14ee6874334287537dd265bc4217e07ee3c8818d

11 years agoMerge "Backport ThreadMPI.cmake version from master" into release-4-6
Roland Schulz [Mon, 12 Nov 2012 19:16:44 +0000 (20:16 +0100)]
Merge "Backport ThreadMPI.cmake version from master" into release-4-6

11 years agoMerge "nbnxn CPU force buffer reduction now uses SIMD" into release-4-6
Roland Schulz [Mon, 12 Nov 2012 18:40:28 +0000 (19:40 +0100)]
Merge "nbnxn CPU force buffer reduction now uses SIMD" into release-4-6

11 years agoBackport ThreadMPI.cmake version from master
Roland Schulz [Sun, 11 Nov 2012 00:49:40 +0000 (19:49 -0500)]
Backport ThreadMPI.cmake version from master

Allows to compile small part of ThreadMPI (e.g. for set_affinity)

Change-Id: I4b483a06fccf801399544c753487402ca5eec3a0

11 years agonbnxn CPU force buffer reduction now uses SIMD
Berk Hess [Mon, 12 Nov 2012 15:09:22 +0000 (16:09 +0100)]
nbnxn CPU force buffer reduction now uses SIMD

The reduction of the non-bonded OpenMP force buffers on the CPU used
a pattern with a high cache-miss rate. This has been improved and
an x86 SIMD reduction function has been added. The old reduction code
has not been removed (yet), as it could be faster in some cases.

Change-Id: Icc5065b976321d34055f9b44caedf3008fe3ec58

11 years agoFixes #1020 options in g_enemat
David van der Spoel [Sun, 11 Nov 2012 12:55:17 +0000 (13:55 +0100)]
Fixes #1020 options in g_enemat

Disentangled the options for selecting energy terms.

Change-Id: I8b2979a32e75a9e6a0eb641c0965089db5318f69

11 years agoFix FMA4 compile for GCC and MSVC
Roland Schulz [Sun, 11 Nov 2012 04:49:24 +0000 (23:49 -0500)]
Fix FMA4 compile for GCC and MSVC

GCC requires -mfma4 and MSVC requires intrin.h

Fixes #1023

Change-Id: I770a9d7fc5d9b0736042ea01ed0ed0d77aac95c6

11 years agoMerge "Fix broken manual formatting" into release-4-6
Roland Schulz [Sat, 10 Nov 2012 22:02:54 +0000 (23:02 +0100)]
Merge "Fix broken manual formatting" into release-4-6

11 years agoFix g_msd -mol
Roland Schulz [Sat, 10 Nov 2012 21:06:28 +0000 (16:06 -0500)]
Fix g_msd -mol

Fixes #774

Change-Id: I6fa564754bcbc898a5da6428729775c669cd72d2

11 years agoFix broken manual formatting
Mark Abraham [Sat, 10 Nov 2012 18:35:00 +0000 (19:35 +0100)]
Fix broken manual formatting

Change-Id: I7d03400c0c8b0527f2d3db185b8bd55f88cd8bba

11 years agoRemove obsolete GMX_THREAD_SHM_FDECOMP.
Teemu Murtola [Sat, 10 Nov 2012 04:58:24 +0000 (06:58 +0200)]
Remove obsolete GMX_THREAD_SHM_FDECOMP.

This macro was never set, and the remaining code behind #ifdefs was
broken.  The defines were removed from the kernels with the new
generator.  The only place where this macro remains after this change is
in obsolete kernels, and should get removed from there as well when they
are changed to the new kernel scheme.

Change-Id: Ifea0e6669791ecf3fecc2cfdec81d068e7507c63

11 years agoFix component for libcudart
Roland Schulz [Fri, 9 Nov 2012 19:10:31 +0000 (14:10 -0500)]
Fix component for libcudart

Change-Id: Ie63bbe5d9bab2f5f0c1231ddc03a7f51ffc86ffb

11 years agoRemoved old (now unused) bluegene kernels.
Erik Lindahl [Fri, 9 Nov 2012 10:27:09 +0000 (11:27 +0100)]
Removed old (now unused) bluegene kernels.

These will be moved to a kernel-generator based alternative
instead that provides SIMD instructions for more BG kernels.

Change-Id: Id53ad928f5d8e7720b6774b4f2a7a1a039d8f20d

11 years agoRemoved unused old kernel generator
Erik Lindahl [Fri, 9 Nov 2012 10:26:24 +0000 (11:26 +0100)]
Removed unused old kernel generator

Change-Id: I74f52245f8d720e1702ae9aaaa0fe675a69b615e

11 years agoRemoval of stale Fortran/Power6 kernels
Erik Lindahl [Fri, 9 Nov 2012 10:22:59 +0000 (11:22 +0100)]
Removal of stale Fortran/Power6 kernels

These Power6 kernels are no longer used in the code.
Based on benchmarks, we will decide whether a Fortran
version is necessary before the final 4.6 release.

Change-Id: Iab5341ce9cc99e2498b648d3a598c11503d87711

11 years agoRemoval of stale Fortran kernels
Erik Lindahl [Fri, 9 Nov 2012 10:20:27 +0000 (11:20 +0100)]
Removal of stale Fortran kernels

These Fortran kernels are no longer used in the code.
Based on benchmarks, we will decide whether to provide
new generated Fortran kernels (possibly for ia64,
Power and/or BlueGene architectures) before the final
Gromacs 4.6 release. I would prefer to keep the Fortran
detection code in CMake until we make that call.

Change-Id: Ia73fbfe968983289bba8896f8b84fdfb262d9105

11 years agoMerge "only use CPU_COUNT if it's available" into release-4-6
Kasson [Fri, 9 Nov 2012 02:42:29 +0000 (03:42 +0100)]
Merge "only use CPU_COUNT if it's available" into release-4-6

11 years agoonly use CPU_COUNT if it's available
Szilard Pall [Fri, 9 Nov 2012 01:38:37 +0000 (02:38 +0100)]
only use CPU_COUNT if it's available

The external affinity detection implemented by a6e1181 uses CPU_COUNT
from sched.h for a consistency check, but this macro is only available
with glibc 2.6 and later. Hence, a check for this macro was needed to
avoid issues with glibc <2.6

Change-Id: I6088972e9a5aabefb2b3fa3b38ac8d4ba32662f7

11 years agoalso preferentiate .lib with GMX_PREFER_STATIC_LIBS
Szilard Pall [Thu, 8 Nov 2012 19:30:18 +0000 (20:30 +0100)]
also preferentiate .lib with GMX_PREFER_STATIC_LIBS

On Mac OS X GMX_PREFER_STATIC_LIBS was enabled by caca171. On Mac OS X
.lib is also used as suffix for static archives (as well as .a), this
commits adds .lib to the preferred library suffixes.

Change-Id: I39e8df212355f6b199de4f93abd29275babdfe96

11 years agoMerge "Fixed bug in the new switch-modified interactions in C kernels" into release-4-6
Roland Schulz [Thu, 8 Nov 2012 23:08:06 +0000 (00:08 +0100)]
Merge "Fixed bug in the new switch-modified interactions in C kernels" into release-4-6

11 years agoMerge "auto-set nvcc host compiler with FindMPI detection" into release-4-6
Christoph Junghans [Thu, 8 Nov 2012 23:07:50 +0000 (00:07 +0100)]
Merge "auto-set nvcc host compiler with FindMPI detection" into release-4-6

11 years agoMerge "Relocated logic of simple-vs-GPU Ewald table generation" into release-4-6
Christoph Junghans [Thu, 8 Nov 2012 23:07:12 +0000 (00:07 +0100)]
Merge "Relocated logic of simple-vs-GPU Ewald table generation" into release-4-6

11 years agoFixed bug in the new switch-modified interactions in C kernels
Erik Lindahl [Thu, 8 Nov 2012 22:27:15 +0000 (23:27 +0100)]
Fixed bug in the new switch-modified interactions in C kernels

Fixed an error in the switch application formula, and another
table-related bug for PME interactions using the switch modifier
just introduced when only forces were calculated. This will not
have affected any other code unless you dug in the source and
tested the new switch modifiers the last 12h.

Change-Id: Ie323f45f2ce60ff1aacc2cccd9b395826f39cdf8

11 years agoAllow rcoulomb=rlistlong for PME with nstcalclr=1
Erik Lindahl [Thu, 8 Nov 2012 19:08:11 +0000 (20:08 +0100)]
Allow rcoulomb=rlistlong for PME with nstcalclr=1

This patch allows mdp files to set a VdW cutoff shorter than the
coulomb cutoff, even when not using potential modifiers for PME.
While this might come in handy in some cases, it is also needed for
the new kernel tests.

Change-Id: I4bef433a47a685f4f839b12b473047057608354d

11 years agoRelocated logic of simple-vs-GPU Ewald table generation
Mark Abraham [Wed, 7 Nov 2012 14:49:06 +0000 (15:49 +0100)]
Relocated logic of simple-vs-GPU Ewald table generation

I think this approach is cleaner than passing multiple arguments
down a call stack from pme_load_bal().

Change-Id: I45655312c5a9866e6fce73049e72acd70c184398

11 years agoInfrastructure for new group kernels, and new C kernels
Erik Lindahl [Sun, 28 Oct 2012 18:45:52 +0000 (14:45 -0400)]
Infrastructure for new group kernels, and new C kernels

This patch implements a new selection mechanism for nonbonded
kernels, as well as modifications of the neighborsearching to allow
long-range lists to be used every step (for rlist!=rcoul!=rvdw),
which is necessary for PP-PME load balancing. We can also evaluate
long-range interactions at steps that are arbitrary divisors of
nstlist. Kernels are now selected from text strings describing
desired options, which makes it much easier to have different
kernels for different architectures and gradually add kernels for
commonly used cases without implementing all combinations of
features. There is also a new kernel generator and flexible
preprocessor written in python. This is only executed by developers,
and the generated kernels are therefor included in the git tree
after discussions. The actual kernels are now written in plain C
with slightly more advanced preprocessor options allowing loops. The
listed (1,4) nonbonded interactions now use their own code rather
than executing a complete kernel call for each pair, which saves
a lot of overhead. The old c kernels have been adapted to continue
working, but addres kernels are disabled by this patch. Subsequent
patches will start adding back the kernels (one per architecture),
and also the addres kernels. The group kernels now support arbitrary
combinations of switch and shift for most interactions (but the
might be run in the generic kernel), and there are new kernels
specifically designed for Ewald direct space interactions as well as
force-only kernels.

Change-Id: Iab142bcc2e6d914ca127b4caa6a07b604549cb13

11 years agoObey DSO standard
Christoph Junghans [Thu, 1 Nov 2012 20:54:35 +0000 (14:54 -0600)]
Obey DSO standard

Compiling the template in recent fedora will lead to:
ld: note: 'sin@@GLIBC_2.2.5' is defined in DSO libm.so, so
try adding it to the linker command line
Hence we move -lm from Libs.private to Libs

Change-Id: I5e2c59bf62f950d06f3c708d22f6d2289babcacf

11 years agoauto-set nvcc host compiler with FindMPI detection
Szilard Pall [Fri, 2 Nov 2012 00:41:18 +0000 (01:41 +0100)]
auto-set nvcc host compiler with FindMPI detection

Distinguish between MPI build that use MPI compiler wrapper and FindMPI
as as in the latter case the CMAKE_C_COMPILER can be used safely as the
CUDA compiler's CPU backend.

Additional minor changes in cmake/gmxManageNvccConfig.cmake:
- added more detailed explanation on some strange things done in order
  to please nvcc;
- bumped icc gcc compatibility version to 4.5 with CUDA <=v4.1;
- added explanation on CUDA code generation;
- typos fixed.

Change-Id: Ia82bc63c129ac897ce88175f919b4f034e7ce665

11 years agodetect externally set CPU affinity
Szilard Pall [Wed, 31 Oct 2012 20:19:53 +0000 (21:19 +0100)]
detect externally set CPU affinity

Try to preserve externally set CPU affinity instead of silently
overriding it. If CPU affinity is set externally, e.g. by taskset or
some OpenMP library we don't check for, disable internal CPU affinity
and warn the user. This only works on Linux as it uses the sched.h CPU
set interface which is GNU feature.

Change-Id: Ie5f292fb1f29e07a3275429688c5d79398564979

11 years agoFix cmake error if compiler starts with blank line
Roland Schulz [Sat, 3 Nov 2012 01:48:36 +0000 (21:48 -0400)]
Fix cmake error if compiler starts with blank line

Change-Id: Id6579e4c7260fe9359ae43f9931662b29a17e7b9

11 years agoMerge "Clarification of mdp_opt, add nstexpand defaults & checks" into release-4-6
Roland Schulz [Tue, 6 Nov 2012 17:57:35 +0000 (18:57 +0100)]
Merge "Clarification of mdp_opt, add nstexpand defaults & checks" into release-4-6

11 years agoMerge "Add option to install libcudart" into release-4-6
Berk Hess [Tue, 6 Nov 2012 16:30:35 +0000 (17:30 +0100)]
Merge "Add option to install libcudart" into release-4-6

11 years agoClarification of mdp_opt, add nstexpand defaults & checks
Michael Shirts [Sat, 27 Oct 2012 03:18:20 +0000 (23:18 -0400)]
Clarification of mdp_opt, add nstexpand defaults & checks

Change-Id: If96973674ba9618256a6454d8f12a3d982ce00e2

11 years agoMerge "don't execute any mpi_info/mpiname in the path" into release-4-6
Berk Hess [Tue, 6 Nov 2012 16:22:16 +0000 (17:22 +0100)]
Merge "don't execute any mpi_info/mpiname in the path" into release-4-6

11 years agoMade g_tune_pme work correctly when ir->init_step > 0
Carsten Kutzner [Tue, 6 Nov 2012 13:03:25 +0000 (14:03 +0100)]
Made g_tune_pme work correctly when ir->init_step > 0

For .tpr files with ir->init_step > 0, the benchmarks do not have the
correct number of steps. This fix sets init_step to zero for the benchmark .tpr
files but keeps the original init_step value for the launch .tpr file.
Benchmarking should now work correctly for .tpr files any init_step value,
regardless whether the .cpt file was provided to g_tune_pme or not.

Change-Id: I9d44647d4c71e1514709ee4d6477bd416f455f42

11 years agoMerge "updated several things related with OpenMP thread count" into release-4-6
Berk Hess [Mon, 5 Nov 2012 21:38:58 +0000 (22:38 +0100)]
Merge "updated several things related with OpenMP thread count" into release-4-6

11 years agoAdd option to install libcudart
Roland Schulz [Sat, 3 Nov 2012 01:50:08 +0000 (21:50 -0400)]
Add option to install libcudart

New option INSTALL_CUDART_LIB installs libcudart and adds it to cpack archive.
Would be good to enable option by default for cpack but I can't find a
way to do so.

Change-Id: I1ce7fe84a9c2c2d9ef0ee0962b871db9fa065607

11 years agoupdated several things related with OpenMP thread count
Berk Hess [Tue, 9 Oct 2012 15:08:42 +0000 (17:08 +0200)]
updated several things related with OpenMP thread count

Removed a gmx_fatal preventing oversubscribing hardware with OpenMP threads.
Proper checks for avoiding partial HT and inconvenient thread count with tMPI.
Automatic switch to pure OpenMP parallelization with <= 4 threads
or <= 12 on Nehalem/Westmere or <= 16 on >=Sandy Bridge.

Change-Id: I5f0fa7c8e5a23cb66833ec9facdbc6d197f82836

11 years agoMerge release-4-5-patches into release-4-6
Roland Schulz [Sat, 3 Nov 2012 19:31:12 +0000 (15:31 -0400)]
Merge release-4-5-patches into release-4-6

Conflicts:
cmake/gmxTestLargeFiles.cmake

Change-Id: I104448f48be0c7b3cd5daa1b5cede3cb9d7f672d

11 years agoReworked version of cmake FFTW detection
Christoph Junghans [Wed, 17 Oct 2012 09:57:32 +0000 (11:57 +0200)]
Reworked version of cmake FFTW detection

Change-Id: I6d83293de760986fc1e1ebe4669520fbd499d7fc

11 years agoMerge all License/COPYING files into one and install it
Roland Schulz [Fri, 19 Oct 2012 00:28:16 +0000 (20:28 -0400)]
Merge all License/COPYING files into one and install it

Installing is important for cpack binary packages (e.g. TGZ).

Also added Copyright of thread_mpi, blas, and lapack which
were missing.

Fixes #952

Change-Id: I06c54a08a493273f8e91333c4601f4fef945ad51

11 years agodon't execute any mpi_info/mpiname in the path
Szilard Pall [Fri, 2 Nov 2012 02:27:52 +0000 (03:27 +0100)]
don't execute any mpi_info/mpiname in the path

During MPI setup, the gmxManageMPI.cmake script uses mpi_info/mpiname to
check for and warn about potentially problematic versions. However,
executing these binatries without any path can lead to false positive
warnings e.g. in case if the MPI installation in used does not provide
mpi_info, but another MPI installation's mpi_info is in the path
(which is the case with MacPorts OpenMPI + Xcode's MPI).

To avoid these false positives we don't execute any other
mpi_info/mpiname but the ones found at the same path where the MPI
compiler wrapper resides (if any).

Change-Id: Icd2091dd952f4a140b92045f95a8d0187c1a354f