How to use the parsl.load function in parsl

To help you get started, we’ve selected a few parsl examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Parsl / parsl / parsl / executors / mpix / test_basic.py View on Github external
if __name__ == '__main__':

    parser = argparse.ArgumentParser()
    parser.add_argument("-s", "--sitespec", default=None)
    parser.add_argument("-c", "--count", default="10",
                        help="Count of apps to launch")
    parser.add_argument("-d", "--debug", action='store_true',
                        help="Count of apps to launch")
    args = parser.parse_args()

    if args.sitespec:
        config = None
        try:
            exec("import parsl; from {} import config".format(args.sitespec))
            parsl.load(config)
        except Exception as e:
            print("Failed to load the requested config : ", args.sitespec)
            exit(0)

    # if args.debug:
    #    parsl.set_stream_logger()

    # x = test_simple(int(args.count))
    # x = test_imports()
    x = test_parallel_for(int(args.count))
    # x = test_parallel_for(int(args.count))
github xtracthub / xtract-tabular / scale_tests.py View on Github external
provider=CobaltProvider(
                    launcher=SingleNodeLauncher(),
                    init_blocks=1,
                    max_blocks=1,
                    queue=args.queue,
                    account='DLHub',
                    worker_init="source activate funcx_5"
                ),
            )
        ],
        run_dir="/home/tskluzac/FuncX/evaluation/runinfo",
        strategy=None,
    )

    parsl.clear()
    dfk = parsl.load(config)
    executor = list(dfk.executors.values())[0]

    @python_app
    def noop():
        pass

    @python_app
    def sleep10ms():
        import time
        time.sleep(0.01)
        #sleep(0.01)

    @python_app
    def sleep100ms():
        import time
        time.sleep(0.1)
github Parsl / parsl / parsl / dataflow / workspace / app_slurm_dag_zhuozhao.py View on Github external
)
    ],
    #strategy='htex_aggressive',
    #strategy='htex_totaltime',
    #strategy='simple',
    strategy=args.strategy,
  )

# TODO: 
#try:
#except:
#  raise NameError("Invalid parsed argument")  

# Load config
print(config)
dfk = parsl.load(config)


@App('python', dfk)
def sleeper(dur=5):
    import time
    time.sleep(dur)


@App('python', dfk)
def cpu_stress(dur=30):
    import time
    s = 0
    start = time.time()
    for i in range(10**8):
        s += i
        if time.time() - start >= dur:
github Parsl / parsl / parsl / dataflow / workspace / app_dev2_dag_zhuozhao.py View on Github external
launcher=SingleNodeLauncher(),
            ),
        )
    ],
    #strategy='htex_aggressive',
    strategy='htex_totaltime',
    #strategy='simple',
  )
# TODO: 
#try:
#except:
#  raise NameError("Invalid parsed argument")  

# Load config
print(config)
dfk = parsl.load(config)


@App('python', dfk)
def sleeper(dur=5):
    import time
    time.sleep(dur)


@App('python', dfk)
def cpu_stress(dur=30):
    import time
    s = 0
    start = time.time()
    for i in range(10**8):
        s += i
        if time.time() - start >= dur:
github Parsl / parsl / parsl / dataflow / workspace / app_slurm_dag2.py View on Github external
],
    #strategy='htex_aggressive',
    #strategy='htex_totaltime',
    #strategy='simple',
    strategy=args.strategy,
    retries=100,
  )

# TODO: 
#try:
#except:
#  raise NameError("Invalid parsed argument")  

# Load config
print(config)
dfk = parsl.load(config)


@App('python', dfk)
def sleeper(dur=5):
    import time
    time.sleep(dur)


@App('python', dfk)
def cpu_stress(dur=30):
    import time
    s = 0
    start = time.time()
    for i in range(10**8):
        s += i
        if time.time() - start >= dur:
github CoffeaTeam / coffea / coffea / processor / parsl / detail.py View on Github external
def _parsl_initialize(config=None):
    parsl.clear()
    parsl.load(config)
github WagnerGroup / pyqmc / pyqmc / optlinemin.py View on Github external
ExtremeScaleExecutor(
                label="Extreme_Local",
                worker_debug=True,
                ranks_per_node=ncore,
                provider=LocalProvider(
                    channel=LocalChannel(),
                    init_blocks=1,
                    max_blocks=1,
                    launcher=SimpleLauncher()
                )
            )
        ],
        strategy=None,
    )
        
    parsl.load(config)

    mol=gto.M(atom='H 0. 0. 0.; H 0. 0. 2.0',unit='bohr',
                ecp='bfd', basis='bfd_vtz')
    mf = scf.RHF(mol).run()
    mol.output=None
    mol.stdout=None
    mf.output=None
    mf.stdout=None
    mf.chkfile=None
    from pyqmc import ExpCuspFunction,GaussianFunction,MultiplyWF,PySCFSlaterRHF,JastrowSpin,initial_guess,EnergyAccumulator
    from pyqmc.accumulators import PGradTransform,LinearTransform
    
    nconf=1600
    basis=[ExpCuspFunction(2.0,1.5),GaussianFunction(0.5),GaussianFunction(2.0),GaussianFunction(.25),GaussianFunction(1.0),GaussianFunction(4.0),GaussianFunction(8.0)  ]
    wf=MultiplyWF(PySCFSlaterRHF(mol,mf),JastrowSpin(mol,basis,basis))
    coords = initial_guess(mol,nconf)