Skip to content
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

HDF5 Engine needs to support memory selections #1866

Closed
pnorbert opened this issue Nov 6, 2019 · 7 comments
Closed

HDF5 Engine needs to support memory selections #1866

pnorbert opened this issue Nov 6, 2019 · 7 comments
Assignees

Comments

@pnorbert
Copy link
Contributor

pnorbert commented Nov 6, 2019

The Gray-Scott example has ghost cells that must not be written. Since memory selection is supported in ADIOS, there is an option (in simulation/settings-file.json "adios_memory_selection": true) to use it in Gray-Scott writer.cpp (var_u.SetMemorySelection()).

So far we have used the original writing code that used a function to copy out the actual data to provide a contiguous array for ADIOS Put() without memory selection. But BP and SST now supports memory selection and it's time to retire this code in Gray-Scott that does an extra memory copy.

Plotting with gsplot.py will make it obvious that the data is invalid when writing with the HDF5 engine and using memory selections.

@pnorbert pnorbert added this to the 2.6.0 Production Release milestone Nov 6, 2019
@pnorbert pnorbert added the bug label Jan 30, 2020
@pnorbert
Copy link
Contributor Author

Changing this to Bug level since it is an issue with the Tutorial. The "proper" adios code is not portable to HDF5 output, forcing gray-scott to use inefficient code (extra copy).

@guj
Copy link
Contributor

guj commented Jan 30, 2020

@pnorbert
Hi Norbert, I am not sure what you meant by "proper"adios code?
where is the extra copy in gray-scott?

  • Junmin

@pnorbert
Copy link
Contributor Author

gray-scott/simulation/writer.cpp line 112

    std::vector<double> u = sim.u_noghost();

That function makes a copy of the data sim.u without the ghost cells.
The "proper" code uses memory selection, and in line 89

     const std::vector<double> &u = sim.u_ghost();

will just use the sim.u data pointer as is.

@guj
Copy link
Contributor

guj commented Jan 31, 2020 via email

@pnorbert
Copy link
Contributor Author

pnorbert commented Feb 1, 2020 via email

@guj
Copy link
Contributor

guj commented Feb 1, 2020 via email

@pnorbert
Copy link
Contributor Author

pnorbert commented Feb 3, 2020

Resolved. Thanks for testing this.

The issue appears on the VM with the ADIOS 2.5.0 installation from github source (commit 837d1b0). It does not appear with master or with an installation from the downloaded 2.5.0 tarball.

@pnorbert pnorbert closed this as completed Feb 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants