diff --git a/install/test_balsam_hworld.py b/install/test_balsam_hworld.py index 444b03c90..79f1bfbac 100644 --- a/install/test_balsam_hworld.py +++ b/install/test_balsam_hworld.py @@ -25,7 +25,7 @@ def wait_for_job_dir(basedb): time.sleep(1) sleeptime += 1 - print('Waiting for Job Directory'.format(sleeptime)) + print('Waiting for Job Directory {}'.format(sleeptime)) while len(os.listdir(basedb)) == 0 and sleeptime < 15: print(sleeptime, end=" ", flush=True) time.sleep(1) diff --git a/libensemble/history.py b/libensemble/history.py index 3fbd80ef5..e5bacd2c6 100644 --- a/libensemble/history.py +++ b/libensemble/history.py @@ -129,7 +129,7 @@ def update_history_x_out(self, q_inds, sim_worker): else: self.given_count += len(q_inds) - def update_history_x_in(self, gen_worker, O): + def update_history_x_in(self, gen_worker, D): """ Updates the history (in place) when new points have been returned from a gen @@ -137,18 +137,18 @@ def update_history_x_in(self, gen_worker, O): ---------- gen_worker: integer The worker who generated these points - O: numpy array + D: numpy array Output from gen_func """ - if len(O) == 0: + if len(D) == 0: return rows_remaining = len(self.H)-self.index - if 'sim_id' not in O.dtype.names: + if 'sim_id' not in D.dtype.names: # gen method must not be adjusting sim_id, just append to self.H - num_new = len(O) + num_new = len(D) if num_new > rows_remaining: self.grow_H(num_new-rows_remaining) @@ -159,18 +159,18 @@ def update_history_x_in(self, gen_worker, O): # gen method is building sim_id or adjusting values in existing sim_id rows. # Ensure there aren't any gaps in the generated sim_id values: - assert np.all(np.in1d(np.arange(self.index, np.max(O['sim_id'])+1), O['sim_id'])),\ + assert np.all(np.in1d(np.arange(self.index, np.max(D['sim_id'])+1), D['sim_id'])),\ "The generator function has produced sim_id that are not in order." - num_new = len(np.setdiff1d(O['sim_id'], self.H['sim_id'])) + num_new = len(np.setdiff1d(D['sim_id'], self.H['sim_id'])) if num_new > rows_remaining: self.grow_H(num_new-rows_remaining) - update_inds = O['sim_id'] + update_inds = D['sim_id'] - for field in O.dtype.names: - self.H[field][update_inds] = O[field] + for field in D.dtype.names: + self.H[field][update_inds] = D[field] self.H['gen_time'][update_inds] = time.time() self.H['gen_worker'][update_inds] = gen_worker diff --git a/libensemble/tools/gen_support.py b/libensemble/tools/gen_support.py index 9e6604b60..344468f7b 100644 --- a/libensemble/tools/gen_support.py +++ b/libensemble/tools/gen_support.py @@ -1,17 +1,17 @@ from libensemble.message_numbers import STOP_TAG, PERSIS_STOP, UNSET_TAG, EVAL_GEN_TAG -def sendrecv_mgr_worker_msg(comm, O, status=None): +def sendrecv_mgr_worker_msg(comm, output, status=None): """Send message from worker to manager and receive response. """ - send_mgr_worker_msg(comm, O) + send_mgr_worker_msg(comm, output) return get_mgr_worker_msg(comm, status=status) -def send_mgr_worker_msg(comm, O): +def send_mgr_worker_msg(comm, output): """Send message from worker to manager. """ - D = {'calc_out': O, + D = {'calc_out': output, 'libE_info': {'persistent': True}, 'calc_status': UNSET_TAG, 'calc_type': EVAL_GEN_TAG