diff --git a/src/rt/ovni.c b/src/rt/ovni.c index 3c85692..dd19833 100644 --- a/src/rt/ovni.c +++ b/src/rt/ovni.c @@ -188,8 +188,8 @@ ovni_add_cpu(int index, int phyid) if (!rproc.ready) die("process not yet initialized"); - if (rproc.meta == NULL) - die("metadata not initialized"); + if (!rthread.ready) + die("thread not yet initialized"); struct ovni_rcpu *cpu = malloc(sizeof(*cpu)); if (cpu == NULL) diff --git a/test/emu/nosv/multiple-segment.c b/test/emu/nosv/multiple-segment.c index 3285fcb..ea037c5 100644 --- a/test/emu/nosv/multiple-segment.c +++ b/test/emu/nosv/multiple-segment.c @@ -27,10 +27,11 @@ main(void) int app = rank / N; char loom[128]; - if (snprintf(loom, 128, "loom.%04d", app) >= 128) + if (snprintf(loom, 128, "node0.%04d", app) >= 128) die("snprintf failed"); ovni_proc_init(1 + app, loom, getpid()); + ovni_thread_init(get_tid()); ovni_proc_set_rank(rank, nranks); /* Leader of the segment, must emit CPUs */ @@ -39,13 +40,13 @@ main(void) for (int i = 0; i < N; i++) { cpus[i] = app * N + i; ovni_add_cpu(i, cpus[i]); + info("adding cpu %d to rank %d", i, rank); } } int nlooms = nranks / N; int lcpu = rank % N; - ovni_thread_init(get_tid()); instr_require("ovni"); instr_nosv_init(); instr_thread_execute(lcpu, -1, 0);