-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
very slow parallel ArrayMesh? #14
Comments
Somehow lost that that pm.py line is: |
Just a quick comment before going to sleep: What is the mesh shape? About asdf, I usually just read the rows of interest for each process, e.g. https://github.com/cosmodesi/mpytools/blob/6f2766ea00b5f316f70e221672cf8d41ac6166f4/mpytools/io.py#L969. Since only slices (start, stop, step) are supported in asdf slicing (if I remember correctly), this should do the right thing, i.e. only read the relevant rows for each process. Not sure this is faster than non-parallel io, though (haven't tried much). |
Yes, the pmesh/pm.py line I mentioned is coming from this unravel() line. This makes it several times faster to just run the whole thing in 1 process (while standard CatalogFFTPower is much faster with mpi, i.e., my mpi is working). In the grand scheme of things this particular case is unimportant, so I will try this asdf read thing just out of curiosity and then forget about it for now. (actually though, it looks like ArrayMesh assumes the data is not distributed, i.e., mpiroot=None doesn't look valid?)(which I guess makes sense... a mesh being different to distribute than list of objects)(I hadn't really thought about it, having gotten used to the catalogs) |
(actually though, it looks like ArrayMesh assumes the data is not distributed, i.e., mpiroot=None doesn't look valid?) |
commit acba368 should allow to pass distributed array to |
The file is This parallel read does work (producing same results). mpi.size>1 is faster, but still overall not as fast as mpi.size=1. I'm happy to leave this until it comes up somewhere as a real obstacle. |
Computing IC power for Abacus cubes, the time for mpi.size>1 is dominated by the line:
mesh_init = pypower.ArrayMesh(mesh_init,L,mpiroot=0)
which jumps from ~7 seconds for one process to ~90s for 2 or 32 processes on cori (and worse, ~4s to 150s on my laptop, so not cori-specific)
Of course can just plow through it, but might as well cut down on friction where possible...
seems to come from
pmesh/pm.py, line ~445
mesh_init being:
(is there a way to parallel read asdf?)
The text was updated successfully, but these errors were encountered: