Skip to content

Commit

Permalink
modified main paths
Browse files Browse the repository at this point in the history
  • Loading branch information
rsexton2 committed Feb 22, 2024
1 parent 81666ad commit 089ab61
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions basicrta/gibbs.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,17 @@ def run(self, run_resids=None):
input_list = np.array([[residues[i], times[i], i % self.nproc,
self.ncomp, self.niter] for i in
range(len(residues))], dtype=object)

with (Pool(self.nproc, initializer=tqdm.set_lock, initargs=(Lock(),)) as
p):
try:
for _ in tqdm(p.istarmap(run_residue, input_list),
total=len(residues), position=0,
desc='overall progress'):
pass
except KeyboardInterrupt:
pass
#
# with (Pool(self.nproc, initializer=tqdm.set_lock, initargs=(Lock(),)) as
# p):
# try:
# for _ in tqdm(p.istarmap(run_residue, input_list),
# total=len(residues), position=0,
# desc='overall progress'):
# pass
# except KeyboardInterrupt:
# pass
Pool(self.nproc).starmap(run_residue, input_list)


class Gibbs(object):
Expand Down

0 comments on commit 089ab61

Please sign in to comment.