コード例 #1
0
ファイル: run.py プロジェクト: Neurita/pypes
def run_debug(workflow, plugin="MultiProc", n_cpus=4, **plugin_kwargs):
    """ Execute `wf` with `plugin`.

    Parameters
    ----------
    wf: nipype Workflow

    plugin: str
        The pipeline execution plugin.
        See wf.run docstring for choices.

    n_cpus: int
        Number of CPUs to use with the 'MultiProc' plugin.

    plugin_kwargs: keyword argumens
        Keyword arguments for the plugin if using something different
        then 'MultiProc'.
    """

    try:
        # plot the graph in its working directory
        plot_workflow(workflow)

        # run it
        run_wf(workflow, plugin, n_cpus, **plugin_kwargs)
    except:
        import sys
        print(sys.exc_info())

        import pdb
        pdb.post_mortem(sys.exc_info()[2])

        raise
    else:
        print('Workflow successfully finished.')
コード例 #2
0
ファイル: tasks.py プロジェクト: Neurita/pypes
def run_pype(workflow, **kwargs):
    try:
        # plot the graph in its working directory
        plot_workflow(workflow)

        # run it
        run_wf(workflow, **kwargs)
    except:
        import pdb, sys
        print(sys.exc_info())
        pdb.post_mortem(sys.exc_info()[2])
    else:
        print('Workflow finished successfully!')
コード例 #3
0
ファイル: run.py プロジェクト: erramuzpe/pypes
def run_debug(workflow, plugin="MultiProc", n_cpus=4, **plugin_kwargs):
    """ Execute `wf` with `plugin`.

    Parameters
    ----------
    wf: nipype Workflow

    plugin: str
        The pipeline execution plugin.
        See wf.run docstring for choices.

    n_cpus: int
        Number of CPUs to use with the 'MultiProc' plugin.

    plugin_kwargs: keyword argumens
        Keyword arguments for the plugin if using something different
        then 'MultiProc'.
    """

    try:
        # plot the graph in its working directory
        plot_workflow(workflow)

        # run it
        run_wf(workflow, plugin=plugin, n_cpus=n_cpus,
               **plugin_kwargs)
    except:
        import sys
        print(sys.exc_info())

        import pdb
        pdb.post_mortem(sys.exc_info()[2])

        raise
    else:
        print('Workflow successfully finished.')