def initialize():
    global coProcessor, usecp
    if usecp:
        coProcessor = catalyst.vtkCPProcessor()

    pm = paraview.servermanager.vtkProcessModule.GetProcessModule()
    from mpi4py import MPI
Example #2
0
def initialize():
    global coProcessor, usecp
    if usecp:
        import paraview
        import vtkParallelCorePython
        import vtk
        from mpi4py import MPI
        import os, sys

        paraview.options.batch = True
        paraview.options.symmetric = True
        import vtkPVClientServerCoreCorePython as CorePython
        try:
            import vtkPVServerManagerApplicationPython as ApplicationPython
        except:
            paraview.print_error(
                "Error: Cannot import vtkPVServerManagerApplicationPython")

        if not CorePython.vtkProcessModule.GetProcessModule():
            pvoptions = None
            if paraview.options.batch:
                pvoptions = CorePython.vtkPVOptions()
                pvoptions.SetProcessType(CorePython.vtkPVOptions.PVBATCH)
                if paraview.options.symmetric:
                    pvoptions.SetSymmetricMPIMode(True)
            ApplicationPython.vtkInitializationHelper.Initialize(
                sys.executable, CorePython.vtkProcessModule.PROCESS_BATCH,
                pvoptions)

        import paraview.servermanager as pvsm
        # we need ParaView 4.2 since ParaView 4.1 doesn't properly wrap
        # vtkPVPythonCatalystPython
        if pvsm.vtkSMProxyManager.GetVersionMajor() < 4 or (
                pvsm.vtkSMProxyManager.GetVersionMajor() == 4
                and pvsm.vtkSMProxyManager.GetVersionMinor() < 2):
            print 'Must use ParaView v4.2 or greater'
            sys.exit(0)

        import numpy
        import vtkPVCatalystPython as catalyst
        import vtkPVPythonCatalystPython as pythoncatalyst
        import paraview.simple
        import paraview.vtk as vtk
        from paraview import numpy_support
        paraview.options.batch = True
        paraview.options.symmetric = True

        coProcessor = catalyst.vtkCPProcessor()
        pm = paraview.servermanager.vtkProcessModule.GetProcessModule()
        from mpi4py import MPI
Example #3
0
def initialize():
    global coProcessor, usecp
    if usecp:
        import paraview
        import vtkParallelCorePython
        import vtk
        from mpi4py import MPI
        import os, sys

        paraview.options.batch = True
        paraview.options.symmetric = True
        import vtkPVClientServerCoreCorePython as CorePython
        try:
            import vtkPVServerManagerApplicationPython as ApplicationPython
        except:
            paraview.print_error("Error: Cannot import vtkPVServerManagerApplicationPython")

        if not CorePython.vtkProcessModule.GetProcessModule():
            pvoptions = None
            if paraview.options.batch:
                pvoptions = CorePython.vtkPVOptions();
                pvoptions.SetProcessType(CorePython.vtkPVOptions.PVBATCH)
                if paraview.options.symmetric:
                    pvoptions.SetSymmetricMPIMode(True)
            ApplicationPython.vtkInitializationHelper.Initialize(sys.executable, CorePython.vtkProcessModule.PROCESS_BATCH, pvoptions)

        import paraview.servermanager as pvsm
        # we need ParaView 4.2 since ParaView 4.1 doesn't properly wrap
        # vtkPVPythonCatalystPython
        if pvsm.vtkSMProxyManager.GetVersionMajor() != 4 or \
           pvsm.vtkSMProxyManager.GetVersionMinor() < 2:
            print 'Must use ParaView v4.2 or greater'
            sys.exit(0)

        import numpy
        import vtkPVCatalystPython as catalyst
        import vtkPVPythonCatalystPython as pythoncatalyst
        import paraview.simple
        import paraview.vtk as vtk
        from paraview import numpy_support
        paraview.options.batch = True
        paraview.options.symmetric = True

        coProcessor = catalyst.vtkCPProcessor()
        pm = paraview.servermanager.vtkProcessModule.GetProcessModule()
        from mpi4py import MPI
Example #4
0
def CatalystInit():
    if (coProcessor == None):
        coProcessor = catalyst.vtkCPProcessor()