Skip to content

Add parallelization to the smooth covering grid.#5341

Merged
cphyc merged 1 commit intoyt-project:mainfrom
AnatoleStorck:parallelize_smooth_covering_grid
Apr 29, 2026
Merged

Add parallelization to the smooth covering grid.#5341
cphyc merged 1 commit intoyt-project:mainfrom
AnatoleStorck:parallelize_smooth_covering_grid

Conversation

@AnatoleStorck
Copy link
Copy Markdown
Contributor

PR Summary

I've added functionality for generating a smooth covering grid by loading the data chunks in parallel using @cphyc #5218 's piter() function. I've also replaced the parallel for loop of the regular covering grid. This PR assumes that the functionality of #5218 is merged. The functionality has been confirmed to work both on sample dataset and a complex simulation.

@cphyc
Copy link
Copy Markdown
Member

cphyc commented Dec 3, 2025

For reference, this needs to be merged after #5218 gets merged (if it ever gets merged :) ).

@cphyc cphyc added parallelism MPI-based parallelism enhancement Making something better labels Dec 15, 2025
@cphyc cphyc marked this pull request as draft March 31, 2026 12:04
Copy link
Copy Markdown
Member

@matthewturk matthewturk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do think this is great!

Comment thread yt/data_objects/construction_data_containers.py Outdated
chunk.get_data(fields)
input_fields = [chunk[field] for field in fields]
tot -= fill_region(
filled_cells += fill_region(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using this is a lot better than tot -=!

ls.left_edge = ls.global_startindex * ls.current_dx + self.ds.domain_left_edge.d
ls.right_edge = ls.left_edge + ls.current_dims * ls.current_dx
ls.fields = [np.zeros(idims, dtype="float64") - 999 for field in fields]
ls.fields = [np.zeros(idims, dtype="float64") for field in fields]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. I believe the setting of -999 was necessary when we didn't check the touched cell count, but that's long since changed.

@cphyc cphyc marked this pull request as ready for review April 29, 2026 06:45
@cphyc cphyc force-pushed the parallelize_smooth_covering_grid branch 2 times, most recently from f11768d to 313681c Compare April 29, 2026 07:46
@cphyc cphyc force-pushed the parallelize_smooth_covering_grid branch from 313681c to 643ac24 Compare April 29, 2026 07:49
Comment thread yt/data_objects/construction_data_containers.py Outdated
@cphyc cphyc merged commit ceec403 into yt-project:main Apr 29, 2026
13 of 14 checks passed
@chrishavlin chrishavlin added this to the 4.5.0 milestone Apr 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Making something better parallelism MPI-based parallelism

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants