+ if (0 != ids.size())
+ {
+ typename Container::const_iterator it = ids.begin();
+ output += gmx::formatString("%d", *it);
+ for (++it; it != ids.end(); ++it)
+ {
+ output += gmx::formatString(",%d", *it);
+ }
+ }
+ return output;
+}
+
+/*! \brief Helper function for reporting GPU usage information
+ * in the mdrun log file
+ *
+ * \param[in] gpu_info Pointer to per-node GPU info struct
+ * \param[in] gpu_opt Pointer to per-node GPU options struct
+ * \param[in] numPpRanks Number of PP ranks per node
+ * \return String to write to the log file
+ * \throws std::bad_alloc if out of memory */
+static std::string
+makeGpuUsageReport(const gmx_gpu_info_t *gpu_info,
+ const gmx_gpu_opt_t *gpu_opt,
+ size_t numPpRanks)
+{
+ int ngpu_use = gpu_opt->ncuda_dev_use;
+ int ngpu_comp = gpu_info->ncuda_dev_compatible;