From 527764d6817ae091ba4a790760a01141d295168c Mon Sep 17 00:00:00 2001 From: Thomas Roehl Date: Mon, 23 May 2022 16:15:11 +0200 Subject: [PATCH] Fix imports --- collectors/rocmsmiMetric.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/collectors/rocmsmiMetric.go b/collectors/rocmsmiMetric.go index bfd9e5e..896ede0 100644 --- a/collectors/rocmsmiMetric.go +++ b/collectors/rocmsmiMetric.go @@ -3,6 +3,8 @@ package collectors import ( "encoding/json" "time" + "errors" + "fmt" cclog "github.com/ClusterCockpit/cc-metric-collector/internal/ccLogger" lp "github.com/ClusterCockpit/cc-metric-collector/internal/ccMetric" @@ -61,7 +63,7 @@ func (m *RocmSmiCollector) Init(config json.RawMessage) error { } } - ret = rocm_smi.Init() + ret := rocm_smi.Init() if ret != rocm_smi.STATUS_SUCCESS { err = errors.New("Failed to initialize ROCm SMI library") cclog.ComponentError(m.name, err.Error()) @@ -86,7 +88,7 @@ func (m *RocmSmiCollector) Init(config json.RawMessage) error { return skip_device } - devices = make([]RocmSmiCollectorDevice, 0) + m.devices = make([]RocmSmiCollectorDevice, 0) for i := 0; i < numDevs; i++ { str_i := fmt.Sprintf("%d", i)