From ac204c2cba0b5e12d7045350eaa8f6e0a2d71cd4 Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Tue, 27 Jun 2023 00:06:51 +0000 Subject: [PATCH] mark all ranks known to graph when "all" is specified --- resource/modules/resource_match.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/resource/modules/resource_match.cpp b/resource/modules/resource_match.cpp index 4190443bf..b0b435fe4 100644 --- a/resource/modules/resource_match.cpp +++ b/resource/modules/resource_match.cpp @@ -1114,14 +1114,10 @@ static int grow_resource_db (std::shared_ptr &ctx, static int decode_all (std::shared_ptr &ctx, std::set &ranks) { - unsigned int size = 0; - unsigned int rank = 0; - if (flux_get_size (ctx->h, &size) < -1) { - flux_log (ctx->h, LOG_ERR, "%s: flux_get_size", __FUNCTION__); - return -1; - } - for (rank = 0; rank < size; ++rank) { - auto ret = ranks.insert (static_cast (rank)); + int64_t size = ctx->db->metadata.by_rank.size(); + + for (int64_t rank = 0; rank < size; ++rank) { + auto ret = ranks.insert (rank); if (!ret.second) { errno = EEXIST; return -1;