Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make SLURM plugin smarter #771

Open
ribab opened this issue Dec 17, 2018 · 1 comment
Open

Make SLURM plugin smarter #771

ribab opened this issue Dec 17, 2018 · 1 comment

Comments

@ribab
Copy link
Contributor

ribab commented Dec 17, 2018

SLURM plguin (And other related plugins like ALPS) should be smarter

  • To log invaluable debug information such as SLURM JOB ID
  • To provide easy interface for controlling/using reservations and partitions
  • To be more general and not only support certain commands
  • To add a unique and auto-generated SLURM JOB NAME

The code could also be cleaned up

@DebRez
Copy link
Contributor

DebRez commented Dec 18, 2018

Here is the code I am using to use srun in an salloc with Open MPI. Starts around line 443 of SLURM.py. Will this interfere with anyone else's use case? It also makes SLURM.py more specific rather than making it more general. @ribab

    # Add support for srun in --no-shell allocation
    if self.allocated and (cmds['command'] == 'srun') and ("--job-name" in cmds['allocate_cmd']
        parseAllocate_cmd = cmds['allocate_cmd'].split()
        for word in parseAllocate_cmd:
            word = word.strip()
            if '--job-name' in word:
                jobname = word[11:]
        jobid = int(subprocess.check_output(['squeue', '--noheader', '--format', '%i', '--name'
        cmdargs.append('--jobid=%d' % (jobid))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants