Commit ce7ade14 by Alexandre Routier

Remove completely SLURM from CLI of every pipeline

parent dd3e2c8b
Pipeline #1389 failed with stages
in 3 minutes 27 seconds
......@@ -98,7 +98,5 @@ class DwiPreprocessingNoddiCLI(ce.CmdParser):
if args.n_procs:
pipeline.run(plugin='MultiProc',
plugin_args={'n_procs': args.n_procs})
elif args.slurm:
pipeline.run(plugin='SLURM')
else:
pipeline.run()
......@@ -64,7 +64,5 @@ class DWIPreprocessingUsingPhaseDiffFieldmapCLI(ce.CmdParser):
if args.n_procs:
pipeline.run(plugin='MultiProc',
plugin_args={'n_procs': args.n_procs})
elif args.slurm:
pipeline.run(plugin='SLURM')
else:
pipeline.run()
......@@ -64,7 +64,5 @@ class DWIPreprocessingUsingT1CLI(ce.CmdParser):
if args.n_procs:
pipeline.run(plugin='MultiProc',
plugin_args={'n_procs': args.n_procs})
elif args.slurm:
pipeline.run(plugin='SLURM')
else:
pipeline.run()
......@@ -54,7 +54,5 @@ class DWIProcessingDTICLI(ce.CmdParser):
if args.n_procs:
pipeline.run(plugin='MultiProc',
plugin_args={'n_procs': args.n_procs})
elif args.slurm:
pipeline.run(plugin='SLURM')
else:
pipeline.run()
......@@ -80,6 +80,7 @@ class DwiProcessingNoddiCLI(ce.CmdParser):
args.working_directory = mkdtemp()
pipeline.base_dir = self.absolute_path(args.working_directory)
if args.n_procs:
pipeline.run(plugin='MultiProc', plugin_args={'n_procs': args.n_procs})
pipeline.run(plugin='MultiProc',
plugin_args={'n_procs': args.n_procs})
else:
pipeline.run()
......@@ -49,9 +49,6 @@ class PetSurfaceCLI(ce.CmdParser):
clinica_opt.add_argument("-np", "--n_procs",
metavar=('N'), type=int,
help='Number of cores to use when running the pipeline in parallel (default: --n_procs 1).')
# clinica_opt.add_argument("-sl", "--slurm",
# action='store_true',
# help='Run the pipelines using SLURM')
def run_command(self, args):
......
......@@ -56,8 +56,6 @@ class PETVolumeCLI(ce.CmdParser):
help='Temporary directory to store pipelines intermediate results')
self._args.add_argument("-np", "--n_procs", type=int,
help='Number of cores used to run in parallel')
self._args.add_argument("-sl", "--slurm", action='store_true',
help='Run the pipelines using SLURM')
def run_command(self, args):
"""
......@@ -66,11 +64,11 @@ class PETVolumeCLI(ce.CmdParser):
from pet_volume_pipeline import PETVolume
pipeline = PETVolume(bids_directory=self.absolute_path(args.bids_directory),
caps_directory=self.absolute_path(args.caps_directory),
tsv_file=self.absolute_path(args.subjects_sessions_tsv),
group_id=args.group_id,
fwhm_tsv=self.absolute_path(args.fwhm_tsv)
)
caps_directory=self.absolute_path(args.caps_directory),
tsv_file=self.absolute_path(args.subjects_sessions_tsv),
group_id=args.group_id,
fwhm_tsv=self.absolute_path(args.fwhm_tsv)
)
pipeline.parameters.update({'pet_type': args.pet_type,
'mask_tissues': args.mask_tissues,
......@@ -84,7 +82,5 @@ class PETVolumeCLI(ce.CmdParser):
if args.n_procs:
pipeline.run(plugin='MultiProc', plugin_args={'n_procs': args.n_procs})
elif args.slurm:
pipeline.run(plugin='SLURM')
else:
pipeline.run()
......@@ -165,9 +165,8 @@ class StatisticsSurfaceCLI(ce.CmdParser):
pipeline.tsv_file)
if args.n_procs:
#pipeline.write_graph()
pipeline.run(plugin='MultiProc', plugin_args={'n_procs': args.n_procs})
pipeline.run(plugin='MultiProc',
plugin_args={'n_procs': args.n_procs})
else:
#pipeline.write_graph()
print(pipeline.parameters)
pipeline.run()
......@@ -65,10 +65,8 @@ class T1FreeSurferCrossSectionalCLI(ce.CmdParser):
args.working_directory = mkdtemp()
pipeline.base_dir = self.absolute_path(args.working_directory)
# run the pipelines in n_procs cores based on your computation power.
if args.n_procs:
# pipeline.write_graph()
pipeline.run(plugin='MultiProc', plugin_args={'n_procs': args.n_procs})
pipeline.run(plugin='MultiProc',
plugin_args={'n_procs': args.n_procs})
else:
# pipeline.write_graph()
pipeline.run()
......@@ -41,8 +41,6 @@ class T1VolumeCreateDartelCLI(ce.CmdParser):
help='Temporary directory to store pipelines intermediate results')
self._args.add_argument("-np", "--n_procs", type=int,
help='Number of cores used to run in parallel')
self._args.add_argument("-sl", "--slurm", action='store_true',
help='Run the pipelines using SLURM')
def run_command(self, args):
"""
......@@ -61,8 +59,7 @@ class T1VolumeCreateDartelCLI(ce.CmdParser):
pipeline.base_dir = self.absolute_path(args.working_directory)
if args.n_procs:
pipeline.run(plugin='MultiProc', plugin_args={'n_procs': args.n_procs})
elif args.slurm:
pipeline.run(plugin='SLURM')
pipeline.run(plugin='MultiProc',
plugin_args={'n_procs': args.n_procs})
else:
pipeline.run()
......@@ -51,8 +51,6 @@ class T1VolumeDartel2MNICLI(ce.CmdParser):
help='Temporary directory to store pipelines intermediate results')
self._args.add_argument("-np", "--n_procs", type=int,
help='Number of cores used to run in parallel')
self._args.add_argument("-sl", "--slurm", action='store_true',
help='Run the pipelines using SLURM')
def run_command(self, args):
"""
......@@ -78,7 +76,5 @@ class T1VolumeDartel2MNICLI(ce.CmdParser):
if args.n_procs:
pipeline.run(plugin='MultiProc', plugin_args={'n_procs': args.n_procs})
elif args.slurm:
pipeline.run(plugin='SLURM')
else:
pipeline.run()
......@@ -40,8 +40,6 @@ class T1VolumeExistingTemplateCLI(ce.CmdParser):
help='Temporary directory to store pipelines intermediate results')
self._args.add_argument("-np", "--n_procs", type=int,
help='Number of cores used to run in parallel')
self._args.add_argument("-sl", "--slurm", action='store_true',
help='Run the pipelines using SLURM')
def run_command(self, args):
"""
......@@ -60,7 +58,5 @@ class T1VolumeExistingTemplateCLI(ce.CmdParser):
if args.n_procs:
pipeline.run(plugin='MultiProc', plugin_args={'n_procs': args.n_procs})
elif args.slurm:
pipeline.run(plugin='SLURM')
else:
pipeline.run()
......@@ -50,9 +50,6 @@ class T1VolumeNewTemplateCLI(ce.CmdParser):
clinica_opt.add_argument("-np", "--n_procs",
metavar=('N'), type=int,
help='Number of cores used to run in parallel')
clinica_opt.add_argument("-sl", "--slurm",
action='store_true',
help='Run the pipelines using SLURM')
# Advanced arguments (i.e. tricky parameters)
advanced = self._args.add_argument_group(PIPELINE_CATEGORIES['ADVANCED'])
advanced.add_argument("-ti", "--tissue_classes",
......@@ -115,7 +112,5 @@ class T1VolumeNewTemplateCLI(ce.CmdParser):
if args.n_procs:
pipeline.run(plugin='MultiProc', plugin_args={'n_procs': args.n_procs})
elif args.slurm:
pipeline.run(plugin='SLURM')
else:
pipeline.run()
......@@ -49,8 +49,6 @@ class T1VolumeTissueSegmentationCLI(ce.CmdParser):
help='Temporary directory to store pipelines intermediate results')
self._args.add_argument("-np", "--n_procs", type=int,
help='Number of cores used to run in parallel')
self._args.add_argument("-sl", "--slurm", action='store_true',
help='Run the pipelines using SLURM')
def run_command(self, args):
"""
......@@ -74,7 +72,5 @@ class T1VolumeTissueSegmentationCLI(ce.CmdParser):
if args.n_procs:
pipeline.run(plugin='MultiProc', plugin_args={'n_procs': args.n_procs})
elif args.slurm:
pipeline.run(plugin='SLURM')
else:
pipeline.run()
......@@ -43,8 +43,6 @@ class {{ pipeline.class_name }}CLI(ce.CmdParser):
help='Temporary directory to store pipeline intermediate results')
self._args.add_argument("-np", "--n_procs", type=int,
help='Number of cores used to run in parallel')
self._args.add_argument("-sl", "--slurm", action='store_true',
help='Run the pipeline using SLURM')
# END OF EXAMPLE
def run_command(self, args):
......@@ -71,8 +69,7 @@ class {{ pipeline.class_name }}CLI(ce.CmdParser):
args.working_directory = mkdtemp()
pipeline.base_dir = self.absolute_path(args.working_directory)
if args.n_procs:
pipeline.run(plugin='MultiProc', plugin_args={'n_procs': args.n_procs})
elif args.slurm:
pipeline.run(plugin='SLURM')
pipeline.run(plugin='MultiProc',
plugin_args={'n_procs': args.n_procs})
else:
pipeline.run()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment