From e70d3770472aeed2d1db8023704e8cf7886bd5ee Mon Sep 17 00:00:00 2001 From: Joachim Meyer Date: Thu, 29 Jun 2023 10:01:19 +0200 Subject: [PATCH] Make gpu map script return the normalized node names already. --- scripts/map-gpu-ids.py | 2 +- src/htcondor_cc_sync_plugin.cpp | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/map-gpu-ids.py b/scripts/map-gpu-ids.py index e0bf183..6d0f190 100644 --- a/scripts/map-gpu-ids.py +++ b/scripts/map-gpu-ids.py @@ -43,5 +43,5 @@ if __name__ == "__main__": machines = fetch_condor_machines() mappings = {} for machine in machines: - mappings[machine] = mapping_for_machine(machine) + mappings[machine.split(".")[0]] = mapping_for_machine(machine) print(json.dumps(mappings)) diff --git a/src/htcondor_cc_sync_plugin.cpp b/src/htcondor_cc_sync_plugin.cpp index f1cdb3d..b419776 100644 --- a/src/htcondor_cc_sync_plugin.cpp +++ b/src/htcondor_cc_sync_plugin.cpp @@ -46,6 +46,8 @@ static const std::unordered_map jobStateMap = { void CCSyncPlugin::earlyInitialize() { lock_guard guard(data_mutex); + dprintf(D_ALWAYS, "Early initializing CCSync plugin.\n"); + param(url, "CCSYNC_URL"); if (url.empty()) dprintf(D_ALWAYS, "WARNING: missing CCSYNC_URL in local config!\n"); @@ -86,7 +88,7 @@ void CCSyncPlugin::earlyInitialize() { void CCSyncPlugin::initialize() { lock_guard guard(data_mutex); - // dprintf(D_ALWAYS, "Initializing TCP Forwarding plugin.\n"); + dprintf(D_ALWAYS, "Initializing CCSync plugin.\n"); initializing = false; } @@ -205,7 +207,8 @@ void CCSyncPlugin::setAttribute(const char *key, const char *_name, // dprintf(D_FULLDEBUG,"Assigning attribute to JobId %d.%d\n", clusterId, // procId); currentStatus[clusterId][procId][name] = value; - // dprintf(D_FULLDEBUG, "[%d.%d] %s: %s\n", clusterId, procId, name.c_str(), + // dprintf(D_FULLDEBUG, "[%d.%d] %s: %s\n", clusterId, procId, + // name.c_str(), // value.c_str()); if (!initializing) { // HTCondor bug? We should'n be receiving events // before initialization is done. We will ignore them