Emit rank information after ovni_thread_init

This commit is contained in:
Rodrigo Arias 2024-09-13 08:58:33 +02:00
parent 16dbc8bf5d
commit 7522886d3f
4 changed files with 4 additions and 5 deletions

View File

@ -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);

View File

@ -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) {

View File

@ -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 */

View File

@ -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++)