예제 #1
0
def test_factory():
    appff = AppFactoryFactory('main')
    app_f = appff.make('bash', workers, app_2, walltime=60)
    assert type(app_f) == AppFactory, "AppFactoryFactory made the wrong type"

    app_f_2 = appff.make('python', workers, app_3, walltime=60)
    assert type(app_f_2) == AppFactory, "AppFactoryFactory made the wrong type"
예제 #2
0
def test_factory():
    appff = AppFactoryFactory('main')
    app_f = appff.make('bash', app_2, workers, walltime=60)
    assert isinstance(app_f,
                      AppFactory), "AppFactoryFactory made the wrong type"

    app_f_2 = appff.make('python', app_3, workers, walltime=60)
    assert isinstance(app_f_2,
                      AppFactory), "AppFactoryFactory made the wrong type"
예제 #3
0
2. set_file_logger
    This sets the logging to a file. This is ideal for reporting issues to the dev team.

'''

from parsl.version import VERSION
from parsl.app.app import App
#from parsl.app.executors import ThreadPoolExecutor, ProcessPoolExecutor
from parsl.executors.threads import ThreadPoolExecutor
from parsl.executors.ipp import IPyParallelExecutor
import logging
#import parsl.app.errors

from parsl.dataflow.dflow import DataFlowKernel
from parsl.app.app_factory import AppFactoryFactory
APP_FACTORY_FACTORY = AppFactoryFactory('central')
#print(APP_FACTORY)

__author__  = 'Yadu Nand Babuji'
__version__ = VERSION

__all__ = ['App', 'DataFlowKernel', 'ThreadPoolExecutor', 'IPyParallelExecutor']

def set_stream_logger(name='parsl', level=logging.DEBUG, format_string=None):
    '''
    Add a stream log handler

    Args:
         - name (string) : Set the logger name.
         - level (logging.LEVEL) : Set to logging.DEBUG by default.
         - format_string (sting) : Set to None by default.
예제 #4
0
def test_factory_names():
    appff = AppFactoryFactory('main')
    print(appff)
    print(appff.__repr__())