runtraj.execution.runner.fetch_shared#

runtraj.execution.runner.fetch_shared(project, location)[source]#

Get the met files of every unfinished simulation, one task at a time, before this task’s share runs.

For the tasks of one Job, such as pods that share a met directory on a volume (runtraj run --task I/N --fetch, which runtraj submit gives each pod with execution.kubernetes.fetch). Each holds the lock FETCH_LOCK at location while it fetches (runtraj.execution.inputs.lock()), so the first downloads the files and the others, waiting their turn, find them and download nothing. Nothing is locked when no met downloads. As for a local run’s fetch, a file that could not be had, or a download a retry may get past, is only logged: each run then tries again.

Parameters:
  • project (Project) – The project, opened here.

  • location (str) – Where every task reads the project’s inputs: the URL they were copied to, or the project folder on a shared volume.

Raises:

OSError – If the lock cannot be made, such as a bucket that cannot be reached.

Return type:

None