def slave_job(myrank): # define the slave slave = mns.Slave(myrank) # master defines the tasks slave.barrier(0) keys = pd.read_pickle(file_tiles_to_interpolate) done = False # print('slave #%3i processes task %i' % (slave.islave, slave.islave)) # do_stats_task(slave.islave) while not (done): itask = slave.get_async_task() # itask = slave.islave if itask > -1: tile = keys[itask] print('** slave #%3i processes task %i / tile %s' % (slave.islave, itask, tile)) interp.update_profiles_in_tile(tile) else: done = True # slaves work slave.barrier(1) # master gathers the dataframes slave.barrier(2)
def slave_job(myrank): # define the slave slave = mns.Slave(myrank, verbose=False) # master defines the tasks slave.barrier(0) #pd.read_pickle(file_tiles_to_stats) done = False #print('slave #%3i is ready to go' % (slave.islave)) # do_stats_task(slave.islave) while not(done): itask = slave.get_async_task() # itask = slave.islave if itask > -1: subd = atlas.subd_list[itask] print('** slave #%3i processes task %i / subd %s' % (slave.islave, itask, subd)) atlas.write_subd_from_tiles(subd) else: done = True # slaves work slave.barrier(1) # master gathers th slave.barrier(2)
def slave_job(myrank): # define the slave slave = mns.Slave(myrank) itask = slave.islave # master defines the tasks slave.barrier(0) f = task_file % itask task = pd.read_pickle(f) argo = task[0] dacs = task[1] wmos = task[2] argo = tools.update_argodb(argo, dacs, wmos) f = result_file % itask pd.to_pickle(argo, f) # slaves work slave.barrier(1) # master gathers the dataframes slave.barrier(2)
def slave_job(myrank): # define the slave slave = mns.Slave(myrank, verbose=False) # master defines the tasks tasks, keys = mns.bcast(None) bb = mns.bcast(None) slave.barrier(0) #pd.read_pickle(file_tiles_to_stats) done = False #print('slave #%3i is ready to go' % (slave.islave)) # do_stats_task(slave.islave) while not (done): itask = slave.get_async_task() # itask = slave.islave if itask > -1: tile = keys[itask] print('** slave #%3i processes task %i / tile %s' % (slave.islave, itask, tile)) stats.compute_stats(bb, tile) else: done = True # slaves work slave.barrier(1) # master gathers the dataframes slave.barrier(2)