Skip to content

Added max-cpu-factor, max-mem-factor and --customTag #1

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

GallVp
Copy link

@GallVp GallVp commented Apr 15, 2025

Hi @edwinyyyu

cc. @sateeshperi

I am testing the profile with verkko and have made a couple of changes that I hope can be generally useful. Kindly see the changelog.

@@ -46,3 +50,17 @@ def __init__(self, config_file=_CONFIG_FILE):

def parameters(self):
return self._parameters

def max_cpu_factor(self):
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These parameters make the profile behave similar to nf-float.

The maxFactors are very useful for finding spot instances when running lots of jobs of the same kind in parallel.

@@ -69,6 +75,11 @@ def submit_job(self, job_file):
cmd.extend(['--job', job_file])
cmd.extend(shlex.split(config_parameters.get('submit-extra', '')))

rule_name = job_properties.get('rule')
cmd.extend(['--customTag', f"nextflow-io-run-name:{job_prefix}"])
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is sort of a hack of a hack to bundle the jobs into a workflow on MM Cloud OpCentre. I feel we should document this behaviour on https://docs.memverge.com/MMCloud/latest/. The nextflow-io bit can be misleading for the users, though.

LOG_FILE = (
'.snakemake/log/'
f"{os.environ.get('SNAKEMAKE_CLUSTER_SIDECAR_VARS', 'snakemake')}"
'.float.log'
)

log_level = os.environ.get('SNAKEMAKE_FLOAT_LOG_LEVEL', 'INFO')
match log_level:
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was not supported by Python 3.9 which is what verkko requires.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant