diff --git a/pando-rt/src/drvx/cores.cpp b/pando-rt/src/drvx/cores.cpp index 32849566..0820d193 100644 --- a/pando-rt/src/drvx/cores.cpp +++ b/pando-rt/src/drvx/cores.cpp @@ -85,6 +85,7 @@ bool Cores::CoreActiveFlag::operator*() const noexcept { } Cores::TaskQueue* Cores::getTaskQueue(Place place) noexcept { + if(*toNativeDrvPtr(coreState, place) != +CoreState::Ready) return nullptr; return *toNativeDrvPtr(coreQueue, place); } diff --git a/pando-rt/src/execute_on.cpp b/pando-rt/src/execute_on.cpp index 131721d0..1340c227 100644 --- a/pando-rt/src/execute_on.cpp +++ b/pando-rt/src/execute_on.cpp @@ -44,7 +44,7 @@ Status detail::executeOn(Place place, Task task) { auto* queue = Cores::getTaskQueue(place); const auto result = queue->enqueue(std::move(task)); - hartYield(); + //hartYield(); return result; #else diff --git a/pando-rt/src/start.cpp b/pando-rt/src/start.cpp index a7ebe1e6..6854e594 100644 --- a/pando-rt/src/start.cpp +++ b/pando-rt/src/start.cpp @@ -81,7 +81,7 @@ extern "C" int __start(int argc, char** argv) { case SchedulerFailState::STEAL: for(std::int8_t i = 0; i <= coreDims.x && !task.has_value(); i++) { auto* otherQueue = pando::Cores::getTaskQueue(pando::Place{thisPlace.node, thisPlace.pod, pando::CoreIndex(i, 0)}); - if(otherQueue == queue) {continue;} + if(!otherQueue || otherQueue == queue) {continue;} if(otherQueue->getApproxSize() > STEAL_THRESH_HOLD_SIZE) { task = otherQueue->tryDequeue(); }