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
Hi,
I've got a question/problem - what is the reason of hard-coding the number of tasks to 1?
This is problematic in some way for me because in my scenario I want to run multiple-node jobs and it is impossible with current generation of job_header.
Example:
I have a cluster of nodes with 24 CPUs per each and initialize my SLURMCluster like that
from dask.distributed import Client
from dask_jobqueue import SLURMCluster
cluster = SLURMCluster(name='dask_test',
queue='qwe123',
memory='1GB',
processes=48, # 2 times 24 since I want double-node job
threads=2, # combined with number of processes gives 96 cores
interface='ib0',
walltime='00:10:00',
job_cpu=1, # 1 CPU per each task
job_extra=['--nodes=2', '--ntasks-per-node=24'])
And because of -n argument it won't create double-node jobs. So I've got to remove that from job header manually.
Maybe the number of tasks should be also an argument for cluster initialization and if it will be None the -n sbatch argument would not appear in job header? What I mean is a more flexible way of job_header creation.
The keywords that you specify at construction time are per-node. If you
want two nodes then you specify this when you ask for workers with
cluster.scale(2)
On Fri, May 18, 2018 at 6:54 AM, AdamWlodarczyk ***@***.***> wrote:
Hi,
I've got a question/problem - what is the reason of hard-coding the number
of tasks to 1?
This is problematic in some way for me because in my scenario I want to
run multiple-node jobs and it is impossible with current generation of
job_header.
Example:
I have a cluster of nodes with 24 CPUs per each and initialize my
SLURMCluster like that
from dask.distributed import Client
from dask_jobqueue import SLURMCluster
cluster = SLURMCluster(name='dask_test',
queue='parrtition123',
memory='1GB',
processes=48, # 2 times 24 since I want double-node job
threads=2, # combined with number of processes gives 96 cores
interface='ib0',
walltime='00:10:00',
job_cpu=1, # 1 CPU per each task
job_extra=['--nodes=2', '--ntasks-per-node=24'])
Such declaration gives me following job header:
In [22]: cluster.job_header
Out[22]: '#SBATCH -J dask_test\n#SBATCH -e dask_test.err\n#SBATCH -o dask_test.out\n#SBATCH -p devel\n#SBATCH -n 1\n#SBATCH --cpus-per-task=1\n#SBATCH --mem=45G\n#SBATCH -t 00:10:00\n#SBATCH --nodes=2\n#SBATCH --ntasks-per-node=24'
And because of -n argument it won't create double-node jobs. So I've got
to remove that from job header manually.
Maybe the number of tasks should be also an argument for cluster
initialization and if it will be None the -n sbatch argument would not
appear in job header? What mean is more flexible way of job_header
creation.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#62>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AASszOzbXmUug9dJ5z7vm1AdDnIGQmL2ks5tzqhPgaJpZM4UEiC0>
.
Got it but I am talking about case when I want to run a dask-worker within multiple-node environment created by sbatch script (e.g. task requires more CPUs than one node has).
cc @ocaisa
Each dask worker only runs on a single node. Dask-jobqueue works by submitting many single-node scripts, one for each dask worker. The dask workers will connect up to each other after they start.
You're still going to have many nodes that will communicate with each other, you're just going to get these many nodes by asking for them one-at-a-time
What @AdamWlodarczyk is trying to describe is the case where each we want a single Dask worker for a set of nodes attached to a single job. Our use case is a task that forks out an srun process which can consume the entire resources allocated to the job. The current syntax doesn't allow us to do this since we would need to overwrite the #SBATCH -n 1\n#SBATCH --cpus-per-task=1...but come to think of it, I wonder if we can just override the default values via job_extra
As @mrocklin mentionned, this was not the initial idea of dask-jobqueue to launch multi nodes job at once. I believe this is also because initial development was done with PBS if I am not mistaken.
From the few I've seen, Slurm is much more powerfull and versatile, and it is probably possible to easily launch jobs that spawn dask-worker processes on multiple nodes at once. By easily I mean just by slightly modifying the job script.
Feel free to work on a pull request doing this 🙂 ! This could be a nice option.
The case I can think of is if you want to be sure to have a given computing power for a known amount of time.
Dask-jobqueue is great for interactive analysis, where we can varry the number of workers. But in some production cases, we may want to know for sure we have a fixed amount of resources for a computation.
Activity
mrocklin commentedon May 18, 2018
AdamWlodarczyk commentedon May 18, 2018
Got it but I am talking about case when I want to run a dask-worker within multiple-node environment created by sbatch script (e.g. task requires more CPUs than one node has).
cc @ocaisa
mrocklin commentedon May 18, 2018
Each dask worker only runs on a single node. Dask-jobqueue works by submitting many single-node scripts, one for each dask worker. The dask workers will connect up to each other after they start.
You're still going to have many nodes that will communicate with each other, you're just going to get these many nodes by asking for them one-at-a-time
AdamWlodarczyk commentedon May 18, 2018
I see. Well, thanks for clarification. Issue can be closed.
Great package BTW!
ocaisa commentedon May 18, 2018
What @AdamWlodarczyk is trying to describe is the case where each we want a single Dask worker for a set of nodes attached to a single job. Our use case is a task that forks out an
srunprocess which can consume the entire resources allocated to the job. The current syntax doesn't allow us to do this since we would need to overwrite the#SBATCH -n 1\n#SBATCH --cpus-per-task=1...but come to think of it, I wonder if we can just override the default values viajob_extraguillaumeeb commentedon May 18, 2018
As @mrocklin mentionned, this was not the initial idea of dask-jobqueue to launch multi nodes job at once. I believe this is also because initial development was done with PBS if I am not mistaken.
From the few I've seen, Slurm is much more powerfull and versatile, and it is probably possible to easily launch jobs that spawn dask-worker processes on multiple nodes at once. By easily I mean just by slightly modifying the job script.
Feel free to work on a pull request doing this 🙂 ! This could be a nice option.
mrocklin commentedon May 18, 2018
Is there an advantage to running few jobs that launch multiple dask-workers vs many jobs that launch one dask-worker each?
guillaumeeb commentedon May 19, 2018
The case I can think of is if you want to be sure to have a given computing power for a known amount of time.
Dask-jobqueue is great for interactive analysis, where we can varry the number of workers. But in some production cases, we may want to know for sure we have a fixed amount of resources for a computation.