Skip to content

SLURM integration #682

Closed
Closed

Description

@guillermo-carrasco

Hi,

I was wondering if there is any plan to adapt a SLURM batch system into toil. I have noticed that you evaluated this a while ago in #18 and #19 , and he conclusion was that SLURM does not meet the use case for Toil, that works with scalable systems like amazon EC2.

I've seen though that you guys provide an abstraction of batch system class here. And there is for example an implementation for LSF.

Unfortunately the documentation on how to implement this class is uncomplete, but having those examples should be possible to do it for SLURM.

Do you guys think its possible and see a fit for this?

Thanks a lot!

Activity

  1. heuermh commented on Feb 16, 2016

    @heuermh

    I've also heard from @chapmanb that SLURM support would be helpful for running bcbio-nextgen on Toil.

    My experience with SLURM has been similar to this comment though, where a static cluster is brought up on EC2 with SLURM, Docker, and NFS to run Nextflow pipelines. If I remember correctly, SLURM handles worker nodes dropping out after initialization, but you can't dynamically add new worker nodes.

  2. hannes-ucsc commented on Feb 16, 2016

    @hannes-ucsc
    Member

    Relates to #19

    It looks to me as if SLURM has two responsibilities: 1) provisioning of nodes and 2) scheduling of nodes tasks. The abstract batch system API would cover 2) while 1) falls into the realm of the upcoming auto-scaling and provisioning support (issues #349, #600 and PR #541).

    We don't have the bandwidth to take this on right now but a PR is always welcome. I would target 2) first. And there would have to be a change to

    https://github.com/BD2KGenomics/cgcloud/blob/master/jenkins/src/cgcloud/jenkins/toil_jenkins_slave.py

    for deploying SLURM on a single node for testing such that we can test the SLURM support on continuous integration.

  3. hannes-ucsc commented on Feb 16, 2016

    @hannes-ucsc
    Member

    s/scheduling of nodes/scheduling of tasks/ above

  4. chapmanb commented on Feb 16, 2016

    @chapmanb
    Contributor

    Hannes and Michael;
    Thanks so much for the discussion. Our use case is on existing local cluster HPC deployments running SLURM, so we wouldn't need node provisioning or in-flight addition of worker nodes. The goal was to have a framework that can run CWL jobs on existing resources and then have the option to scale out to more elastic environments through your AWS/Azure support. If we were to plug SLURM in through the Batch system API, would that be a good fit?

  5. hannes-ucsc commented on Feb 16, 2016

    @hannes-ucsc
    Member

    Yes. When implementing this, the best batch system implementation to use as a model are singleMachine and mesos. If the task submission to SLURM happens via a command line utility as opposed to a library/API, the GridEngine batch system is also worth looking at since it also uses a CLI to submit tasks.

  6. seandavi commented on Feb 16, 2016

    @seandavi

    SLURM is very similar in operation to GridEngine. An alternative to using the command-line approach is to use DRMAA which would, in a sense, align work across batch systems. That said, DRMAA support and availability varies by HPC cluster system.

  7. hannes-ucsc commented on Feb 16, 2016

    @hannes-ucsc
    Member

    It would be preferable if there were a batch system implementation that generically works on every DRMAA-compatible backend. Not only would that open Toil up to more backends but using a full-fledged API might be easier and more efficient than using a CLI and parsing program output. I have never heard of DRMAA until today but if you think it is easier to write a batch system that uses it, go for it.

  8. brainstorm commented on Feb 17, 2016

    @brainstorm
    Contributor

    Other systems like Galaxy use DRMAA alongside other cluster support systems:

    https://github.com/galaxyproject/galaxy/blob/9264d90ea471214b09666b82781acd49d84f19ec/lib/galaxy/jobs/runners/drmaa.py

    Another (perhaps cleaner and newer) abstraction is SAGA:

    https://github.com/radical-cybertools/saga-python

    In any case, I wouldn't wrap the bare cmdline tools, so it's a matter of choosing the best abstraction/dependency.

  9. ohofmann commented on Feb 17, 2016

    @ohofmann

    Maybe for context, this is all part of the same request. We are using bcbio for the Scottish Genome Partnership (and other projects) on several SLURM HPC installations and want to push the CWL functionality a bit further. A quick poll here shows that none of the sites have DRMAA or SAGA deployed, and I'm hoping we can avoid additional dependencies just as @chapmanb managed to wrap pretty much everything on our side in Conda.

    That said, if it's the only reasonable way forward we'll cope ;-)

  10. brainstorm commented on Feb 17, 2016

    @brainstorm
    Contributor

    Fair point, countering my own argument with: ipython-cluster-helper SLURM code.

  11. guillermo-carrasco commented on Feb 17, 2016

    @guillermo-carrasco
    ContributorAuthor

    That pointer may be very helpful @brainstorm , thanks!

  12. guillermo-carrasco commented on Feb 17, 2016

    @guillermo-carrasco
    ContributorAuthor

    Thanks for the references to GridEngine and singleMachine as well @hannes-ucsc . I'll try to implement basic SLURM support by looking at these classes and will submit a Pull Request when I'm done so that you can have a look and give me feedback.

    Thanks all!

  13. added a commit that references this issue on Mar 17, 2016
    0d295b3
  14. added 2 commits that reference this issue on Apr 12, 2016
    2944563
    acd5faf
  15. added a commit that references this issue on Apr 15, 2016
    027390b
  16. self-assigned this
    on Apr 15, 2016
  17. added a commit that references this issue on Apr 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions