Exemple #1
0
    def __init__(self,
                 channel=LocalChannel(),
                 label='cobalt',
                 script_dir='parsl_scripts',
                 nodes_per_block=1,
                 tasks_per_node=1,
                 init_blocks=0,
                 min_blocks=0,
                 max_blocks=10,
                 parallelism=1,
                 walltime="00:10:00",
                 account=None,
                 queue=None,
                 overrides='',
                 launcher=AprunLauncher(),
                 cmd_timeout=10):
        super().__init__(label,
                         channel=channel,
                         script_dir=script_dir,
                         nodes_per_block=nodes_per_block,
                         tasks_per_node=tasks_per_node,
                         init_blocks=init_blocks,
                         min_blocks=min_blocks,
                         max_blocks=max_blocks,
                         parallelism=parallelism,
                         walltime=walltime,
                         launcher=launcher,
                         cmd_timeout=cmd_timeout)

        self.account = account
        self.queue = queue
        self.overrides = overrides
Exemple #2
0
 def __init__(self,
              partition,
              label='slurm',
              channel=LocalChannel(),
              script_dir='parsl_scripts',
              nodes_per_block=1,
              tasks_per_node=1,
              init_blocks=1,
              min_blocks=0,
              max_blocks=10,
              parallelism=1,
              walltime="00:10:00",
              overrides='',
              cmd_timeout=10,
              launcher=SingleNodeLauncher()):
     super().__init__(label,
                      channel,
                      script_dir,
                      nodes_per_block,
                      tasks_per_node,
                      init_blocks,
                      min_blocks,
                      max_blocks,
                      parallelism,
                      walltime,
                      cmd_timeout=cmd_timeout,
                      launcher=launcher)
     self.partition = partition
     self.overrides = overrides
Exemple #3
0
    def __init__(self,
                 channel=LocalChannel(),
                 account=None,
                 queue=None,
                 overrides='',
                 label='torque',
                 script_dir='parsl_scripts',
                 nodes_per_block=1,
                 tasks_per_node=1,
                 init_blocks=1,
                 min_blocks=0,
                 max_blocks=100,
                 parallelism=1,
                 launcher=AprunLauncher(),
                 walltime="00:20:00"):
        super().__init__(label, channel, script_dir, nodes_per_block,
                         tasks_per_node, init_blocks, min_blocks, max_blocks,
                         parallelism, walltime, launcher)

        self.account = account
        self.queue = queue
        self.overrides = overrides
        self.provisioned_blocks = 0

        self.script_dir = script_dir
        if not os.path.exists(self.script_dir):
            os.makedirs(self.script_dir)

        # Dictionary that keeps track of jobs, keyed on job_id
        self.resources = {}
Exemple #4
0
    def __init__(self,
                 channel=LocalChannel(),
                 label='grid_engine',
                 script_dir='parsl_scripts',
                 nodes_per_block=1,
                 tasks_per_node=1,
                 init_blocks=1,
                 min_blocks=0,
                 max_blocks=10,
                 parallelism=1,
                 walltime="00:10:00",
                 overrides='',
                 launcher=SingleNodeLauncher()):
        super().__init__(label,
                         channel,
                         script_dir,
                         nodes_per_block,
                         tasks_per_node,
                         init_blocks,
                         min_blocks,
                         max_blocks,
                         parallelism,
                         walltime,
                         launcher)
        self.overrides = overrides

        if launcher in ['srun', 'srun_mpi']:
            logger.warning("Use of {} launcher is usually appropriate for Slurm providers. "
                           "Recommended options include 'single_node' or 'aprun'.".format(launcher))
Exemple #5
0
    def __init__(self,
                 channel=LocalChannel(),
                 label='local',
                 script_dir='parsl_scripts',
                 tasks_per_node=1,
                 nodes_per_block=1,
                 launcher=SingleNodeLauncher(),
                 init_blocks=4,
                 min_blocks=0,
                 max_blocks=10,
                 walltime="00:15:00",
                 parallelism=1):
        self.channel = channel
        self.label = label
        if not os.path.exists(script_dir):
            os.makedirs(script_dir)
        self.script_dir = script_dir
        self.provisioned_blocks = 0
        self.nodes_per_block = nodes_per_block
        self.tasks_per_node = tasks_per_node
        self.launcher = launcher
        self.init_blocks = init_blocks
        self.min_blocks = min_blocks
        self.max_blocks = max_blocks
        self.parallelism = parallelism
        self.walltime = walltime

        # Dictionary that keeps track of jobs, keyed on job_id
        self.resources = {}
Exemple #6
0
from libsubmit.providers import LocalProvider
from libsubmit.channels import LocalChannel

from parsl.config import Config
from parsl.executors.ipp import IPyParallelExecutor

config = Config(executors=[
    IPyParallelExecutor(label="local_ipp",
                        provider=LocalProvider(
                            channel=LocalChannel(),
                            init_blocks=2,
                            max_blocks=2,
                        ))
])