Skip to content

Commit

Permalink
bugs bugs bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
arahlin committed Nov 6, 2023
1 parent a012160 commit 31027b1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions xfaster/gcorr_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def run_xfaster_gcorr(
opts["checkpoint"] = "bandpowers"
opts["dep_afterok"] = [jobs[0]]

idxs = np.array_split(np.arange(num_sims), num_jobs)
idxs = np.array_split(np.arange(sim_index, sim_index + num_sims), num_jobs)
for idx in idxs:
opts["sim_index_default"] = idx[0]
opts["num_sims"] = len(idx)
Expand Down Expand Up @@ -176,9 +176,10 @@ def wait_for_jobs(jobs):
print("Waiting for {} jobs: {}".format(len(jobs), jobs))
time.sleep(10)
out = sp.check_output("squeue -u $USER", shell=True).decode().strip()
running = set([job.split()[0] for job in out.split("\n")[1:]]) & jobs
print("Found {} running jobs: {}".format(len(running), running))
jobs -= running
if len(out) <= 1:
break
out = [x.strip() for x in out.split("\n")[1:] if x.strip()]
jobs = set([job.split()[0] for job in out]) & jobs


def compute_gcal(
Expand Down

0 comments on commit 31027b1

Please sign in to comment.