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

Support Particle Functionalities #32

Closed cindytsai closed 2 years ago

cindytsai commented 2 years ago

Support Particle Functionalities

Initially, particle plots may generate false figure, if the MPI size is too large. After testing on different machine, this doesn't seems to be an issue in libyt. This is more or less related to memory space of one machine has. But we still cannot find where actually is this issue, we move to another issue.

:information_source: After testing on calab912 and eureka, it doesn't seem to be an issue. Instead, it is more or less related to memory on the machine. Though we still don't know why and where is the bug.

:heavy_check_mark: Particle plot (ParticlePlot, ParticleProjectionPlot) can successfully run in parallel in inline-analysis. Though some memory related issues may occurred.

Test Run on My Laptop with RAM = 16

All of the images are results from inline-analysis. MPI=1 is the correct and expected outcome.

  • Test Problem: gamer Plummer
  • Machine: My Laptop
    ParticlePlot
    import yt
    yt.enable_parallelism()
    def yt_inline():
    ds = yt.frontends.libyt.libytDataset()
    par = yt.ParticlePlot( ds, 'particle_position_x', 'particle_position_y', "particle_mass", center='c' )
    if yt.is_root():
    par.save()
  • MPI=1 Fig000000000_Particle_z_particle_mass
  • MPI=2 Fig000000000_Particle_z_particle_mass
ParticleProjectionPlot
import yt
yt.enable_parallelism()
def yt_inline():
    ds = yt.frontends.libyt.libytDataset()
    par = yt.ParticleProjectionPlot( ds, "z")
    if yt.is_root():
        par.save()
cindytsai commented 2 years ago

ParticlePlot

cindytsai commented 2 years ago

ParticlePlot

cindytsai commented 2 years ago

ParticleProjectionPlot