-
Notifications
You must be signed in to change notification settings - Fork 8
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
V2 parallelize #123
base: master
Are you sure you want to change the base?
V2 parallelize #123
Conversation
Some basic profiling/scaling times on a single core AMD Ryzen 7 5800H CPU
Some basic things to speed up:
|
Did some refactoring which combines the
|
Added the parallelization to Periodic mode as well, but dont have a good test setup or unit test for that |
Eliminated the |
@QuiteAFoxtrot Thank you for starting work on this! This will be incredibly helpful for running V2 with DESI. To let you know, some of the commonly used V2 functionality was never added to the master branch. @dveyrat created branches for calculating which voids are edge voids and for running on non-periodic, cubic simulation volumes (a so-called "xyz" mode), and I combined these branches in https://github.com/DESI-UR/VAST/tree/fits_edge. This is as good a time as any to pull these features into the master branch (in particular, the edge void calculation code is some of the most time-intensive code in V2 and could benefit greatly from parallelization). I can start work on adding the fits_edge features to v2_parallelize. Let me know if there's anything else I can do to help out with testing. |
Sure @hbrincon I could definitely use a hand - I think you had started going through and commenting code, if you are able to do that some more that would be hugely helpful, I got stuck on some of the names of the data structures: Zones - Voids - And yeah we can pull in those other branches too, thanks for consolidating them into that one. |
The ones you don't know are also ones I struggle with, but my understanding of the terms is this:
VAST/python/vast/vsquared/classes.py Line 356 in 0e811ed
zlut - zone IDs in descending order of maximum linking volumevoids[i] - a list of which zone IDs are in void i , pre-pruning. Based off of VAST/python/vast/vsquared/zobov.py Line 202 in 0e811ed
voids are equivalent to the output of the zobov method, aka one void for every possible void in the void hierarchy as defined in section 2.3 of https://arxiv.org/abs/0712.3049mvols - (probably short for maximum volumes), the maximum volume cell in a zone, I'm guessing based on VAST/python/vast/vsquared/zobov.py Line 211 in 0e811ed
ovols[i][j] - (probably short for overflow volumes), the maximum linking volume that links zone i to all zones j that have a larger maximum cell volume than i , I'm guessing based on VAST/python/vast/vsquared/zobov.py Line 195 in 0e811ed
mvlut - lookup table used in the construction of mvols , not really sure beyond thatovlut - lookup table used in the construction of ovols , not really sure beyond that
|
The output data structrures are a series of up to 5 fits HDUs that are calculated in VAST/python/vast/vsquared/zobov.py Line 314 in 0e811ed
VAST/python/vast/vsquared/zobov.py Line 374 in 0e811ed
VAST/python/vast/vsquared/zobov.py Line 434 in 0e811ed
![]() ![]() ![]() |
So far just a draft PR, want to get the changes online so Hernan can see what I'm doing
So far shaved a few seconds off the overall runtime on DR7 just converting some indexing into some less redundant copying
Going through the V2 codebase to comment things, add docstrings, and eventually make an attempt to switch from using the Scipy/QHull backend to a parallelized Voronoi/Delaunay backend like potentially https://github.com/ParAlg/ParGeo or https://github.com/eleftherioszisis/multivoro
Also might be good to come up with some code that can convert between Voronoi and Delaunay because they are dual and right now during the Tesselation phase we're basically recomputing them from the input coordinates, instead of using the existing computed Voronoi class to produce the Delaunay class
Created some minor API changes in the main Zobov class (example: instead of "start" and "end" will now use a "stages" parameter to simplify")