diff --git a/src/projects/spades/pipeline/spades_pipeline/executors/executor_slurm.py b/src/projects/spades/pipeline/spades_pipeline/executors/executor_slurm.py index 6702ec1c1..9add6a369 100644 --- a/src/projects/spades/pipeline/spades_pipeline/executors/executor_slurm.py +++ b/src/projects/spades/pipeline/spades_pipeline/executors/executor_slurm.py @@ -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}" @@ -30,10 +30,7 @@ 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) @@ -41,9 +38,8 @@ 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" @@ -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) + " " diff --git a/src/projects/spades/pipeline/spades_pipeline/options_parser.py b/src/projects/spades/pipeline/spades_pipeline/options_parser.py index 23a9e017b..7df4ee46e 100644 --- a/src/projects/spades/pipeline/spades_pipeline/options_parser.py +++ b/src/projects/spades/pipeline/spades_pipeline/options_parser.py @@ -811,7 +811,7 @@ def add_cluster_args(pgroup_cluster): pgroup_cluster.add_argument("--grid-queue", metavar="", 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", @@ -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="", action="store") - pgroup_cluster.add_argument("--grid-partition", - dest="grid_partition", - default="lr3", - help="partition for the resource allocation (for SLURM grid enging)", - metavar="", - 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="", action="store")