Skip to content

Make slurm job name accesible in all tasks #67

@Trophime

Description

@Trophime

Hi,
would it be possible to somehow get the slurm_id_job out of the submission to be able to
notify the user of the output of the slurm job by, for instance, sending email in the revert step?

for instance in workload_manager.py in submit_job method :

        output, exit_code = self._execute_shell_command(ssh_client,
                                                        call,
                                                        workdir=workdir,
                                                        wait_result=True)
        if exit_code is not 0:
            logger.error("Job submission '" + call + "' exited with code " +
                         str(exit_code) + ":\n" + output)
            return False        
        else:
            slurm_job_id = output.replace("Submitted batch job ",'').strip()
            logger.info("slurm_job_id=%s"%slurm_job_id)

the trouble is how to get slurm_job_id accessible from the rest of the code...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions