return k1 if __name__ == '__main__': # Create pattern object with desired ensemble size, pipeline size pipe = Test(ensemble_size=[ENSEMBLE_SIZE, 1], pipeline_size=PIPELINE_SIZE, name='1', iterations=TOTAL_ITERS) # Create an application manager app = AppManager(name='MSM') # Register kernels to be used app.register_kernels(openmm_kernel) app.register_kernels(msm_kernel) # Add workload to the application manager app.add_workload(pipe) parser = argparse.ArgumentParser() parser.add_argument('--resource', help='target resource label') args = parser.parse_args() if args.resource != None: resource = args.resource else: resource = 'local.localhost' res_dict = {
# Push new value into INPUT_PAR_Q if new_par != None: push_val(int(new_par)) if __name__ == '__main__': # Create pattern object with desired ensemble size, pipeline size pipe = Test(ensemble_size=ENSEMBLE_SIZE + 1, pipeline_size=1) # Create an application manager app = AppManager(name='Adap_sampling') # Register kernels to be used app.register_kernels(rand_kernel) app.register_kernels(sleep_kernel) # Add workload to the application manager app.add_workload(pipe) # Create a resource handle for target machine res = ResourceHandle( resource="local.localhost", cores=4, #username=, #project =, #queue=, walltime=10, database_url='mongodb://*****:*****@ds015335.mlab.com:15335/rp')
try: with open('%s/config.json' % os.path.dirname(os.path.abspath(__file__))) as data_file: config = json.load(data_file) os.system( 'wget -q -o UTF-8-demo.txt http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-demo.txt' ) # Create an application manager app = AppManager(name='example_1') # Register kernels to be used app.register_kernels(ccount_kernel) # Create a new resource handle with one resource and a fixed # number of cores and runtime. cluster = ResourceHandle( resource=resource, cores=config[resource]["cores"], walltime=30, #username=None, project=config[resource]['project'], access_schema=config[resource]['schema'], queue=config[resource]['queue'], database_url='mongodb://*****:*****@ds151993.mlab.com:51993/test_08_22', ) cluster.shared_data = ['./UTF-8-demo.txt']