From 7522886d3fb1ad43aa052665e64944f54b2563bf Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Date: Fri, 13 Sep 2024 08:58:33 +0200 Subject: [PATCH] Emit rank information after ovni_thread_init --- test/emu/common/instr.h | 3 +-- test/emu/nosv/multiple-segment.c | 2 +- test/emu/ovni/clockgate.c | 2 +- test/emu/ovni/merge-cpus-loom.c | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/test/emu/common/instr.h b/test/emu/common/instr.h index 85f7e6a..12061f1 100644 --- a/test/emu/common/instr.h +++ b/test/emu/common/instr.h @@ -102,12 +102,11 @@ instr_start(int rank, int nranks) ovni_version_check(); ovni_proc_init(1, rankname, getpid()); + ovni_thread_init(get_tid()); if (nranks > 0) ovni_proc_set_rank(rank, nranks); - ovni_thread_init(get_tid()); - /* All ranks inform CPUs */ for (int i = 0; i < nranks; i++) ovni_add_cpu(i, i); diff --git a/test/emu/nosv/multiple-segment.c b/test/emu/nosv/multiple-segment.c index ea037c5..8e2aee9 100644 --- a/test/emu/nosv/multiple-segment.c +++ b/test/emu/nosv/multiple-segment.c @@ -31,8 +31,8 @@ main(void) die("snprintf failed"); ovni_proc_init(1 + app, loom, getpid()); - ovni_thread_init(get_tid()); ovni_proc_set_rank(rank, nranks); + ovni_thread_init(get_tid()); /* Leader of the segment, must emit CPUs */ if (rank % N == 0) { diff --git a/test/emu/ovni/clockgate.c b/test/emu/ovni/clockgate.c index 66ed98e..24c4152 100644 --- a/test/emu/ovni/clockgate.c +++ b/test/emu/ovni/clockgate.c @@ -37,8 +37,8 @@ start_delayed(int rank, int nranks) ovni_version_check(); ovni_proc_init(1, rankname, getpid()); - ovni_proc_set_rank(rank, nranks); ovni_thread_init(get_tid()); + ovni_proc_set_rank(rank, nranks); instr_require("ovni"); /* All ranks inform CPUs */ diff --git a/test/emu/ovni/merge-cpus-loom.c b/test/emu/ovni/merge-cpus-loom.c index 746c06b..7d6f950 100644 --- a/test/emu/ovni/merge-cpus-loom.c +++ b/test/emu/ovni/merge-cpus-loom.c @@ -19,8 +19,8 @@ start(int rank, int nranks) /* Only one loom */ ovni_proc_init(1, hostname, getpid()); - ovni_proc_set_rank(rank, nranks); ovni_thread_init(get_tid()); + ovni_proc_set_rank(rank, nranks); /* Only emit a subset of CPUs up to the rank number */ for (int i = 0; i <= rank; i++)