Skip to content

Commit

Permalink
[WIP] Fix gpumetrics sampler
Browse files Browse the repository at this point in the history
  • Loading branch information
nichamon committed Sep 5, 2023
1 parent 4209fbc commit 920e281
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions ldms/src/contrib/sampler/gpu_metrics_sampler/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ AM_CPPFLAGS = @OVIS_INCLUDE_ABS@ $(SDLCFLAGS)
AM_LDFLAGS = @OVIS_LIB_ABS@ $(SDLLDFLAGS)
COMMON_LIBADD = -lsampler_base -lldms -lovis_util -lcoll -lovis_log\
@LDFLAGS_GETTIME@
GMGLIBS = -L. -lgmg -L/usr/lib/x86_64-linux-gnu/ -lze_loader
GMGLIBS = -L. ./libgmg.a -L/usr/lib/x86_64-linux-gnu/ -lze_loader

if ENABLE_GPU_METRICS

Expand All @@ -80,7 +80,7 @@ pkglib_LTLIBRARIES += libgpumetrics.la

bin_PROGRAMS = bin/gpu_metrics_gatherer
bin_gpu_metrics_gatherer_SOURCES = gather_gpu_metrics.cpp
bin_gpu_metrics_gatherer_LDADD = $(GMGLIBS)
bin_gpu_metrics_gatherer_LDADD = $(GMGLIBS) -lovis_log


endif
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
#include "gmg_log.h"
#include "gather_gpu_metrics_from_one_api.h"
#include "gmg_ldms_util.h"
#include "ovis_log/ovis_log.h"
#include <string.h>
#include <time.h>
#include <stdlib.h>
Expand Down Expand Up @@ -694,7 +695,7 @@ uint32_t readRasErrorPropAndState(ze_device_handle_t hDevice, zes_ras_properties
ze_bool_t clear = 0;
res = zesRasGetState(pHandle[0], clear, &state);
if (res != ZE_RESULT_SUCCESS) {
GMGLOG(OVIS_LERROR, "!!!zesRasGetState(pHandle[0]=%p,clear=%p,&state=%p) => 0x%x\n",
GMGLOG(OVIS_LERROR, "!!!zesRasGetState(pHandle[0]=%p,clear=%d,&state=%p) => 0x%x\n",
pHandle[0], clear, &state, res);
return -9999;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ int populateMetricSchema(ldms_schema_t schema, uint32_t numDevices) {
for (size_t i = 0; i < c_numMetrics; i++) {
char szMetricName[MAX_METRIC_NAME_LENGTH + 1] = {};
constructMetricName(metricsDefinitions[i].name, deviceId, szMetricName);
GMGLOG(OVIS_LDEBUG, "metricsDefinitions[i=%d].name = %s\n", i, metricsDefinitions[i].name);
GMGLOG(OVIS_LDEBUG, "metricsDefinitions[i=%ld].name = %s\n", i, metricsDefinitions[i].name);
GMGLOG(OVIS_LDEBUG, "szMetricName = %s\n", szMetricName);
if (ldms_type_is_array(metricsDefinitions[i].type)) {
rc = ldms_schema_metric_array_add(schema, szMetricName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ static int create_metric_set_schema_and_set(base_data_t base) {
static void printValList(const char *szListName, struct attr_value_list *av_list) {
size_t listSize = MIN(av_list->count, av_list->size);
for (size_t i = 0; i < listSize; i++) {
ovis_log(__gpu_metrics_log, OVIS_LDEBUG, "%s[%d] = %s:%s\n",
ovis_log(__gpu_metrics_log, OVIS_LDEBUG, "%s[%ld] = %s:%s\n",
szListName, i, av_name(av_list, i), av_value_at_idx(av_list, i));
}
}
Expand Down

0 comments on commit 920e281

Please sign in to comment.