Skip to content

Slurm: WORKDIR files overwritten on multistep-stage specs #311

Description

@Sinclert

This issue describes an undesirable behaviour found within the SlurmJobManagerCERN class, discovered between Carl Evans (NYU HPC) and myself (NYU CDS).

Context

We are currently trying to run a complex workflow (see madminer-workflow for reference) on REANA 0.7.3, using SLURM as the computational backend. The workflow specification is written in Yadage, and it is totally functional on REANA 0.7.1, when using Kubernetes as the computational backend.

Problem

The problem is found on any Yadage spec. using the multistep-stage scheduler_type value (where multiple "step-jobs" are run in parallel), when those "step-jobs" depend on scattered files to perform their computations.

In those scenarios, the SlurmJobManagerCERN._download_dir function, in addition to be somehow inefficient (it crawls through every file and directory in the SLURM workdir, making each step to scan everything all previous steps created), overrides the whole workflow WORKDIR at the start of each "step-job".

We have recently raised concerns about this behaviour on the REANA Mattermost channel (precisely here) where we thought the problem was due to the publisher_type within the Yadage specification. Turns out that was not the case, but instead it is due to the scheduler_type multistep-stage value.

Testing

We did some preliminary testing to properly identify the scope of the issue.

We are fairly sure the issue is located within the SlurmJobManagerCERN._download_dir function, as we have performed some testing on a custom reana-job-controller Docker image (where we have tuned this function and hardcoded some paths to our needs), and we were able to run the complete workflow successfully

Possible solution

We believe a good patch would involve reducing the scope of the SlurmJobManagerCERN._download_dir function WORKDIR copying procedure, from the "workflow" level to the "step-job" level. That way, there will not be any overriding problems among parallel "step-jobs" within the same workflow stage.

Additional clarifications

This issue has not being detected in any of the workflows you guys use for testing because none of them use multistep-stage scheduler_type values, involving files. See:

@lukasheinrich offered to create a dummy workflow to test this behaviour, but no progress has been done so far (message).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions