Remove some utility -> legacyheaders dependencies
authorTeemu Murtola <teemu.murtola@gmail.com>
Sat, 5 Apr 2014 17:59:21 +0000 (20:59 +0300)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Tue, 8 Apr 2014 16:52:24 +0000 (18:52 +0200)
commit15d71933ab534a66cf0669eb92a71ea0970de48c
tree436df8ca112cc7f7374ca0e7f4d9c10136da1cf8
parent7d42d47ab840da69f40691c64d7bbeb437611b64
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
src/gromacs/gmxlib/gmx_omp_nthreads.c
src/gromacs/gmxlib/gmx_thread_affinity.c
src/gromacs/legacyheaders/gmx_thread_affinity.h
src/gromacs/mdlib/clincs.c
src/gromacs/mdlib/vsite.c
src/gromacs/utility/fatalerror.cpp [moved from src/gromacs/utility/fatalerror.c with 93% similarity]
src/gromacs/utility/gmxomp.cpp
src/gromacs/utility/gmxomp.h
src/programs/mdrun/runner.c