Skip to content

Commit

Permalink
Fix some defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
asl committed Sep 21, 2024
1 parent fcf0c5c commit 9573ebf
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
class Executor(executors.ExecutorCluster):
grid_engine = "SLURM"
grid_engine_submit_command = "sbatch"
grid_engine_slurm_args = "--hint=compute_bound --mem-bind=verbose,none --exclusive --cpus-per-task {NCPUS} --open-mode=append --kill-on-invalid-dep=yes --mem {MEMORY_MB}M --partition={PARTITION} --account={ACCOUNT} --qos={QOS}"
grid_engine_slurm_args = "--hint=compute_bound --mem-bind=verbose,none --cpus-per-task {NCPUS} --open-mode=append --kill-on-invalid-dep=yes --mem {MEMORY_MB}M --time {TIME} {EXTRA}"
grid_engine_output_option = "-o {OUT}"
grid_engine_err_output_option = "-e {ERR}"
grid_engine_job_name = "--job-name {JOB_NAME}"
Expand All @@ -30,20 +30,16 @@ def join(self, job_name):
log_file = options_storage.args.output_dir + "/spades.log"
cmd = self.grid_engine_submit_command.format(COMMAND="true", JOB_NAME="wait", OUT=log_file, ERR=log_file, NCPUS=1)
cmd += " " + self.grid_engine_dependency_option.format(WAIT_TAG=job_name)
cmd += " " + self.grid_engine_credentials.format(PARTITION=options_storage.args.grid_partition,
ACCOUNT=options_storage.args.grid_account,
QOS=options_storage.args.grid_qos,
QUEUE=options_storage.args.grid_queue)
cmd += " " + self.grid_engine_credentials.format(QUEUE=options_storage.args.grid_queue)
cmd += " --wait"
support.sys_call(cmd, log=self.log)

def get_MPI_sh_preambula(self):
memory_mb = int(options_storage.args.memory * 1024)
preambula = "SLURM_ARGS=\"" + self.grid_engine_slurm_args.format(NCPUS=options_storage.args.threads,
MEMORY_MB=memory_mb,
PARTITION=options_storage.args.grid_partition,
ACCOUNT=options_storage.args.grid_account,
QOS=options_storage.args.grid_qos,
TIME=options_storage.args.grid_time,
EXTRA=options_storage.args.grid_extra,
QUEUE=options_storage.args.grid_queue) + "\"\n"
preambula += "MPIRUN_ARGS=\"" + self.grid_engine_mpirun_args.format(NCPUS=options_storage.args.threads) + "\"\n"
log_file = options_storage.args.output_dir + "/spades.log"
Expand Down Expand Up @@ -99,9 +95,8 @@ def get_command(self, command, prev_id, mpi):
memory_mb = int(options_storage.args.memory * 1024)
cmd += self.grid_engine_slurm_args.format(NCPUS=options_storage.args.threads,
MEMORY_MB=memory_mb,
PARTITION=options_storage.args.grid_partition,
ACCOUNT=options_storage.args.grid_account,
QOS=options_storage.args.grid_qos,
TIME=options_storage.args.grid_time,
EXTRA=options.storage.args.grid_extra,
QUEUE=options_storage.args.grid_queue) + " "
cmd += self.grid_engine_job_name.format(JOB_NAME=command.job_uuid) + " "
cmd += self.grid_engine_err_output_option.format(ERR=log_file) + " "
Expand Down
24 changes: 9 additions & 15 deletions src/projects/spades/pipeline/spades_pipeline/options_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@ def add_cluster_args(pgroup_cluster):
pgroup_cluster.add_argument("--grid-queue",
metavar="<string>",
dest="grid_queue",
default="mpi-rh74",
default="standard",
help="submits the jobs to one of the specified queues",
action="store")
pgroup_cluster.add_argument("--grid-nnodes",
Expand All @@ -825,22 +825,16 @@ def add_cluster_args(pgroup_cluster):
dest="grid_wait",
help="wait for job finish",
action="store_true")
pgroup_cluster.add_argument("--grid-qos",
dest="grid_qos",
default="lr_normal",
help="quality of service for the jobs (for SLURM grid engine)",
pgroup_cluster.add_argument("--grid-extra",
dest="grid_extra",
default="",
help="any extra commands",
metavar="<string>",
action="store")
pgroup_cluster.add_argument("--grid-partition",
dest="grid_partition",
default="lr3",
help="partition for the resource allocation (for SLURM grid enging)",
metavar="<string>",
action="store")
pgroup_cluster.add_argument("--grid-account",
dest="grid_account",
default="ac_scsguest",
help="charge resources used by this run to specified account (for SLURM grid engine)",
pgroup_cluster.add_argument("--grid-time",
dest="grid_time",
default="1:00:00",
help="time limit",
metavar="<string>",
action="store")

Expand Down

0 comments on commit 9573ebf

Please sign in to comment.