Commit 954052f8 by Zoltan Karsa

rank up

parent 694ebe1b
...@@ -5,5 +5,5 @@ try: ...@@ -5,5 +5,5 @@ try:
size = comm.Get_size() size = comm.Get_size()
except: except:
comm = None comm = None
rank = None rank = 0
size = None size = None
\ No newline at end of file
...@@ -43,6 +43,9 @@ def main(argv): ...@@ -43,6 +43,9 @@ def main(argv):
elif opt in ("-b", "--bin"): elif opt in ("-b", "--bin"):
binary = True binary = True
if outputfile and binary and mpi and rank == 0:
os.mkdir(outputfile)
space = gen_angels_to_pick(n) space = gen_angels_to_pick(n)
Cx, Cy = angles_alap(space) Cx, Cy = angles_alap(space)
...@@ -75,7 +78,7 @@ def main(argv): ...@@ -75,7 +78,7 @@ def main(argv):
if mpi: if mpi:
offset = f"R{rank}-{size}" offset = f"R{rank}-{size}"
res = start_kernel(Cx, Cy, Dx, Dy, Dz, v, w) res = start_kernel(Cx, Cy, Dx, Dy, Dz, v, w)
os.mkdir(outputfile) # os.mkdir(outputfile)
cp.save(f"{outputfile}/{offset}_Cx.npy", Cx) cp.save(f"{outputfile}/{offset}_Cx.npy", Cx)
cp.save(f"{outputfile}/{offset}_Cy.npy", Cy) cp.save(f"{outputfile}/{offset}_Cy.npy", Cy)
cp.save(f"{outputfile}/{offset}_Dx.npy", Dx) cp.save(f"{outputfile}/{offset}_Dx.npy", Dx)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment