alexxy/gromacs.git
10 years agoFix strange character in manual
Mark Abraham [Wed, 27 Nov 2013 18:57:28 +0000 (19:57 +0100)]
Fix strange character in manual

Fixes #1389

Change-Id: I577a174c807f813e8070bb4ac9f30a66b39c124a

10 years agoRemove #ifdef GMX_THREAD_MPI for basic thread safety.
Teemu Murtola [Sat, 14 Sep 2013 12:05:06 +0000 (15:05 +0300)]
Remove #ifdef GMX_THREAD_MPI for basic thread safety.

Simplifies the code, and at least most of this should have zero impact
on performance.  Basic thread support from thread-MPI is already
required for compilation anyways even with GMX_THREAD_MPI off.
This removes about 70% of the #ifdefs, making it clearer what is
different between MPI and thread-MPI implementation in Gromacs.

Also set MPI_IN_PLACE_EXISTS with GMX_THREAD_MPI instead of checking for
GMX_THREAD_MPI separately each time.  Adjust one #ifdef in network.c to
replace an GMX_LIB_MPI made unnecessary by this with GMX_MPI.

Related to #948 and #1320.

Change-Id: I03a54b0bffde090100afe5ed2e91c184af36c189

10 years agoMoved gromos87 writing code into fileio module
Mark Abraham [Sun, 24 Nov 2013 12:02:15 +0000 (13:02 +0100)]
Moved gromos87 writing code into fileio module

Fixed copyright, include guards, uncrustify. Removed
a useless #include and comment. Renamed files and functions
to avoid cryptic "gms" abbreviation.

Change-Id: I17422d9a46398162710a6e768aeb5c2a5e5c5d8f

10 years agoAdd license for Sun XDR routines
Mark Abraham [Sun, 24 Nov 2013 12:50:04 +0000 (13:50 +0100)]
Add license for Sun XDR routines

I can find no distribution from Sun, and the original GROMACS import
does not reproduce a coyright statement, if one existed. If this ever
proves to be a problem, we can replace these routines with LGPL
alternatives.

Fixes #1241

Change-Id: I12061672599bf17daa40ad85315ec242a1be6593

10 years agoUpdate copyright headers in kernels.
Teemu Murtola [Fri, 11 Oct 2013 04:19:44 +0000 (07:19 +0300)]
Update copyright headers in kernels.

Update copyright headers in kernel files to match the new format.
Since all the kernel code has been introduced in 2012, removed copyright
years older than that.  The Python script for Verlet kernels was updated
to strip a copyright header from the templates to allow adding one there
as well.  This commit processes all files that are not produced by the
kernel generators, but contain _kernel_ in their path.

Part of #818.

Change-Id: I5d7babc137cdbe0c427cbaa44209b9e8f7be55bb

10 years agoUpdate copyright headers in generated kernels.
Teemu Murtola [Fri, 11 Oct 2013 03:57:51 +0000 (06:57 +0300)]
Update copyright headers in generated kernels.

Update copyright headers in generated kernel files to the new format.
Update also some copyright years.

Adjust the generating scripts to reuse the copyright header from
admin/copyright.py to keep it up-to-date.  For the Verlet kernels, some
changes may be required if/when we want to add a copyright header also
into the .pre files.

Part of #818.

Change-Id: I6b5060f12a3c469d0080c73bc9d674e074ce44a4

10 years agoScript to automatically update copyright
Teemu Murtola [Sat, 27 Jul 2013 19:16:58 +0000 (22:16 +0300)]
Script to automatically update copyright

Adapt the automatic uncrustification script to also update the
copyright header for changed files.  Add a Python script to do the
actual copyright header processing.  The Python script can also do other
copyright header tasks.  Make the pre-commit hook more flexible to be
able to do either only uncrustify or only copyright checking, as well as
temporarily skipping the hook for a commit.

Related to #818.

Change-Id: Ie21365acbe07e1f097e6d72c6a5e0d0826631ff0

10 years agoAdd some missing copyright headers.
Teemu Murtola [Mon, 7 Oct 2013 03:59:58 +0000 (06:59 +0300)]
Add some missing copyright headers.

Went through files that were modified by
  git ls-tree --name-only -r HEAD | git check-attr filter --stdin | \
  sed -Ene '/(copyright|uncrustify)$/ {s/:.*//;p;}' | \
  grep -v '_kernel_' | xargs admin/copyright.py --add-missing
and updated the copyright years for those where I know the history or
could easily dig it out.  Mostly this is CMake build system files, which
came to existence at earliest 2009, so it wasn't too hard to dig out
when the code was actually introduced/changed, using git log and
git log --follow.

Part of #818.

Change-Id: Ibba6d8bacc700efd76b7bc429228d751b8e17a27

10 years agoAdd back mechanism for cross-tool hyperlinks.
Teemu Murtola [Sun, 22 Sep 2013 18:11:56 +0000 (21:11 +0300)]
Add back mechanism for cross-tool hyperlinks.

The exported HTML pages again can contain hyperlinks to other tools.
Instead of replicating the old functionality, made the links of the form
[gmx-distance] instead of recognizing plain text words.  This requires
all the output formats to be aware of them (not a big deal in the
current code layout), and makes it possible to define the appearance of
the links centrally instead of relying on all links being wrapped in,
e.g., [TT]...[tt].  The new link syntax is similar to Markdown implicit
links (at least Doxygen accepts them without the second []).

Also added support for [THISMODULE] tag in the help text, which expands
to the name of the current module, again allowing the appearance to be
defined centrally.

Only changed the help text for gmx-mindist to take advantage of the new
mechanism as a proof-of-concept.  Bulk work for other tools is better
done as a separate commit once the general approach is accepted.

Part of #685 and #1242.

Change-Id: Ibd263cc2c131dc18d2a5d9046fecc6b1c08734f9

10 years agoBump CMake requirement to 2.8.8
Mark Abraham [Sun, 3 Nov 2013 12:33:29 +0000 (13:33 +0100)]
Bump CMake requirement to 2.8.8

Permits use of CMake "object libraries," and CMake-based detection of
compiler ID and version. Avoids bug in add_library(GLOBAL). Various
minor CMake logic simplifications ensue.

2.8.8 will be 21 months old by the time we release GROMACS 5. Anybody
who installed the latest CMake since we released 4.6 betas already has
a suitable version. Most distros already supply a higher version, with
the notable exception of Ubuntu 12.04 LTS (supplies 2.8.7). A new
Ubuntu LTS is due shortly after GROMACS 5.0, and it will have a
suitable CMake.

Also moved the code supporting storing the compiler info in
buildinfo.h to where it is first used, instead of some point in
top-level CMake scope.

Fixes #1287

Change-Id: I7b82412d2b51a7a0b2e94022e8e39cf3ae06cc35

10 years agoReformat existing LGPL copyright notices.
Teemu Murtola [Sun, 6 Oct 2013 05:06:01 +0000 (08:06 +0300)]
Reformat existing LGPL copyright notices.

Update files that already had the new-style LGPL copyright notice to
match what the new copyright script expects (slightly different author
list).  Generated kernels need a somewhat separate approach, so skipped
in this change.

Applied with
  git ls-tree --name-only -r HEAD | git check-attr filter --stdin | \
  sed -Ene '/(copyright|uncrustify)$/ {s/:.*//;p;}' | \
  grep -v '_kernel_' | xargs admin/copyright.py --update-header
with the .gitattributes and copyright.py from Ie21365a.

