Report up to date hwloc version information
authorKevin Boyd <kevin.boyd@uconn.edu>
Tue, 31 Jul 2018 01:54:27 +0000 (21:54 -0400)
committerKevin Boyd <kevin.boyd@uconn.edu>
Tue, 31 Jul 2018 02:29:59 +0000 (22:29 -0400)
The hwloc version in gmx --version and log files had been
taken from HWLOC_API_VERSION in the hwloc header, which is
not always updated to reflect new releases.

Added HWLOC_VERSION to buildinfo.h from cmake, used in place of
HWLOC_API_VERSION

Fixes #2591

Change-Id: I0ed9f1f1ad9b4262fbb966c03c407eeb1edfc3da

src/buildinfo.h.cmakein
src/gromacs/utility/binaryinformation.cpp

index 1e32a4c3815cb9473c97e390cceb594bec37d8c7..f681a650c0320397ac9809f2558e8142838ca01a 100644 (file)
@@ -90,6 +90,9 @@
 /** Location of GROMACS-specific data files */
 #define GMX_INSTALL_GMXDATADIR  "@GMX_INSTALL_GMXDATADIR@"
 
+/** HWLOC version information */
+#define HWLOC_VERSION "@HWLOC_VERSION@"
+
 /** CUDA compiler version information */
 #define CUDA_COMPILER_INFO "@CUDA_COMPILER_INFO@"
 
index 495ebe3ae6aacfc186c702508a7c2a4946b1f903..c27e28ad37aa09a0fc803521ea04bd9f4d88c3ba 100644 (file)
@@ -263,10 +263,7 @@ void gmx_print_version_info(gmx::TextWriter *writer)
     writer->writeLine("TNG support:        disabled");
 #endif
 #if GMX_HWLOC
-    writer->writeLine(formatString("Hwloc support:      hwloc-%d.%d.%d",
-                                   HWLOC_API_VERSION>>16,
-                                   (HWLOC_API_VERSION>>8) & 0xFF,
-                                   HWLOC_API_VERSION & 0xFF));
+    writer->writeLine(formatString("Hwloc support:      hwloc-%s", HWLOC_VERSION));
 #else
     writer->writeLine("Hwloc support:      disabled");
 #endif