diff --git a/ci/hermes/packages/hermes/package.py b/ci/hermes/packages/hermes/package.py index 2533343e2..d6abae443 100644 --- a/ci/hermes/packages/hermes/package.py +++ b/ci/hermes/packages/hermes/package.py @@ -38,6 +38,7 @@ class Hermes(CMakePackage): variant('only_verbs', default=False, description='Only verbs') variant('debug', default=False, description='Build shared libraries') variant('zmq', default=False, description='Build ZeroMQ tests') + variant('adios', default=False, description='Build Adios tests') depends_on('mochi-thallium~cereal@0.10.1') depends_on('catch2@3.0.1') diff --git a/hrun/include/hrun/work_orchestrator/worker.h b/hrun/include/hrun/work_orchestrator/worker.h index f0e0ac9a0..e7c1a68c9 100644 --- a/hrun/include/hrun/work_orchestrator/worker.h +++ b/hrun/include/hrun/work_orchestrator/worker.h @@ -302,6 +302,23 @@ class Worker { } } + /** Allocate a stack for a task */ + void* AllocateStack() { + void *stack; + if (!stacks_.pop(stack).IsNull()) { + return stack; + } + return malloc(stack_size_); + } + + /** Free a stack */ + void FreeStack(void *stack) { + if(!stacks_.emplace(stack).IsNull()) { + return; + } + stacks_.Resize(stacks_.size() + num_stacks_); + } + /**=============================================================== * Run tasks * =============================================================== */ @@ -357,54 +374,6 @@ class Worker { } } - /** Print all queues */ - void PrintQueues(bool no_long_run = false) { - for (std::unique_ptr &worker : HRUN_WORK_ORCHESTRATOR->workers_) { - for (WorkEntry &work_entry : worker->work_queue_) { - Lane *&lane = work_entry.lane_; - LaneData *entry; - int off = 0; - while (!lane->peek(entry, off).IsNull()) { - Task *task = HRUN_CLIENT->GetMainPointer(entry->p_); - TaskState *exec = HRUN_TASK_REGISTRY->GetTaskState(task->task_state_); - bool is_remote = task->domain_id_.IsRemote(HRUN_RPC->GetNumHosts(), - HRUN_CLIENT->node_id_); - if (no_long_run && task->IsLongRunning()) { - off += 1; - continue; - } - HILOG(kInfo, - "(node {}, worker {}) Task {} state {}, method {}, is remote: {}, long_running: {}", - HRUN_CLIENT->node_id_, - worker->id_, - task->task_node_, - exec->name_, - task->method_, - is_remote, - task->IsLongRunning()); - off += 1; - } - } - } - } - - /** Allocate a stack for a task */ - void* AllocateStack() { - void *stack; - if (!stacks_.pop(stack).IsNull()) { - return stack; - } - return malloc(stack_size_); - } - - /** Free a stack */ - void FreeStack(void *stack) { - if(!stacks_.emplace(stack).IsNull()) { - return; - } - stacks_.Resize(stacks_.size() + num_stacks_); - } - /** Run an iteration over a particular queue */ HSHM_ALWAYS_INLINE void PollGrouped(WorkEntry &work_entry, bool flushing) { @@ -609,6 +578,37 @@ class Worker { off += 1; } } + + /** Print all queues */ + void PrintQueues(bool no_long_run = false) { + for (std::unique_ptr &worker : HRUN_WORK_ORCHESTRATOR->workers_) { + for (WorkEntry &work_entry : worker->work_queue_) { + Lane *&lane = work_entry.lane_; + LaneData *entry; + int off = 0; + while (!lane->peek(entry, off).IsNull()) { + Task *task = HRUN_CLIENT->GetMainPointer(entry->p_); + TaskState *exec = HRUN_TASK_REGISTRY->GetTaskState(task->task_state_); + bool is_remote = task->domain_id_.IsRemote(HRUN_RPC->GetNumHosts(), + HRUN_CLIENT->node_id_); + if (no_long_run && task->IsLongRunning()) { + off += 1; + continue; + } + HILOG(kInfo, + "(node {}, worker {}) Task {} state {}, method {}, is remote: {}, long_running: {}", + HRUN_CLIENT->node_id_, + worker->id_, + task->task_node_, + exec->name_, + task->method_, + is_remote, + task->IsLongRunning()); + off += 1; + } + } + } + } }; } // namespace hrun