Skip to content

Accessing worker ID #628

Answered by Kobzol
Schlevidon asked this question in Q&A
Oct 13, 2023 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Hi :)
Regarding worker-start-cmd, this is a bit complicated. The start command is executed within a PBS/Slurm allocation even before a HQ worker is started, something like this:

#PBS ...
<worker-start-cmd>
hq worker start
<worker-stop-cmd>

Therefore, it's not really possible to know the worker ID here (at least with the current design), because the worker hasn't been started yet at the moment when worker-start-cmd is executed.

Regarding worker ID, workers are not assigned to jobs, but to individual tasks within a job. But even then it's not so simple! Because we have multi-node tasks, so a single task might have multiple workers, and furthermore, if a worker fails while executing a task, …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Schlevidon
Comment options

Answer selected by Schlevidon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants