Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add bulker support #500

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions divvy_templates/localhost_bulker_template.sub

This file was deleted.

8 changes: 0 additions & 8 deletions divvy_templates/localhost_docker_template.sub

This file was deleted.

9 changes: 0 additions & 9 deletions divvy_templates/localhost_singularity_template.sub

This file was deleted.

8 changes: 0 additions & 8 deletions divvy_templates/localhost_template.sub

This file was deleted.

4 changes: 0 additions & 4 deletions divvy_templates/lsf_template.sub

This file was deleted.

1 change: 0 additions & 1 deletion divvy_templates/sge_template.sub

This file was deleted.

17 changes: 0 additions & 17 deletions divvy_templates/slurm_singularity_template.sub

This file was deleted.

14 changes: 0 additions & 14 deletions divvy_templates/slurm_template.sub

This file was deleted.

6 changes: 6 additions & 0 deletions looper/command_models/arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,3 +281,9 @@ class ArgumentEnum(enum.Enum):
default=(bool, False),
description="Is this command executed for project-level?",
)

BULKER = Argument(
name="bulker",
default=(bool, False),
description="Run bulker",
)
1 change: 1 addition & 0 deletions looper/command_models/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ def create_model(self) -> Type[pydantic.BaseModel]:
ArgumentEnum.SKIP_FILE_CHECKS.value,
ArgumentEnum.COMPUTE.value,
ArgumentEnum.PACKAGE.value,
ArgumentEnum.BULKER.value,
],
)

Expand Down
16 changes: 16 additions & 0 deletions looper/conductor.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ def __init__(
max_jobs=None,
automatic=True,
collate=False,
bulker=False,
):
"""
Create a job submission manager.
Expand Down Expand Up @@ -214,6 +215,20 @@ def __init__(
self._failed_sample_names = []
self._curr_skip_pool = []
self.process_id = None # this is used for currently submitted subprocess
self.bulker = bulker

if bulker:
if "bulker_crate" in self.pl_iface.exp:
crates = []
self.bulker_commands = []
if isinstance(self.pl_iface.exp["bulker_crate"], str):
crates = [self.pl_iface.exp["bulker_crate"]]
elif isinstance(self.pl_iface.exp["bulker_crate"], list):
crates = self.pl_iface.exp["bulker_crate"]
for crate in crates:
bulker_load_cmd = f"bulker load -b -f {crate}"
bulker_load_process = subprocess.Popen(bulker_load_cmd, shell=True)
bulker_load_process.wait()

if self.extra_pipe_args:
_LOGGER.debug(
Expand Down Expand Up @@ -685,6 +700,7 @@ def write_script(self, pool, size):
else EXTRA_SAMPLE_CMD_TEMPLATE
)
templ += extras_template

for sample in pool:
# cascading compute settings determination:
# divcfg < pipeline interface < config < CLI
Expand Down
1 change: 1 addition & 0 deletions looper/looper.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@ def __call__(self, args, top_level_args=None, rerun=False, **compute_kwargs):
max_cmds=getattr(args, "lump_n", None),
max_size=getattr(args, "lump", None),
max_jobs=getattr(args, "lump_j", None),
bulker=getattr(args, "bulker", None),
)
submission_conductors[piface.pipe_iface_file] = conductor

Expand Down
Loading