Also adapt COPYING to match more or less the contents of the file in
release-4-6.

Part of #818.

Change-Id: I2885b36f65ac3599a7dfb66efdb7faed55fa9557

10 years agoMove binary directory search to ProgramInfo.
Teemu Murtola [Mon, 1 Jul 2013 05:05:54 +0000 (08:05 +0300)]
Move binary directory search to ProgramInfo.

This makes it possible to print the real executable location in the
startup header.  Probably useful diagnostic if one has multiple Gromacs
installations in different paths.  Also, now the search for the path is
done at most once per invocation, and not for each library file.

This is mainly moving code around and converting it to C++:
- Part of get_libdir() gets moved into gmx::ProgramInfo, and the
  remainder is now using C++.
- Move gmx_is_file() to gmx::File, since it is only used in the code
  moved to gmx::ProgramInfo.

There are some minor behavior changes:
- The search now works correctly if PATH contains an empty entry
  (i.e., the working directory is in the path).
- If PATH does not contain the working directory explicity, the search
  only considers the working directory on Windows.
- If the working directory has been changed in code (but not before call
  to gmx::init()), the search still works.

Change-Id: If1d548be6b4dd031617a6019bcad20466ad91994

10 years agoRemove more obsolete content from share/html.
Teemu Murtola [Sun, 17 Nov 2013 13:03:47 +0000 (15:03 +0200)]
Remove more obsolete content from share/html.

- yourown.html was not referenced.
- Will replace ADD_INCLUDE and include_*.html with something more useful
  in the future.
- FAQ link in online.html was referencing a file deleted in release-4-6.
- Other changes remove content that was referencing share/tutor/, which
  was removed earlier.

Related to #1242.

Change-Id: I0e04438694cf251eae789c08e2ae1087d6fd99fc

10 years agoAllow copying of HelpWriterContext.
Teemu Murtola [Fri, 20 Sep 2013 03:50:57 +0000 (06:50 +0300)]
Allow copying of HelpWriterContext.

It is now possible to create copies of HelpWriterContext.  The copies
share the same base state (output file, format and links).
This makes it possible to add support for customizing some aspects of
the substitution (done in a later commit).

Change-Id: I8af70ef35269edc5fd216728e8d962f4839ef29c

10 years agoAdd listing of programs by topic to HTML output.
Teemu Murtola [Tue, 8 Oct 2013 18:34:40 +0000 (21:34 +0300)]
Add listing of programs by topic to HTML output.

Now the HTML-exported help contains also a list of programs by topic,
similar to what used to be generated from programs.txt.  Removed the
mkhtml script, since it is now fully replaced by the mechanism in the
wrapper binary.

The same mechanism could also be used to replace the gromacs.7 man page,
but in its current form, it contains so much boilerplate code that I
didn't want to copy-paste that all into the source file.  And it could
also be used to make the output of 'gmx help' more structured.

Related to #685, #969, and #1242.

Change-Id: I6c2efe10c53f10f7fde90b3386ddea7fbea34b89

10 years agoSome module dependency cleanup.
Teemu Murtola [Tue, 29 Oct 2013 20:25:10 +0000 (22:25 +0200)]
Some module dependency cleanup.

Move wman.* from onlinehelp/ to commandline/, since they depend on stuff
from commandline, and are not used by anything else than statutil.cpp
for command-line stuff.  Also, don't let exceptions from write_man()
propagate into C code potentially calling parse_common_args().

Move some additional file I/O stuff into trxio.c from statutil.cpp,
removing otherwise unnecessary dependencies to fileio.

Change-Id: I43ededf3c729239cd0e6bd8ddaf97386747c4363

10 years agoReorganize help writing code.
Teemu Murtola [Wed, 18 Sep 2013 18:37:51 +0000 (21:37 +0300)]
Reorganize help writing code.

Move all code related to printing the help (console or other formats)
into wman.cpp from pargs.c and filenm.c.  This allows making a lot of
functions internal to this file.

Move code related to markup substitution from wman.cpp into
helpwritercontext.cpp, making it a bit more C++-like in the process.

This commit is mostly cut&pasting code, but some small changes here and
there were required to make it compile (mostly, replacing direct access
to deffile[] with ftp2*() function calls).

Change-Id: I233be210f98c65ffc6308bc91021100bacf7c831

10 years agoMake gmx-gangle more flexible with multiple angles
Teemu Murtola [Wed, 23 Oct 2013 18:41:33 +0000 (21:41 +0300)]
Make gmx-gangle more flexible with multiple angles

Add support for providing only a single selection and/or a single vector
while the second group of selections is larger.  In such cases, expand
the smaller selection to match the size of the larger selection.

This makes it easier to compute multiple angles against the same vector.
For example, computing the relative angle of N molecules against a
single reference molecule.

Change-Id: I464acc8655c1bae09a88dff7d7301d20712d270e

10 years agoTurn on most -Wunused warnings for C++ code.
Teemu Murtola [Mon, 11 Nov 2013 18:33:36 +0000 (20:33 +0200)]
Turn on most -Wunused warnings for C++ code.

They used to be on, but some merge from release-4-6 ages ago removed
the flags.  Now, also -Wunused-parameter can be enabled.  At least new
code can now be kept free of these warnings; there is still ~150
warnings left for non(-thread)-MPI compiled C code.

Fix remaining warnings in C++ code.

Change-Id: I15628665ae9214c8d44b58bab5f963a3e1bc74bd

10 years agoConsistently handle NULL at argv[argc].
Teemu Murtola [Sat, 9 Nov 2013 14:36:06 +0000 (16:36 +0200)]
Consistently handle NULL at argv[argc].

The command-line test classes now provide a trailing NULL for the argv
array, to match what the C/C++ standard says about argv for main().
The new command-line parser also adds such a NULL at the end if it
modifies the array.

Change-Id: I723d45ee599c47db205544878d547ee6d5dad230

10 years agoMerge "Merge branch release-4-6"
Erik Lindahl [Fri, 15 Nov 2013 20:51:19 +0000 (21:51 +0100)]
Merge "Merge branch release-4-6"

10 years agoSimplify GMX_X11 handling.
Teemu Murtola [Sat, 9 Nov 2013 14:24:41 +0000 (16:24 +0200)]
Simplify GMX_X11 handling.

Now user request for GMX_X11 is always honored, or a fatal error given
if that is not possible instead of overriding the user-set option.
Use GMX_X11 consistently to turn on X11 compilation.
Reorganize code in view.cpp to have (nearly) all #ifdef'd code within a
single block for easier readability.  The main function is also now at
the end, making it easier to find by casual browsing.

Change-Id: Ic7f8908d117bacb6140f6e422c0e2c24bba85443

10 years agoMerge branch release-4-6
Mark Abraham [Thu, 14 Nov 2013 17:35:56 +0000 (18:35 +0100)]
Merge branch release-4-6

Conflicts:
CMakeLists.txt
cmake/gmxDetectAcceleration.cmake
cmake/gmxSetBuildInformation.cmake
include/gpu_utils.h
include/nbnxn_cuda_data_mgmt.h
include/string2.h
src/gromacs/gmxlib/gmx_detect_hardware.c
src/gromacs/legacyheaders/domdec.h
src/gromacs/legacyheaders/force.h
src/gromacs/legacyheaders/gmx_detect_hardware.h
src/gromacs/legacyheaders/network.h
src/programs/mdrun/mdrun.cpp
src/programs/mdrun/runner.c
Resolved in favour of release-4-6, except for details like
the use of gmx_unused and changes to include file locations

