Fix dependencies on config.h for typedefs.h
authorRoland Schulz <roland@utk.edu>
Fri, 7 Mar 2014 00:28:39 +0000 (19:28 -0500)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Tue, 18 Mar 2014 13:11:50 +0000 (14:11 +0100)
The include in simple.h hid other dependencies and was only
used for gmx_inline and gmx_restrict. Defining those
in just one place simplifies it.

Also fix missing includes in public headers.
All public headers should be able to be compiled by themselfes
and shouldn't rely on other headers aready being included.

Also fixes that math module headers were installed to maths.

thread-mpi headers and commrec.h are not installed anymore.
The installed headers have no dependency on GMX_LIB_MPI and
GMX_THREAD_MPI anymore.

Change-Id: Ie1f26913739d3e42d653a51fa2c2d71e6ea3ef7a

87 files changed:
CMakeLists.txt
cmake/gmxTestInline.cmake [deleted file]
cmake/gmxTestRestrict.cmake [deleted file]
src/config.h.cmakein
src/gromacs/fft/fft5d.h
src/gromacs/fileio/filenm.h
src/gromacs/fileio/futil.cpp
src/gromacs/fileio/futil.h
src/gromacs/fileio/mdoutf.c
src/gromacs/fileio/trajectory_writing.h
src/gromacs/gmxana/gmx_pme_error.cpp
src/gromacs/gmxana/gmx_tune_pme.c
src/gromacs/gmxlib/checkpoint.c
src/gromacs/gmxlib/disre.c
src/gromacs/gmxlib/ewald_util.c
src/gromacs/gmxlib/gmx_fatal.c
src/gromacs/gmxlib/main.cpp
src/gromacs/gmxlib/mvdata.c
src/gromacs/gmxlib/network.c
src/gromacs/gmxlib/orires.c
src/gromacs/gmxlib/pbc.c
src/gromacs/gmxlib/txtdump.c
src/gromacs/gmxpreprocess/addconf.c
src/gromacs/legacyheaders/CMakeLists.txt
src/gromacs/legacyheaders/constr.h
src/gromacs/legacyheaders/coulomb.h
src/gromacs/legacyheaders/domdec.h
src/gromacs/legacyheaders/domdec_network.h
src/gromacs/legacyheaders/genborn.h
src/gromacs/legacyheaders/gmx_detect_hardware.h
src/gromacs/legacyheaders/gmx_fatal_collective.h
src/gromacs/legacyheaders/gmx_ga2la.h
src/gromacs/legacyheaders/gmx_hash.h
src/gromacs/legacyheaders/gmx_omp_nthreads.h
src/gromacs/legacyheaders/gmx_thread_affinity.h
src/gromacs/legacyheaders/gpu_utils.h
src/gromacs/legacyheaders/main.h
src/gromacs/legacyheaders/md_logging.h
src/gromacs/legacyheaders/mdrun.h
src/gromacs/legacyheaders/mvdata.h
src/gromacs/legacyheaders/nbnxn_cuda_data_mgmt.h
src/gromacs/legacyheaders/network.h
src/gromacs/legacyheaders/nrnb.h
src/gromacs/legacyheaders/pbc.h
src/gromacs/legacyheaders/pmalloc_cuda.h
src/gromacs/legacyheaders/tables.h
src/gromacs/legacyheaders/typedefs.h
src/gromacs/legacyheaders/types/commrec.h
src/gromacs/legacyheaders/types/inputrec.h
src/gromacs/legacyheaders/types/nbnxn_pairlist.h
src/gromacs/legacyheaders/types/simple.h
src/gromacs/legacyheaders/types/state.h
src/gromacs/legacyheaders/vec.h
src/gromacs/legacyheaders/vsite.h
src/gromacs/math/CMakeLists.txt
src/gromacs/mdlib/constr.c
src/gromacs/mdlib/coupling.c
src/gromacs/mdlib/domdec_box.c
src/gromacs/mdlib/domdec_con.c
src/gromacs/mdlib/domdec_network.c
src/gromacs/mdlib/domdec_setup.c
src/gromacs/mdlib/domdec_top.c
src/gromacs/mdlib/ewald.c
src/gromacs/mdlib/forcerec.c
src/gromacs/mdlib/genborn.c
src/gromacs/mdlib/nbnxn_atomdata.c
src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda.cu
src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda.h
src/gromacs/mdlib/nbnxn_search.c
src/gromacs/mdlib/ns.c
src/gromacs/mdlib/pme_pp.c
src/gromacs/mdlib/qmmm.c
src/gromacs/mdlib/shellfc.c
src/gromacs/mdlib/stat.c
src/gromacs/mdlib/wnblist.c
src/gromacs/pulling/pull.c
src/gromacs/pulling/pullutil.c
src/gromacs/utility/CMakeLists.txt
src/gromacs/utility/gmx_header_config_gen.h.cmakein
src/gromacs/utility/gmxmpi.h
src/gromacs/utility/gmxomp.h
src/programs/mdrun/deform.h [new file with mode: 0644]
src/programs/mdrun/md.c
src/programs/mdrun/mdrun.cpp
src/programs/mdrun/membed.c
src/programs/mdrun/pme_loadbal.c
src/programs/mdrun/runner.c

index 8fcbfac8137dfbae5ce5bf3216434b597adbd733..df522432c0cb548b2516807d4fd777b64a7c8aa9 100644 (file)
@@ -450,7 +450,6 @@ tmpi_enable_cxx()
 if(GMX_THREAD_MPI)
     # enable MPI functions
     tmpi_enable()
-    set(PKG_CFLAGS "${PKG_CFLAGS} -DGMX_THREAD_MPI")
     set(GMX_MPI 1)
     set(MPI_IN_PLACE_EXISTS 1)
 endif()
@@ -582,12 +581,6 @@ gmx_test_large_files(GMX_LARGEFILES)
 include(gmxTestSignal)
 gmx_test_sigusr1(HAVE_SIGUSR1)
 
-include(gmxTestInline)
-gmx_test_inline(INLINE_KEYWORD)
-
-include(gmxTestRestrict)
-gmx_test_restrict(RESTRICT_KEYWORD)
-
 include(gmxTestPipes)
 gmx_test_pipes(HAVE_PIPES)
 
diff --git a/cmake/gmxTestInline.cmake b/cmake/gmxTestInline.cmake
deleted file mode 100644 (file)
index c9e8125..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-#
-# This file is part of the GROMACS molecular simulation package.
-#
-# Copyright (c) 2009,2012,2014, by the GROMACS development team, led by
-# Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
-# and including many others, as listed in the AUTHORS file in the
-# top-level source directory and at http://www.gromacs.org.
-#
-# GROMACS is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public License
-# as published by the Free Software Foundation; either version 2.1
-# of the License, or (at your option) any later version.
-#
-# GROMACS is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with GROMACS; if not, see
-# http://www.gnu.org/licenses, or write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
-#
-# If you want to redistribute modifications to GROMACS, please
-# consider that scientific software is very special. Version
-# control is crucial - bugs must be traceable. We will be happy to
-# consider code for inclusion in the official distribution, but
-# derived work must not be called official GROMACS. Details are found
-# in the README & COPYING files - if they are missing, get the
-# official version at http://www.gromacs.org.
-#
-# To help us fund GROMACS development, we humbly ask that you cite
-# the research papers on the package. Check out http://www.gromacs.org.
-
-# - Define macro to check inline keyword
-#
-#  GMX_TEST_INLINE(VARIABLE)
-#
-#  VARIABLE will be set to the keyword
-#
-#  Remember to have a cmakedefine for it too...
-
-MACRO(GMX_TEST_INLINE VARIABLE)
-    IF(NOT DEFINED TEST_${VARIABLE})
-
-        MESSAGE(STATUS "Checking for inline keyword")
-
-       FOREACH(KEYWORD "__inline__" "__inline" "inline")
-            IF(NOT TEST_${VARIABLE})
-                TRY_COMPILE(TEST_${VARIABLE} "${CMAKE_BINARY_DIR}"
-                            "${CMAKE_SOURCE_DIR}/cmake/TestInline.c"
-                            COMPILE_DEFINITIONS "-DTESTINLINEDEF=${KEYWORD}" )
-                SET(LAST_INLINE_KEYWORD ${KEYWORD})
-           ENDIF()
-        ENDFOREACH(KEYWORD)
-
-        IF(TEST_${VARIABLE})
-            SET(${VARIABLE} ${LAST_INLINE_KEYWORD} CACHE INTERNAL "Inline keyword" FORCE)
-            MESSAGE(STATUS "Checking for inline keyword - ${LAST_INLINE_KEYWORD}")
-        ELSE()
-           SET(${VARIABLE} " " CACHE INTERNAL "Inline keyword" FORCE)
-            MESSAGE(STATUS "Checking for inline keyword - not found")
-        ENDIF()
-
-    ENDIF()
-ENDMACRO(GMX_TEST_INLINE VARIABLE)
diff --git a/cmake/gmxTestRestrict.cmake b/cmake/gmxTestRestrict.cmake
deleted file mode 100644 (file)
index 391e8e4..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-#
-# This file is part of the GROMACS molecular simulation package.
-#
-# Copyright (c) 2010,2012,2014, by the GROMACS development team, led by
-# Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
-# and including many others, as listed in the AUTHORS file in the
-# top-level source directory and at http://www.gromacs.org.
-#
-# GROMACS is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public License
-# as published by the Free Software Foundation; either version 2.1
-# of the License, or (at your option) any later version.
-#
-# GROMACS is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with GROMACS; if not, see
-# http://www.gnu.org/licenses, or write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
-#
-# If you want to redistribute modifications to GROMACS, please
-# consider that scientific software is very special. Version
-# control is crucial - bugs must be traceable. We will be happy to
-# consider code for inclusion in the official distribution, but
-# derived work must not be called official GROMACS. Details are found
-# in the README & COPYING files - if they are missing, get the
-# official version at http://www.gromacs.org.
-#
-# To help us fund GROMACS development, we humbly ask that you cite
-# the research papers on the package. Check out http://www.gromacs.org.
-
-# - Define macro to check restrict keyword
-#
-#  GMX_TEST_RESTRICT(VARIABLE)
-#
-#  VARIABLE will be set to the keyword
-#
-#  Remember to have a cmakedefine for it too...
-
-MACRO(GMX_TEST_RESTRICT VARIABLE)
-    IF(NOT DEFINED TEST_${VARIABLE})
-
-        MESSAGE(STATUS "Checking for restrict keyword")
-
-# Start with __restrict__, since that is the C++ default keyword.
-       FOREACH(KEYWORD "__restrict__" "__restrict" "restrict")
-            IF(NOT TEST_${VARIABLE})
-                TRY_COMPILE(TEST_${VARIABLE} "${CMAKE_BINARY_DIR}"
-                            "${CMAKE_SOURCE_DIR}/cmake/TestRestrict.c"
-                            COMPILE_DEFINITIONS "-DTESTRESTRICTDEF=${KEYWORD}" )
-                SET(LAST_RESTRICT_KEYWORD ${KEYWORD})
-            ENDIF()
-        ENDFOREACH(KEYWORD)
-
-        IF(TEST_${VARIABLE})
-            SET(${VARIABLE} ${LAST_RESTRICT_KEYWORD} CACHE INTERNAL "Restrict keyword" FORCE)
-            MESSAGE(STATUS "Checking for restrict keyword - ${LAST_RESTRICT_KEYWORD}")
-        ELSE()
-           SET(${VARIABLE} " " CACHE INTERNAL "Restrict keyword" FORCE)
-            MESSAGE(STATUS "Checking for restrict keyword - not found")
-        ENDIF()
-
-    ENDIF()
-ENDMACRO(GMX_TEST_RESTRICT VARIABLE)
index 1b03b167476aaa137aad60d412c6b19c1148e300..4aefa453f81709563a9c905250ca71582530cf33 100644 (file)
 /* Some systems requires this to be set to 64 for large file support */
 #cmakedefine _FILE_OFFSET_BITS @_FILE_OFFSET_BITS@
 
-/* Define to __inline__ or __inline if that is what the C compiler
-   calls it, or to nothing if inline is not supported under any name.
-   Please do NOT remove the gmx_inline keyword from here. The classical
-   C++ inline keyword is merely a recommendation to the compiler, and
-   many compilers support stronger alternatives (e.g. __forceinline)
-   that we might want to use. */
-#define gmx_inline ${INLINE_KEYWORD}
-
-/* Define to __restrict__ or __restrict if that is what the C compiler
-   calls it, unless we are on C99 when it is simply called restrict.
-   Since restrict is a reserved key word in C99 we are not allowed to
-   redefine the word itself, so call this gmx_restrict to avoid having
-   to identify the language standard level. If it is not supported, it
-   is still defined to an empty string here. */
-#define gmx_restrict ${RESTRICT_KEYWORD}
 /* Build special-purpose mdrun library */
 #cmakedefine GMX_FAHCORE   
 
index a577efc1758c53778ea214a137e41f2fd0f05586..feab8329fa400e1ff49aca3014b79bd12778fd19 100644 (file)
 #include <config.h>
 #endif
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #ifdef NOGMX
 /*#define GMX_MPI*/
 /*#define GMX_FFT_FFTW3*/
@@ -70,12 +66,18 @@ double MPI_Wtime();
 #endif
 
 #ifdef NOGMX
+#ifdef __cplusplus
+extern "C" {
+#endif
 struct fft5d_time_t {
     double fft, local, mpi1, mpi2;
 };
 typedef struct fft5d_time_t *fft5d_time;
 #else
 #include "gromacs/timing/wallcycle.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
 typedef gmx_wallcycle_t fft5d_time;
 #endif
 
index 74274628cf9ec9f9f41c7059efa55fec9ba1cb36..12933f6315fd18cd71645fa0f367a9f934d9ebd9 100644 (file)
@@ -38,8 +38,7 @@
 #ifndef GMX_FILEIO_FILENM_H
 #define GMX_FILEIO_FILENM_H
 
-#include "../legacyheaders/types/simple.h"
-#include "../legacyheaders/types/commrec.h"
+#include "../legacyheaders/typedefs.h"
 
 #ifdef __cplusplus
 extern "C" {
index 2c54809dcb1787dbb0f5a44747124f7844381337..28b5af6d29371f97ee0a926c460ad9af3810d478 100644 (file)
@@ -66,6 +66,7 @@
 #endif
 
 #include "gromacs/legacyheaders/gmx_fatal.h"
+#include "gromacs/legacyheaders/types/commrec.h"
 #include "gromacs/legacyheaders/network.h"
 #include "gromacs/legacyheaders/smalloc.h"
 #include "gromacs/legacyheaders/string2.h"
index bb76b03ff437086710a48f25bc8b010625b70bbd..ddaaef1b4ba4c3149b68a3906e5b17f70585dd04 100644 (file)
@@ -40,7 +40,6 @@
 
 #include <stdio.h>
 #include "../legacyheaders/typedefs.h"
-#include "../legacyheaders/types/commrec.h"
 
 #ifdef __cplusplus
 extern "C" {
index 1fda7204335f90f82df65da7192bb7b9407f0219..d140e1dc6a80b232aa4a7e3469d074e5b6047dfb 100644 (file)
@@ -37,6 +37,7 @@
 #include "gromacs/legacyheaders/xvgr.h"
 #include "gromacs/legacyheaders/mdrun.h"
 #include "gromacs/legacyheaders/smalloc.h"
+#include "gromacs/legacyheaders/types/commrec.h"
 #include "gromacs/legacyheaders/mvdata.h"
 #include "gromacs/legacyheaders/domdec.h"
 #include "trnio.h"
index b4355bad1358b19a64c12f89d5adc79459e060b3..65e8e067ea158162379079872ea76d24852bd7bc 100644 (file)
@@ -41,8 +41,7 @@
 #include <stdio.h>
 #include "filenm.h"
 #include "mdoutf.h"
-#include "../legacyheaders/types/simple.h"
-#include "../legacyheaders/types/commrec.h"
+#include "../legacyheaders/typedefs.h"
 #include "../legacyheaders/mdebin.h"
 
 /*! \brief Wrapper routine for writing trajectories during mdrun
index 16d6f6740a2e56213c5523d1f1118f6b80c71807..eb165a6311ebad58d767c1565492e7b9809fed90 100644 (file)
@@ -36,6 +36,7 @@
 
 #include "gromacs/commandline/pargs.h"
 #include "typedefs.h"
+#include "types/commrec.h"
 #include "smalloc.h"
 #include "vec.h"
 #include "copyrite.h"
index eeed72959175821a327af34cd2d7a41528194d9c..ac6a6e779e59fa23ec01b3230269bde98b6d8dc3 100644 (file)
@@ -46,6 +46,7 @@
 
 #include "gromacs/commandline/pargs.h"
 #include "typedefs.h"
+#include "types/commrec.h"
 #include "smalloc.h"
 #include "vec.h"
 #include "copyrite.h"
index 438b8c30af6edae5b21e0e6057ed2a976c307d45..1cf6248291164b0fa2fb90bdc818da31ad823f03 100644 (file)
@@ -61,6 +61,7 @@
 #include "copyrite.h"
 #include "names.h"
 #include "typedefs.h"
+#include "types/commrec.h"
 #include "smalloc.h"
 #include "txtdump.h"
 #include "vec.h"
index e3906564364c995bc626259321c4d8f3770c5ff9..b792c2240a5e1a8657983622bcb0df4a22a17320 100644 (file)
@@ -41,6 +41,7 @@
 
 #include <math.h>
 #include "typedefs.h"
+#include "types/commrec.h"
 #include "sysstuff.h"
 #include "smalloc.h"
 #include "macros.h"
index 99e57148ccdba4ceb1140e0a4e67c84da7bad48b..8b811323080fd1f3796852b06839faf1d6a91063 100644 (file)
@@ -42,6 +42,7 @@
 #include <math.h>
 #include "gromacs/math/utilities.h"
 #include "typedefs.h"
+#include "types/commrec.h"
 #include "vec.h"
 #include "coulomb.h"
 #include "smalloc.h"
index 1481bde2ee6efba78ff33e4d9a8851e5fc02c954..86ea38079061ba48904af4dbba78b2c4acbac68a 100644 (file)
@@ -44,6 +44,7 @@
 #include <string.h>
 
 #include "main.h"
+#include "types/commrec.h"
 #include "network.h"
 #include "gmx_fatal.h"
 #include "copyrite.h"
index f28c222dc98c47938082dc1759ba24d1ada7e3d8..4b4d75855e2afa4cc000f63944b757f8a4158430 100644 (file)
@@ -49,6 +49,7 @@
 #endif
 
 #include "smalloc.h"
+#include "types/commrec.h"
 #include "gmx_fatal.h"
 #include "network.h"
 #include "main.h"
index 1e491b25aa2175b52999aefb8c15699114f9d580..299d2729e6e47217b22989143be355b0954116ad 100644 (file)
@@ -44,6 +44,7 @@
 #include "typedefs.h"
 #include "main.h"
 #include "mvdata.h"
+#include "types/commrec.h"
 #include "network.h"
 #include "smalloc.h"
 #include "gmx_fatal.h"
index c47bbbceb92dd8bb8a7f89b4bea7e895371c82c5..f850de4e92e587e14917153f5c24ccb44f288eb8 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -42,6 +42,7 @@
 #include "gmx_fatal.h"
 #include "main.h"
 #include "smalloc.h"
+#include "types/commrec.h"
 #include "network.h"
 #include "copyrite.h"
 #include <ctype.h>
@@ -774,7 +775,7 @@ void gmx_sumli(int gmx_unused nr, gmx_int64_t gmx_unused r[], const t_commrec gm
 
 
 #ifdef GMX_MPI
-void gmx_sumd_comm(int nr, double r[], MPI_Comm mpi_comm)
+static void gmx_sumd_comm(int nr, double r[], MPI_Comm mpi_comm)
 {
 #if defined(MPI_IN_PLACE_EXISTS)
     MPI_Allreduce(MPI_IN_PLACE, r, nr, MPI_DOUBLE, MPI_SUM, mpi_comm);
@@ -797,7 +798,7 @@ void gmx_sumd_comm(int nr, double r[], MPI_Comm mpi_comm)
 #endif
 
 #ifdef GMX_MPI
-void gmx_sumf_comm(int nr, float r[], MPI_Comm mpi_comm)
+static void gmx_sumf_comm(int nr, float r[], MPI_Comm mpi_comm)
 {
 #if defined(MPI_IN_PLACE_EXISTS)
     MPI_Allreduce(MPI_IN_PLACE, r, nr, MPI_FLOAT, MPI_SUM, mpi_comm);
index 44a8361de057cffdb8ef490e2b9551bd794fe0f1..a25411ba9d91495f3864116765312acec794d151 100644 (file)
@@ -42,6 +42,7 @@
 #include "smalloc.h"
 #include "vec.h"
 #include "nrjac.h"
+#include "types/commrec.h"
 #include "network.h"
 #include "orires.h"
 #include "do_fit.h"
index c2ceaef80d67c6ba9f39281e2b3024c1f2ee56e5..514c680a73a8f8ac4fe18adeef77ab50cbcdb563 100644 (file)
@@ -43,6 +43,7 @@
 
 #include "sysstuff.h"
 #include "typedefs.h"
+#include "types/commrec.h"
 #include "vec.h"
 #include "gromacs/math/utilities.h"
 #include "main.h"
index a4460a0922fcae866663de7d7706c301fe131e40..90ff1083508a444c91bfd4863e998bf9c5f800e1 100644 (file)
@@ -43,6 +43,7 @@
 #include <stdio.h>
 #include "smalloc.h"
 #include "typedefs.h"
+#include "types/commrec.h"
 #include "names.h"
 #include "txtdump.h"
 #include "string2.h"
index e9ea538fd9b098db1d6404d73cc94edf549eb461..68b80f19c74b8254e1d02885fcce6eed96d99f4f 100644 (file)
@@ -45,6 +45,7 @@
 #include "vec.h"
 #include "macros.h"
 #include "smalloc.h"
+#include "types/commrec.h"
 #include "force.h"
 #include "names.h"
 #include "nsgrid.h"
index 944f537cbcbf0294fc219d40e90175f9344c5f0f..586797fab9d1a017fe3ad7c66728dd80bf3b74da 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2009,2010,2012,2013, by the GROMACS development team, led by
+# Copyright (c) 2009,2010,2012,2013,2014, by the GROMACS development team, led by
 # Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
 # and including many others, as listed in the AUTHORS file in the
 # top-level source directory and at http://www.gromacs.org.
 # the research papers on the package. Check out http://www.gromacs.org.
 
 # includes: Nothing to build, just installation
-file(GLOB ROOT_LEGACY_HEADERS       *.h)
-file(GLOB THREAD_MPI_LEGACY_HEADERS thread_mpi/*.h)
-file(GLOB THREAD_MPI_ATOMIC_LEGACY_HEADERS thread_mpi/atomic/*.h)
-file(GLOB TYPES_LEGACY_HEADERS      types/*.h)
+file(GLOB ROOT_LEGACY_HEADERS          *.h)
+file(GLOB ROOT_LEGACY_HEADERS_PRIVATE  thread_mpi.h tmpi.h gmx_hash.h 
+     gmx_ga2la.h gpu_utils.h pmalloc_cuda.h nbnxn_cuda_data_mgmt.h)
+file(GLOB TYPES_LEGACY_HEADERS         types/*.h)
+file(GLOB TYPES_LEGACY_HEADERS_PRIVATE types/commrec.h)
+list(REMOVE_ITEM ROOT_LEGACY_HEADERS   ${ROOT_LEGACY_HEADERS_PRIVATE})
+list(REMOVE_ITEM TYPES_LEGACY_HEADERS  ${TYPES_LEGACY_HEADERS_PRIVATE})
 gmx_install_headers(legacyheaders                   ${ROOT_LEGACY_HEADERS})
-gmx_install_headers(legacyheaders/thread_mpi        ${THREAD_MPI_LEGACY_HEADERS})
-gmx_install_headers(legacyheaders/thread_mpi/atomic ${THREAD_MPI_ATOMIC_LEGACY_HEADERS})
 gmx_install_headers(legacyheaders/types             ${TYPES_LEGACY_HEADERS})
index 89ae893c436b160946802ede1b06c6a0de8863c3..69f0a0a6fb28cc43246603ce8242fe3a1adf94f8 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -38,7 +38,6 @@
 #ifndef _constr_h
 #define _constr_h
 #include "typedefs.h"
-#include "types/commrec.h"
 
 #ifdef __cplusplus
 extern "C" {
index 95b928555f2057e5eb5d11338d23709fd07bb05c..7d086ddb4244baef3b06225cbcd9bdc2a425ac9a 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -40,7 +40,6 @@
 
 #include <stdio.h>
 #include "typedefs.h"
-#include "types/commrec.h"
 
 #ifdef __cplusplus
 extern "C" {
index 32b7cf4bce930e174da1bfa625d88fe6ad0b01b8..6a0fb7c7cabaa88290f8931986fa7270a2280b44 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2005,2006,2007,2008,2009,2010,2012,2013, by the GROMACS development team, led by
+ * Copyright (c) 2005,2006,2007,2008,2009,2010,2012,2013,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -37,7 +37,6 @@
 #define _domdec_h
 
 #include "typedefs.h"
-#include "types/commrec.h"
 #include "vsite.h"
 #include "genborn.h"
 
index e7504346e1cdb6ecd97578d9657113668ba82356..84e6b2e556db3be939517f67bc7daa1f1a2fca65 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2008,2009,2010,2012, by the GROMACS development team, led by
+ * Copyright (c) 2008,2009,2010,2012,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -37,7 +37,6 @@
 #define _domdec_network_h
 
 #include "typedefs.h"
-#include "types/commrec.h"
 
 #ifdef __cplusplus
 extern "C" {
index 12d723b06085e0dda8512e5feebafc702a465df0..99e2d51513deae7db479b7433943a6fcdc8ad2d9 100644 (file)
@@ -40,7 +40,6 @@
 #define _genborn_h
 
 #include "typedefs.h"
-#include "types/commrec.h"
 
 #ifdef __cplusplus
 extern "C" {
index d45a2b53b8348a1945999733fe0ea77c0a87a7f8..0e638031386cbf609dcaa3eba27a7abe8c10ed3b 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2013, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -36,7 +36,7 @@
 #ifndef GMX_HARDWARE_DETECT_H
 #define GMX_HARDWARE_DETECT_H
 
-#include "types/hw_info.h"
+#include "typedefs.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -48,7 +48,6 @@ extern "C" {
 /* the init and consistency functions depend on commrec that may not be
    consistent in cuda because MPI types don't exist there.  */
 #ifndef __CUDACC__
-#include "types/commrec.h"
 /* return a pointer to a global hwinfo structure. */
 gmx_hw_info_t *gmx_detect_hardware(FILE *fplog, const t_commrec *cr,
                                    gmx_bool bDetectGPUs);
index af5599698b16e9735b358957a9577683e923bd8d..c7e59575a5c50d4ae32112b25c9dba761d5e6854 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2012, The GROMACS development team.
- * Copyright (c) 2012, by the GROMACS development team, led by
+ * Copyright (c) 2012,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -38,8 +38,7 @@
 #ifndef _fatal_collective_h
 #define _fatal_collective_h
 
-#include "types/simple.h"
-#include "types/commrec.h"
+#include "typedefs.h"
 
 #ifdef __cplusplus
 extern "C" {
index cc816208dc6902784c77b8bcddbc6a638ee3730e..c6f9ca34ded3d372983c879f0e9b06d2f58bce8f 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2010, by the GROMACS development team, led by
+ * Copyright (c) 2010,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -38,6 +38,7 @@
 #define _gmx_ga2la_h
 
 #include "typedefs.h"
+#include "types/commrec.h"
 #include "smalloc.h"
 
 #ifdef __cplusplus
index 117e8f73ca7daf47eecbcafdeb5403498da6877f..0be911727681cc40c727ddb6b1ae535216c8801a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012, by the GROMACS development team, led by
+ * Copyright (c) 2012,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -37,6 +37,7 @@
 
 #include "typedefs.h"
 #include "smalloc.h"
+#include "gmx_fatal.h"
 
 #ifdef __cplusplus
 extern "C" {
index a96e932d920500505ac2a4a05b5cefcb273f4cee..f4010010dba270082c377b2786c52645cb7a256b 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2013, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -36,7 +36,8 @@
 #ifndef GMX_OMP_NTHREADS
 #define GMX_OMP_NTHREADS
 
-#include "types/commrec.h"
+#include <stdio.h>
+#include "typedefs.h"
 
 #ifdef __cplusplus
 extern "C" {
index 8de038d4ef79f7eb86654dfade3e5fc2db7d83fb..2ee5cfd4e328b03611cfcfa95339586b03d145b0 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2013, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -34,7 +34,6 @@
  */
 #ifndef GMX_THREAD_AFFINITY_H_
 #define GMX_THREAD_AFFINITY_H_
-#include "types/commrec.h"
 #include "typedefs.h"
 
 #ifdef __cplusplus
index a993a450a09ebe69be0cf3ab89e9556d6de75bcf..e2960730495f0185e2374e3b87175bc6f05ff4be 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2010, The GROMACS development team.
- * Copyright (c) 2012,2013, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
 #ifndef _GPU_UTILS_H_
 #define _GPU_UTILS_H_
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include "types/simple.h"
 #include "types/hw_info.h"
 
index 81011e23f91ea8198acf62cca0aee031829c98cf..58356f6a6a980472b422b8d221e3b3eca32e710b 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -40,6 +40,7 @@
 
 
 #include <stdio.h>
+#include "typedefs.h"
 #include "network.h"
 #include "../fileio/filenm.h"
 
index 700a97f0ad8b11cf21492db27d03c7dc77ec98c8..9a074b381fa89be3cb945f70e469a2aa1a3d5571 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2012, by the GROMACS development team, led by
+ * Copyright (c) 2012,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -38,7 +38,8 @@
 #ifndef _md_logging_h
 #define _md_logging_h
 
-#include "types/commrec.h"
+#include <stdio.h>
+#include "typedefs.h"
 
 #ifdef __cplusplus
 extern "C" {
index 5ac463ef8a0c3615f75417ca2f90bcaba129eafc..c1a16210d5113c58f94f71fdd97d34317d24af60 100644 (file)
@@ -53,8 +53,6 @@
 #include "types/membedt.h"
 #include "types/globsig.h"
 
-#include "thread_mpi/threads.h"
-
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -81,23 +79,6 @@ enum {
     ddnoSEL, ddnoINTERLEAVE, ddnoPP_PME, ddnoCARTESIAN, ddnoNR
 };
 
-/* Variables for temporary use with the deform option,
- * used in runner.c and md.c.
- * (These variables should be stored in the tpx file.)
- */
-extern gmx_int64_t         deform_init_init_step_tpx;
-extern matrix              deform_init_box_tpx;
-extern tMPI_Thread_mutex_t deform_init_box_mutex;
-
-#ifdef GMX_THREAD_MPI
-/* The minimum number of atoms per tMPI thread. With fewer atoms than this,
- * the number of threads will get lowered.
- */
-#define MIN_ATOMS_PER_MPI_THREAD    90
-#define MIN_ATOMS_PER_GPU           900
-#endif
-
-
 typedef double gmx_integrator_t (FILE *log, t_commrec *cr,
                                  int nfile, const t_filenm fnm[],
                                  const output_env_t oenv, gmx_bool bVerbose,
index ec19f38289bfa5266425b905731bcaf3b9d9904c..083e4fc6bcec05dd5c1f6c4bebe3214583c58f18 100644 (file)
@@ -39,7 +39,6 @@
 #define _mvdata_h
 
 #include "typedefs.h"
-#include "types/commrec.h"
 
 #ifdef __cplusplus
 extern "C" {
index 48ede0da8ed84a40308b6f25b205521b71dc7fcd..62cdfe6ceab333a31b9d2aed1c067c769b5adb99 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2013, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -40,6 +40,7 @@
 #include "types/interaction_const.h"
 #include "types/nbnxn_cuda_types_ext.h"
 #include "types/hw_info.h"
+#include "types/nb_verlet.h"
 
 #ifdef GMX_GPU
 #define FUNC_TERM ;
index 4c4d86f2d76ffd61202c9adec24e1e01ccffa90e..8d4d4f17a3c8cc2a8a7388f0d83326cf70542da3 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -46,7 +46,6 @@
 #include <stdio.h>
 
 #include "types/simple.h"
-#include "types/commrec.h"
 #include "typedefs.h"
 #include "main.h"
 #include "gmx_fatal.h"
@@ -120,12 +119,6 @@ void gmx_sumf(int nr, float r[], const t_commrec *cr);
 void gmx_sumd(int nr, double r[], const t_commrec *cr);
 /* Calculate the global sum of an array of doubles */
 
-void gmx_sumf_comm(int nr, float r[], MPI_Comm mpi_comm);
-/* Calculate the global sum of an array of floats */
-
-void gmx_sumd_comm(int nr, double r[], MPI_Comm mpi_comm);
-/* Calculate the global sum of an array of doubles */
-
 void gmx_sumi_sim(int nr, int r[], const gmx_multisim_t *ms);
 /* Calculate the sum over the simulations of an array of ints */
 
@@ -142,11 +135,9 @@ void gmx_abort(int nodeid, int nnodes, int errorno);
 /* Abort the parallel run */
 
 #ifdef GMX_DOUBLE
-#define gmx_sum_comm  gmx_sumd_comm
 #define gmx_sum       gmx_sumd
 #define gmx_sum_sim   gmx_sumd_sim
 #else
-#define gmx_sum_comm  gmx_sumf_comm
 #define gmx_sum       gmx_sumf
 #define gmx_sum_sim   gmx_sumf_sim
 #endif
index 642daa26b764525856384bb53e0624573bd344c7..464a57b4ead654e53846ca853f29eb485ec6078c 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -39,7 +39,6 @@
 #define _nrnb_h
 
 #include "typedefs.h"
-#include "types/commrec.h"
 
 #ifdef __cplusplus
 extern "C" {
index 6efaf9adc1d85d7216b3e88cf71c5e4c3b89f9ec..be7e51fa9e421344d1dea33f5f1fe409873ab068 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2012, by the GROMACS development team, led by
+ * Copyright (c) 2012,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -40,7 +40,6 @@
 
 #include "sysstuff.h"
 #include "typedefs.h"
-#include "types/commrec.h"
 
 #ifdef __cplusplus
 extern "C" {
index b35a56c559ba4a5663ac22c204c1ef8ce0db82e9..d00179a4ad11f46e552df6ab96084e639c8d1906 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2013, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
 #ifndef PMALLOC_CUDA_H
 #define PMALLOC_CUDA_H
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
 #include "types/simple.h"
 
 #ifdef GMX_GPU
index bda733b34e65ec1c879d606bbba867ff3f85e601..e15f3c71f6cfbc5d69321e1ccdc6c9e9b724b2e9 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012, by the GROMACS development team, led by
+ * Copyright (c) 2012,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -35,7 +35,7 @@
 
 #ifndef _tables_h
 #define _tables_h
-
+#include "types/simple.h"
 
 #ifdef __cplusplus
 extern "C" {
index 17663d2fb249c18a9aec5b9ea4eb8197bee1940a..eb0b30b563c2d483007ebd35005b6e60da41838e 100644 (file)
@@ -200,6 +200,13 @@ t_atoms *mtop2atoms(gmx_mtop_t *mtop);
 real max_cutoff(real cutoff1, real cutoff2);
 /* Returns the maximum of the cut-off's, taking into account that 0=inf. */
 
+/* Following are forward declarations for structures in commrec.h */
+typedef struct t_commrec t_commrec;
+typedef struct gmx_domdec_t gmx_domdec_t;
+typedef struct gmx_multisim_t gmx_multisim_t;
+typedef struct gmx_domdec_zones_t gmx_domdec_zones_t;
+typedef struct gmx_ddbox_t gmx_ddbox_t;
+
 #ifdef __cplusplus
 }
 #endif
index 86d105fa978a8538ce254cd3b4c649de417f7b21..eaad7b4ead41f49b286ea1123f20baa479fb5996 100644 (file)
@@ -38,6 +38,7 @@
 #define _commrec_h
 
 #include "../../utility/gmxmpi.h"
+#include "../typedefs.h"
 #include "idef.h"
 
 #ifdef __cplusplus
@@ -67,7 +68,7 @@ typedef struct {
     rvec bb_x1;  /* Zone bounding box upper corner in Cartesian coords */
 } gmx_domdec_zone_size_t;
 
-typedef struct {
+struct gmx_domdec_zones_t {
     /* The number of zones including the home zone */
     int                    n;
     /* The shift of the zones with respect to the home zone */
@@ -82,7 +83,7 @@ typedef struct {
     gmx_domdec_zone_size_t size[DD_MAXZONE];
     /* The cg density of the home zone */
     real                   dens_zone0;
-} gmx_domdec_zones_t;
+};
 
 typedef struct gmx_ga2la *gmx_ga2la_t;
 
@@ -98,7 +99,7 @@ typedef struct gmx_domdec_comm *gmx_domdec_comm_p_t;
 
 typedef struct gmx_pme_comm_n_box *gmx_pme_comm_n_box_p_t;
 
-typedef struct {
+struct gmx_ddbox_t {
     int  npbcdim;
     int  nboundeddim;
     rvec box0;
@@ -110,7 +111,7 @@ typedef struct {
     rvec v[DIM][DIM];
     /* Normal vectors for the cells walls */
     rvec normal[DIM];
-} gmx_ddbox_t;
+};
 
 
 typedef struct {
@@ -130,7 +131,7 @@ typedef struct {
 } mpi_in_place_buf_t;
 
 
-typedef struct {
+struct gmx_domdec_t {
     /* The DD particle-particle nodes only */
     /* The communication setup within the communicator all
      * defined in dd->comm in domdec.c
@@ -222,9 +223,9 @@ typedef struct {
     int   pme_recv_f_alloc;
     rvec *pme_recv_f_buf;
 
-} gmx_domdec_t;
+};
 
-typedef struct {
+struct gmx_multisim_t {
     int       nsim;
     int       sim;
     MPI_Group mpi_group_masters;
@@ -232,7 +233,7 @@ typedef struct {
     /* these buffers are used as destination buffers if MPI_IN_PLACE isn't
        supported.*/
     mpi_in_place_buf_t *mpb;
-} gmx_multisim_t;
+};
 
 #define DUTY_PP  (1<<0)
 #define DUTY_PME (1<<1)
@@ -245,7 +246,7 @@ typedef struct {
 
 } gmx_nodecomm_t;
 
-typedef struct {
+struct t_commrec {
     /* The nodeids in one sim are numbered sequentially from 0.
      * All communication within some simulation should happen
      * in mpi_comm_mysim, or its subset mpi_comm_mygroup.
@@ -278,7 +279,7 @@ typedef struct {
     /* these buffers are used as destination buffers if MPI_IN_PLACE isn't
        supported.*/
     mpi_in_place_buf_t *mpb;
-} t_commrec;
+};
 
 #define MASTERNODE(cr)     (((cr)->nodeid == 0) || !PAR(cr))
 /* #define MASTERTHREAD(cr)   ((cr)->threadid == 0) */
index af720bbbd8bc11eea33084a21b0c8a3230d25e16..54a2afd7c5a7c7254051ce7f3caaf856e3151fc3 100644 (file)
@@ -41,7 +41,7 @@
 #include "simple.h"
 #include "enums.h"
 #include "../sysstuff.h"
-#include "gromacs/swap/enums.h"
+#include "../../swap/enums.h"
 
 #ifdef __cplusplus
 extern "C" {
index 0748804c37ab05671a51f55ae024933af087bf89..dec56d38f17f0c5dfe6f5bbe416f2dfc4d61a493 100644 (file)
 #ifndef _nbnxn_pairlist_h
 #define _nbnxn_pairlist_h
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
 #include "nblist.h"
 
-#include "../thread_mpi/atomic.h"
-
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -80,10 +75,8 @@ typedef void nbnxn_free_t (void *ptr);
 typedef struct {
     int          cj;    /* The j-cluster                    */
     unsigned int excl;  /* The exclusion (interaction) bits */
-#ifdef GMX_SIMD_IBM_QPX
     /* Indices into the arrays of SIMD interaction masks. */
     char         interaction_mask_indices[4];
-#endif
 } nbnxn_cj_t;
 
 /* In nbnxn_ci_t the integer shift contains the shift in the lower 7 bits.
@@ -229,6 +222,9 @@ enum {
     ljcrGEOM, ljcrLB, ljcrNONE, ljcrNR
 };
 
+/* TODO: Remove need for forward declare */
+struct tMPI_Atomic;
+
 typedef struct {
     nbnxn_alloc_t           *alloc;
     nbnxn_free_t            *free;
@@ -266,16 +262,14 @@ typedef struct {
      */
     unsigned int            *simd_exclusion_filter1;
     unsigned int            *simd_exclusion_filter2;
-#ifdef GMX_SIMD_IBM_QPX
     real                    *simd_interaction_array; /* Array of masks needed for exclusions on QPX */
-#endif
     int                      nout;                   /* The number of force arrays                         */
     nbnxn_atomdata_output_t *out;                    /* Output data structures               */
     int                      nalloc;                 /* Allocation size of all arrays (for x/f *x/fstride) */
     gmx_bool                 bUseBufferFlags;        /* Use the flags or operate on all atoms     */
     nbnxn_buffer_flags_t     buffer_flags;           /* Flags for buffer zeroing+reduc.  */
     gmx_bool                 bUseTreeReduce;         /* Use tree for force reduction */
-    tMPI_Atomic_t           *syncStep;               /* Synchronization step for tree reduce */
+    struct tMPI_Atomic      *syncStep;               /* Synchronization step for tree reduce */
 } nbnxn_atomdata_t;
 
 #ifdef __cplusplus
index 6a1f58b354b609d3b111258caba677b591b44471..f00da633cb59f22468413daa2b2c068bff50fca1 100644 (file)
 #ifndef _simple_h
 #define _simple_h
 
-/* Dont remove this instance of HAVE_CONFIG_H!!!
- *
- * We dont _require_ config.h here, but IF one is
- * available it might contain valuable information about simple types
- * that helps us automate things better and avoid bailing out.
- *
- * Note that this does not have to be the gromacs config.h - several
- * package setups define these simple types.
- */
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
 /* Information about integer data type sizes */
 #include <limits.h>
 #define __STDC_LIMIT_MACROS
@@ -208,75 +195,17 @@ typedef uint64_t gmx_uint64_t;
 #define GMX_UINT64_MAX UINT64_MAX
 #define GMX_UINT64_MIN UINT64_MIN
 
-#ifndef gmx_inline
-/* config.h tests for inline definitions and should work on a much wider range
- * of compilers, but does not work with installed headers. These compiler checks
- * still enable a real inline keyword for the most common compilers.
- */
-
-/* Try to define suitable inline keyword for gmx_inline.
- * Set it to empty if we cannot find one (and dont complain to the user)
- */
-#ifndef __cplusplus
-
-#ifdef __GNUC__
-/* GCC */
-#  define gmx_inline   __inline__
-#elif (defined(__INTEL_COMPILER) || defined(__ECC)) && defined(__ia64__)
-/* ICC */
-#  define gmx_inline __inline__
-#elif defined(__PATHSCALE__)
-/* Pathscale */
-#  define gmx_inline __inline__
-#elif defined(__PGIC__)
-/* Portland */
-#  define gmx_inline __inline
-#elif defined _MSC_VER
-/* MSVC */
-#  define gmx_inline __inline
-#elif defined(__xlC__)
-/* IBM */
-#  define gmx_inline __inline
-#else
-#  define gmx_inline
-#endif
-
+#if !defined __cplusplus && _MSC_VER
+#define gmx_inline __inline
 #else
-/* C++ */
-#  define gmx_inline inline
+/* C++ or C99 */
+#define gmx_inline inline
 #endif
 
-#endif /* ifndef gmx_inline */
-
-
-/* Restrict keywords. Note that this has to be done for C++ too, unless
- * it was set from the more general checks if we had config.h (gmx internal)
- */
-#ifndef gmx_restrict
-
-#ifdef __GNUC__
-/* GCC */
-#  define gmx_restrict   __restrict__
-#elif (defined(__INTEL_COMPILER) || defined(__ECC)) && defined(__ia64__)
-/* ICC */
-#  define gmx_restrict __restrict__
-#elif defined(__PATHSCALE__)
-/* Pathscale */
-#  define gmx_restrict __restrict
-#elif defined(__PGIC__)
-/* Portland */
-#  define gmx_restrict __restrict
-#elif defined _MSC_VER
-/* MSVC */
-#  define gmx_restrict __restrict
-#elif defined(__xlC__)
-/* IBM */
-#  define gmx_restrict __restrict
-#else
-#  define gmx_restrict
-#endif
-
-#endif
+/* ICC, GCC, MSVC, Pathscale, PGI, XLC support __restrict.
+ * Any other compiler can be added here. We cannot
+ * use restrict because it is in C99 but not in C++ */
+#define gmx_restrict __restrict
 
 /*
  * These attributes suppress compiler warnings about unused function arguments
index 853a8220518e57bb65ef40e604a6bbbec03515f2..3418ab189b81ca89527314572a8f90577ab01423 100644 (file)
@@ -39,7 +39,7 @@
 
 
 #include "simple.h"
-#include "gromacs/swap/enums.h"
+#include "../../swap/enums.h"
 
 #ifdef __cplusplus
 extern "C" {
index e2d120d77518cc53ca6cdf98cd2d094c8a33ed1d..a14dc49dc90f77eb7e1d36c1cbba72adde3f3ea2 100644 (file)
    real trace(matrix m)                             = trace(m)
  */
 
+/* The file only depends on config.h for GMX_SOFTWARE_INVSQRT and
+   HAVE_*SQRT*. This is no problem with public headers because
+   it is OK if user code uses a different rsqrt implementation */
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include "types/simple.h"
 #include "../math/utilities.h"
 #include "typedefs.h"
index eb629e111d975898aee3b0559cb48ca3af654661..2ccc6ed1f9988681711f79259165249ad60ca049 100644 (file)
@@ -40,7 +40,6 @@
 
 #include <stdio.h>
 #include "typedefs.h"
-#include "types/commrec.h"
 
 #ifdef __cplusplus
 extern "C" {
index 06d2f09f109ac2998e5b9e8e057e97be060681fc..4b3a5b80e474841cda2192fb87ad16cf3e56d48d 100644 (file)
@@ -40,7 +40,7 @@ set(MATH_PUBLIC_HEADERS
     gmxcomplex.h
     utilities.h
     )
-gmx_install_headers(maths ${MATH_PUBLIC_HEADERS})
+gmx_install_headers(math ${MATH_PUBLIC_HEADERS})
 
 if (BUILD_TESTING)
 #    add_subdirectory(tests)
index 49595554de6cf9669eef95a7d351087866754898..4f01f54654aab436b7c3e44aca2d6b0709ea9752 100644 (file)
@@ -39,6 +39,7 @@
 #endif
 
 #include "gromacs/fileio/confio.h"
+#include "types/commrec.h"
 #include "constr.h"
 #include "copyrite.h"
 #include "invblock.h"
index 7d207b9d506dd90e04f88cadfe6c8d71db5fadfa..d5e4d9d3ff1a90fbdf95400690f107f7449a9bda 100644 (file)
@@ -40,6 +40,7 @@
 #include <assert.h>
 
 #include "typedefs.h"
+#include "types/commrec.h"
 #include "smalloc.h"
 #include "update.h"
 #include "vec.h"
index 4778e13adaf33bae2b22194e70eb668f64a0d9cd..9348512e64ddd3d999844c05c118d4588d81595b 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2009,2010, by the GROMACS development team, led by
+ * Copyright (c) 2009,2010,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -40,6 +40,7 @@
 #include "typedefs.h"
 #include "vec.h"
 #include "pbc.h"
+#include "types/commrec.h"
 #include "domdec.h"
 #include "domdec_network.h"
 #include "nsgrid.h"
index 53658aa56ba51d8298dec51ef2a660db90aca6cc..31154f34609ab4b81e02b576cd0a16a8694dd45c 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2006,2007,2008,2009,2010,2012,2013, by the GROMACS development team, led by
+ * Copyright (c) 2006,2007,2008,2009,2010,2012,2013,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -41,6 +41,7 @@
 #include "smalloc.h"
 #include "vec.h"
 #include "constr.h"
+#include "types/commrec.h"
 #include "domdec.h"
 #include "domdec_network.h"
 #include "mtop_util.h"
index 8e184d38c0b3a0cc6a37fbb72f297f51be497267..9142d54ae7b51040f371e4afa427b6e42282b591 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2008,2009,2010,2012,2013, by the GROMACS development team, led by
+ * Copyright (c) 2008,2009,2010,2012,2013,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -38,6 +38,7 @@
 #endif
 
 #include <string.h>
+#include "types/commrec.h"
 #include "domdec_network.h"
 
 #include "gromacs/utility/gmxmpi.h"
index d5fec0dbd622d32cec29c28c42dde8abd181499a..8e39f16daa9dc21ab8ce23c2f4227e2ba9aff738 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2008,2009,2010,2011,2012,2013, by the GROMACS development team, led by
+ * Copyright (c) 2008,2009,2010,2011,2012,2013,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -40,6 +40,7 @@
 #include <stdio.h>
 #include <assert.h>
 #include "domdec.h"
+#include "types/commrec.h"
 #include "network.h"
 #include "perf_est.h"
 #include "physics.h"
index 3eea74ab0883431cb919f566f250b4c2c1d73c0e..1503d9d963df1fd415a2977bfbcddff0738dd2d6 100644 (file)
@@ -40,6 +40,7 @@
 #include <string.h>
 #include "typedefs.h"
 #include "smalloc.h"
+#include "types/commrec.h"
 #include "domdec.h"
 #include "domdec_network.h"
 #include "names.h"
index 845060173f42407017119aab2c13629ee92b51ae..740ad32e989f086afde9a2f114cafd6b97beb699 100644 (file)
@@ -41,6 +41,7 @@
 #include <stdio.h>
 #include <math.h>
 #include "typedefs.h"
+#include "types/commrec.h"
 #include "vec.h"
 #include "smalloc.h"
 #include "gmx_fatal.h"
index 3f4c0d8ddc20b4558ef5830bd95f2b1f2f2ce64c..bd22a259fa1a7ae23a10b9ac52deeb2fd1f29541 100644 (file)
@@ -43,6 +43,7 @@
 #include <assert.h>
 #include "sysstuff.h"
 #include "typedefs.h"
+#include "types/commrec.h"
 #include "vec.h"
 #include "gromacs/math/utilities.h"
 #include "macros.h"
index ff228f9529f0eb08a30ad86bec88262d6ae8fca4..edd78818a70ca30d2ad3964d75d309c8e65c2772 100644 (file)
@@ -43,6 +43,7 @@
 #include <string.h>
 
 #include "typedefs.h"
+#include "types/commrec.h"
 #include "smalloc.h"
 #include "genborn.h"
 #include "vec.h"
index d780c21331237dec7333243a5b3bbec39f4a7b9e..36c5b2c565ea1a269cc98518ec88a8992acbcf94 100644 (file)
@@ -49,6 +49,7 @@
 #include "nbnxn_search.h"
 #include "gromacs/utility/gmxomp.h"
 #include "gmx_omp_nthreads.h"
+#include "thread_mpi/atomic.h"
 
 /* Default nbnxn allocation routine, allocates NBNXN_MEM_ALIGN byte aligned */
 void nbnxn_alloc_aligned(void **ptr, size_t nbytes)
index 2821e54cbdc53eb90504b4fcfedfba3c811b74a5..440c074db3b9518cfb2da8b8769e7084f6464be8 100644 (file)
@@ -32,6 +32,9 @@
  * To help us fund GROMACS development, we humbly ask that you cite
  * the research papers on the package. Check out http://www.gromacs.org.
  */
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 
 #include <stdlib.h>
 #include <assert.h>
index 576f413ba255cf9c785b7ba698c71a3c2a9080cd..994738f627a94ba99c359e15041b37d702fdfb89 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2013, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
 #ifndef NBNXN_CUDA_H
 #define NBNXN_CUDA_H
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include "types/nbnxn_cuda_types_ext.h"
 #include "types/simple.h"
 
index 4f52448ee0551e17b9bc9347132a9729e51a3093..5466bb5288ed738503dfa0e73bfac4e35b6c9d75 100644 (file)
@@ -43,6 +43,7 @@
 
 #include "sysstuff.h"
 #include "smalloc.h"
+#include "types/commrec.h"
 #include "macros.h"
 #include "gromacs/math/utilities.h"
 #include "vec.h"
index 36ad72c4ef6cc815b6eb3e090b5b45fd58d9f732..491d53ee0eba9a28364940caf12ff13974cdc7cf 100644 (file)
@@ -45,6 +45,7 @@
 #include "macros.h"
 #include "gromacs/math/utilities.h"
 #include "vec.h"
+#include "types/commrec.h"
 #include "network.h"
 #include "nsgrid.h"
 #include "force.h"
index e1cab52c1eed116774dfa0413199287c2133aa04..5ea913e7b55f07b5072cbf0482354a894698c4b6 100644 (file)
@@ -44,6 +44,7 @@
 #include <string.h>
 #include <math.h>
 #include "typedefs.h"
+#include "types/commrec.h"
 #include "smalloc.h"
 #include "gmx_fatal.h"
 #include "vec.h"
index e0d45d2a618edce8180dfe1597cc341fcf96e116..b4fca75f1fd9b934ffdb0a088bb0b255f0370474 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -41,6 +41,7 @@
 #include <math.h>
 #include "sysstuff.h"
 #include "typedefs.h"
+#include "types/commrec.h"
 #include "macros.h"
 #include "smalloc.h"
 #include "physics.h"
index 1a4e4b90bdb398989880a936631004a36bc8d9b3..4cb1bb5a2f62bfe76b5b3f4a4bf6f23f97d92356 100644 (file)
@@ -40,6 +40,7 @@
 
 #include <string.h>
 #include "typedefs.h"
+#include "types/commrec.h"
 #include "smalloc.h"
 #include "gmx_fatal.h"
 #include "vec.h"
index e5431b1c7aa41746445a0d4226c9738541e563e9..f09e9ed4cad124330d3f8905e8dda1662c5df45f 100644 (file)
@@ -41,6 +41,7 @@
 #include <string.h>
 #include <stdio.h>
 #include "typedefs.h"
+#include "types/commrec.h"
 #include "sysstuff.h"
 #include "gmx_fatal.h"
 #include "network.h"
index 84661b0cf091d85f95ef00b5ad055c6289c24347..5d142c5ca4fc2f61e5921222a7fa2845dd6c3569 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -44,6 +44,7 @@
 #include "string2.h"
 #include "force.h"
 #include "smalloc.h"
+#include "types/commrec.h"
 #include "ns.h"
 #include "nrnb.h"
 #include "gmx_fatal.h"
index abb51a55a3393a048f2f0675a9af3b9d43dc7274..58dbd60c58e648c89cae7b127dfaab53750da48d 100644 (file)
@@ -47,6 +47,7 @@
 #include "gromacs/fileio/gmxfio.h"
 #include "vec.h"
 #include "typedefs.h"
+#include "types/commrec.h"
 #include "network.h"
 #include "gromacs/fileio/filenm.h"
 #include <string.h>
index bf8bb137c831c779bb12f52ecc9fbd9805d959a8..5ffc05787b454f39676ea1c85b623a78d49b93b3 100644 (file)
@@ -46,6 +46,7 @@
 #include "vec.h"
 #include "smalloc.h"
 #include "typedefs.h"
+#include "types/commrec.h"
 #include "names.h"
 #include "gmx_fatal.h"
 #include "macros.h"
index 4432ea6aefecf109c3d1da14c48fd5e49628ea7c..def7b9691be7e5c6a0a9b530a6429446d4e9b005 100644 (file)
@@ -48,7 +48,6 @@ set(UTILITY_PUBLIC_HEADERS
     flags.h
     gmx_header_config.h
     gmxassert.h
-    gmxmpi.h
     init.h
     programcontext.h
     stringutil.h
index 603d39cf7550155ca4f7dbc12759b14c14503808..3e99283735b5aa534529e62cfdc631f4871cfc1a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012, by the GROMACS development team, led by
+ * Copyright (c) 2012,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
  * \ingroup module_utility
  */
 
-/** Detect Cygwin */
-#cmakedefine GMX_CYGWIN
+#ifdef __CYGWIN__
+#define GMX_CYGWIN
+#endif
 
-/** Detect native (i.e. non-Cygwin) Windows */
-#cmakedefine GMX_NATIVE_WINDOWS
+/* We currently don't support MingW. And ICC also defines it */
+#ifdef _MSC_VER
+#define GMX_NATIVE_WINDOWS
+#endif
 
 /** Define if we have sufficient C++11 support */
 #cmakedefine GMX_CXX11
index 3b36a87db22f3bfff10030d1c8497617ee8eacc7..640d553f34210fd9524a284373c1720559053658 100644 (file)
 #ifndef GMX_UTILITY_GMXMPI_H
 #define GMX_UTILITY_GMXMPI_H
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 /*! \cond */
 #ifdef GMX_LIB_MPI
 /* MPI C++ binding is deprecated and can cause name conflicts (e.g. stdio/mpi seek) */
index c698b5168ac11fce1c9caddf58af10568f577caa..af11cac918acdcc739daba306f3a41e8865c0f1a 100644 (file)
@@ -53,6 +53,7 @@
 #include "config.h"
 #endif
 
+#ifndef GMX_NATIVE_WINDOWS
 /* Ugly hack because the openmp implementation below hacks into the SIMD
  * settings to decide when to use _mm_pause(). This should eventually be
  * changed into proper detection of the intrinsics uses, not SIMD.
@@ -62,6 +63,9 @@
     (defined GMX_SIMD_X86_AVX2_256)
 #    include <xmmintrin.h>
 #endif
+#else
+#include <windows.h>
+#endif
 
 #include "types/commrec.h"
 #include "mdrun.h"
@@ -118,6 +122,7 @@ void gmx_omp_check_thread_affinity(FILE *fplog, const t_commrec *cr,
  */
 static gmx_inline void gmx_pause()
 {
+#ifndef GMX_NATIVE_WINDOWS
     /* Ugly hack because the openmp implementation below hacks into the SIMD
      * settings to decide when to use _mm_pause(). This should eventually be
      * changed into proper detection of the intrinsics uses, not SIMD.
@@ -132,6 +137,9 @@ static gmx_inline void gmx_pause()
 #else
     /* No wait for unknown architecture */
 #endif
+#else
+    YieldProcessor();
+#endif
 }
 
 /*! \} */
diff --git a/src/programs/mdrun/deform.h b/src/programs/mdrun/deform.h
new file mode 100644 (file)
index 0000000..d2106f1
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * 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 GMX_MDRUN_DEFORM_H
+#define GMX_MDRUN_DEFORM_H
+
+#include "thread_mpi/threads.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Variables for temporary use with the deform option,
+ * used in runner.c and md.c.
+ * (These variables should be stored in the tpx file.)
+ */
+extern gmx_int64_t         deform_init_init_step_tpx;
+extern matrix              deform_init_box_tpx;
+extern tMPI_Thread_mutex_t deform_init_box_mutex;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
index 04c48de3fa58b55eef45b1c3c5750cf28b3ef101..8fb7afb3ffcb7bea0165d07d9cd2b0803d66213e 100644 (file)
@@ -63,6 +63,7 @@
 #include "pme.h"
 #include "mdatoms.h"
 #include "repl_ex.h"
+#include "deform.h"
 #include "qmmm.h"
 #include "domdec.h"
 #include "domdec_network.h"
index 332d64e5e83cafaeba1b9d77ee7d430bdfa08dcf..4767c1a513de87e5336f1c02d609be430122395b 100644 (file)
@@ -51,6 +51,7 @@
 #include "gromacs/legacyheaders/network.h"
 #include "gromacs/legacyheaders/readinp.h"
 #include "gromacs/legacyheaders/typedefs.h"
+#include "gromacs/legacyheaders/types/commrec.h"
 
 #include "gromacs/commandline/pargs.h"
 #include "gromacs/fileio/filenm.h"
index 77231a113084d7706ff889102f25941f7eda8915..a7b66b60fbda941d5fc59c3ae30eb614dc26ad40 100644 (file)
@@ -39,6 +39,7 @@
 #include <signal.h>
 #include <stdlib.h>
 #include "typedefs.h"
+#include "types/commrec.h"
 #include "smalloc.h"
 #include "sysstuff.h"
 #include "vec.h"
index 63efb07eea468fddd884f05295c33e71daf4fc58..1caf80e26d77bf8885d6c9b84dff56e19147f1f5 100644 (file)
@@ -37,6 +37,7 @@
 #endif
 
 #include "smalloc.h"
+#include "types/commrec.h"
 #include "network.h"
 #include "calcgrid.h"
 #include "pme.h"
index 96d4f2f06c2dee625ac8a7513586d05c137b6b96..30044a2d193bb8897ae3ef5934b7c788ff04d63f 100644 (file)
@@ -60,6 +60,7 @@
 #include "pme.h"
 #include "mdatoms.h"
 #include "repl_ex.h"
+#include "deform.h"
 #include "qmmm.h"
 #include "domdec.h"
 #include "coulomb.h"
@@ -109,6 +110,12 @@ tMPI_Thread_mutex_t deform_init_box_mutex = TMPI_THREAD_MUTEX_INITIALIZER;
 
 
 #ifdef GMX_THREAD_MPI
+/* The minimum number of atoms per tMPI thread. With fewer atoms than this,
+ * the number of threads will get lowered.
+ */
+#define MIN_ATOMS_PER_MPI_THREAD    90
+#define MIN_ATOMS_PER_GPU           900
+
 struct mdrunner_arglist
 {
     gmx_hw_opt_t    hw_opt;