From d33a0173dba7990deb63382c7f7239d325be54bd Mon Sep 17 00:00:00 2001 From: Lucas Schnorr Date: Sun, 10 Apr 2011 09:59:48 +0200 Subject: [PATCH] if smpi is ungrouped, processes behavior is registered as child of root type details: - some checks in recursive get container --- src/instr/instr_paje.c | 2 ++ src/instr/instr_smpi.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/instr/instr_paje.c b/src/instr/instr_paje.c index 8b300ed22c..1bc7133d36 100644 --- a/src/instr/instr_paje.c +++ b/src/instr/instr_paje.c @@ -233,6 +233,7 @@ container_t newContainer (const char *name, e_container_types kind, container_t static container_t recursiveGetContainer (const char *name, container_t root) { + if (name == NULL || root == NULL) return NULL; if (strcmp (root->name, name) == 0) return root; xbt_dict_cursor_t cursor = NULL; @@ -247,6 +248,7 @@ static container_t recursiveGetContainer (const char *name, container_t root) container_t getContainer (const char *name) { + if (name == NULL) return NULL; return recursiveGetContainer(name, rootContainer); } diff --git a/src/instr/instr_smpi.c b/src/instr/instr_smpi.c index 130bc2635a..c06d40ad80 100644 --- a/src/instr/instr_smpi.c +++ b/src/instr/instr_smpi.c @@ -111,7 +111,7 @@ void TRACE_smpi_init(int rank) if (TRACE_smpi_is_grouped()){ father = getContainer (SIMIX_host_self_get_name()); }else{ - father = getContainer ("0"); + father = getRootContainer (); } xbt_assert(father!=NULL, "Could not find a parent for mpi rank %s at function %s", str, __FUNCTION__); -- 2.20.1