share/html/gmxfaq.html
Deleted as in release-4-6

share/html/online.html
Retained master version because this file is not generated
in master branch.

Did a little bit of uncrustify on areas that were already changing

Change-Id: I3ecf623a65eb4dac208a239e1b35141d08512483

10 years agoBump version after 4.6.4 release
Mark Abraham [Wed, 13 Nov 2013 17:11:09 +0000 (18:11 +0100)]
Bump version after 4.6.4 release

Change-Id: Ied0463a471657e39cb6c4c41d6112f5778ef00d5

10 years agoFix minor things before release
Mark Abraham [Fri, 8 Nov 2013 11:31:40 +0000 (12:31 +0100)]
Fix minor things before release

Bumped various version numbers

Trivial fix to install guide

Removed out-of-date gmxfaq.html and links to it, replaced links with
links to up-to-date FAQ

share/html/online.html is generated by mkhtml, so stopped caching it
in the repo.

Change-Id: I52265e1174f6e42a2a9d056c3a1751c1cd5886ac

10 years agoClarified GPU selection output and mdrun help
Szilard Pall [Fri, 8 Nov 2013 17:05:25 +0000 (18:05 +0100)]
Clarified GPU selection output and mdrun help

The reporting of GPU selection has been confusing when devices are
shared as GPU IDs would show up multiple times in a list of "devices
selected to be used." The reporting has been modified to print the
number of devices selected followed by the GPU to PP rank mapping which
is in fact exactly the previously printed list of IDs.

Additionally, the mdrun help page now explicitly states that the GPU ID
string passed with -gpu_id specifies a per-node GPU to PP rank mapping
and that multiple ranks can share GPUs.

Change-Id: Id98c592c1dd38573df003247281e4edf50debba7

10 years agoAdded rotation to the tests run by ctest
Roland Schulz [Tue, 12 Nov 2013 21:42:31 +0000 (16:42 -0500)]
Added rotation to the tests run by ctest

Was forgotten when the rotation tests were added and thus
they weren't run by Jenkins

Change-Id: I27fc51b1314e6377d1e866a8ba4658700cc71cfa

10 years agoUpgrade Doxygen layout to 1.8.5.
Teemu Murtola [Thu, 26 Sep 2013 15:16:38 +0000 (18:16 +0300)]
Upgrade Doxygen layout to 1.8.5.

Second part of Doxygen layout file changes.  Add sections that have been
added between 1.7.6.1 and 1.8.5.

Related to #1239.

Change-Id: Ie2656448aafbce2687fbc00350663771f9dd52fb

10 years agofix nbnxn atom sorting with distant bondeds
Berk Hess [Fri, 8 Nov 2013 17:44:23 +0000 (18:44 +0100)]
fix nbnxn atom sorting with distant bondeds

Atoms communicated for bonded interactions can be beyond the non-local
search grid. Only a single cell extra was accounted for, which could
give inconsistency errors. Now any distance is handled correctly.
Fixes #1379

Change-Id: I7b12efeeab4074f2b356c0d0739105ce38371901

10 years agoFix malformed CMake
Mark Abraham [Fri, 8 Nov 2013 17:25:37 +0000 (18:25 +0100)]
Fix malformed CMake

Change-Id: Ic23e3444d4cae568cd9fedfa17f095fad1ab6da9

10 years agocorrected dynamic load balancing when sharing GPUs
Berk Hess [Fri, 27 Sep 2013 12:24:58 +0000 (14:24 +0200)]
corrected dynamic load balancing when sharing GPUs

When sharing GPUs over MPI ranks, the time the GPU is busy might not
reflect the actual load. To make the dynamic load balancing between
domains work correctly, the GPU wait times are now redistributed over
the ranks/domains sharing a GPU.

Change-Id: Id9414e3ef7cc5a73a2b4560a0e10c2ee8ab1257f

10 years ago12 new quotes
David van der Spoel [Sat, 2 Nov 2013 15:56:39 +0000 (16:56 +0100)]
12 new quotes

Change-Id: I232f55577594c2632931fe6162bb83082c872a80

10 years agoAdded enumeration of valid build types for CMake GUI
Marcus D. Hanwell [Tue, 29 Oct 2013 20:25:41 +0000 (16:25 -0400)]
Added enumeration of valid build types for CMake GUI

The CMake GUI (cmake-gui) will display a drop-down list if they are
added as a property to the CMAKE_BUILD_TYPE, making it easier to
select a valid type from the list.

Change-Id: I50b2d8c951b68a13ac7dd80812c2c35365530bb7

10 years agoenable GPU sharing among tMPI ranks
Szilard Pall [Fri, 4 Oct 2013 00:01:44 +0000 (02:01 +0200)]
enable GPU sharing among tMPI ranks

It turns out that the only issue preventing sharing GPUs among thread-MPI
threads was that when the thread arriving to free_gpu() first destroys
the context, it is highly likely that the other thread(s) sharing a GPU
with this are still freeing their resources - operation which fails as
soon as the context is destroyed by the "fast" thread.

Simply placing a barrier between the GPU resource freeing and context
destruction solves the issue. However, there is still a very unlikely
concurrency hazard after CUDA texture reference updates (non-bonded
parameter table and coulomb force table initialization). To be on the
safe side, with tMPI a barrier is placed after these operations.

Change-Id: Iac7a39f841ca31a32ab979ee0012cfc18a811d76

10 years agoGPU detection is done once per physical node
Berk Hess [Thu, 17 Oct 2013 10:11:55 +0000 (12:11 +0200)]
GPU detection is done once per physical node

Only one MPI rank in each physical node now run the GPU detection.
The resulting information is broadcasted to the other ranks.
Note that we should also implement this for the CPU detection.
Fixes #1358

Change-Id: I16c6ccc40bd53d96b99d3f6a0abed69cc89136d8

10 years agoremoved (harmless) left-over in nbnxn SIMD kernels
Berk Hess [Mon, 21 Oct 2013 14:05:20 +0000 (16:05 +0200)]
removed (harmless) left-over in nbnxn SIMD kernels

This improves performance of PME + p-coupling by about 5%.
With Ewald and virial, the nbnxn SIMD energy kernels were used
(some left-over development code). The plain-C code did not do this.

Change-Id: I039044fcb393bf0bcaa06f38498b2a57d60cf080

10 years agoAdded gmx_omp_nthreads_set for use in testing
Mark Abraham [Wed, 31 Jul 2013 08:32:05 +0000 (10:32 +0200)]
Added gmx_omp_nthreads_set for use in testing

Also added extern-C guards in gmx_omp_nthreads.h,
and removed an unused return value.

Change-Id: I46e1df5ddbb0de0c86aabdb9866c1a7638eaa586

10 years agoreorganized GPU detection and selection
Berk Hess [Thu, 10 Oct 2013 15:39:25 +0000 (17:39 +0200)]
reorganized GPU detection and selection

The GPU selection has been separated from the GPU detection
and now happens after the thread-MPI threads are started.
The GPU user/auto-selected options have been removed from
gmx_hw_info_t, such that it only contains hardware info
and can be passed around as const.
As both the CPU and GPU options structs are now tMPI rank local,
tMPI thread concurrency issues are avoided.
Fixes #1334 #1359

