-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #84 from nesi/dini-dev
fixing bugs related to snakemake profile and correct the order in submit.sh
- Loading branch information
Showing
12 changed files
with
1,036 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# | ||
# Based on lsf CookieCutter.py | ||
# | ||
import os | ||
import json | ||
|
||
d = os.path.dirname(__file__) | ||
with open(os.path.join(d, "settings.json")) as fh: | ||
settings = json.load(fh) | ||
|
||
|
||
def from_entry_or_env(values, key): | ||
"""Return value from ``values`` and override with environment variables.""" | ||
if key in os.environ: | ||
return os.environ[key] | ||
else: | ||
return values[key] | ||
|
||
|
||
class CookieCutter: | ||
|
||
SBATCH_DEFAULTS = from_entry_or_env(settings, "SBATCH_DEFAULTS") | ||
CLUSTER_NAME = from_entry_or_env(settings, "CLUSTER_NAME") | ||
CLUSTER_CONFIG = from_entry_or_env(settings, "CLUSTER_CONFIG") | ||
|
||
@staticmethod | ||
def get_cluster_option() -> str: | ||
cluster = CookieCutter.CLUSTER_NAME | ||
if cluster != "": | ||
return f"--cluster={cluster}" | ||
return "" | ||
|
||
@staticmethod | ||
def get_cluster_logpath() -> str: | ||
return "logs/slurm/%r/%j" | ||
|
||
@staticmethod | ||
def get_cluster_jobname() -> str: | ||
return "%r_%w" |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
|
||
cluster-sidecar: "slurm-sidecar.py" | ||
cluster-cancel: "scancel" | ||
restart-times: "2" | ||
jobscript: "slurm-jobscript.sh" | ||
cluster: "slurm-submit.py" | ||
cluster-status: "slurm-status.py" | ||
max-jobs-per-second: "10" | ||
max-status-checks-per-second: "10" | ||
local-cores: 1 | ||
latency-wait: "5" | ||
use-conda: "False" | ||
use-singularity: "False" | ||
jobs: "500" | ||
printshellcmds: "True" | ||
|
||
# Example resource configuration | ||
# default-resources: | ||
# - runtime=100 | ||
# - mem_mb=6000 | ||
# - disk_mb=1000000 | ||
# # set-threads: map rule names to threads | ||
# set-threads: | ||
# - single_core_rule=1 | ||
# - multi_core_rule=10 | ||
# # set-resources: map rule names to resources in general | ||
# set-resources: | ||
# - high_memory_rule:mem_mb=12000 | ||
# - long_running_rule:runtime=1200 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"SBATCH_DEFAULTS": "", | ||
"CLUSTER_NAME": "eri", | ||
"CLUSTER_CONFIG": "" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
# properties = {properties} | ||
{exec_job} |
Oops, something went wrong.