How to use the parsl.app.app.python_app 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 xtracthub / xtract-tabular / scale_tests.py View on Github external
    @python_app
    def sleep10ms():
        import time
        time.sleep(0.01)
        #sleep(0.01)
github funcx-faas / funcX / funcx / executor / parsl / data_provider / data_manager.py View on Github external
def _ftp_stage_in_app(self, executor):
        return python_app(executors=[executor])(_ftp_stage_in)
github Parsl / parsl / parsl / dataflow / workspace / app_slurm_dag.py View on Github external
@python_app
def inc(inputs=[], init_time=0):
    import time
    import psutil
    import numpy as np
    start = time.time()
    #sleep_duration = 600.0
    sleep_duration = 60.0
    _inputs = np.asarray(inputs)
    mems = [] #_inputs[0].tolist()
    cpus = [] #_inputs[1].tolist()
    times =[]
    x = 0
    while True:
        x += 1
        end = time.time()
        #if (end - start) % 10 == 0:
github Parsl / parsl / parsl / dataflow / workspace / app_slurm_dag_zhuozhao.py View on Github external
@python_app
def add_inc(inputs=[]):
    import time
    import psutil
    import numpy as np
    start = time.time()
    sleep_duration = 300.0
    #sleep_duration = 60.0
    res = 0
    _inputs = np.asarray(inputs)
    mems = [] # _inputs[0].tolist()
    cpus = [] # _inputs[1].tolist()
    while True:
        res += 1
        end = time.time()
        if (end - start) % 10 == 0:
            mems += [psutil.virtual_memory().percent]
github Parsl / parsl / parsl / dataflow / workspace / app_dev_theo_dag_zhuozhao.py View on Github external
@python_app
def inc(x):
    import time
    start = time.time()
    sleep_duration = 60.0
    while True:
        x += 1
        end = time.time()
        if end - start >= sleep_duration:
            break
    return x
github funcx-faas / funcX / funcx / executor / parsl / data_provider / data_manager.py View on Github external
def _globus_stage_in_app(self):
        return python_app(executors=['data_manager'])(self._globus_stage_in)
github Parsl / parsl / parsl / dataflow / workspace / cpu_stress_midway.py View on Github external
@python_app
def func(n=1000000, stime=0.00):
  # import necessary library?! otherwise get errors
  import os, sys, time
  import psutil
  import logging
  logger  = logging.getLogger()
  handler = logging.StreamHandler(sys.stdout)
  handler.setLevel(logging.INFO)
  logger.addHandler(handler)
  logger.setLevel(logging.INFO) 

  logging.info("  ### JOB START ### ")
  x = 0.0
  #n = 1000000
  num = 0
  mems = []
github Parsl / parsl / parsl / dataflow / workspace / app_dev_dag_zhuozhao.py View on Github external
@python_app
def inc(inputs=[]):
    import time
    import psutil
    import numpy as np
    start = time.time()
    sleep_duration = 60.0
    _inputs = np.asarray(inputs)
    mems = _inputs[0].tolist()
    cpus = _inputs[1].tolist()
    x = 0
    while True:
        x += 1
        end = time.time()
        if (end - start) % 10 == 0:
            mems += [psutil.virtual_memory().percent]
            cpus += [psutil.cpu_percent()]