You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I forget where I saw it in the docs/code where it said not to launch a slurm executor from an srun interactive session - which is not quite always possible.
There is a simple workaround - unset SLURM_* env vars and then launch and it works just fine.
or you could of course unset them inside your script as well, which would make the launching even simpler.
That way all SLURM_* env vars will remain intact in your shell environment if you need them for something else.
edit:
I added:
import os
# datatrove fails to start slurm jobs from an interactive slurm job,
# so hack to pretend we aren't inside an interactive slurm job by removing SLURM env vars
for key in os.environ.keys():
if key.startswith("SLURM_"):
os.environ.pop(key)
on top of my script to make it always work.
The text was updated successfully, but these errors were encountered:
stas00
changed the title
solved: how to launch a slurm executor from an already running slurm job
solved: how to launch a slurm executor from an interactive slurm job
Jul 12, 2024
I forget where I saw it in the docs/code where it said not to launch a slurm executor from an
srun
interactive session - which is not quite always possible.There is a simple workaround - unset
SLURM_*
env vars and then launch and it works just fine.Of course, your
srun
session will now be w/o its env vars - which you may or may not care for.To help others to find the solution, the error is likely to be:
There is also this discussion that proposes to unset just
SLURM_CPU_BIND_*
env vars, so you'd then:If you want to unset them just for the datatrove launcher use this one-liner syntax
or you could of course unset them inside your script as well, which would make the launching even simpler.
That way all
SLURM_*
env vars will remain intact in your shell environment if you need them for something else.edit:
I added:
on top of my script to make it always work.
The text was updated successfully, but these errors were encountered: