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

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

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

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

Change-Id: I8fe7436b8164d80ad6db64eb54dc81424cd44e4a

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

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

Fixes #977

Change-Id: Iaf42afd3617873e5c1e5e7cb7c327986efa20fcd

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

In particular, reduce ambiguous usage of "force".

Refs #974

Change-Id: Ia6178ce3392f66451341dd7a4af98312f9e72c0f

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

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

Change-Id: I1b474019bf93e6ef6f7cc935aa3f73f2597a91a8

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

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

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

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

Change-Id: Ia4fba1b1a66baab8b409fbb3932ee099cec80298

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

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

Change-Id: I323524d32f07409c02de6066a24e73fb8a966481

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

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

Change-Id: I089d67a6442a745faa3bf5e3be1c779855725a67

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

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

Change-Id: I114f1ab4d58c9ccca0261e8588b61c39feaae874

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

Change-Id: I3b7879fc93d9b3a7c5eed5f14825331a12589b25

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

Change-Id: I7ec8707acf021b0f168691014fb0ba2f68ae29a6

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

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

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

Change-Id: Ie656d5fcfa62f9c7e0fee605c90251084a421a72

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

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

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

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

Fixes Bug #919

Change-Id: I20a78b0b1cf4bf2271ba0ce8c785d900502d7656

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

Backported from dd3a102.

Conflicts:
src/gmxlib/selection/compiler.c

Fixes #968.

Change-Id: If92b5b1eb8cf6b3acb510ba43f64fc82b63ab82a

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

Change-Id: I958906dc9967155bccd3f43e5a6882632a829951

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

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

Change-Id: I7378047b5cd0909b864a62200ded747682f627a1

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

Fixes #967

Change-Id: I23968ca45683b5867f919bf32e588058bd391c67

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

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

Change-Id: Icb9c4dfa2e7d211ab6bd2efcb2f2437504a87cfe

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

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

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

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

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

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

Change-Id: I7d7145fb99d3f1991d0f3992ca4f3ea20668dd9a

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

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

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

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

Change-Id: I86f8cb4dfb73898e74d320ae8ef3676e62ebde51

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

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

Change-Id: I452ab2e873434086e6bc616d9d24a8d890147220

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

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

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

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

Change-Id: I99bc7eee76953d06767f9c9916d1c9289badf74f

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

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

Fixes #905.

Change-Id: Id3ff7b090efd23fd28d8c27ea99992d1647f1ed6

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

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

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

Change-Id: I6abe24a5c286d20dcf554831ade9540674df9d77

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

Introduced recently when FEP was added to the Morse potential.

Change-Id: I90edfd13835637c872af31f2c7abf900ce8a8e5f

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

Change-Id: Id5adec8aa057f1d56021b06aaedd35dab108ead7

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

Change-Id: I2992a927ccf49b407fa985eb2283c37818bbd2a5

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

Change-Id: If9494aa0bdbd6f83cc2a8a57a5c7e399aaa787f4

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

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

Change-Id: I5145ced14d59f7186dd8ef47fe6877fe00cbd94b

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

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

Change-Id: I20c0ac3958724feecaaef5c20279d340ecca4b1a

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

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

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

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

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

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

Fixes #958

Change-Id: Ic53d8125c5a58edc6789fe16f2b710e7e2568d4f

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

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

Change-Id: I8a92a5f1849d170951719b29b17e0ec6134ee556

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

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

Change-Id: I988763e6b26cc5bae62c4da66cc7b30f2f93c128

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

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

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

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

Change-Id: If30f433946fef908c26a29f1bff3671580e90629

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

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

Change-Id: I3d6b636ddba80fc2ae400590c48642c217325293

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

Change-Id: I79d16574b6c4cb039afa01240e7d3aa816b3f337

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

11 years agoMerge "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 agoFix mdp_opt formatting of expanded ensemble
Roland Schulz [Sun, 24 Jun 2012 15:07:04 +0000 (11:07 -0400)]
Fix mdp_opt formatting of expanded ensemble

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

Change-Id: I86afd4a2bdc638fb910cb0afa827b3f56447bb36

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

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

This fixes #849 and is related to #853.

Change-Id: I63bfc14400cda096350aba9a94a676e9c0952d56

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

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

Change-Id: Ia70f81862fa50b03ab127e8796226369f6732942

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

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 agoFixes #961 - Shake reports wrong error
David van der Spoel [Thu, 21 Jun 2012 16:14:33 +0000 (18:14 +0200)]
Fixes #961 - Shake reports wrong error

The constraint index reported by shake was off by 1.

Change-Id: I6f4d0c013b30f5963fb312b41fb87e90e6314619

11 years agoFix gmx_fatal for serial compilation
Roland Schulz [Thu, 14 Jun 2012 23:16:06 +0000 (19:16 -0400)]
Fix gmx_fatal for serial compilation

With neither GMX_MPI nor GMX_THREAD_MPI gmx_fatal
called gmx_abort which called gmx_fatal.

Change-Id: Id18c3bc94f19a8008fa2aaa8335c221f115fcd8b

11 years agoCorrect normalization for HB-contact c-correlation.
Erik Marklund [Wed, 20 Jun 2012 11:23:12 +0000 (13:23 +0200)]
Correct normalization for HB-contact c-correlation.

Fixes #960

Change-Id: I391dd84fd38e784ac6c311dd913284de47d6a93d

11 years agoMerge "Fixes #882 - looping bug in trxio.c" into release-4-5-patches
Mark Abraham [Tue, 19 Jun 2012 23:12:18 +0000 (01:12 +0200)]
Merge "Fixes #882 -  looping bug in trxio.c" into release-4-5-patches

11 years agoMerge "Quiet linker on BlueGene" into release-4-5-patches
Christoph Junghans [Tue, 19 Jun 2012 22:46:12 +0000 (00:46 +0200)]
Merge "Quiet linker on BlueGene" into release-4-5-patches

11 years agoMerge "Fix g_lie counting last frame twice" into release-4-5-patches
Christoph Junghans [Mon, 18 Jun 2012 21:32:22 +0000 (23:32 +0200)]
Merge "Fix g_lie counting last frame twice" into release-4-5-patches

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 agoFixes #882 - looping bug in trxio.c
David van der Spoel [Fri, 15 Jun 2012 11:47:07 +0000 (13:47 +0200)]
Fixes #882 -  looping bug in trxio.c

This led to infinite output files in the case of a corrupt
input file.

Change-Id: I25d61752d901012e9ce5e6adae1679c2ef99467a

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 agoQuiet linker on BlueGene
Mark Abraham [Tue, 5 Jun 2012 04:08:29 +0000 (14:08 +1000)]
Quiet linker on BlueGene

Change-Id: Ib105a93ca233c763d3b6caf3c3c636a673078986

11 years agoMakes g_hbond -contact work
Erik Marklund [Fri, 8 Jun 2012 23:36:53 +0000 (01:36 +0200)]
Makes g_hbond -contact work

Fixes #955

Change-Id: I5d421d5f2e25d3801497efccb291425f90480a8c

11 years agoFix g_lie counting last frame twice
Mark Abraham [Fri, 15 Jun 2012 07:46:26 +0000 (17:46 +1000)]
Fix g_lie counting last frame twice

Change-Id: Ia1c37e79843cd0e10d5e8444d004c7aca9cce87a

11 years agoMerge "Work around failure of endianness testing on BlueGene" into release-4-5-patches
Christoph Junghans [Fri, 15 Jun 2012 00:16:37 +0000 (02:16 +0200)]
Merge "Work around failure of endianness testing on BlueGene" into release-4-5-patches

11 years agoMerge "Made mdrun more verbose about PME split" into release-4-5-patches
Roland Schulz [Thu, 14 Jun 2012 14:14:49 +0000 (16:14 +0200)]
Merge "Made mdrun more verbose about PME split" into release-4-5-patches

11 years agoSmall fix for g_tune_pme
Carsten Kutzner [Thu, 24 May 2012 13:18:11 +0000 (15:18 +0200)]
Small fix for g_tune_pme

Change-Id: I12fd2e48dc409f87b270f1ddaaaf2d1a83683fd1

11 years agoMerge "Added more suggested strategies to error message" into release-4-5-patches
Christoph Junghans [Fri, 8 Jun 2012 15:45:24 +0000 (17:45 +0200)]
Merge "Added more suggested strategies to error message" into release-4-5-patches

12 years agoWork around failure of endianness testing on BlueGene
Mark Abraham [Wed, 6 Jun 2012 11:52:41 +0000 (21:52 +1000)]
Work around failure of endianness testing on BlueGene

Refs #944

Change-Id: I4bbfe9865800bbe4e407a88cdecec6678d56f3b4

12 years agoFix endian test functionality
Mark Abraham [Wed, 6 Jun 2012 10:15:58 +0000 (20:15 +1000)]
Fix endian test functionality

Code for big-endian systems was silently failing with CMake. This
patch brings CMake and autotools into agreement.

Partial fix of #944
Change-Id: I1f14938fd23e926e05397977963fbf968f0406e0

12 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

12 years agoAdded more suggested strategies to error message
Mark Abraham [Mon, 4 Jun 2012 07:34:49 +0000 (17:34 +1000)]
Added more suggested strategies to error message

Change-Id: I4a68ea06697890175bb03e900664dd9bb886305c

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 agoMade mdrun more verbose about PME split
Mark Abraham [Thu, 31 May 2012 11:26:20 +0000 (21:26 +1000)]
Made mdrun more verbose about PME split

Change-Id: Ieda0ba5dcf08260cf94ad9aefd8937e067f2c6e2

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 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 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 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 "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 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 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 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