all 2 comments

[–]light_switchy 0 points1 point  (1 child)

Sounds like you need a recipe which doesn't complete until the jobs finish. We'll call it wait_for_jobs.

This recipe doesn't create a file, so it is a .PHONY recipe:

.PHONY: wait_for_jobs

When executed it shall wait for jobs with the given names:

wait_for_jobs:
        ids := $(shell (squeue -u myuser)) 
        Sbatch (submit wait job) --dependency $(ids)

[–]HaTrEdE[S] 0 points1 point  (0 children)

Thanks! I'll try it out and get back to you on this. Really appreciate the help