Conversation
|
@jan-janssen So far I just parallelized at the analysis level, but since the viscosity analysis is too slow, we also need to parallelize inside. In this PR I special-case the viscosity so I can still submit slurm jobs for its internal steps, but it's not very elegant. What is the suggested approach with executorlib for cases like these? |
|
@ltalirz There are two constraints from my side:
Unless there is a strong preference for very small jobs from the job manager perspective or a drastic change in resource requirements, I would recommend to package one user request in one SLURM job and then within this SLRUM job use a nested executor to efficiently use the available resources. |
|
Thanks for the detailed feedback, Jan! My use case here is: At the top level, it makes sense to launch one workflow per analysis, such as CTE, viscosity, elastic constants. However, within each workflow it can be necessary to parallelize again. This is the case for the viscosity workflow, we are talking about many minutes to hours of runtime for each parallel job and, importantly, the parallel jobs may have significantly different runtimes. Now, I could submit one "viscosity" slurm job and then parallelize inside that job, but that would (a) require me to already know how many parallel jobs the viscosity workflow will want to spawn so I know how much computational resources to allocate (doable, but not elegant) and (b) it will be inefficient because the entire reserved resources will be blocked until the slowest of the parallel jobs has completed. Alternatively, I could submit one slurm job per parallel job (which is what I do in this PR), but then I lose the "workflow wrapper" around the viscosity (no caching + I have to use a different codepath than non-parallel workflows that are directly run inside executors, see the code in this PR). Ideally, I would like to do something like: submit a 1-core job for the outer viscosity workflow that essentially just does the steering and data merging (in AiiDA, this comes for free, it is the AiiDA daemon process), which then launches dynamically as many parallel computation jobs as needed. Re 1.: We do currently have some jobs that run just for a few seconds, where we could probably gain a bit by not running them through slurm, but they are few and the few seconds we lose here are not relevant in the big picture (on the upside we get the caching), see below
Re 2.: In this particular case, a cache of the intermediate jobs would be nice to have, but not mandatory. |
|
I am a bit confused. Based on the user input, do you know how many tasks you are going to create in the workflow? Or is the number of tasks only determined at run time? If the number of tasks is only determined at run time, then this requires hierarchical scheduling, because job schedulers like SLURM do not support this. In terms of the comparison to AiiDA, you can create a local flux server and use it for short running tasks. In this case you would submit the whole workflow to this flux scheduler and inside this flux job submit the individual tasks to SLURM. The question for me is do you want to keep these flux jobs running while the SLURM jobs are waiting or is the task stopped after the individual steps are submitted to SLURM. In general to me this comes down to the difference of caching and data management. Executorlib does caching, so when you submit the same task we can reload the result, still we do not claim to provide a research data management solution. So I would split the workflow into individual steps but having a hierarchy of caching is not something we provide at the moment. |

No description provided.