Move hardware detection to hardware/
authorTeemu Murtola <teemu.murtola@gmail.com>
Mon, 14 Dec 2015 18:25:41 +0000 (20:25 +0200)
committerMark Abraham <mark.j.abraham@gmail.com>
Tue, 15 Dec 2015 02:41:01 +0000 (03:41 +0100)
This may not be the best place for all of the code, since there are
also, e.g., functions that return information about implementation
limitations of mdrun, and for checking mdrun input parameter
consistency.  But it would make sense for as much of the actual
detection code as possible to be in a single location, and this would be
the most natural place.

There are several cyclic dependencies suppressed for now to get forward
with breaking up gmxlib/.

Change-Id: Ie73d0a18530082d3a2b9f26a655706b33bf58a8a

docs/doxygen/cycle-suppressions.txt
src/gromacs/hardware/CMakeLists.txt
src/gromacs/hardware/detecthardware.cpp [moved from src/gromacs/gmxlib/gmx_detect_hardware.cpp with 99% similarity]
src/gromacs/hardware/detecthardware.h [moved from src/gromacs/gmxlib/gmx_detect_hardware.h with 98% similarity]
src/gromacs/mdlib/forcerec.cpp
src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda_data_mgmt.cu
src/gromacs/mdlib/nbnxn_ocl/nbnxn_ocl_data_mgmt.cpp
src/programs/mdrun/resource-division.cpp
src/programs/mdrun/runner.cpp

index f2feb95da137b4d206ec3b9fab14fd1831dc3b1b..9e66e1fee24a012606705343b7299bc67f071e35 100644 (file)
@@ -12,6 +12,8 @@ mdlib -> essentialdynamics
 mdlib -> imd
 mdlib -> ewald
 mdlib -> pulling
+simd -> hardware
+gpu_utils -> hardware
 topology -> listed-forces
 pbcutil -> mdtypes
 listed-forces -> mdlib
index 67c34ffa8f3f6a11df96f7a4e381953bad54354c..83016454f57456d86461bfafa2a7f16bdad8059b 100644 (file)
@@ -34,6 +34,7 @@
 
 gmx_add_libgromacs_sources(
     cpuinfo.cpp
+    detecthardware.cpp
     hardwaretopology.cpp
     )
 
similarity index 99%
rename from src/gromacs/gmxlib/gmx_detect_hardware.cpp
rename to src/gromacs/hardware/detecthardware.cpp
index f4edd0eabbd9a7de45c10fe2bb87b697f6af9dc1..dd2bb02d69b7f0b7bfee7a0e553785cca6d79bc0 100644 (file)
@@ -34,7 +34,7 @@
  */
 #include "gmxpre.h"
 
-#include "gmx_detect_hardware.h"
+#include "detecthardware.h"
 
 #include "config.h"
 
similarity index 98%
rename from src/gromacs/gmxlib/gmx_detect_hardware.h
rename to src/gromacs/hardware/detecthardware.h
index d9511b3e408a6db603160ae99f8cc165253a4911..d60cb0b47cbb831fed3f2c0a48b27ce294870213 100644 (file)
@@ -32,8 +32,8 @@
  * 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_GMXLIB_DETECT_HARDWARE_H
-#define GMX_GMXLIB_DETECT_HARDWARE_H
+#ifndef GMX_HARDWARE_DETECTHARDWARE_H
+#define GMX_HARDWARE_DETECTHARDWARE_H
 
 #include <cstdio>
 
index 78621f4b93769bd4da500179fb790ade3d2217d2..4850834040cadff7db7b3baacbc34d47cac060bd 100644 (file)
 #include "gromacs/domdec/domdec_struct.h"
 #include "gromacs/ewald/ewald.h"
 #include "gromacs/fileio/filetypes.h"
-#include "gromacs/gmxlib/gmx_detect_hardware.h"
 #include "gromacs/gmxlib/gmx_omp_nthreads.h"
 #include "gromacs/gmxlib/md_logging.h"
 #include "gromacs/gmxlib/network.h"
 #include "gromacs/gmxlib/nonbonded/nonbonded.h"
 #include "gromacs/gpu_utils/gpu_utils.h"
+#include "gromacs/hardware/detecthardware.h"
 #include "gromacs/listed-forces/manage-threading.h"
 #include "gromacs/math/calculate-ewald-splitting-coefficient.h"
 #include "gromacs/math/units.h"
index 373a6b275dfd90fc449ecb4d9d21f2d21c2f3ac7..aa1d33c70aa19d0430d85671b52de70402b691ea 100644 (file)
 
 #include <cuda_profiler_api.h>
 
-#include "gromacs/gmxlib/gmx_detect_hardware.h"
 #include "gromacs/gpu_utils/cudautils.cuh"
 #include "gromacs/gpu_utils/gpu_utils.h"
 #include "gromacs/gpu_utils/pmalloc_cuda.h"
+#include "gromacs/hardware/detecthardware.h"
 #include "gromacs/hardware/gpu_hw_info.h"
 #include "gromacs/math/vectypes.h"
 #include "gromacs/mdlib/force_flags.h"
index 091daead46389f2d11a21744cb53a9dc7e897de6..fefd9b7b54ca6f039c0683751f6046d4d82c7ef5 100644 (file)
@@ -48,9 +48,9 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "gromacs/gmxlib/gmx_detect_hardware.h"
 #include "gromacs/gpu_utils/gpu_utils.h"
 #include "gromacs/gpu_utils/oclutils.h"
+#include "gromacs/hardware/detecthardware.h"
 #include "gromacs/hardware/gpu_hw_info.h"
 #include "gromacs/math/vectypes.h"
 #include "gromacs/mdlib/force_flags.h"
index 293d2c8c1976ce956d9a06d9eefe60254426df4d..202375f246b4a5004de22b5e5b50654bfd0a9427 100644 (file)
 
 #include <algorithm>
 
-#include "gromacs/gmxlib/gmx_detect_hardware.h"
 #include "gromacs/gmxlib/gmx_omp_nthreads.h"
 #include "gromacs/gmxlib/md_logging.h"
 #include "gromacs/hardware/cpuinfo.h"
+#include "gromacs/hardware/detecthardware.h"
 #include "gromacs/hardware/gpu_hw_info.h"
 #include "gromacs/hardware/hardwaretopology.h"
 #include "gromacs/hardware/hw_info.h"
index 7d240d248c6586bef53ff790d0c7f7d59dc64eed..0038dcf5401bc06988ebf1c92f3ec7589ac748fd 100644 (file)
 #include "gromacs/fileio/checkpoint.h"
 #include "gromacs/fileio/oenv.h"
 #include "gromacs/fileio/tpxio.h"
-#include "gromacs/gmxlib/gmx_detect_hardware.h"
 #include "gromacs/gmxlib/gmx_omp_nthreads.h"
 #include "gromacs/gmxlib/main.h"
 #include "gromacs/gmxlib/md_logging.h"
 #include "gromacs/gmxlib/network.h"
 #include "gromacs/gpu_utils/gpu_utils.h"
+#include "gromacs/hardware/detecthardware.h"
 #include "gromacs/listed-forces/disre.h"
 #include "gromacs/listed-forces/orires.h"
 #include "gromacs/math/calculate-ewald-splitting-coefficient.h"