yt-project / libyt

In-situ analysis with yt
https://libyt.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
9 stars 3 forks source link

Ask Non-Local Grid From Other MPI Rank #26

Closed cindytsai closed 2 years ago

cindytsai commented 3 years ago

Ask Non-Local Grid From Other MPI Rank

cindytsai commented 2 years ago

Solution

Because window creation in MPI RMA operation is a collective operation, every rank must be in the same state. Which means we have to enter this state at the very beginning of the IO. ( I didn't consider load balancing. But if we really need to, we only need to make sure every rank goes to the same function that will enter the same state.) To do this,

Distinguish local/non-local grids.

See cindytsai/yt branch libyt-NonLocal.

At libyt yt frontend, gather all the non-local grids at each rank's perspective.

See cindytsai/yt branch libyt-NonLocal.

RMA operation in C extended python method.

Collect the field and return.

Reference

Test Run

TODO

hyschive commented 2 years ago

@cindytsai I like this approach. We can easily distinguish local and non-local grids when collecting the complete AMR structure.

cindytsai commented 2 years ago

Test Run

Volume Rendering

cindytsai commented 2 years ago

Test Run

OffAxisProjectionPlot

cindytsai commented 2 years ago

Test Run

OffAxisSlicePlot

cindytsai commented 2 years ago

Test Run

ParticlePlot

Output

Fig000000000_Particle_z_particle_mass

Expected Output

Fig000000000_Particle_z_particle_mass

cindytsai commented 2 years ago

Test Run

ParticleProjectionPlot

MPI = 2

Fig000000000_Particle_z_particle_ones

MPI = 1 (Expected)

Fig000000000_Particle_z_particle_ones