From a5b355552b920746e3dda332accccabadfe37b50 Mon Sep 17 00:00:00 2001 From: Teemu Murtola Date: Sat, 6 Sep 2014 07:03:02 +0300 Subject: [PATCH] Manually sort some includes in src/gromacs Sort manually includes in files where there are #ifdefs within the include statements and the automatic sorter does not do a good job because of this. This commit does this for files found in src/gromacs/. Files from other locations will be done in a separate change if there are any. Fix nbnxn_cuda.h to work without requiring code to include nbnxn_pairlist.h first. Change-Id: I26fa1a28ea9094a62c826d8ee65ddabac345da68 --- src/gromacs/fft/fft5d.cpp | 27 ++++--- src/gromacs/fft/fft_fftw3.cpp | 10 +-- src/gromacs/fileio/gmxfio.c | 19 ++--- src/gromacs/fileio/gmxfio_asc.c | 22 +++--- src/gromacs/fileio/gmxfio_bin.c | 16 ++-- src/gromacs/fileio/gmxfio_rw.c | 16 ++-- src/gromacs/fileio/gmxfio_xdr.c | 18 ++--- src/gromacs/fileio/tngio_for_tools.cpp | 7 +- src/gromacs/fileio/trxio.c | 39 +++++----- src/gromacs/gmxana/gmx_hbond.c | 36 ++++----- src/gromacs/gmxana/gmx_trjconv.c | 41 +++++----- src/gromacs/gmxana/gmx_tune_pme.c | 24 +++--- src/gromacs/gmxlib/checkpoint.cpp | 25 +++--- src/gromacs/gmxlib/copyrite.cpp | 14 ++-- src/gromacs/gmxlib/gmx_detect_hardware.cpp | 34 ++++----- src/gromacs/gmxlib/gmx_thread_affinity.c | 16 ++-- src/gromacs/gmxlib/main.cpp | 22 +++--- src/gromacs/gmxpreprocess/fflibutil.cpp | 11 +-- src/gromacs/gmxpreprocess/gpp_nextnb.c | 9 ++- src/gromacs/imd/imd.c | 25 +++--- src/gromacs/math/utilities.c | 9 ++- src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda.cu | 33 ++++---- src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda.h | 37 ++++----- src/gromacs/mdlib/nbnxn_search.c | 35 ++++----- src/gromacs/mdlib/sim_util.c | 80 ++++++++++---------- src/gromacs/random/random.c | 15 ++-- src/gromacs/timing/cyclecounter.c | 6 +- src/gromacs/timing/walltime_accounting.c | 5 +- src/gromacs/tools/dump.c | 30 ++++---- src/gromacs/trajectoryanalysis/modules/nsc.c | 12 +-- src/gromacs/utility/cstringutil.c | 5 +- src/gromacs/utility/file.cpp | 3 +- src/gromacs/utility/gmxregex.cpp | 6 +- src/gromacs/utility/path.cpp | 3 +- 34 files changed, 351 insertions(+), 359 deletions(-) diff --git a/src/gromacs/fft/fft5d.cpp b/src/gromacs/fft/fft5d.cpp index 69a689aaa8..1e9e11bd70 100644 --- a/src/gromacs/fft/fft5d.cpp +++ b/src/gromacs/fft/fft5d.cpp @@ -34,14 +34,23 @@ */ #include "gmxpre.h" -#include "config.h" - -#include +#include "fft5d.h" +#include +#include +#include #include #include #include +#include + +#include "gromacs/utility/fatalerror.h" +#include "gromacs/utility/gmxmpi.h" +#include "gromacs/utility/smalloc.h" + +#include "config.h" + #ifdef NOGMX #define GMX_PARALLEL_ENV_INITIALIZED 1 #else @@ -52,8 +61,6 @@ #endif #endif -#include "gromacs/utility/gmxmpi.h" - #ifdef GMX_OPENMP /* TODO: Do we still need this? Are we still planning ot use fftw + OpenMP? */ #define FFT5D_THREADS @@ -61,12 +68,6 @@ /* #define FFT5D_FFTW_THREADS (now set by cmake) */ #endif -#include "fft5d.h" -#include -#include -#include -#include "gromacs/utility/smalloc.h" - #ifndef __FLT_EPSILON__ #define __FLT_EPSILON__ FLT_EPSILON #define __DBL_EPSILON__ DBL_EPSILON @@ -76,11 +77,9 @@ FILE* debug = 0; #endif -#include "gromacs/utility/fatalerror.h" - - #ifdef GMX_FFT_FFTW3 #include "thread_mpi/mutex.h" + #include "gromacs/utility/exceptions.h" /* none of the fftw3 calls, except execute(), are thread-safe, so we need to serialize them with this mutex. */ diff --git a/src/gromacs/fft/fft_fftw3.cpp b/src/gromacs/fft/fft_fftw3.cpp index e9de7eb0d1..d83d0f591b 100644 --- a/src/gromacs/fft/fft_fftw3.cpp +++ b/src/gromacs/fft/fft_fftw3.cpp @@ -35,25 +35,25 @@ */ #include "gmxpre.h" -#include "config.h" - #include #include #include +#include "thread_mpi/mutex.h" + #include "gromacs/fft/fft.h" +#include "gromacs/utility/exceptions.h" #include "gromacs/utility/fatalerror.h" +#include "config.h" + #ifdef GMX_DOUBLE #define FFTWPREFIX(name) fftw_ ## name #else #define FFTWPREFIX(name) fftwf_ ## name #endif -#include "thread_mpi/mutex.h" -#include "gromacs/utility/exceptions.h" - /* none of the fftw3 calls, except execute(), are thread-safe, so we need to serialize them with this mutex. */ static tMPI::mutex big_fftw_mutex; diff --git a/src/gromacs/fileio/gmxfio.c b/src/gromacs/fileio/gmxfio.c index 24dbc9f54a..e191b217e9 100644 --- a/src/gromacs/fileio/gmxfio.c +++ b/src/gromacs/fileio/gmxfio.c @@ -36,11 +36,14 @@ */ #include "gmxpre.h" -#include "config.h" +#include "gmxfio.h" #include #include #include + +#include "config.h" + #ifdef HAVE_IO_H #include #endif @@ -50,16 +53,14 @@ #include "thread_mpi/threads.h" -#include "gromacs/utility/fatalerror.h" +#include "gromacs/fileio/filenm.h" +#include "gromacs/fileio/gmxfio_int.h" +#include "gromacs/fileio/md5.h" #include "gromacs/legacyheaders/macros.h" -#include "gromacs/utility/smalloc.h" -#include "gromacs/utility/futil.h" -#include "filenm.h" #include "gromacs/utility/cstringutil.h" -#include "gmxfio.h" -#include "md5.h" - -#include "gmxfio_int.h" +#include "gromacs/utility/fatalerror.h" +#include "gromacs/utility/futil.h" +#include "gromacs/utility/smalloc.h" /* This is the new improved and thread safe version of gmxfio. */ diff --git a/src/gromacs/fileio/gmxfio_asc.c b/src/gromacs/fileio/gmxfio_asc.c index 28ea2377ee..b2f04b7ff8 100644 --- a/src/gromacs/fileio/gmxfio_asc.c +++ b/src/gromacs/fileio/gmxfio_asc.c @@ -34,30 +34,28 @@ * To help us fund GROMACS development, we humbly ask that you cite * the research papers on the package. Check out http://www.gromacs.org. */ - - #include "gmxpre.h" -#include "config.h" - #include #include #include #include + +#include "config.h" + #ifdef HAVE_IO_H #include #endif -#include "gromacs/utility/fatalerror.h" +#include "gromacs/fileio/filenm.h" +#include "gromacs/fileio/gmxfio.h" +#include "gromacs/fileio/gmxfio_int.h" +#include "gromacs/fileio/md5.h" #include "gromacs/legacyheaders/macros.h" -#include "gromacs/utility/smalloc.h" -#include "gromacs/utility/futil.h" -#include "filenm.h" #include "gromacs/utility/cstringutil.h" -#include "gmxfio.h" -#include "md5.h" - -#include "gmxfio_int.h" +#include "gromacs/utility/fatalerror.h" +#include "gromacs/utility/futil.h" +#include "gromacs/utility/smalloc.h" /* This is the part that reads dummy and ascii files. */ diff --git a/src/gromacs/fileio/gmxfio_bin.c b/src/gromacs/fileio/gmxfio_bin.c index e8db04822e..498a795eb4 100644 --- a/src/gromacs/fileio/gmxfio_bin.c +++ b/src/gromacs/fileio/gmxfio_bin.c @@ -36,23 +36,23 @@ */ #include "gmxpre.h" -#include "config.h" - #include #include #include + +#include "config.h" + #ifdef HAVE_IO_H #include #endif +#include "gromacs/fileio/filenm.h" +#include "gromacs/fileio/gmxfio.h" +#include "gromacs/fileio/gmxfio_int.h" +#include "gromacs/fileio/md5.h" #include "gromacs/legacyheaders/macros.h" -#include "gromacs/utility/smalloc.h" #include "gromacs/utility/futil.h" -#include "filenm.h" -#include "gmxfio.h" -#include "md5.h" - -#include "gmxfio_int.h" +#include "gromacs/utility/smalloc.h" /* This is the part that reads dummy and ascii files. */ diff --git a/src/gromacs/fileio/gmxfio_rw.c b/src/gromacs/fileio/gmxfio_rw.c index 1b74123e3b..d41d19176a 100644 --- a/src/gromacs/fileio/gmxfio_rw.c +++ b/src/gromacs/fileio/gmxfio_rw.c @@ -36,22 +36,22 @@ */ #include "gmxpre.h" +#include +#include + #include "config.h" -#include -#include #ifdef HAVE_IO_H #include #endif +#include "gromacs/fileio/filenm.h" +#include "gromacs/fileio/gmxfio.h" +#include "gromacs/fileio/gmxfio_int.h" +#include "gromacs/fileio/md5.h" #include "gromacs/legacyheaders/macros.h" -#include "gromacs/utility/smalloc.h" #include "gromacs/utility/futil.h" -#include "filenm.h" -#include "gmxfio.h" -#include "md5.h" - -#include "gmxfio_int.h" +#include "gromacs/utility/smalloc.h" /******************************************************************* diff --git a/src/gromacs/fileio/gmxfio_xdr.c b/src/gromacs/fileio/gmxfio_xdr.c index 77ca2f9f16..6054be42f9 100644 --- a/src/gromacs/fileio/gmxfio_xdr.c +++ b/src/gromacs/fileio/gmxfio_xdr.c @@ -36,24 +36,24 @@ */ #include "gmxpre.h" -#include "config.h" - #include #include #include + +#include "config.h" + #ifdef HAVE_IO_H #include #endif -#include "gromacs/utility/fatalerror.h" +#include "gromacs/fileio/filenm.h" +#include "gromacs/fileio/gmxfio.h" +#include "gromacs/fileio/gmxfio_int.h" +#include "gromacs/fileio/md5.h" #include "gromacs/legacyheaders/macros.h" -#include "gromacs/utility/smalloc.h" +#include "gromacs/utility/fatalerror.h" #include "gromacs/utility/futil.h" -#include "filenm.h" -#include "gmxfio.h" -#include "md5.h" - -#include "gmxfio_int.h" +#include "gromacs/utility/smalloc.h" /* This is the part that reads xdr files. */ diff --git a/src/gromacs/fileio/tngio_for_tools.cpp b/src/gromacs/fileio/tngio_for_tools.cpp index f15d15dafc..cdc1263bad 100644 --- a/src/gromacs/fileio/tngio_for_tools.cpp +++ b/src/gromacs/fileio/tngio_for_tools.cpp @@ -36,17 +36,16 @@ #include "tngio_for_tools.h" -#include "config.h" - #include -#include "tngio.h" -#include "trx.h" +#include "config.h" #ifdef GMX_USE_TNG #include "tng/tng_io.h" #endif +#include "gromacs/fileio/tngio.h" +#include "gromacs/fileio/trx.h" #include "gromacs/math/units.h" #include "gromacs/utility/common.h" #include "gromacs/utility/fatalerror.h" diff --git a/src/gromacs/fileio/trxio.c b/src/gromacs/fileio/trxio.c index 0f39b6c46b..b6098ce5b3 100644 --- a/src/gromacs/fileio/trxio.c +++ b/src/gromacs/fileio/trxio.c @@ -38,35 +38,34 @@ #include "trxio.h" -#include "config.h" - #include #include -#ifdef GMX_USE_PLUGINS -#include "vmdio.h" -#endif -#include "gmxfio.h" -#include "trxio.h" -#include "tpxio.h" -#include "trnio.h" -#include "tngio.h" -#include "tngio_for_tools.h" -#include "gromacs/legacyheaders/names.h" -#include "gromacs/math/vec.h" -#include "gromacs/utility/futil.h" -#include "xtcio.h" -#include "pdbio.h" -#include "confio.h" -#include "gromacs/legacyheaders/checkpoint.h" -#include "xdrf.h" - +#include "gromacs/fileio/confio.h" +#include "gromacs/fileio/gmxfio.h" +#include "gromacs/fileio/pdbio.h" #include "gromacs/fileio/timecontrol.h" +#include "gromacs/fileio/tngio.h" +#include "gromacs/fileio/tngio_for_tools.h" +#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/trnio.h" #include "gromacs/fileio/trx.h" +#include "gromacs/fileio/xdrf.h" +#include "gromacs/fileio/xtcio.h" +#include "gromacs/legacyheaders/checkpoint.h" +#include "gromacs/legacyheaders/names.h" +#include "gromacs/math/vec.h" #include "gromacs/topology/atoms.h" #include "gromacs/utility/fatalerror.h" +#include "gromacs/utility/futil.h" #include "gromacs/utility/smalloc.h" +#include "config.h" + +#ifdef GMX_USE_PLUGINS +#include "gromacs/fileio/vmdio.h" +#endif + /* defines for frame counter output */ #define SKIP1 10 #define SKIP2 100 diff --git a/src/gromacs/gmxana/gmx_hbond.c b/src/gromacs/gmxana/gmx_hbond.c index c226bed5bf..46a4da6497 100644 --- a/src/gromacs/gmxana/gmx_hbond.c +++ b/src/gromacs/gmxana/gmx_hbond.c @@ -36,34 +36,34 @@ */ #include "gmxpre.h" -#include "config.h" #include -/*#define HAVE_NN_LOOPS*/ - #include "gromacs/commandline/pargs.h" +#include "gromacs/fileio/matio.h" +#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/trxio.h" +#include "gromacs/fileio/xvgr.h" +#include "gromacs/gmxana/correl.h" +#include "gromacs/gmxana/geminate.h" +#include "gromacs/gmxana/gmx_ana.h" +#include "gromacs/gmxana/gstat.h" #include "gromacs/legacyheaders/copyrite.h" +#include "gromacs/legacyheaders/macros.h" #include "gromacs/legacyheaders/txtdump.h" +#include "gromacs/legacyheaders/viewit.h" #include "gromacs/math/units.h" -#include "gromacs/legacyheaders/macros.h" -#include "gromacs/utility/fatalerror.h" -#include "gromacs/topology/index.h" -#include "gromacs/utility/smalloc.h" #include "gromacs/math/vec.h" -#include "gromacs/fileio/xvgr.h" -#include "gromacs/legacyheaders/viewit.h" -#include "gstat.h" -#include "gromacs/utility/cstringutil.h" #include "gromacs/pbcutil/pbc.h" -#include "correl.h" -#include "gmx_ana.h" -#include "geminate.h" - +#include "gromacs/topology/index.h" +#include "gromacs/utility/cstringutil.h" +#include "gromacs/utility/fatalerror.h" #include "gromacs/utility/futil.h" -#include "gromacs/fileio/matio.h" -#include "gromacs/fileio/tpxio.h" -#include "gromacs/fileio/trxio.h" #include "gromacs/utility/gmxomp.h" +#include "gromacs/utility/smalloc.h" + +#include "config.h" + +/*#define HAVE_NN_LOOPS*/ typedef short int t_E; typedef int t_EEst; diff --git a/src/gromacs/gmxana/gmx_trjconv.c b/src/gromacs/gmxana/gmx_trjconv.c index 29e064f74b..f0aa6b5d80 100644 --- a/src/gromacs/gmxana/gmx_trjconv.c +++ b/src/gromacs/gmxana/gmx_trjconv.c @@ -36,43 +36,42 @@ */ #include "gmxpre.h" -#include "config.h" - #include #include #include -#include "gromacs/legacyheaders/copyrite.h" -#include "gromacs/legacyheaders/macros.h" -#include "gromacs/legacyheaders/typedefs.h" +#include "config.h" + +#ifdef HAVE_UNISTD_H +#include +#endif + +#include "gromacs/commandline/pargs.h" +#include "gromacs/fileio/confio.h" #include "gromacs/fileio/gmxfio.h" +#include "gromacs/fileio/pdbio.h" +#include "gromacs/fileio/tngio_for_tools.h" #include "gromacs/fileio/tpxio.h" -#include "gromacs/fileio/trxio.h" #include "gromacs/fileio/trnio.h" -#include "gromacs/fileio/tngio_for_tools.h" -#include "gromacs/utility/futil.h" -#include "gromacs/fileio/pdbio.h" -#include "gromacs/fileio/confio.h" -#include "gromacs/legacyheaders/names.h" -#include "gromacs/topology/index.h" -#include "gromacs/math/vec.h" +#include "gromacs/fileio/trxio.h" #include "gromacs/fileio/xtcio.h" -#include "gromacs/legacyheaders/viewit.h" -#include "gmx_ana.h" - -#include "gromacs/commandline/pargs.h" #include "gromacs/fileio/xvgr.h" +#include "gromacs/gmxana/gmx_ana.h" +#include "gromacs/legacyheaders/copyrite.h" +#include "gromacs/legacyheaders/macros.h" +#include "gromacs/legacyheaders/names.h" +#include "gromacs/legacyheaders/typedefs.h" +#include "gromacs/legacyheaders/viewit.h" #include "gromacs/math/do_fit.h" +#include "gromacs/math/vec.h" #include "gromacs/pbcutil/pbc.h" #include "gromacs/pbcutil/rmpbc.h" +#include "gromacs/topology/index.h" #include "gromacs/topology/topology.h" #include "gromacs/utility/fatalerror.h" +#include "gromacs/utility/futil.h" #include "gromacs/utility/smalloc.h" -#ifdef HAVE_UNISTD_H -#include -#endif - enum { euSel, euRect, euTric, euCompact, euNR }; diff --git a/src/gromacs/gmxana/gmx_tune_pme.c b/src/gromacs/gmxana/gmx_tune_pme.c index 80a86c4df4..990ec4738d 100644 --- a/src/gromacs/gmxana/gmx_tune_pme.c +++ b/src/gromacs/gmxana/gmx_tune_pme.c @@ -34,32 +34,32 @@ */ #include "gmxpre.h" -#include "config.h" - #include #include + +#include "config.h" + #ifdef HAVE_SYS_TIME_H #include #endif -#include "gromacs/legacyheaders/typedefs.h" -#include "gromacs/legacyheaders/types/commrec.h" -#include "gromacs/math/vec.h" +#include "gromacs/commandline/pargs.h" #include "gromacs/fileio/tpxio.h" -#include "gromacs/utility/cstringutil.h" -#include "gromacs/legacyheaders/readinp.h" +#include "gromacs/gmxana/gmx_ana.h" #include "gromacs/legacyheaders/calcgrid.h" #include "gromacs/legacyheaders/checkpoint.h" +#include "gromacs/legacyheaders/inputrec.h" #include "gromacs/legacyheaders/macros.h" -#include "gmx_ana.h" #include "gromacs/legacyheaders/names.h" #include "gromacs/legacyheaders/perf_est.h" -#include "gromacs/legacyheaders/inputrec.h" -#include "gromacs/timing/walltime_accounting.h" +#include "gromacs/legacyheaders/readinp.h" +#include "gromacs/legacyheaders/typedefs.h" +#include "gromacs/legacyheaders/types/commrec.h" #include "gromacs/math/utilities.h" - -#include "gromacs/commandline/pargs.h" +#include "gromacs/math/vec.h" +#include "gromacs/timing/walltime_accounting.h" #include "gromacs/utility/baseversion.h" +#include "gromacs/utility/cstringutil.h" #include "gromacs/utility/fatalerror.h" #include "gromacs/utility/smalloc.h" diff --git a/src/gromacs/gmxlib/checkpoint.cpp b/src/gromacs/gmxlib/checkpoint.cpp index b2c9c37e97..bec5b71652 100644 --- a/src/gromacs/gmxlib/checkpoint.cpp +++ b/src/gromacs/gmxlib/checkpoint.cpp @@ -39,49 +39,46 @@ #include "gromacs/legacyheaders/checkpoint.h" -#include "config.h" - #include #include #include #include #include + +#include "config.h" + #ifdef HAVE_SYS_TIME_H #include #endif - #ifdef HAVE_UNISTD_H #include #endif - #ifdef GMX_NATIVE_WINDOWS /* _chsize_s */ #include #include #endif +#include "buildinfo.h" +#include "gromacs/fileio/filenm.h" +#include "gromacs/fileio/gmxfio.h" +#include "gromacs/fileio/xdr_datatype.h" +#include "gromacs/fileio/xdrf.h" #include "gromacs/legacyheaders/copyrite.h" #include "gromacs/legacyheaders/names.h" +#include "gromacs/legacyheaders/network.h" +#include "gromacs/legacyheaders/txtdump.h" #include "gromacs/legacyheaders/typedefs.h" #include "gromacs/legacyheaders/types/commrec.h" -#include "gromacs/legacyheaders/txtdump.h" #include "gromacs/math/vec.h" -#include "gromacs/legacyheaders/network.h" - -#include "gromacs/fileio/filenm.h" -#include "gromacs/utility/futil.h" -#include "gromacs/fileio/gmxfio.h" -#include "gromacs/fileio/xdrf.h" -#include "gromacs/fileio/xdr_datatype.h" #include "gromacs/utility/basenetwork.h" #include "gromacs/utility/baseversion.h" #include "gromacs/utility/cstringutil.h" #include "gromacs/utility/fatalerror.h" +#include "gromacs/utility/futil.h" #include "gromacs/utility/smalloc.h" -#include "buildinfo.h" - #ifdef GMX_FAHCORE #include "corewrap.h" #endif diff --git a/src/gromacs/gmxlib/copyrite.cpp b/src/gromacs/gmxlib/copyrite.cpp index e2a2da88cb..c1b94f0ebe 100644 --- a/src/gromacs/gmxlib/copyrite.cpp +++ b/src/gromacs/gmxlib/copyrite.cpp @@ -38,29 +38,27 @@ #include "gromacs/legacyheaders/copyrite.h" -#include "config.h" - #include #include #include #include +#include "config.h" + #ifdef HAVE_LIBMKL #include #endif - #ifdef HAVE_EXTRAE - #include "extrae_user_events.h" +#include #endif - #include /* This file is completely threadsafe - keep it that way! */ -#include "gromacs/legacyheaders/macros.h" - +#include "buildinfo.h" #include "gromacs/fft/fft.h" #include "gromacs/fileio/strdb.h" +#include "gromacs/legacyheaders/macros.h" #include "gromacs/math/vec.h" #include "gromacs/random/random.h" #include "gromacs/utility/baseversion.h" @@ -71,8 +69,6 @@ #include "gromacs/utility/programcontext.h" #include "gromacs/utility/smalloc.h" -#include "buildinfo.h" - static gmx_bool be_cool(void) { /* Yes, it is bad to check the environment variable every call, diff --git a/src/gromacs/gmxlib/gmx_detect_hardware.cpp b/src/gromacs/gmxlib/gmx_detect_hardware.cpp index 3158d79f0d..e05629a512 100644 --- a/src/gromacs/gmxlib/gmx_detect_hardware.cpp +++ b/src/gromacs/gmxlib/gmx_detect_hardware.cpp @@ -34,32 +34,36 @@ */ #include "gmxpre.h" -#include "config.h" - -#include -#include +#include "gromacs/legacyheaders/gmx_detect_hardware.h" #include #include #include #include +#include +#include + +#include "config.h" + #ifdef HAVE_UNISTD_H /* For sysconf */ #include #endif +#ifdef GMX_NATIVE_WINDOWS +#include +#endif -#include "gromacs/legacyheaders/types/enums.h" -#include "gromacs/legacyheaders/types/hw_info.h" -#include "gromacs/legacyheaders/types/commrec.h" -#include "gromacs/legacyheaders/network.h" -#include "gromacs/legacyheaders/md_logging.h" +#include "thread_mpi/threads.h" + +#include "gromacs/legacyheaders/copyrite.h" #include "gromacs/legacyheaders/gmx_cpuid.h" #include "gromacs/legacyheaders/gpu_utils.h" -#include "gromacs/legacyheaders/copyrite.h" -#include "gromacs/legacyheaders/gmx_detect_hardware.h" #include "gromacs/legacyheaders/md_logging.h" - +#include "gromacs/legacyheaders/network.h" +#include "gromacs/legacyheaders/types/commrec.h" +#include "gromacs/legacyheaders/types/enums.h" +#include "gromacs/legacyheaders/types/hw_info.h" #include "gromacs/utility/basenetwork.h" #include "gromacs/utility/cstringutil.h" #include "gromacs/utility/exceptions.h" @@ -68,12 +72,6 @@ #include "gromacs/utility/smalloc.h" #include "gromacs/utility/stringutil.h" -#include "thread_mpi/threads.h" - -#ifdef GMX_NATIVE_WINDOWS -#include -#endif - #ifdef GMX_GPU const gmx_bool bGPUBinary = TRUE; #else diff --git a/src/gromacs/gmxlib/gmx_thread_affinity.c b/src/gromacs/gmxlib/gmx_thread_affinity.c index 703ec4cf71..69e256fbca 100644 --- a/src/gromacs/gmxlib/gmx_thread_affinity.c +++ b/src/gromacs/gmxlib/gmx_thread_affinity.c @@ -35,6 +35,7 @@ #include "gmxpre.h" #include "config.h" + #ifdef HAVE_SCHED_AFFINITY # ifndef _GNU_SOURCE # define _GNU_SOURCE 1 @@ -42,22 +43,23 @@ # include # include #endif -#include -#include + +#include "gromacs/legacyheaders/gmx_thread_affinity.h" + #include +#include #include +#include #include "thread_mpi/threads.h" -#include "gromacs/legacyheaders/typedefs.h" -#include "gromacs/legacyheaders/types/commrec.h" -#include "gromacs/legacyheaders/types/hw_info.h" #include "gromacs/legacyheaders/copyrite.h" #include "gromacs/legacyheaders/gmx_cpuid.h" #include "gromacs/legacyheaders/gmx_omp_nthreads.h" #include "gromacs/legacyheaders/md_logging.h" -#include "gromacs/legacyheaders/gmx_thread_affinity.h" - +#include "gromacs/legacyheaders/typedefs.h" +#include "gromacs/legacyheaders/types/commrec.h" +#include "gromacs/legacyheaders/types/hw_info.h" #include "gromacs/utility/basenetwork.h" #include "gromacs/utility/cstringutil.h" #include "gromacs/utility/fatalerror.h" diff --git a/src/gromacs/gmxlib/main.cpp b/src/gromacs/gmxlib/main.cpp index dffa2ad7d8..a91b41e2e4 100644 --- a/src/gromacs/gmxlib/main.cpp +++ b/src/gromacs/gmxlib/main.cpp @@ -36,37 +36,37 @@ */ #include "gmxpre.h" -#include "config.h" +#include "gromacs/legacyheaders/main.h" +#include #include #include #include -#include #include +#include "config.h" + +#ifdef GMX_NATIVE_WINDOWS +#include +#endif #ifdef HAVE_SYS_TIME_H #include #endif #ifdef HAVE_UNISTD_H #include #endif -#ifdef GMX_NATIVE_WINDOWS -#include -#endif -#include "gromacs/legacyheaders/types/commrec.h" -#include "gromacs/legacyheaders/network.h" -#include "gromacs/legacyheaders/main.h" -#include "gromacs/legacyheaders/macros.h" -#include "gromacs/utility/futil.h" #include "gromacs/fileio/filenm.h" #include "gromacs/fileio/gmxfio.h" #include "gromacs/legacyheaders/copyrite.h" - +#include "gromacs/legacyheaders/macros.h" +#include "gromacs/legacyheaders/network.h" +#include "gromacs/legacyheaders/types/commrec.h" #include "gromacs/utility/basenetwork.h" #include "gromacs/utility/cstringutil.h" #include "gromacs/utility/exceptions.h" #include "gromacs/utility/fatalerror.h" +#include "gromacs/utility/futil.h" #include "gromacs/utility/gmxmpi.h" #include "gromacs/utility/programcontext.h" #include "gromacs/utility/smalloc.h" diff --git a/src/gromacs/gmxpreprocess/fflibutil.cpp b/src/gromacs/gmxpreprocess/fflibutil.cpp index c08255fa8c..b47aa18b7c 100644 --- a/src/gromacs/gmxpreprocess/fflibutil.cpp +++ b/src/gromacs/gmxpreprocess/fflibutil.cpp @@ -34,26 +34,27 @@ */ #include "gmxpre.h" -#include "config.h" +#include "fflibutil.h" #include #include #include #include -#include #include +#include + +#include "config.h" + #ifdef HAVE_UNISTD_H #include #endif #include "gromacs/legacyheaders/network.h" -#include "fflibutil.h" - #include "gromacs/utility/cstringutil.h" +#include "gromacs/utility/exceptions.h" #include "gromacs/utility/fatalerror.h" #include "gromacs/utility/futil.h" -#include "gromacs/utility/exceptions.h" #include "gromacs/utility/path.h" #include "gromacs/utility/programcontext.h" #include "gromacs/utility/smalloc.h" diff --git a/src/gromacs/gmxpreprocess/gpp_nextnb.c b/src/gromacs/gmxpreprocess/gpp_nextnb.c index ff7bbaff4e..ac779b14bd 100644 --- a/src/gromacs/gmxpreprocess/gpp_nextnb.c +++ b/src/gromacs/gmxpreprocess/gpp_nextnb.c @@ -37,15 +37,16 @@ /* This file is completely threadsafe - keep it that way! */ #include "gmxpre.h" -#include - -/* #define DEBUG_NNB */ #include "gpp_nextnb.h" -#include "toputil.h" +#include + +#include "gromacs/gmxpreprocess/toputil.h" #include "gromacs/utility/fatalerror.h" #include "gromacs/utility/smalloc.h" +/* #define DEBUG_NNB */ + typedef struct { int ai, aj; } sortable; diff --git a/src/gromacs/imd/imd.c b/src/gromacs/imd/imd.c index 3392fe1388..7c6585260e 100644 --- a/src/gromacs/imd/imd.c +++ b/src/gromacs/imd/imd.c @@ -45,35 +45,34 @@ * * \ingroup module_imd */ - #include "gmxpre.h" -#include "config.h" +#include "imd.h" #include #include +#include "config.h" + #ifdef GMX_NATIVE_WINDOWS #include #else #include #endif -#include "imd.h" -#include "imdsocket.h" -#include "gromacs/legacyheaders/network.h" -#include "gromacs/legacyheaders/mdrun.h" -#include "gromacs/legacyheaders/sighandler.h" -#include "gromacs/legacyheaders/gmx_ga2la.h" -#include "gromacs/mdlib/groupcoord.h" #include "gromacs/fileio/confio.h" -#include "gromacs/topology/mtop_util.h" -#include "gromacs/legacyheaders/names.h" -#include "gromacs/timing/wallcycle.h" - #include "gromacs/fileio/xvgr.h" +#include "gromacs/imd/imdsocket.h" +#include "gromacs/legacyheaders/gmx_ga2la.h" +#include "gromacs/legacyheaders/mdrun.h" +#include "gromacs/legacyheaders/names.h" +#include "gromacs/legacyheaders/network.h" +#include "gromacs/legacyheaders/sighandler.h" #include "gromacs/math/vec.h" +#include "gromacs/mdlib/groupcoord.h" #include "gromacs/pbcutil/pbc.h" +#include "gromacs/timing/wallcycle.h" +#include "gromacs/topology/mtop_util.h" #include "gromacs/utility/fatalerror.h" #include "gromacs/utility/smalloc.h" diff --git a/src/gromacs/math/utilities.c b/src/gromacs/math/utilities.c index 4e40b88d1d..c2df23ec2e 100644 --- a/src/gromacs/math/utilities.c +++ b/src/gromacs/math/utilities.c @@ -36,13 +36,14 @@ */ #include "gmxpre.h" -#include "gromacs/math/utilities.h" - -#include "config.h" +#include "utilities.h" #include -#include #include +#include + +#include "config.h" + #ifdef HAVE__FINITE #include #endif diff --git a/src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda.cu b/src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda.cu index 2d48a302ba..301627d872 100644 --- a/src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda.cu +++ b/src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda.cu @@ -34,10 +34,12 @@ */ #include "gmxpre.h" -#include "config.h" +#include "nbnxn_cuda.h" -#include #include +#include + +#include "config.h" #if defined(_MSVC) #include @@ -45,21 +47,18 @@ #include -#include "gromacs/legacyheaders/types/simple.h" -#include "gromacs/mdlib/nbnxn_pairlist.h" -#include "gromacs/mdlib/nb_verlet.h" -#include "gromacs/legacyheaders/types/force_flags.h" -#include "../nbnxn_consts.h" - #ifdef TMPI_ATOMICS #include "thread_mpi/atomic.h" #endif -#include "nbnxn_cuda_types.h" -#include "../../gmxlib/cuda_tools/cudautils.cuh" -#include "nbnxn_cuda.h" +#include "gromacs/gmxlib/cuda_tools/cudautils.cuh" +#include "gromacs/legacyheaders/types/force_flags.h" +#include "gromacs/legacyheaders/types/simple.h" +#include "gromacs/mdlib/nb_verlet.h" +#include "gromacs/mdlib/nbnxn_consts.h" +#include "gromacs/mdlib/nbnxn_pairlist.h" #include "gromacs/mdlib/nbnxn_cuda/nbnxn_cuda_data_mgmt.h" - +#include "gromacs/mdlib/nbnxn_cuda/nbnxn_cuda_types.h" #include "gromacs/pbcutil/ishift.h" #include "gromacs/utility/cstringutil.h" @@ -81,7 +80,7 @@ texture coulomb_tab_texref; #define CL_SIZE (NBNXN_GPU_CLUSTER_SIZE) /***** The kernels come here *****/ -#include "nbnxn_cuda_kernel_utils.cuh" +#include "gromacs/mdlib/nbnxn_cuda/nbnxn_cuda_kernel_utils.cuh" /* Top-level kernel generation: will generate through multiple inclusion the * following flavors for all kernels: @@ -91,19 +90,19 @@ texture coulomb_tab_texref; * - force and energy output with pair list pruning. */ /** Force only **/ -#include "nbnxn_cuda_kernels.cuh" +#include "gromacs/mdlib/nbnxn_cuda/nbnxn_cuda_kernels.cuh" /** Force & energy **/ #define CALC_ENERGIES -#include "nbnxn_cuda_kernels.cuh" +#include "gromacs/mdlib/nbnxn_cuda/nbnxn_cuda_kernels.cuh" #undef CALC_ENERGIES /*** Pair-list pruning kernels ***/ /** Force only **/ #define PRUNE_NBL -#include "nbnxn_cuda_kernels.cuh" +#include "gromacs/mdlib/nbnxn_cuda/nbnxn_cuda_kernels.cuh" /** Force & energy **/ #define CALC_ENERGIES -#include "nbnxn_cuda_kernels.cuh" +#include "gromacs/mdlib/nbnxn_cuda/nbnxn_cuda_kernels.cuh" #undef CALC_ENERGIES #undef PRUNE_NBL diff --git a/src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda.h b/src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda.h index 17995e901e..6ccce27efd 100644 --- a/src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda.h +++ b/src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda.h @@ -32,15 +32,14 @@ * To help us fund GROMACS development, we humbly ask that you cite * the research papers on the package. Check out http://www.gromacs.org. */ - #ifndef NBNXN_CUDA_H #define NBNXN_CUDA_H -#include "config.h" - #include "gromacs/legacyheaders/types/nbnxn_cuda_types_ext.h" #include "gromacs/legacyheaders/types/simple.h" +#include "config.h" + #ifdef GMX_GPU #define FUNC_TERM ; #else @@ -51,6 +50,8 @@ extern "C" { #endif +struct nbnxn_atomdata_t; + /*! \brief * Launch asynchronously the nonbonded force calculations. * @@ -61,31 +62,31 @@ extern "C" { * The local and non-local interaction calculations are launched in two * separate streams. */ -void nbnxn_cuda_launch_kernel(nbnxn_cuda_ptr_t gmx_unused cu_nb, - const nbnxn_atomdata_t gmx_unused *nbdata, - int gmx_unused flags, - int gmx_unused iloc) FUNC_TERM +void nbnxn_cuda_launch_kernel(nbnxn_cuda_ptr_t gmx_unused cu_nb, + const struct nbnxn_atomdata_t gmx_unused *nbdata, + int gmx_unused flags, + int gmx_unused iloc) FUNC_TERM /*! \brief * Launch asynchronously the download of nonbonded forces from the GPU * (and energies/shift forces if required). */ -void nbnxn_cuda_launch_cpyback(nbnxn_cuda_ptr_t gmx_unused cu_nb, - const nbnxn_atomdata_t gmx_unused *nbatom, - int gmx_unused flags, - int gmx_unused aloc) FUNC_TERM +void nbnxn_cuda_launch_cpyback(nbnxn_cuda_ptr_t gmx_unused cu_nb, + const struct nbnxn_atomdata_t gmx_unused *nbatom, + int gmx_unused flags, + int gmx_unused aloc) FUNC_TERM /*! \brief * Wait for the asynchronously launched nonbonded calculations and data * transfers to finish. */ -void nbnxn_cuda_wait_gpu(nbnxn_cuda_ptr_t gmx_unused cu_nb, - const nbnxn_atomdata_t gmx_unused *nbatom, - int gmx_unused flags, - int gmx_unused aloc, - real gmx_unused *e_lj, - real gmx_unused *e_el, - rvec gmx_unused *fshift) FUNC_TERM +void nbnxn_cuda_wait_gpu(nbnxn_cuda_ptr_t gmx_unused cu_nb, + const struct nbnxn_atomdata_t gmx_unused *nbatom, + int gmx_unused flags, + int gmx_unused aloc, + real gmx_unused *e_lj, + real gmx_unused *e_el, + rvec gmx_unused *fshift) FUNC_TERM #ifdef __cplusplus } diff --git a/src/gromacs/mdlib/nbnxn_search.c b/src/gromacs/mdlib/nbnxn_search.c index 5e2882122d..6c1e301a07 100644 --- a/src/gromacs/mdlib/nbnxn_search.c +++ b/src/gromacs/mdlib/nbnxn_search.c @@ -35,32 +35,33 @@ #include "gmxpre.h" -#include "config.h" +#include "nbnxn_search.h" +#include #include #include -#include -#include "gromacs/legacyheaders/types/commrec.h" +#include "gromacs/legacyheaders/gmx_omp_nthreads.h" #include "gromacs/legacyheaders/macros.h" +#include "gromacs/legacyheaders/nrnb.h" +#include "gromacs/legacyheaders/ns.h" +#include "gromacs/legacyheaders/types/commrec.h" #include "gromacs/math/utilities.h" #include "gromacs/math/vec.h" -#include "nbnxn_consts.h" +#include "gromacs/mdlib/nb_verlet.h" +#include "gromacs/mdlib/nbnxn_atomdata.h" +#include "gromacs/mdlib/nbnxn_consts.h" +#include "gromacs/pbcutil/ishift.h" +#include "gromacs/pbcutil/pbc.h" +#include "gromacs/utility/smalloc.h" + +#include "config.h" + /* nbnxn_internal.h included gromacs/simd/macros.h */ -#include "nbnxn_internal.h" +#include "gromacs/mdlib/nbnxn_internal.h" #ifdef GMX_SIMD #include "gromacs/simd/vector_operations.h" #endif -#include "nbnxn_atomdata.h" -#include "nbnxn_search.h" -#include "gromacs/legacyheaders/gmx_omp_nthreads.h" -#include "gromacs/legacyheaders/nrnb.h" -#include "gromacs/legacyheaders/ns.h" - -#include "gromacs/pbcutil/ishift.h" -#include "gromacs/mdlib/nb_verlet.h" -#include "gromacs/pbcutil/pbc.h" -#include "gromacs/utility/smalloc.h" #ifdef NBNXN_SEARCH_BB_SIMD4 /* Always use 4-wide SIMD for bounding box calculations */ @@ -2941,10 +2942,10 @@ static void make_cluster_list_simple(const nbnxn_grid_t *gridj, } #ifdef GMX_NBNXN_SIMD_4XN -#include "nbnxn_search_simd_4xn.h" +#include "gromacs/mdlib/nbnxn_search_simd_4xn.h" #endif #ifdef GMX_NBNXN_SIMD_2XNN -#include "nbnxn_search_simd_2xnn.h" +#include "gromacs/mdlib/nbnxn_search_simd_2xnn.h" #endif /* Plain C or SIMD4 code for making a pair list of super-cell sci vs scj. diff --git a/src/gromacs/mdlib/sim_util.c b/src/gromacs/mdlib/sim_util.c index 30de5e9b37..4090760008 100644 --- a/src/gromacs/mdlib/sim_util.c +++ b/src/gromacs/mdlib/sim_util.c @@ -36,70 +36,68 @@ */ #include "gmxpre.h" -#include "config.h" +#include "gromacs/legacyheaders/sim_util.h" #include #include #include #include + +#include "config.h" + #ifdef HAVE_SYS_TIME_H #include #endif -#include "gromacs/legacyheaders/typedefs.h" -#include "gromacs/utility/cstringutil.h" -#include "gromacs/legacyheaders/names.h" -#include "gromacs/legacyheaders/txtdump.h" -#include "gromacs/pbcutil/pbc.h" -#include "gromacs/legacyheaders/chargegroup.h" -#include "gromacs/math/vec.h" -#include "gromacs/legacyheaders/nrnb.h" -#include "gromacs/legacyheaders/mdrun.h" -#include "gromacs/legacyheaders/sim_util.h" -#include "gromacs/legacyheaders/update.h" -#include "gromacs/math/units.h" -#include "gromacs/legacyheaders/mdatoms.h" -#include "gromacs/legacyheaders/force.h" -#include "gromacs/legacyheaders/pme.h" -#include "gromacs/legacyheaders/disre.h" -#include "gromacs/legacyheaders/orires.h" -#include "gromacs/legacyheaders/network.h" +#include "gromacs/bonded/bonded.h" +#include "gromacs/essentialdynamics/edsam.h" +#include "gromacs/gmxlib/nonbonded/nb_free_energy.h" +#include "gromacs/gmxlib/nonbonded/nb_kernel.h" +#include "gromacs/imd/imd.h" #include "gromacs/legacyheaders/calcmu.h" +#include "gromacs/legacyheaders/chargegroup.h" #include "gromacs/legacyheaders/constr.h" #include "gromacs/legacyheaders/copyrite.h" +#include "gromacs/legacyheaders/disre.h" #include "gromacs/legacyheaders/domdec.h" +#include "gromacs/legacyheaders/force.h" #include "gromacs/legacyheaders/genborn.h" -#include "nbnxn_atomdata.h" -#include "nbnxn_search.h" -#include "nbnxn_kernels/nbnxn_kernel_ref.h" -#include "nbnxn_kernels/simd_4xn/nbnxn_kernel_simd_4xn.h" -#include "nbnxn_kernels/simd_2xnn/nbnxn_kernel_simd_2xnn.h" -#include "nbnxn_kernels/nbnxn_kernel_gpu_ref.h" +#include "gromacs/legacyheaders/gmx_omp_nthreads.h" +#include "gromacs/legacyheaders/mdatoms.h" +#include "gromacs/legacyheaders/mdrun.h" +#include "gromacs/legacyheaders/names.h" +#include "gromacs/legacyheaders/network.h" #include "gromacs/legacyheaders/nonbonded.h" -#include "../gmxlib/nonbonded/nb_kernel.h" -#include "../gmxlib/nonbonded/nb_free_energy.h" - -#include "gromacs/bonded/bonded.h" +#include "gromacs/legacyheaders/nrnb.h" +#include "gromacs/legacyheaders/orires.h" +#include "gromacs/legacyheaders/pme.h" +#include "gromacs/legacyheaders/qmmm.h" +#include "gromacs/legacyheaders/txtdump.h" +#include "gromacs/legacyheaders/typedefs.h" +#include "gromacs/legacyheaders/update.h" #include "gromacs/legacyheaders/types/commrec.h" +#include "gromacs/math/units.h" +#include "gromacs/math/vec.h" +#include "gromacs/mdlib/adress.h" +#include "gromacs/mdlib/nb_verlet.h" +#include "gromacs/mdlib/nbnxn_atomdata.h" +#include "gromacs/mdlib/nbnxn_search.h" +#include "gromacs/mdlib/nbnxn_cuda/nbnxn_cuda.h" #include "gromacs/mdlib/nbnxn_cuda/nbnxn_cuda_data_mgmt.h" +#include "gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_gpu_ref.h" +#include "gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_ref.h" +#include "gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_simd_2xnn.h" +#include "gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_simd_4xn.h" #include "gromacs/pbcutil/ishift.h" #include "gromacs/pbcutil/mshift.h" +#include "gromacs/pbcutil/pbc.h" +#include "gromacs/pulling/pull.h" +#include "gromacs/pulling/pull_rotation.h" #include "gromacs/timing/wallcycle.h" #include "gromacs/timing/walltime_accounting.h" +#include "gromacs/utility/cstringutil.h" #include "gromacs/utility/gmxmpi.h" #include "gromacs/utility/smalloc.h" -#include "gromacs/essentialdynamics/edsam.h" -#include "gromacs/pulling/pull.h" -#include "gromacs/pulling/pull_rotation.h" -#include "gromacs/imd/imd.h" -#include "adress.h" -#include "gromacs/legacyheaders/qmmm.h" - -#include "gromacs/legacyheaders/gmx_omp_nthreads.h" - -#include "nbnxn_cuda/nbnxn_cuda.h" - -#include "nb_verlet.h" void print_time(FILE *out, gmx_walltime_accounting_t walltime_accounting, diff --git a/src/gromacs/random/random.c b/src/gromacs/random/random.c index 4004db7ad5..9150e64f3e 100644 --- a/src/gromacs/random/random.c +++ b/src/gromacs/random/random.c @@ -36,25 +36,26 @@ */ #include "gmxpre.h" -#include "config.h" - #include "random.h" +#include #include #include +#include + +#include "config.h" + #ifdef HAVE_UNISTD_H #include #endif -#include -#include #ifdef GMX_NATIVE_WINDOWS #include #endif -#include "external/Random123-1.08/include/Random123/threefry.h" - #include "gromacs/math/utilities.h" -#include "random_gausstable.h" +#include "gromacs/random/random_gausstable.h" + +#include "external/Random123-1.08/include/Random123/threefry.h" #define RNG_N 624 #define RNG_M 397 diff --git a/src/gromacs/timing/cyclecounter.c b/src/gromacs/timing/cyclecounter.c index 037d3952c1..a48bf35aa1 100644 --- a/src/gromacs/timing/cyclecounter.c +++ b/src/gromacs/timing/cyclecounter.c @@ -35,15 +35,15 @@ */ #include "gmxpre.h" -#include "gromacs/timing/cyclecounter.h" +#include "cyclecounter.h" + +#include #include "config.h" -#include #ifdef HAVE_SYS_TIME_H #include #endif - #ifdef _MSC_VER #include #endif diff --git a/src/gromacs/timing/walltime_accounting.c b/src/gromacs/timing/walltime_accounting.c index 8dc9ac17be..d7c711127f 100644 --- a/src/gromacs/timing/walltime_accounting.c +++ b/src/gromacs/timing/walltime_accounting.c @@ -35,11 +35,12 @@ */ #include "gmxpre.h" -#include "gromacs/timing/walltime_accounting.h" +#include "walltime_accounting.h" + +#include #include "config.h" -#include #ifdef HAVE_UNISTD_H #include #endif diff --git a/src/gromacs/tools/dump.c b/src/gromacs/tools/dump.c index c87fe831ce..9c57a293d4 100644 --- a/src/gromacs/tools/dump.c +++ b/src/gromacs/tools/dump.c @@ -36,37 +36,35 @@ */ #include "gmxpre.h" -#include "config.h" - #include #include #include #include -#include "gromacs/legacyheaders/macros.h" -#include "gromacs/legacyheaders/txtdump.h" -#include "gromacs/legacyheaders/names.h" -#include "gromacs/legacyheaders/txtdump.h" -#include "gromacs/legacyheaders/checkpoint.h" -#include "gromacs/topology/mtop_util.h" -#include "gromacs/fileio/xtcio.h" -#include "gromacs/fileio/enxio.h" -#include "gromacs/fileio/gmxfio.h" -#include "gromacs/fileio/tpxio.h" -#include "gromacs/fileio/trnio.h" -#include "gromacs/utility/futil.h" -#include "gromacs/fileio/tngio.h" -#include "gromacs/fileio/tngio_for_tools.h" +#include "config.h" #ifdef HAVE_UNISTD_H #include #endif #include "gromacs/commandline/pargs.h" +#include "gromacs/fileio/enxio.h" +#include "gromacs/fileio/gmxfio.h" #include "gromacs/fileio/mtxio.h" +#include "gromacs/fileio/tngio.h" +#include "gromacs/fileio/tngio_for_tools.h" +#include "gromacs/fileio/tpxio.h" +#include "gromacs/fileio/trnio.h" +#include "gromacs/fileio/xtcio.h" #include "gromacs/gmxpreprocess/gmxcpp.h" +#include "gromacs/legacyheaders/checkpoint.h" +#include "gromacs/legacyheaders/macros.h" +#include "gromacs/legacyheaders/names.h" +#include "gromacs/legacyheaders/txtdump.h" #include "gromacs/linearalgebra/sparsematrix.h" +#include "gromacs/topology/mtop_util.h" #include "gromacs/utility/fatalerror.h" +#include "gromacs/utility/futil.h" #include "gromacs/utility/smalloc.h" static void list_tpx(const char *fn, gmx_bool bShowNumbers, const char *mdpfn, diff --git a/src/gromacs/trajectoryanalysis/modules/nsc.c b/src/gromacs/trajectoryanalysis/modules/nsc.c index ffc58420e3..29f9875b6e 100644 --- a/src/gromacs/trajectoryanalysis/modules/nsc.c +++ b/src/gromacs/trajectoryanalysis/modules/nsc.c @@ -36,18 +36,18 @@ */ #include "gmxpre.h" -#include -#include -#include +#include "nsc.h" + #include #include +#include +#include +#include -/* Modified DvdS */ -#include "gromacs/pbcutil/pbc.h" #include "gromacs/legacyheaders/macros.h" #include "gromacs/math/vec.h" +#include "gromacs/pbcutil/pbc.h" #include "gromacs/utility/smalloc.h" -#include "nsc.h" #define TEST_NSC 0 diff --git a/src/gromacs/utility/cstringutil.c b/src/gromacs/utility/cstringutil.c index 0768c50864..85cbd41c0a 100644 --- a/src/gromacs/utility/cstringutil.c +++ b/src/gromacs/utility/cstringutil.c @@ -39,8 +39,6 @@ #include "cstringutil.h" -#include "config.h" - #include #include #include @@ -49,6 +47,9 @@ #include #include + +#include "config.h" + #ifdef HAVE_SYS_TIME_H #include #endif diff --git a/src/gromacs/utility/file.cpp b/src/gromacs/utility/file.cpp index 30c900e7a0..31055f28b8 100644 --- a/src/gromacs/utility/file.cpp +++ b/src/gromacs/utility/file.cpp @@ -51,9 +51,10 @@ #include #include +#include + #include "config.h" -#include #ifdef HAVE_UNISTD_H #include #endif diff --git a/src/gromacs/utility/gmxregex.cpp b/src/gromacs/utility/gmxregex.cpp index cf0fc9746b..81efa86870 100644 --- a/src/gromacs/utility/gmxregex.cpp +++ b/src/gromacs/utility/gmxregex.cpp @@ -46,8 +46,8 @@ #include "config.h" #if defined(HAVE_POSIX_REGEX) -// old Mac needs sys/types.h before regex.h #include +// old Mac needs sys/types.h before regex.h #include #define USE_POSIX_REGEX #elif defined(HAVE_CXX11_REGEX) @@ -55,8 +55,8 @@ #define USE_CXX11_REGEX #endif -#include "exceptions.h" -#include "stringutil.h" +#include "gromacs/utility/exceptions.h" +#include "gromacs/utility/stringutil.h" namespace gmx { diff --git a/src/gromacs/utility/path.cpp b/src/gromacs/utility/path.cpp index 6257d2875a..0a0e54bc76 100644 --- a/src/gromacs/utility/path.cpp +++ b/src/gromacs/utility/path.cpp @@ -50,9 +50,10 @@ #include +#include + #include "config.h" -#include #ifdef GMX_NATIVE_WINDOWS #include #else -- 2.22.0