Teemu Murtola [Sun, 25 May 2014 04:28:31 +0000 (07:28 +0300)]
Remove some typedefs.h dependencies
- Replace several typedefs.h dependencies with either forward
declarations or includes of the individual headers that are required.
- Some other cleanup in the selection code, removing stuff that is no
longer necessary for C++.
Change-Id: I6b9b3fe5cbbcc8f6bac29c9306cc4c4c57e59479
Teemu Murtola [Sun, 25 May 2014 03:20:55 +0000 (06:20 +0300)]
Move types/topology.h to topology/
- Make the types forward-declarable, and use that in a few headers.
- Adapt files that were including the file directly.
- Move functions that operate on these structs from typedefs.[ch] to
topology/ as well, and make callers of those functions include
topology.h.
typedefs.h still brings this header with it. That will be cleaned up
separately in parts.
Change-Id: Iff50b854c335d10b97fd79c65d21791e5ae432a1
Teemu Murtola [Sat, 24 May 2014 18:13:58 +0000 (21:13 +0300)]
Move types/idef.h to topology/
- Move bondedtable_t to fcdata.h, which is the only header that used it.
- Make other types forward-declarable.
- Some minor cleanup in the moved file.
- Adapt files that were including idef.h directly. Everything else
still depends on getting this through typedefs.h / types/topology.h.
Change-Id: Ib11c1e34dde83180e1bfa8415d579ced96aeee4d
Teemu Murtola [Sat, 24 May 2014 04:20:48 +0000 (07:20 +0300)]
Move types/atoms.h to topology/
- Make all the structs forward-declarable, and use that in a few
headers.
- Adjust existing few includes.
- Move functions that operate on these types from typedefs.[ch] to
topology/ as well.
Nearly all code still depends on including this through
typedefs.h->types/topology.h, but that can wait.
Change-Id: If870711a061756a77451f52598d91e72d8948d92
Teemu Murtola [Sat, 24 May 2014 03:41:51 +0000 (06:41 +0300)]
Move types/ishift.h to pbcutil/
- Remove the include from typedefs.h, and add it to files that are using
it.
Change-Id: I752648c73ba767eff30c113c84aabd5c7d7494ac
Teemu Murtola [Fri, 23 May 2014 18:51:22 +0000 (21:51 +0300)]
Move invblock.* to topology/
- Remove unnecessary includes of invblock.h.
- make_invblock() actually seems unused, but left it there for now.
Perhaps the whole functions could be merged to block.h, but that will
be easy to do later as well.
Change-Id: I5dc133b0bb66c9ec66704c3406f19ab217dade68
Teemu Murtola [Fri, 23 May 2014 04:07:48 +0000 (07:07 +0300)]
Move types/block.h to topology/
- Move t_block and t_blocka definitions to topology/.
- Move functions that operate only on these types from typedefs.[hc] to
the same place.
- Include the new block.h from all source files that reference the
functions.
- Clean up a few headers that were including types/block.h directly.
Most other code still depends on getting the type definitions
indirectly through typedefs.h, but that can be fixed during subsequent
changes.
Change-Id: I458e9cdc00a8d81665630f8123589b64d123790a
Teemu Murtola [Thu, 22 May 2014 19:01:43 +0000 (22:01 +0300)]
Move symtab.* to topology/
- Adapt #includes and some minor cleanup in touched files.
- Convert symtab.c to C++ to get rid of a "macros.h" dependency, and
clean up the includes otherwise as well.
- Adjust valgrind memory leak suppression to suppress on an extern "C"
function.
This new subdirectory is an initial home for everything related to basic
topology and index group handling. More files will follow.
Change-Id: Id5b1a626ef4a90836f70a8b4c7f24ff52c768a5d
Teemu Murtola [Wed, 21 May 2014 19:22:33 +0000 (22:22 +0300)]
Merge t_symtab into symtab.h
- Remove types/symtab.h.
- Make the type forward-declarable and use that in headers.
- Remove some unnecessary includes of symtab.h, and added some that were
missing. These may not be 100% accurate, since types/topology.h still
brings symtab.h into nearly every file.
In principle, it should be straightforward to make the type internal to
symtab.c (I don't think the contents of the struct are used anywhere
outside that file), but the problem is that it is very difficult to find
all places where t_topology or gmx_mtop_t is allocated with snew()
without calling open_symtab() afterwards, since all those should change
to also initialize the symtab member to a non-NULL pointer.
Change-Id: I3b932f508bb010c4bda06f80ad98a4836eeb8484
Teemu Murtola [Tue, 20 May 2014 19:30:03 +0000 (22:30 +0300)]
Move pbc.* to pbcutil/
- Remove unnecessary includes of pbc.h.
- Reorder some of the includes in C++ code manually; elsewhere, just a
manual replacement of the include paths.
- Some minor cleanup.
This introduces a cyclic fileio<->pbcutil dependency, but that needs to be solved separately.
Change-Id: I13becc82aaa217288ea45df72bb6198377de9d0f
Mark Abraham [Wed, 21 May 2014 17:47:52 +0000 (19:47 +0200)]
Move tools code to where it is used
All the actual clients of calch.c and princ.c were respectively
in gmxpreprocess and gmxana, so it makes more sense for them
to be there, together with their headers. Removed some
unneccesary #includes of those headers.
Change-Id: I47f6d2f1e3a4670ebba907b874590e362f070eac
Roland Schulz [Sun, 11 May 2014 20:26:14 +0000 (16:26 -0400)]
Add ASAN build configuration
Also renamed ThreadSanitizer to TSAN
Change-Id: I4373a626acc3962bfb8f163297ab146684bd5ea6
Teemu Murtola [Thu, 22 May 2014 03:57:13 +0000 (06:57 +0300)]
Move cinvsqrtdata.c to math/ and remove Fortran remnants
There is no longer any Fortran code that needs to use the arrays, so
simplify the code.
Change-Id: I304ab21129412f53b8c9696ac0739cbafbcb0b7e
Teemu Murtola [Tue, 20 May 2014 04:25:27 +0000 (07:25 +0300)]
Merge t_pbc definition into pbc.h
- Remove types/pbc.h, and merge its contents into pbc.h.
- Make t_pbc forward-declarable, and use this in header that only
included one of the pbc.h files to just get this definition.
- Add some missing pbc.h includes.
- Fix some other include dependencies that were previously covered
transitively.
- Minor cleanup in touched files.
Change-Id: I0a69980b244c23905c44448c1a095d497807cd04
Mark Abraham [Sat, 17 May 2014 13:27:25 +0000 (15:27 +0200)]
Refactor string handling for GPU usage report
This prepares for future addition of reporting the list of available
compatible GPUs in the auto-selection case, which is needed for gmx
tune-pme to function well. Current outputs are only of IDs of
available GPUs, or IDs of those that will be used. The latter depends
on the number of PP ranks, so it doesn't help gmx tune-pme find out
how to run the optimization. At some point, delegating this kind of
task to hwinfo called from gmx tune-pme might be preferable.
The only functionality changes here are of reporting GPU ids by
referring to them as IDs, and the string of the ones used is of style
"0,1,4" rather than "#0, #1, #4". The use of the template function and
constructing the temporary vector prepares for the next commit.
Change-Id: Ic37989ce2f8e6396f450e1b5457ea7ea70b3849b
Teemu Murtola [Mon, 19 May 2014 18:16:13 +0000 (21:16 +0300)]
Move mshift.* to pbcutil/
- Remove unnecessary includes of mshift.h.
- Replace mshift.h includes in headers with forward declarations of
t_graph where applicable.
- Add some missing mshift.h includes to source files that were getting
it transitively from one of the above headers.
- Convert mshift.c to C++ and get rid of macros.h dependency.
Change-Id: Ie0671cd6d683f5092243e5fdcb102641fdb6ecf6
Teemu Murtola [Mon, 19 May 2014 17:08:59 +0000 (20:08 +0300)]
Merge t_graph definition into mshift.h
- Remove types/graph.h, and merge its contents into mshift.h.
This is a natural place for the structure, as the header already
contains most functions that operate on the graph.
- Make t_graph forward-declarable, and use that in headers that
previously got t_graph from typedefs.h.
- Add some missing mshift.h includes to source files that now need it.
Some additional cleanup of mshift.h dependencies will be done in
subsequent commits, when the header itself is moved.
Change-Id: Ia8c5817c11474c857a6845810e5e7f5a75f1c47c
Teemu Murtola [Sun, 18 May 2014 17:25:06 +0000 (20:25 +0300)]
Move rmpbc.* to pbcutil/
- Remove unnecessary includes of rmpbc.h.
- Add includes for rmpbc.h in files where it was missing and was
previously transitively covered through gstat.h (which itself didn't
need rmpbc.h).
- Some additional include reordering in files that were manually edited.
More PBC-related files will get to this directory in subsequent commits.
Change-Id: I3f3a963bb2444c0899ea24d2d4cd6a58c3077a82
Mark Abraham [Sat, 17 May 2014 12:23:00 +0000 (14:23 +0200)]
Convert gmx_detect_hardware.c to C++
Minor fixes to keep new compilers and static analysis happy. The
change to the return behaviour of sizeof_cuda_dev_info does not
matter, because it is only used if it is non-zero.
Change-Id: If2c9c2676667316637a30af9ead71fb9f77058c2
Teemu Murtola [Sun, 18 May 2014 04:32:03 +0000 (07:32 +0300)]
Clean up matio.*
- Remove unnecessary includes of matio.h.
- Move t_matrix and related type definitions from types/matrix.h to
matio.h, since this is the only header that needs them, and all users
also need the contents of that header.
- t_rgb is an exception to the above rule. Moved that to types/rgb.h
for now, and adapted other users.
- Remove clear_matrix() as unused.
- Fix a file handle left open in do_dssp.
- Make several functions not declared in matio.h static in matio.cpp.
- Don't use gmx_fio_close() on a handle not opened with gmx_fio_open()
in readcmap().
- Most of the *cmap() functions are unused (only do_dssp calls one of
the reading functions, and no one calls the writing functions), but
left them there for completeness.
Change-Id: Iffc9c9e6d06ce8884e1835c07e9c0f9227412725
Teemu Murtola [Wed, 23 Apr 2014 18:58:41 +0000 (21:58 +0300)]
Move 3dview.* to programs/view/
This is the only place where the t_3dview structure is used, and it
seems quite tailored for this use.
Change-Id: Iee0cb3aae947b2bb3f98763ea91949a560faf602
Teemu Murtola [Wed, 23 Apr 2014 18:51:05 +0000 (21:51 +0300)]
Clean up math/
- Remove some unnecessary includes.
- Remove autoconf remnants.
- Split 3dview.* to 3dview.* for t_3dview and 3dtransforms.* for the
basic 4-vector operations.
- Rename most mat4/vec4 operations to be more descriptive and make some
3dview operations static, as they were not used outside the source
file.
- Add some documentation for 3dtransforms.h (but not for all functions,
so the file itself is not documented).
This removes some legacyheaders/ dependencies from math/, and allows
moving 3dview.* to programs/view/, which is the only user for them.
Change-Id: Ieb51d1d800c07f053eb5a28dfef2a249d5fcfceb
Roland Schulz [Wed, 30 Apr 2014 07:37:36 +0000 (03:37 -0400)]
Clean-up gmx_eof
- Changed name to gmx_one_before_eof so that the different
behavior from feof is obvious.
- Changed one usage of gmx_eof to feof where the std
behavior is OK
- Moved to confio and made static because it is only
used there.
- Removed the special treatment for pipes. It was incorrect.
gmx_before_eof is only used for gro file reading and
those could not be read from compressed files anyhow.
Their is no possible correct implemenation for pipes
(which cannot be seeked) and even if it wouldn't help
because gro file reading also uses rewind which
doesn't work for pipes.
Change-Id: I77fd34253817cd591011b8a2ec39ae95ce7b7378
Teemu Murtola [Mon, 5 May 2014 18:33:27 +0000 (21:33 +0300)]
More elaborate default handling for FileNameOption
- FileNameOption now prefers existing files when completing the default
basename to a full filename for input options, like t_filenm parsing
does.
- Add FileNameOptionManager that allows interaction between different
file-related options. Use it to add support for -deffnm-like option
to set a default base name for all FileNameOptions.
To do the above, and make the -deffnm option independent from the
command line order, the default file names are now handled during
Options::finish(). So there are cases when the value returned by a file
name option changes after this call.
Change-Id: I73d3badae5409e9f066f06dec307b2c10ac89bfd
Teemu Murtola [Sun, 27 Apr 2014 03:49:11 +0000 (06:49 +0300)]
Unit tests for parse_common_args() file options
Some tests were already there, but extended the set to consider the
paths that check for file existence on the file system.
The tests should now cover most happy paths within parse_file_args().
Many unhappy paths behave quite unintuitively, so they are not tested
to avoid enforcing such unintuitive behavior.
Change-Id: I21c2dc40a3861784d55b6419dd148d6dda26dde5
David van der Spoel [Tue, 13 May 2014 13:46:53 +0000 (15:46 +0200)]
Added cmake profiling support
Support for using gprof with gromacs executables is added to
allow basic profiling using
gmx command [options]
gprof gmx
Removed explicit -fomit-frame-pointer, since this has been default
behaviour in gcc at most optimization levels since at least version
4.4. This lets "-O3 -pg" in the Profile build-type CFLAGS fight it out
themselves.
Change-Id: I99710f9cdd406f866d663a9610e0e9cccb87c07c
Teemu Murtola [Tue, 22 Apr 2014 04:14:58 +0000 (07:14 +0300)]
Move physics.* to math/units.*
- Remove some unnecessary #includes.
- Remove the dummy tests; easy to rewrite as usable tests using GTest if
someone needs those. They were anyways testing code that no one is
still calling, even though it was introduced several years ago.
Now gmxlib is free of *_test.c files.
Now, only one file using atom_id is keeping math/ dependent on
legacyheaders/.
Part of #1415.
Change-Id: I31312b92cf9f5d5129fbd90f31fcf27be2f7afaf
Roland Schulz [Wed, 14 May 2014 16:25:27 +0000 (18:25 +0200)]
Merge "Merge release-5-0 into master"
Roland Schulz [Sat, 10 May 2014 16:34:36 +0000 (12:34 -0400)]
Merge release-5-0 into master
Change-Id: Ib309c33a5923d50757122b789df9430aaa1ee98d
Roland Schulz [Fri, 9 May 2014 19:08:58 +0000 (15:08 -0400)]
Merge release-4-6 into release-5-0
Conflicts:
CMakeLists.txt (applied to cmake/gmxManageSharedLibraries.cmake)
Replaced gmx_llabs by llabs as mentioned in TODO.
Change-Id: I37e8cf5d6725cc9836e6dc29ca44e7ef915417c4
Alexey Shvetsov [Sun, 20 Apr 2014 13:01:54 +0000 (17:01 +0400)]
Fix clang 3.5 warnings regarding *abs*
Fix abs() family functions type usage mismatch.
Change-Id: I85ed2931d681aa1ad024678b4209a524abc2cc61
Signed-off-by: Alexey Shvetsov <alexxy@omrb.pnpi.spb.ru>
Berk Hess [Thu, 8 May 2014 13:17:00 +0000 (15:17 +0200)]
Minor tweaks to the DD setup
Dynamic load balancing is now turned on when the total performance
loss is more than 2% (lower than that will not help).
The check for large prime factors should be done on the PP node
count when -npme is set by the user.
Change-Id: Ib81b56a7cb071540b143a4bfc98758788a8ac07d
Roland Schulz [Sat, 3 May 2014 16:27:14 +0000 (12:27 -0400)]
Fix comparison of array to NULL
Static char array is never NULL. Detected by clang 3.5. Also fixes
output of read_atype and print error for incorrect format.
Change-Id: I834fca2d8fdd49167a88dc15bc7a2e72f4d97269
Roland Schulz [Fri, 9 May 2014 19:04:43 +0000 (21:04 +0200)]
Merge "Merge branch release-4-6 into release-5-0" into release-5-0
Roland Schulz [Fri, 9 May 2014 09:57:08 +0000 (05:57 -0400)]
Fix OpenMP scope error
Change-Id: I5cea5df876a48e5868b5160170e8450e697f3b4b
Roland Schulz [Fri, 9 May 2014 16:57:53 +0000 (12:57 -0400)]
Fix GCC 4.9 warnings
Change-Id: I277d0f03f67dfbb5ca5785adc7e8f31880202b41
Roland Schulz [Fri, 9 May 2014 16:33:13 +0000 (12:33 -0400)]
Fix OpenMP unproteced update bug
Change-Id: Id881b3e2726fa9c9be7a37f7e909bb7b268e44a7
Roland Schulz [Thu, 8 May 2014 02:40:31 +0000 (22:40 -0400)]
Fix GCC 4.8 warnings
Those warnings only present without OpenMP were not fixed prior.
Defines GMX_ATTRIBUTE_NORETURN for GCC and Clang. TODO is
left because it still doesn't define it for all compilers.
Change-Id: I7197e58f87c01de7d2deeba91a82026af74ba213
Pino Toscano [Mon, 5 May 2014 21:01:28 +0000 (23:01 +0200)]
cmake: enable shared libraries by default on Hurd
Since the toolchain is mostly the same as used on e.g. GNU/Linux
(glibc, gcc, binutils, etc), they can be safely enabled.
Change-Id: Ic663c8c344b5dfa2910e9c30260588e1917038c1
Teemu Murtola [Thu, 1 May 2014 18:20:22 +0000 (21:20 +0300)]
Fix incorrect limits in FloatOptionStorage
This typo didn't cause any problems in Gromacs, since currently, no code
path enters here. But if user code would use FloatOption or RealOption,
it would trigger. Found while taking this code into actual use in
master.
Change-Id: I712faf365359964f6f767991664da7981072e5bd
Roland Schulz [Wed, 30 Apr 2014 07:37:36 +0000 (03:37 -0400)]
Fix usage of gmx_eof
gmx_eof has different behavior from gmx_eof and feof
should be used here.
Change-Id: I877c15d0edde64fe06ae2eedbda980f117509449
Mark Abraham [Tue, 29 Apr 2014 20:52:24 +0000 (22:52 +0200)]
Merge branch release-4-6 into release-5-0
Conflicts:
src/gromacs/mdlib/coupling.c
Resolved in favour of release-4-6, except that the underlying
RNG calls are now made to the new cycle-based RNG.
Run uncrustify
Change-Id: I56286e19632ac28958a0d4ef60ff09b875aa3005
Berk Hess [Wed, 23 Apr 2014 13:15:08 +0000 (15:15 +0200)]
Removed truncation of nrdf in v-rescale thermostat
The resampling function for the v-rescale thermostat expected an
integer value for nrdf, but a real was passed, which was truncated.
With a single coupling coupling group nrdf is analytically an int,
but could be off by a bit. The could lead to incorrect kinetic
energy fluctuations (averages were correct).
Now fractional nrdf's are properly handled for nrdf > 3.
For nrdf < 3 a check is added for integer values with a small margin
for rounding.
Fixes #1218
Change-Id: I4c60c337f9874d0bff51220ad09429140be2a056
Justin Lemkul [Thu, 24 Apr 2014 14:45:41 +0000 (10:45 -0400)]
Made ORCA compile.
There are probably larger issues here with the QM/MM interface.
I made no effort to test the validity of any simulation done with
ORCA (since I don't have ORCA and I don't do QM/MM), so issues
definitely remain.
Change-Id: Ibd5dd83d05a3b42c641f0fc9def75c4641e3a7d4
Teemu Murtola [Mon, 21 Apr 2014 04:11:00 +0000 (07:11 +0300)]
Move mtxio.* to fileio/
This removes some cyclic module-level dependencies, and is more in line
with the current layout, where all I/O code specific to some file
formats is in fileio/. math/ in general probably also needs to be lower
in the dependency stack than fileio/, so it is not possible to keep the
code in the old place without introducing a cyclic dependency.
Change-Id: If0c0632a3d5b3cd4ffe82f38f743e9afdc7ffdff
Roland Schulz [Mon, 21 Apr 2014 00:57:32 +0000 (20:57 -0400)]
Reduced usage of typdefs.h
Preliminary step to move types out of legacyheader.
Renamed parameter called "matrix" because cppcheck gets
confused if a parameter is called the same as a type.
Part of #1415
Change-Id: I9207a7b8de7f092bab890da128abbb48a8d97b79
Teemu Murtola [Sun, 20 Apr 2014 18:33:08 +0000 (21:33 +0300)]
Move rvec and friends to math/vectypes.h
Adjust a few more types/simple.h includes to use only its component
parts. Now, math/ has only very few legacyheaders/ dependencies left.
Part of #1415
Change-Id: Iffeafa4fac5c5e0c744cf6deecac4eedaee2caf5
Teemu Murtola [Fri, 18 Apr 2014 14:16:13 +0000 (17:16 +0300)]
Move 'real' definition to utility/real.h
- types/simple.h still includes the new header to avoid touching all
code depending on this.
- Go through most files outside gmxlib and mdlib that included
types/simple.h, and checked whether headers from utility/ could
fulfill the needs. Replaced at least in places where this helped
fully remove legacyheaders/ dependencies.
- Some minor changes elsewhere to remove legacyheaders/ dependencies
from modules. Now linearalgebra/ and statistics/ don't depend on
legacyheaders, improving the layout of the dependency graph
significantly.
In the long run, this may be better outside utility/ to better
distinguish code that depends on 'real' from parts that do not.
Currently, it would create a lot of cyclic dependencies everywhere else.
Part of #1415.
Change-Id: I2aa1890357377d0d14c05b3968e1b36e1023458f
Roland Schulz [Sat, 19 Apr 2014 08:51:39 +0000 (04:51 -0400)]
Fix cppcheck 1.64 warnings
Related to #1487
Change-Id: I223289d71e0dfc426f382d1bcb53b3509202779f
Magnus Lundborg [Wed, 16 Apr 2014 06:29:18 +0000 (08:29 +0200)]
More efficient TNG selection group creation
Do not create a TNG selection group if no selection is specified
explicitly, or if the selection contains all atoms in the system.
Change-Id: Ibe2a14e55aff829fdb74de074447f00f0e85f090
Berk Hess [Wed, 16 Apr 2014 08:11:50 +0000 (10:11 +0200)]
Fixed nbnxn FE list allocation issue
With free-energy calculations, the nbnxn search code could write
beyond the list bound, which could cause a segv.
Fixes #1474
Change-Id: I4c202fc14b04980f05ad1b3ea001732fdfaa9f00
Roland Schulz [Tue, 22 Apr 2014 19:51:29 +0000 (15:51 -0400)]
Fix memory error in asc format IO
Found with cppcheck 1.64
Change-Id: I72e80cd2b11559be47d449d0a8d444857843979b
Michael Shirts [Fri, 18 Apr 2014 03:09:01 +0000 (23:09 -0400)]
Issue warnings for potential switch w/o defining switch regions.
If either older style switches or new potential-switch modifiers are
used, issue a warning if the PME regions is too long, resulting in
inaccurate energies. Also issue a warning if rvdw_switch is 0, which
occurs if no value is specified.
Discussion is in redmine #1463
Change-Id: I7a2c29f87ceb04712aab5076ac97f5f22f573671
Roland Schulz [Sun, 20 Apr 2014 17:56:55 +0000 (13:56 -0400)]
Move part of macros.h to grompp-impl.h
Part of #1415.
Change-Id: I360ae1f220b6c51e90edbbe136053fd2e1c0ad5b
Alexey Shvetsov [Wed, 16 Apr 2014 04:26:17 +0000 (08:26 +0400)]
Move sfactor.[hc] to gmxana
Move it here since its only used by g_saxs
Change-Id: I2ff7761da30eabb569e55362cdc55d683b296d8e
Signed-off-by: Alexey Shvetsov <alexxy@omrb.pnpi.spb.ru>
Teemu Murtola [Wed, 16 Apr 2014 03:49:35 +0000 (06:49 +0300)]
Move vec.h to math/
Most of the changes are scripted replacement of include paths.
Exceptions:
- #includes in the moved file were cleaned up slightly, and include
guards adjusted.
- Places where it was included as "gromacs/legacyheaders/vec.h" were
handled manually and the include order adjusted.
- Removal of unnecessary #include "vec.h" from update.h revealed some
transitive dependencies that were fixed. Some associated include
order cleanup in these files.
- Removed some duplicate includes.
- Remove dependency from linearalgebra/matrix.c to vec.h (only needed
for a single sqr()) to avoid a cyclic math <-> linearalgebra
dependency.
Part of #1415.
Change-Id: I7ece6eafa22139215510148807c5979f8950a885
Mark Abraham [Thu, 17 Apr 2014 08:58:32 +0000 (10:58 +0200)]
Merge "Merge release-5-0 into master"
Magnus Lundborg [Wed, 16 Apr 2014 06:23:03 +0000 (08:23 +0200)]
Fixed bug inverting compression precision.
In the TNG library the compression precision was modified to
suit GROMACS compression precision better (i.e. indicating
the multiplier applied to the compressed value). There was no
change in GROMACS to reflect this, meaning that compressed TNG
would have 0 coordinates for almost all atoms. That is fixed
in this commit.
Change-Id: Id906c710deb68d172a38acec34892aa4823c039d
Roland Schulz [Wed, 16 Apr 2014 15:07:10 +0000 (11:07 -0400)]
Merge release-5-0 into master
Conflicts:
CMakeLists.txt
Change-Id: Id9bdc4de634a67c4060bec0e5edf4c358cc6a228
Teemu Murtola [Mon, 14 Apr 2014 18:15:50 +0000 (21:15 +0300)]
Remove unused minvert.h
This wasn't included from anywhere either (except one file in contrib/),
and none of the declared functions had implementation.
Change-Id: I8133c278303f651c9a324fd5ec60133e00c90cd8
Roland Schulz [Wed, 16 Apr 2014 06:45:52 +0000 (02:45 -0400)]
Fix whitespace
Change-Id: Ib5cba2818ae0ae5cbf40634fc85a20ca196e70d9
Mark Abraham [Fri, 11 Apr 2014 12:11:00 +0000 (14:11 +0200)]
Fix and simplify version matching for running tests
The version strings that might need bumping for releases and branch
forks are now all maintained in one place, and are always
defined. Correct behaviour follows from whether the "-dev" tag is
present in PROJECT_VERSION.
When this patch is merged with master branch, preserve the bump
to PROJECT_VERSION that is already in master branch, and change
release-5-0 to master branch for REGRESSIONTEST_BRANCH.
Change-Id: I4a5579f00e487273f8e08bad5613ecceac7bf682
Teemu Murtola [Wed, 16 Apr 2014 04:04:57 +0000 (07:04 +0300)]
Fix typo in fatalerror.h
This was causing a warning from the Doxygen checker (doc-check).
Change-Id: I2a482856fd7b88db0d8e669bdb815f52db79e4f0
Teemu Murtola [Tue, 15 Apr 2014 04:07:31 +0000 (07:07 +0300)]
Move xvgr.* to fileio/
Part of #1415
Change-Id: Ib3d78bce62a4c03c4d72001164921edd556657a2
Teemu Murtola [Tue, 15 Apr 2014 03:59:39 +0000 (06:59 +0300)]
Clean up xvgr.h and viewit.h usage
- Remove unnecessary includes of these files.
- Include viewit.h in files that were covered transitively through
xvgr.h, and remove the include from there.
- Remove other unnecessary includes in these headers.
- Make can_view() static in viewit.c, since it wasn't even declared in
the header.
Change-Id: I7b6b3724a5b7fd40be46eb8fbcb9d9aeaccf9cc8
Teemu Murtola [Sun, 13 Apr 2014 09:39:57 +0000 (12:39 +0300)]
Remove sysstuff.h
Replace this with those standard headers that are actually necessary for
the source files. There are likely several transitively covered header
dependencies now, but those can be resolved when they give problems.
One more header off from legacyheaders/.
Part of #1415.
Change-Id: I4cc3f0eec0f546dad929512e532d8efb11da3694
Teemu Murtola [Sun, 13 Apr 2014 07:05:14 +0000 (10:05 +0300)]
Remove sysstuff.h includes from headers
Remove #include "sysstuff.h" from all headers, and replace it with
standard headers where necessary. Add necessary standard headers to
source files that previously got them transitively from one of these.
Use snew() in gmx_spatial.c instead of a custom implementation.
Replace some free() with sfree().
Part of getting rid of sysstuff.h.
Change-Id: I857ba69c004aea16195e629c5bf69df32724b3fc
Teemu Murtola [Sun, 13 Apr 2014 05:29:48 +0000 (08:29 +0300)]
Refactor gmx_fatal()
- Remove t_commrec and legacyheaders/ dependencies from
utility/fatalerror.cpp by splitting gmx_fatal_collective() into a
low-level helper (in fatalerror.cpp) and a high-level routine that
knows t_commrec (in network.c).
- Move the declaration of gmx_fatal_collective to network.h to get rid
of one more header in legacyheaders/.
- Refactor fatalerror.cpp such that the error handler is no longer
responsible of terminating the program. Split functionality into
helper functions that can be called as appropriate, and remove a lot
of duplication.
- Clean up gmx_abort() and code that calls it.
- Remove interactive prompt from the error handler exit path.
Change-Id: Ia0ab2e415a18bf6ed17bebd1fd8870946d16793e
Mark Abraham [Thu, 10 Apr 2014 22:14:11 +0000 (00:14 +0200)]
Beer + table soccer = quote!
Change-Id: I3323f5b7ae7c65013dc8c0270232f02da8a42bd5
Roland Schulz [Mon, 14 Apr 2014 16:47:02 +0000 (12:47 -0400)]
Improve language choice
Fixes #1480
Change-Id: I45d26cd329c8c358852dc759270ffbac54728d27
Teemu Murtola [Sun, 13 Apr 2014 14:19:26 +0000 (17:19 +0300)]
Remove unused shift.h
Wasn't included from anywhere, and the one declared function isn't
implemented anywhere.
Change-Id: Ib7548bdfe4f02e34a5c4c62b370c4a7071c3653a
Teemu Murtola [Mon, 7 Apr 2014 04:09:55 +0000 (07:09 +0300)]
Remove utility -> fileio dependencies
- Move futil.* to utility/. It is somewhat difficult to keep low-level
utilities independent of any file utility functions. Now fileio/
mainly contains I/O routines that need to know something about the
file formats supported by Gromacs, and lower-level stuff is in
utility/.
- Move path.* back to utility/, with the same rationale as above.
- Don't use gmxfio for the debug file. It doesn't provide any benefit
for this use, but introduces a cyclic dependency that is very hard to
break otherwise. There are some extra conditionals in gmxfio that
could possibly be removed because of this, but left them there for
now, since they require additional analysis.
Now, the only dependency from utility/ to other subdirectories is
because of gmx_fatal_collective().
Change-Id: Ib5b8e71088f1fa69909179b35f9600e22ef9ad8d
Teemu Murtola [Thu, 10 Apr 2014 03:39:23 +0000 (06:39 +0300)]
Clean up futil.*
- Make is_pipe() static, since it is not used outside futil.cpp.
- Move gmx_fexist_master() to network.* to remove t_commrec dependency
from futil.
- Remove unnecessary #define for a system-provided symbol rewind().
- Remove unused gmx_truncatefile().
- Move STRLEN to utility/cstringutil.h, since types/simple.h is no
longer transitively included by futil.h. This avoids reintroducing an
utility/ -> types/simple.h dependency. Include cstringutil.h in
source files that were depending on STRLEN.
- Add some Doxygen documentation for all the functions.
Preparation for moving these to utility/ to resolve fileio-utility
cyclic dependency.
Change-Id: I26ed7e46c512ee41621e2a2c241692c1bb28530d
Justin Lemkul [Thu, 10 Apr 2014 17:57:22 +0000 (13:57 -0400)]
Fixed typo in manual README.
Fixes #1478
Change-Id: I0dc1cbcac90b4d40a805bfeaf38a90e478801ae0
Mark Abraham [Thu, 10 Apr 2014 16:40:29 +0000 (18:40 +0200)]
Merge branch 'release-4-6' into release-5-0
Change-Id: Icd1eafab98512328523a3ea788626b3fb415b0a8
Teemu Murtola [Thu, 3 Apr 2014 03:16:52 +0000 (06:16 +0300)]
Clean up and fix issues in doc-check scripts
- Some 'documentation' -> 'doc' replacements in method names to make
lines shorter and to make method names more consistent.
- Make the checker work for members of anonymous namespaces.
- To achieve the above, add minimal modeling of namespaces and members
to gmxtree.py, and model the parent compounds of members better in
doxygenxml.py.
- Make the checker check also documentation that is ignored by Doxygen.
This is now possible when anonymouns namespaces work.
--check-ignored now only controls whether the ignored comments provoke
a note or not. This is not enabled currently, because it produces
quite a lot of noise.
- Fix documentation issues in those ignored Doxygen comments (all the
source code changes).
- Encapsulate some logic in gmxtree.py related to how the API type is
handled in the case of legacy (undocumented) modules. This simplifies
the graph generation logic, and replaces a lot of the "legacy" edges
with more descriptive edges: installed headers in legacy modules are
now treated as public API headers.
- Add a basic legend to the module graph.
Change-Id: Ia4e83468548b361f37bdb8d35862e636d7abddd6
Teemu Murtola [Sun, 6 Apr 2014 18:55:25 +0000 (21:55 +0300)]
Move part of types/simple.h to utility/
- Move those parts of types/simple.h that are wrapping C99 features and
some compiler-specific attributes (gmx_unused) into
utility/basedefinitions.h.
- Replace some uses of types/simple.h with the new header, removing a
few module-level dependencies on legacyheaders/
- For now, types/simple.h includes the new header to avoid touching a
lot of code.
- Remove unused BIG_STRLEN from types/simple.h.
- Move XXXX etc. into calcvir.c, which is the only place where they are
used.
Change-Id: Idad2aff77048cc1487945e90c8b50ff8bd7010d4
Carsten Kutzner [Mon, 7 Apr 2014 11:55:15 +0000 (13:55 +0200)]
Re-use gmx_within_tol from math/utilities instead of is_equal
Change-Id: I097bc4901c2f0123cdcb101c9d2f75f1485fb771
Mark Abraham [Sun, 6 Apr 2014 15:04:14 +0000 (17:04 +0200)]
Further fix to gmx tune-pme
We need to ignore the column of total time, before reading the total
number of gigacycles. This was also broken before the recent patch to
this line that removed a spurious read of a %d for the number of
ranks.
Change-Id: I1ce7f378069c319e03fe9c0691193bd09a8a209f
Teemu Murtola [Sun, 6 Apr 2014 04:03:45 +0000 (07:03 +0300)]
Remove utility/ dependencies on network.h and main.h
- Move basic functions that do not depend on t_commrec from network.*
to utility/basenetwork.h. This allows removing network.h dependencies
from utility/, as well as from other new C++ code.
- Simplify gmx_abort() somewhat. It is only called with real MPI, so
remove other code paths, and make it a linker error if it is called
under other circumstances.
- Move gmx_gethostname() from main.* to basenetwork.*.
- While at it, remove unnecessary includes for main.h, now that it only
contains a few functions.
Change-Id: I048e48ba81b5e764e8342ee07a05201da5fbade2
Carlo Camilloni [Wed, 9 Apr 2014 22:38:08 +0000 (23:38 +0100)]
Fixed g_rmsdist NOE calculation
This fix solve a series of bugs in NOE calculations:
1) incorrect number of frames in the calculation of the average distance
2) wrong selection of equivalent atoms
3) -equiv was wrongly documented
Change-Id: Icc6bbed0e1ba65774ad470c3edbd7a6a96e63ee6
Justin Lemkul [Wed, 9 Apr 2014 16:47:10 +0000 (12:47 -0400)]
Fixed MG typo in residuetypes.dat
Corrected "MK" typo to "MG" so that magnesium is recognized.
Change-Id: Ia4e76028e40ffd849eb0155ce5bac2996472cef6
Teemu Murtola [Sat, 5 Apr 2014 17:59:21 +0000 (20:59 +0300)]
Remove some utility -> legacyheaders dependencies
- Use methods in programcontext.h and baseversion.h instead of
copyrite.h within utility/.
- Replace one use of asize() with an alternative implementation that
doesn't require an explicit array size.
- Don't pass the whole hw_opt structure to the OpenMP thread affinity
check, when only a single field is ever accessed.
- Don't call md_print_warn() from gmx_omp_check_thread_affinity(), but
provide the message to the caller so that they can print it.
For the last two, the rationale is that if this function needs to be in
a generic OpenMP wrapper (which makes sense, since it requires in-depth
information about the actual OpenMP library), then it shouldn't depend
on any mdrun-specific code.
Change-Id: Icc8f4026e4a2ce8e5d533a5bb88e5f3dddcc9a4a
Teemu Murtola [Tue, 8 Apr 2014 15:56:29 +0000 (18:56 +0300)]
Version bump for post-5.0 development
Change-Id: I6be353c112669216c39da441d58d1d10976b3b63
Teemu Murtola [Sat, 5 Apr 2014 03:16:57 +0000 (06:16 +0300)]
Move gmx_fatal.* to utility/fatalerror.*
One more included-by-all header to utility/.
Mainly mechanical replacement of include paths, some reordering in C++
files. Minor clean-up in the moved files.
gmx_fatal_collective.h not moved at this point, as it is unclear whether
it should go here, or somewhere else (utility/ should not depend on
t_commrec...).
Now, it's mainly types/simple.h that prevents removing some module-level
dependencies to legacyheaders/. Finding a good location for that (or
its contents, if it needs to be split), and reorganizing the code a bit
more should now allow really putting utility/ at the bottom of the
dependency stack where it belongs.
Part of #1415.
Change-Id: I6e487566d5bd7c9ec7a1455a2d31bd6d645bada3
Mark Abraham [Sun, 6 Apr 2014 11:40:38 +0000 (13:40 +0200)]
Fix invalid dereference in g_tune_pme
Change-Id: If4c999e22799ab2087ff1a1d74d8e5b50ddddd57
Erik Lindahl [Wed, 19 Mar 2014 16:16:18 +0000 (17:16 +0100)]
Make sure water optimization is disabled for esoteric interactions
This fixes a bug where the generic NB kernel could be called with
a water-water neighborlist for a few special combinations where
no C kernels existed (e.g. switch/shifted plain-cutoff coulomb).
This would typically lead to virtually no nonbonded interactions
being calculated and the simulation crashing rapidly, so it is
unlikely to have affected any results silently, but was noticed
when testing interaction forms.
Change-Id: I634fc4ab78b54281c89333299975e25883dc1f2c
Mark Abraham [Mon, 7 Apr 2014 15:37:18 +0000 (17:37 +0200)]
Version bump for 5.0-rc1
Change-Id: I2e855832ce3d8301a63fe32ea8e5077ad7c082c6
Teemu Murtola [Tue, 1 Apr 2014 15:47:15 +0000 (18:47 +0300)]
Doxygen documentation for version.h
This allows removing one suppression from the new checker, and it is
anyways nice that the documentation can actually be linked from relevant
parts of earlier documentation. Some of the mentions of 4.6 could
perhaps be removed as obsolete in the future, but left them there for
now.
It requires extra investigation how to make the Doxygen build pick the
file up with an out-of-source build (if at all possible).
Change-Id: I196e89d1193cb8034580aee7d0d0bd5196ac176d
Teemu Murtola [Fri, 4 Apr 2014 17:29:19 +0000 (20:29 +0300)]
Remove ancient SGI-specific code
Change-Id: I32aa353faf8848690e1ae931e958d04aff10c121
Teemu Murtola [Fri, 4 Apr 2014 04:02:25 +0000 (07:02 +0300)]
Clean up gmx_fatal.*
- Remove unused functions and macros.
- Replace some one-use wonders with a direct call to gmx_fatal().
- Add basic Doxygen documentation.
- Clean up some (but not all) gmx_fatal.h includes, removing unnecessary
ones and adding some transitively covered ones. Didn't go through all
the files, and didn't do this very carefully, so some are still left.
but as long as vec.h includes gmx_fatal.h, it doesn't really matter...
Preparation for moving gmx_fatal.h away from legacyheaders/.
Change-Id: I96934ac6ce6bca1e4e8473bdee2b8fec036b0f76
Mark Abraham [Mon, 31 Mar 2014 15:19:14 +0000 (17:19 +0200)]
Move string-parsing code to where it can be reused
Change-Id: Ie043e403828237ee3a58baaa1521df2ea58d2f6d
Roland Schulz [Tue, 1 Apr 2014 13:51:02 +0000 (09:51 -0400)]
Add doc for spec. values of GMX_MAXBACKUP
Change-Id: Ibea096daa61e08e32f8dba05ba6afc5c7fbbb28c
David van der Spoel [Fri, 7 Feb 2014 09:45:37 +0000 (10:45 +0100)]
Removed possibility of compiling with GSL.
Cleanup up of programs that are not functioning well anyway
will be done in conjunction with a move to the new analysis
framework. Removed g_kinetics.
Refs #1472
Change-Id: Ic948e239fd77d8ae519a6462c1e25f908a5de014
Teemu Murtola [Tue, 1 Apr 2014 04:04:59 +0000 (07:04 +0300)]
Move string2.* to utility/cstringutil.*
Another common header away from legacyheaders/.
Some associated #include cleanup.
This reintroduces some unwanted dependencies (like utility -> fileio),
but those need to be fixed separately.
Part of #1415.
Change-Id: Iffb2820019e2b41ef74bcabcd202364917e43d58
Mark Abraham [Mon, 31 Mar 2014 13:43:38 +0000 (15:43 +0200)]
Fixes for g_tune_pme for 5.0
Removed unused variable procs, particularly because mdrun
no longer writes such a quantity on the "Total" line of
the walltime reporting section.
Change-Id: Ib49afc25c7d5119da7e315fab45d33cb64629b63
Mark Abraham [Mon, 31 Mar 2014 14:28:36 +0000 (16:28 +0200)]
Fix bug accumulating nrank_pp_intranode on PME ranks
The old code led to cr->nrank_pp_intranode=zero on PME ranks, which
meant that a command line of mpirun -np 4 mdrun -npme 2 on a two-GPU
node would fail, because gmx_select_gpu_ids() runs on all ranks, and
it calls limit_num_gpus_used() which thinks 0 PP ranks and 2 GPUs is
silly. Adding -gpu_id 01 works, of course, but that takes a different
code path in gmx_select_gpu_ids().
Change-Id: Iecd43ef9b71e2cc0339e93724b6b1071f0a159f6
Berk Hess [Tue, 3 Dec 2013 08:54:35 +0000 (09:54 +0100)]
Added LJ-PME and LJ Pot-switch to PME load estimate
Change-Id: I7f032fffb0a26d40914740c1180c4137c0b95653
Mark Abraham [Mon, 31 Mar 2014 16:11:33 +0000 (18:11 +0200)]
Re-use gmx_greatest_common_divisor()
Change-Id: Iee3a7b3bc339639360eed3498769efe64dd7dbf8
Teemu Murtola [Mon, 31 Mar 2014 18:20:05 +0000 (21:20 +0300)]
Move smalloc.h to utility/
One common header away from legacyheaders/.
Mostly mechanical replacement for the include paths, but removed a few
instances where the header was included more than once. Also, reordered
the headers a bit, mainly in C++ files.
Part of #1415.
Change-Id: Ic438d501ebf5eccc285655a9e8f2f625eb12f1d1