The GPU detection is now skipped with mdrun -nb cpu
CPU acceleration binary/hardware mismatch is now only printed once
to stderr (instead of #MPI-rank times to stdout).
Removed the master_inf_t struct.

Change-Id: If497f611b911808f6d01ca83f41ae288061dd361

10 years agoRename GMX_IS_* to GMX_TARGET_*
Mark Abraham [Fri, 19 Jul 2013 07:23:43 +0000 (09:23 +0200)]
Rename GMX_IS_* to GMX_TARGET_*

This addresses some confusion that developed between release-4-6 and
master with me trying to develop the kernels in master branch so I
could have unit testing support, and then cherry-pick them back.  I
had intended to solve #1269 in a separate commit, but it didn't happen
that way.

As #1269 discusses, the code sometimes needs to know what architecture
is being targetted by the compiler. This information is held in the
GMX_TARGET_X86 and GMX_TARGET_BGQ CMake and preprocessor
variables. Note that this information is distinct from what CPU
acceleration is being used (which might be "None" on either platform).

gmx_cpuid.c needs GMX_TARGET_X86 defined to work correctly on x86, and
is called at configure time (at which time config.h is
unavailable). So, this in CMake is treated via a command-line
definition of GMX_TARGET_X86 when required.

Fixes #1269 (even though I98c5791ec silently did this already)

Change-Id: I94e0756856e7d49ff09a87b8283189976b48ea49

10 years agoMove more timing routines into timing/.
Teemu Murtola [Wed, 30 Oct 2013 04:52:03 +0000 (06:52 +0200)]
Move more timing routines into timing/.

Move both gmx_cyclecounter.* and gmx_wallcycle.* into
src/gromacs/timing/, and remove the superfluous gmx_ prefix from the
file names.

These are low-level functionality that can't easily be used or extended
in user code, so there is no need to install them (they are even not
referenced by any currently installed header).  This allows including
config.h directly in cyclecounter.h and get rid of an explicit define on
the compiler command line.

Change-Id: If7c5fa282812c88b3208223cfe3f2982e3b968e9

10 years agoSilence warnings about scanner.cpp
Mark Abraham [Tue, 29 Oct 2013 17:15:36 +0000 (18:15 +0100)]
Silence warnings about scanner.cpp

This file is generated, so it is awkward to suppress inline.
So we suppress on the compiler command line, and test to
make sure that will work cleanly.

Change-Id: I8d7b78d71f13fb91b900ff994e319f6360a4bb86

10 years agogromacs cpp: clean up -Wunused-parameter warnings
Alexey Shvetsov [Fri, 26 Jul 2013 00:08:25 +0000 (04:08 +0400)]
gromacs cpp: clean up -Wunused-parameter warnings

Clean up unused function arguments in cpp code

Change-Id: I7f935d99dd6e9611b551f31c238a4c1f301335f9

10 years agonbnxn_kernels: Clean up -Wunused-parameter warnings
Alexey Shvetsov [Thu, 26 Sep 2013 08:33:18 +0000 (12:33 +0400)]
nbnxn_kernels: Clean up -Wunused-parameter warnings

Update kernel generator and regen kernels
so they want produce warnings with gcc

Change-Id: I0be6bb001afebe03706f9bede2ae10b5de3af5ea
Signed-off-by: Alexey Shvetsov <alexxy@omrb.pnpi.spb.ru>
10 years agoMarkup substitution through HelpWriterContext.
Teemu Murtola [Tue, 17 Sep 2013 17:49:12 +0000 (20:49 +0300)]
Markup substitution through HelpWriterContext.

Make all calls to process the in-source strings to help output go
through HelpWriterContext.  This makes it easy to implement common
functionality using C++ mechanisms.

Moved all the HTML link processing stuff into HelpWriterContext as well
and cleaned up links.dat.  The generated HTML pages should no longer
contain broken links (but links between program pages are not there
yet).

The markup substitution itself is still done by functions in wman.cpp;
will move those into private functions in helpwritercontext.cpp as a
separate change.

Related to #685 and #969.

Change-Id: I37d45549214e49a6edab82fb64ec7b38b9e72094

10 years agoMerge "Merge release-4-6 into master"
Mark Abraham [Wed, 30 Oct 2013 14:22:24 +0000 (15:22 +0100)]
Merge "Merge release-4-6 into master"

10 years agoFix build with GMX_CYCLE_SUBCOUNTERS
Roland Schulz [Fri, 18 Oct 2013 17:40:37 +0000 (13:40 -0400)]
Fix build with GMX_CYCLE_SUBCOUNTERS

Was broken by 4d2f9bcee0734a

Changed that the function signature isn't depending on the
compile options.

Change-Id: I7c3e9d6bdcadc80b02dd0f523358c8122f0f9fcc

10 years agoMerge release-4-6 into master
Roland Schulz [Wed, 30 Oct 2013 03:03:45 +0000 (23:03 -0400)]
Merge release-4-6 into master

Change-Id: I584e5fb2d70e90e5ac8a1439268ee185b0a4105f

10 years agomdlib: Clean up -Wunused-parameter warnings
Alexey Shvetsov [Thu, 26 Sep 2013 08:00:32 +0000 (12:00 +0400)]
mdlib: Clean up -Wunused-parameter warnings

Change-Id: I555d418ca21e03ba891b0cf9f9eebbe2fb19a316

10 years agocorrected volume with serial NPT replica exchange
Berk Hess [Mon, 28 Oct 2013 14:11:27 +0000 (15:11 +0100)]
corrected volume with serial NPT replica exchange

Replica exchange with replicas run in serial would only update
x and v, not the other state data. This gave incorrect volumes
with NPT replica exchange.
Fixes #1362

Change-Id: Ib726fbb75e800c624ef61f31e76a5d4a4e408b9c

10 years agoRenamed and removed last references to GMX_CRAY_XT3
Mark Abraham [Thu, 3 Oct 2013 18:00:57 +0000 (20:00 +0200)]
Renamed and removed last references to GMX_CRAY_XT3

These systems were around in 2006, so probably out of commission by
now. XT5 had replaced catamount with something else. Not sure about
XT4, which might still be around. In any case, the machinery to test
for Cray's catamount should be named more generally, spam the
CMake status and cache less, and use the standard CMake mechanism
to avoid repeating try_compile().

Change-Id: Ic23b195f500662a6a0c4e27b4dc1c9c647b03fc1

10 years agoFixed memory leak in gmxdump.
Magnus Lundborg [Mon, 28 Oct 2013 14:36:01 +0000 (15:36 +0100)]
Fixed memory leak in gmxdump.

Release memory allocated when reading xtc.

Change-Id: I51ab413e598ce937e836b183b29775bc246055cd

10 years agoimproved the nbnxn buffer size estimate with GPUs
Berk Hess [Wed, 2 Oct 2013 15:43:12 +0000 (17:43 +0200)]
improved the nbnxn buffer size estimate with GPUs

The nbnxn Verlet buffer estimate now takes into account that
constrained atoms rotate, and don't move linearly, around the atom
they are constrained to. This significantly lower the buffer size
estimate for long neighborlist life times (as used with GPUs).
The buffer for most CPU runs is not affected (significantly).
Because of the smaller buffer, mdrun now uses smaller list increase
limits for increasing nstlist when using GPUs. This improves
performance.

Also activated and tested the virtual site effective mass calculation
(vsites were ignored in the drift calculation).

Change-Id: I2cb349f483610eabcc97bfbc23d17f189dec19d6

10 years agoOverview Doxygen pages for analysis framework.
Teemu Murtola [Sat, 28 Sep 2013 19:59:01 +0000 (22:59 +0300)]
Overview Doxygen pages for analysis framework.

Main content:
- General overview page for the whole framework.
- Reorganized the way the documentation for the analysis template is
  generated.
- Separate page for describing the concepts for the analysisdata module
  in more detail.
- Separate page for giving an overview of the selection engine.
  Also minor clean up for related documentation pages.
- Add missing installation rule for analysisdata/modules/lifetime.h.

The module pages could now use some restructuring to reference the
information here and provide relevant details instead of duplicating any
of it.  Left for later.

Change-Id: I159a2d913fe6f9114c60804d30fa3714b23df262

10 years agoSome overview content for Doxygen documentation.
Teemu Murtola [Sat, 28 Sep 2013 03:49:05 +0000 (06:49 +0300)]
Some overview content for Doxygen documentation.

Make the main page more useful by providing some explanation of the
purpose of the documentation and adding a (currently very short) list of
links to more detailed pages, making it easier to start consuming the
documentation.

Added a page that contains some information from the wiki
http://www.gromacs.org/Developer_Zone/Programming_Guide/Library_Structure

Once the documentation is more complete, some wiki pages (including the
above) could go away.

Requires Doxygen >=1.8, because separate Markdown pages are used.

Change-Id: I2bf6e00976b47b0d34c79f4ea09452d40701f753

10 years agoMisc. Doxygen updates for src/gromacs/utility/.
Teemu Murtola [Thu, 26 Sep 2013 19:05:47 +0000 (22:05 +0300)]
Misc. Doxygen updates for src/gromacs/utility/.

Add some missing documentation, fix problems noticed, make the
documentation appear more uniform etc.
The biggest improvement is a better overview of the whole directory.
Some Markdown syntax used (requires Doxygen >=1.8), but not much.

Change-Id: Ib4505219536679b17f323c65a9c3f005b655e229

10 years agoCreate fileio module
Mark Abraham [Tue, 17 Sep 2013 08:07:13 +0000 (10:07 +0200)]
Create fileio module

This patch contains only code motion. There are no functional code
changes. Moves lots of I/O code into src/gromacs/fileio. This means
lots of changes to avoid having everything as a compile-time dependency
of everything else because everything is pulled in via typedefs.h,
etc. Note that src/gromacs/legacyheaders/filenm.h and
src/gromacs/legacyheaders/types/filenm.h have been consolidated into
src/gromacs/fileio/filenm.h.

I/O code in files named stat*[ch] now lives in various new files in
fileio.

Files outside of the module now #include its header files in a proper
way, e.g. #include #include "../fileio/filenm.h" or
"gromacs/fileio/filenm.h" according to whether they are an installed
header, or not. Files within the module are blessed and do not need
that qualifier.

This module installs most of its headers (because they're almost all
inter-dependent; gmxfio_int.h is not installed because it is
only useful internally, vmdio.h is not installed because it
relies on a header from src/external)

Files in new module
* conform to preferred include-guard format.
* have up-to-date copyright headers thanks to Teemu's automatic
  script
* that are installed headers refer to other GROMACS include files via
  relative paths

Moves mdrun trajectory writing into wrapper function.

Removes small pieces of I/O code that was hiding behind "#if 0".

Some pieces of I/O code specific to the gmxpreprocess module have
remained there.

Moved a cppcheck suppression to follow matio.cpp to its new home.

Minor fix to xdrf.h logic, since it is now the subject of a CMake
test.

Refs #1292, #1193, #1137

Change-Id: I820036298d574966d596ab9e258ed8676e359184

10 years agoSimplify code structure for C++ analysis tools
Teemu Murtola [Tue, 22 Oct 2013 04:34:36 +0000 (07:34 +0300)]
Simplify code structure for C++ analysis tools

Move all the code for declaring the actual analysis tool into the source
file, and leave only a stub info object in the headers.  Make the class
declared in the header provide a static factory method to allow this.

This has several benefits:
 - Easier to write and maintain the tools, as all the logic is in one
   file only.
 - Clearer about the intended level of encapsulation of the tools.
 - Makes the tools in the library more closely resemble those written
   using the template.  The only difference now is that the main()
   method is replaced by the info object, and that the info object
   provides the names to pass to TrajectoryAnalysisModule constructor.

Change-Id: Ib545cc1d8900fe88cb58811df2cd4a63a6a99b2f

10 years agoFix NBNxN SIMD reference kernels
Roland Schulz [Wed, 23 Oct 2013 22:12:12 +0000 (18:12 -0400)]
Fix NBNxN SIMD reference kernels

nbfp_stride was added independently by both 25eb0e14 and 5deee8a0.

Removing static is not OK for gcc. Mark will resolve later whether
this was even needed for his upstream work.

Change-Id: I97ea4131163512354b5e339dd19549c3e49e9de2

10 years agoEncapsulate gmx_wallclock_accounting_t into new timing module
Mark Abraham [Sat, 28 Sep 2013 13:45:30 +0000 (15:45 +0200)]
Encapsulate gmx_wallclock_accounting_t into new timing module

Started a timing module where things like gmx_wallcycle.c and
gmx_cyclecounter.c will eventually also live.

Renamed s/runtime/wallclock_accounting/ to avoid ambiguity with
"compile time," "simulation time," etc.

This patch preserves the release-4-6 behaviour of the reported times
with all supported combinations of MPI, thread-MPI, GPUs, OpenMP.  I
think the old behaviour of -ntomp_pme != -ntomp was buggy with respect
to timing, and this patch fixes that.

Change-Id: I22cba17cdf866e17d9d0732de204b85b0ab31994

10 years agoCleaned up run time measurement
Mark Abraham [Wed, 25 Sep 2013 22:25:20 +0000 (00:25 +0200)]
Cleaned up run time measurement

Removed all use of clock(), in favour of using clock_gettime for
per-node timer and (where available) per-thread timer. This is better
than using gettimeofday(), which is deprecated by POSIX. clock() has
no real advantages, and requires us to keep bumping our own counter if
we use it (in particular, on any remaining 32-bit
machines). Eliminated related dead code.

Cleaned up struct gmx_runtime_t and related code by
* renaming variables more descriptively
* removing variables that should be local variables in a function
* eliminating variables associated with using clock()

The behaviour of print_perf is preserved (tested real MPI, thread MPI;
serial looks like it should work also); namely that the "(%)" should
be a crude reflection of machine load.

Change-Id: Icdf506150045bee88cf04200b25cd010a9bb5419

10 years agoAdded documentation for gmx_runtime_t struct
Mark Abraham [Wed, 25 Sep 2013 21:22:50 +0000 (23:22 +0200)]
Added documentation for gmx_runtime_t struct

Now it is clear what should be done to simplify things, noted inline
with TODO comments.

Change-Id: If66157d9fe924ca1f02b6ffbdd4526feb9ac9784

10 years agoMerge branch release-4-6 into master
Mark Abraham [Tue, 22 Oct 2013 16:42:04 +0000 (18:42 +0200)]
Merge branch release-4-6 into master

Conflicts:
CMakeLists.txt
admin/installguide/installguide.tex
cmake/gmxDetectAcceleration.cmake
cmake/gmxSetBuildInformation.cmake
Resolved generally in favour of release-4-6, but some changes in
master branch associated with new CMake functionality was kept in the
expected way. Behaviour detecting hardware (particularly on non-x86
platforms) is not optimal in this commit, but is fixed in
I94e0756856e7.

src/gromacs/gmxlib/checkpoint.c
src/gromacs/legacyheaders/typedefs.h
src/gromacs/mdlib/expanded.c
Resolved in favour of release-4-6 (expanded ensemble fixes)

src/gromacs/mdlib/pme.c
Resolved in favour of release-4-6 (SIMD generalization)

src/gromacs/mdlib/pme_sse_single.h
Deleted (superseded by src/gromacs/mdlib/pme_simd4.h)

src/mdlib/CMakeLists.txt
Relocated new comment to correct place in src/gromacs/CMakeLists.txt
(BUILD_OWN_FFTW fixing)

src/mdlib/nbnxn_cuda/nbnxn_cuda_types.h
Replaced src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda_types.h with this file,
but preserved corrected comments from master branch

src/gromacs/legacyheaders/mdrun.h
src/programs/mdrun/md.c
Resolved in trajectory_writing.c (removed df_history parameter that is
now useless)

Change-Id: I44ffdc7eb15039b98910f6b3f32252f5849ecfce

10 years agofixed recent bug with CUDA texture objects
Berk Hess [Tue, 22 Oct 2013 20:01:32 +0000 (22:01 +0200)]
fixed recent bug with CUDA texture objects

On GPUs with CUDA architecture 3.0, mdrun would exit with an error.
This bug was introduced very recently in 43b41cb8
Fixes #1361

Change-Id: I0c46867b987cbf3c0da3aa9384d985fef1e4aa73

10 years agofixed OpenMP threads being pinned to the same cores
Berk Hess [Tue, 22 Oct 2013 10:02:44 +0000 (12:02 +0200)]
fixed OpenMP threads being pinned to the same cores

Due to the thread id not being a thread-local variable in the OpenMP
loop setting the thread affinities, different OpenMP threads could be
pinned to the same physical cores.
Fixes #1360

Change-Id: I7bc39aef9a8854ec24006895da6005c1326033a3

10 years agoRemove useless warnings from Doxygen logs.
Teemu Murtola [Fri, 18 Oct 2013 19:22:39 +0000 (22:22 +0300)]
Remove useless warnings from Doxygen logs.

Remove warnings about too big include dependency graphs for some files
from the logs; these may cause issues for Jenkins if/when graphviz gets
installed there.

Related to #1239.

Change-Id: Ic20f5939bfa3a0b641f7c372d2f705a8dbd463e7

10 years agoRemove html target from and excessive PDFs for manual
Mark Abraham [Sun, 20 Oct 2013 17:45:41 +0000 (19:45 +0200)]
Remove html target from and excessive PDFs for manual

Change-Id: I0049fcb1f96aa2b2253bf8029f5172bae4747b69

10 years agoUpgrade layout file to support Doxygen >=1.8.
Teemu Murtola [Thu, 26 Sep 2013 15:16:38 +0000 (18:16 +0300)]
Upgrade layout file to support Doxygen >=1.8.

Remove entries in the layout file that cause warnings with Doxygen >=1.8
Split the layout file changes into two parts to allow upgrading Doxygen
without breaking existing builds; after this change, the layout file
does not produce warnings with either version, but needs additional
changes to fully conform to what at least 1.8.5 expects (those included
in Ie265644).  Jenkins needs to be updated for this to be useful; until
that is done, some links etc. in the generated documentation may subtly
break.

Also fixed a stray Doxygen warning with 1.8.5.

Related to #1239.

Change-Id: Ieb7d4441ba8f6e6ffde042e20fc51598b3029439

10 years agoBlueGene/Q Verlet cut-off scheme kernels
Mark Abraham [Mon, 19 Aug 2013 16:33:55 +0000 (18:33 +0200)]
BlueGene/Q Verlet cut-off scheme kernels

The kernels are implemented with small functions whose inlining
is guaranteed by the use of xlc and clang extensions. That's a hack
whose general solution I plan to implement in master branch.

Other BG/Q considerations:

Architecture detection now works on A2 core.

Install guide updated.

It is better to use intra-node communicators than not, and ranks
within nodes are correctly detected via querying the BlueGene/Q API,
since the hostname is not useful for the purpose.

It is better to not set GMX_DD_SENDRECV2.

It is better to use the analytical Ewald correction.

In principle, we should version the type of variables and fields named
d2, rl2, rbb2 in nbnxn_search*[ch] to be double on PowerPC and float
everywhere else (each regardless of GROMACS target precision). This
would mean that on PowerPC (where all flops take place in double
precision with free precision-extension upon load) we can be both
cache-efficient by storing bounding boxes in float, and flop-efficient
by not having to generate a round-to-single instruction to compare the
result of subc_bb_dist2_simd4 with the cut-off stored as a
float. Still, a flop per bounding-box distance comparison will not
break the bank.

Enough bgclang support exists for the build to succeed (no platform
file is required), even with OpenMP, but a number of compiler issues
have been reported on llvm-bgq-discuss mailing list.

Change-Id: I98c5791ec3766cdbdcb8a8eb7418d00585727cc0

10 years agoCall atomics from TestAtomic.c
Mark Abraham [Fri, 11 Oct 2013 12:19:17 +0000 (14:19 +0200)]
Call atomics from TestAtomic.c

This exposes more compile-time errors than simply parsing
the definitions. This makes CMake's diagnostics more useful
with respect to atomic operations.

Fixes #1355

Change-Id: Ie1d6f14565700b98988cadc17cb7ac2b78d76ce3

10 years agoFix tMPI_Atomic_memory_barrier for MIC
Roland Schulz [Tue, 8 Oct 2013 20:13:25 +0000 (16:13 -0400)]
Fix tMPI_Atomic_memory_barrier for MIC

MIC doesn't has sfence. It isn't required because the current generation
of MIC is in-order.

Change-Id: I6953bc3168a191a3038408e6ea35025a25509abe

10 years agoMove mdrun trajectory writing into wrapper function
Mark Abraham [Tue, 17 Sep 2013 08:07:13 +0000 (10:07 +0200)]
Move mdrun trajectory writing into wrapper function

Refs #1292, #1193, #1137

Change-Id: I3f19e0995ff7fab465184d5bab8c2683260af853

10 years agoFix typo in g_membed documentation
Mark Abraham [Wed, 16 Oct 2013 16:23:43 +0000 (18:23 +0200)]
Fix typo in g_membed documentation

Suggested by Iman Pouya

Change-Id: I5c77a29b64e61f9da5a663119e149d992141eb21

10 years agoFix SIMD C reference nbnxn kernels
Roland Schulz [Wed, 9 Oct 2013 18:16:52 +0000 (14:16 -0400)]
Fix SIMD C reference nbnxn kernels

Got broken by ace006a86 and 022581b388.
An additional fix for nbnxn 4x8 reference code, broken by c0cf8ce,
is in a separate patch.
Also changed the AVX256 double precision nbfp_stride from 4 to 2.

Refs #1173

Change-Id: If3b3291a7ff765acc19c29f834e856cc9798d47e

10 years agoRestarting from checkpoint no longer reinitializes WL weights.
Michael Shirts [Wed, 2 Oct 2013 23:59:06 +0000 (19:59 -0400)]
Restarting from checkpoint no longer reinitializes WL weights.

Fixes a problem where mdrun was reinitializing the initial Wang-Landau
delta for expanded ensemble simulations, because the flag turning it
off was stored the expanded ensemble data structure (not saved in cpt)
instead of the df_history structure (is saved in checkpoint).  In the
process, some moderate encasulaton of the df_history structure and
the expanded ensemble methods.

Fixes #1350

Change-Id: I13492a7a9773fcb417fcd0ee106d851d9838ce25

10 years agoRemove latex help export.
Teemu Murtola [Wed, 18 Sep 2013 03:12:53 +0000 (06:12 +0300)]
Remove latex help export.

The decision in I7e56a011 was to drop Appendix D from the manual.
This commit removes the latex help export code that supported that.
This makes it easier to manage change in wman.cpp, since now all the
markup substitution code operates in the same environment.

Related to #685 and #969.

Change-Id: Iaeb5b82e288e3120ebe6ae38c0e5c3aca892194a

10 years agoMove manual repo into code repo, and make it build
Mark Abraham [Fri, 11 Oct 2013 15:38:38 +0000 (17:38 +0200)]
Move manual repo into code repo, and make it build

Supersedes I12066943a1. Contains all the manual content from
Ic1f74befee88. Manual history is lost - nobody was super
keen on keeping it, and the git repos still exist if we
care later on.

If the user opts in with cmake .. -DGMX_BUILD_MANUAL=on, this patch
detects whether a manual build is possible. If so, creates a make
target called "manual" which will build the PDF manual in the manual
sub-directory. The manual is never automatically made, and the
supporting detection is never automatically run. Thus, a normal
GROMACS user or developer never has any problems.

Appendix D (compendium of man pages) is removed. The header of chapter
7 always contained advice on where to get that content. That advice
is updated.

Also
* streamlined manual CMakeLists.txt for new context
* removed outdated \gmxmajor{} LaTeX macro
* noted some TODOs for future work

Refs #1177

Change-Id: I7e56a01182fbd9803222c8d47cb8a9c88d7b932a

10 years agoavoid division by zero in SIMD angles and dihedrals
Berk Hess [Fri, 11 Oct 2013 13:42:14 +0000 (15:42 +0200)]
avoid division by zero in SIMD angles and dihedrals

The SIMD accelerated angle and dihedral code did not (correctly)
check for dividing by zero, which can happen with aligned bonds.
Fixes #1351

Change-Id: I326f90fca87ab5cca493204de4a58655465634ca

10 years agoturning off expanded ensemble for all integrators but md-vv.
Michael Shirts [Mon, 2 Sep 2013 03:35:46 +0000 (23:35 -0400)]
turning off expanded ensemble for all integrators but md-vv.

Broke at some point, and somewhat tricky to turn back on
correctly for other integrators at this point; target for
5.0 when it should be more straightforward.

fixes #1321

Change-Id: I599b308800411e0cea111ffd280487037d613755

10 years agofixed a half bin misalignment in gmx_vanhove -or
Berk Hess [Wed, 2 Oct 2013 12:27:07 +0000 (14:27 +0200)]
fixed a half bin misalignment in gmx_vanhove -or

Change-Id: Ia800861912d50f5047742bcb1bb51e753920968f

10 years agoFixes a problem with pair type 2 interactions with free energy
Michael Shirts [Sat, 5 Oct 2013 18:28:12 +0000 (14:28 -0400)]
Fixes a problem with pair type 2 interactions with free energy

Pair type 2 interactions, which should remain on regardless
of couple-intramol=yes, were being turned off. Currently, when free
energies were turned on, they were just ignored, because the (empty)
pair one 1 type list was copied over them.  This fix adresses
this problem by adding onto the list instead of copying it over.

Fixes #1315

Change-Id: I240479a8dc083f7a355917ed9f74f4337fa3448f

10 years agomake use of CUDA stream priorities
Szilard Pall [Fri, 4 Oct 2013 00:33:04 +0000 (02:33 +0200)]
make use of CUDA stream priorities

CUDA 5.5 introduced steam priorities with 2 levels. We make use of this
feature by launching the non-local non-bonded kernel in a high priority
stream. As a consequence, the non-local kernel will preempt the local
one and finish first. This will improve performance in multi-node runs
by reducing the possibility of late arrival of non-local forces.

Change-Id: I4efc65546e4135f12006c0422e1fca42a788129f

10 years agoFix/improve installation directory logic.
Teemu Murtola [Sun, 4 Aug 2013 03:55:20 +0000 (06:55 +0300)]
Fix/improve installation directory logic.

With the move to relative install paths (recommended by CMake), logic
that relied on the *_INSTALL_DIR variables for something else than
locations for the CMake install() command got broken.  Explicitly added
CMAKE_INSTALL_PREFIX there.

Also improve the approach for customizing the installation directories:
 - GMXLIB is now GMX_LIB_INSTALL_DIR, and a proper cache variable.
 - Added a GMX_DATA_INSTALL_DIR to customize the directory under which
   the data files get installed under share/.  Use this also in the code
   that searches for the data directory instead of hardcoding several
   guesses.

Related, moved the logic of falling back to a hard-coded library
directory into get_libdir(); it was duplicated in two places.

Resolves part of #1271: creating a binary package with CPack and
installing it somewhere else than in the CMAKE_INSTALL_PREFIX
used to create it still breaks all the logic touched here.  Also using
DESTDIR with 'make install' breaks it (but that has never worked).

Change-Id: I0271a8152f87dd59a229c9d0eca976404f974ea8

10 years agouse CUDA texture objects when supported
Szilard Pall [Wed, 18 Sep 2013 19:59:36 +0000 (21:59 +0200)]
use CUDA texture objects when supported

CUDA texture objects are more efficient than texture references, their
use reduces the kernel launch overhead by up to 20%. The kernel
performance is not affected.

Change-Id: Ifa7c148eb2eea8e33ed0b2f1d8ef092d59ba768e

10 years agointroduced general 4-wide SIMD support
Berk Hess [Thu, 1 Aug 2013 12:34:22 +0000 (14:34 +0200)]
introduced general 4-wide SIMD support

PME spread+gather and the nbnxn search bounding box checks use
4-wide SIMD (as opposed to arbitrary width SIMD). This SSE code
has now been replaced by macros from gmx_simd4_macros.h.
pme_sse_single.h has been renamed to pme_simd4.h
This change is mainly refactoring; it only adds PME spread+gather
AVX acceleration in double precision plus a few FMA instructions.

Change-Id: Ia5e02295bb281a2e23d57f4c165f555de6744064

10 years agoIntroduced MPI initialization counter
Mark Abraham [Tue, 1 Oct 2013 14:47:22 +0000 (16:47 +0200)]
Introduced MPI initialization counter

Normal GROMACS code needs to initialize and finalize MPI. Code that
uses GROMACS as a client (e.g. external code, possible GROMACS test
code) needs GROMACS to work normally and not make erroneous calls to
the MPI library. For example, this would allow a single test binary
to call MPI-enabled mdrun repeatedly to test a range of test cases.

Change-Id: I546518923561a13e3973f90182fa31129ab1e6ae

10 years agofixed nbnxn 4x8 pair search without AVX
Berk Hess [Thu, 10 Oct 2013 10:53:05 +0000 (12:53 +0200)]
fixed nbnxn 4x8 pair search without AVX

This bug was introduced recently.
Note that nbnxn 4x8 without AVX was only possible when manually
changing the code to use plain-C reference SIMD.

Change-Id: I5effe4076bc5ff270ebeb366f9c2b8a13c256025

10 years agoRemove some unused variables from MD loop
Mark Abraham [Tue, 8 Oct 2013 23:26:02 +0000 (01:26 +0200)]
Remove some unused variables from MD loop

Change-Id: I2722e8adcad9f0d1f2f108d7e6bc859b8034266d

10 years agoImprove markup substitution in HelpWriterContext.
Teemu Murtola [Thu, 30 Aug 2012 03:48:19 +0000 (06:48 +0300)]
Improve markup substitution in HelpWriterContext.

- substituteMarkup() replaced with an interface that also does line
  wrapping at the same time.  Allows more complex line wrapping that
  can also depend on the input markup, and clarifies responsibilities in
  the code.
- Make TextTableFormatter use the new interface, removing explicit
  substituteMarkup() calls from elsewhere in the code.
- Structure the substitution to allow easy addition of more output
  formats.

Related to #685 and #969.

Change-Id: Id34be9489aa3a90d94cd87f8936b030bc21f1c98

10 years agoHTML export from the wrapper binary.
Teemu Murtola [Thu, 5 Sep 2013 03:25:19 +0000 (06:25 +0300)]
HTML export from the wrapper binary.

Implement HTML output format for 'gmx help -export'.
Fix an issue that caused 'mdrun -man html' to segfault.
Move the HTML header and footer generation out of wman.cpp and clean it
up (close incomplete tags, remove the date, etc.).

Clean up the layout of the online manual (on the file system) by putting
the generated files into a separate directory.  Also generate an
alphabetical list of programs into its own file instead of directly on
the front page.  By-topic list is currently missing.

Left out installation rules for now; can be reinstantiated once #1242
and the general approach to the whole online manual is clearer.

Will fix hyperlinks etc. in the generated output in separate change(s).

Related to #685, #969, and #1242.

Change-Id: Iaf8fc28d563f05a8e00c7c52d58b91cd1dabf369

10 years agoFixed triggering of CPU acceleration-scheme detection
Mark Abraham [Sun, 6 Oct 2013 16:45:23 +0000 (18:45 +0200)]
Fixed triggering of CPU acceleration-scheme detection

Recent patch Ic8f674e5ac29 fell afoul of the way the CPU acceleration
scheme needs to protect itself from re-running try_run() detection by
noticing when the suggestion variable is already defined.

Change-Id: Ifb528a072610b775384f397155a9daba8c293b64

10 years agoFurther consolidation of commrec initialization
Mark Abraham [Sat, 28 Sep 2013 23:19:02 +0000 (01:19 +0200)]
Further consolidation of commrec initialization

* renamed init_par_threads to reinitialize_commrec_for_this_thread,
  because that's what it does.
* minor consolidation of the two commrec construction functions
* removed useless and untrue comments

Change-Id: I109af71e548012b72388d3ce3e5e8353110e43b3

10 years agoMore consolidation of MPI initialization
Mark Abraham [Sat, 28 Sep 2013 22:52:27 +0000 (00:52 +0200)]
More consolidation of MPI initialization

* renamed init_par to init_commrec, like it does
* relocated some functions (or their content) from main* to network*
  or init.cpp

Now it is clear how to consolidate further parallel initialization
code.

Change-Id: I31e78d702b6d1fc1498d059722688a23ab1409df

10 years agoClean up CTest usage.
Teemu Murtola [Sat, 14 Sep 2013 18:48:35 +0000 (21:48 +0300)]
Clean up CTest usage.

- Remove use of backwards-compatibility Dart include; we are not using
  such dashboards.
- Move CTest include to the top of the main CMakeLists.txt.  This clears
  a lot of confusion about how BUILD_TESTING works, as it is declared by
  CTest.  Previously it worked because include(Dart) also declared it.
- The memory check suppression file needs a different treatment.  That
  also seems to have worked only because CTest was included twice.

Change-Id: I418997bfe01a0f3d90f40558a4dbba10f4744af7

10 years agoReorganize static/shared library management.
Teemu Murtola [Sun, 26 May 2013 18:36:08 +0000 (21:36 +0300)]
Reorganize static/shared library management.

The logic was scattered throughout the main CMakeLists.txt file, with
some very confusing logic (e.g., depending on the platform, the same
variable could be declared in completely different parts of the file).
Now all the logic is gathered in the same block, where it should be easy
to move into a separate file.

Change-Id: I102a80fe2847ebecafd5225e05d0e22ccd237bdd

10 years agoCMake helper for tracking cache variable changes.
Teemu Murtola [Fri, 24 May 2013 15:37:40 +0000 (18:37 +0300)]
CMake helper for tracking cache variable changes.

Used the new macro for controlling when to output various status
messages, making the output more useful to see that user-made changes
really had the desired effect.

Change-Id: I21b791ab8e4f3c8d22981b2315db96e8983c0b26

10 years agoRemove unused shift_util.c.
Teemu Murtola [Sat, 14 Sep 2013 12:11:13 +0000 (15:11 +0300)]
Remove unused shift_util.c.

There was a single function (set_shift_consts()) that was called, but it
only set some static variables that never got used.

Change-Id: I4305b345c0025e90e19aad70b46ab481696c1994

10 years agoImprove diagnostics with empty selections.
Teemu Murtola [Wed, 25 Sep 2013 18:33:24 +0000 (21:33 +0300)]
Improve diagnostics with empty selections.

Two independent fixes to make empty selections work better:
 - Some empty selections could assert or give internal errors, because
   evaluation of some types of expressions for zero atoms was not
   working.  Fixed by removing the asserts/checks.  The check for empty
   selections should now produce useful diagnostics for these cases.
 - Fix the check for empty selections to work for all types of selection
   option input.  Previously, it only worked if the selection was
   provided on the command line, but not if it was provided from a file
   or through interactive input.

Fixes a problem reported on the gmx-users list.  Only fixed in master
since the problem is only with selections that are nearly always
incorrect.  Also, the empty selections check makes the fix much more
useful there.

Change-Id: Ic3e086e637493fc5fefe4594d4407c5a6c53bc8b

10 years agoMan page export from the wrapper binary.
Teemu Murtola [Tue, 3 Sep 2013 04:11:38 +0000 (07:11 +0300)]
Man page export from the wrapper binary.

Implement nroff output format for 'gmx help -export'.
Move the header/footer generation out of wman.cpp.
The generation is now off by default.  Can be reinstantiated if someone
comes with a good approach for the case where the compiled binaries
don't run on the build host (e.g., compiling AVX256 binaries on a SSE4.1
host).

Related to #685 and #969.

Change-Id: I17725e3a487470bea8f6db2a59da31139e70621e

10 years agoFix parallel build for GMX_BUILD_OWN_FFTW
Christoph Junghans [Wed, 31 Jul 2013 19:46:58 +0000 (13:46 -0600)]
Fix parallel build for GMX_BUILD_OWN_FFTW

* only works for cmake >=2.8.8
* cmake 2.8.7 has a bug in add_library, but
  cmake 2.8.[0123] have other problem, cmake-2.8.[456]
  still don't build in parallel
* fix from https://gerrit.gromacs.org/#/c/1675/12
* hardcode libdir to fix build on OpenSuse

Change-Id: I74315880f71fd4384084819ccc686072f7cad4f5

10 years agoUse filenm.c data for FileNameOption.
Teemu Murtola [Mon, 30 Sep 2013 14:34:15 +0000 (17:34 +0300)]
Use filenm.c data for FileNameOption.

Expose the necessary data (through functions) from filenm.c so that
FileNameOption can use it.  Removes the need to duplicate the file name
extensions (potentially also other stuff in the future) for the period
that both coexist.

Part of #642.

Change-Id: I0b375da494d6e9c8a0fe6a38d9e1f27078ab9726