llnl / llnl/axom

external vs view into shared buffer?

Open
#45 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
C++
Stars
196
Forks
34
Avg merge
4d 1h
Merged PRs (30d)
11

Description

@nselliott pointed out an issue with reading external buffers in the VisIt Blueprint plugin.

The files were created with `src/axom/sidre/examples/sidre_createdatastore.cpp`
I found the issue with the VisIt plugin, however I am still a bit confused b/c I did not expect these fields to be written out as "external".

Here is the snippet that creates the views:

```
// "x", "y", and "z" are three views into a shared Sidre buffer object that
// holds 3 * nodecount doubles. These views might describe the location of
// each node in a 16 x 16 x 16 hexahedron mesh. Each view is described by
// number of elements, offset, and stride into that data.
Buffer* buff = ds->createBuffer(sidre::DOUBLE_ID, 3*nodecount)->allocate();
nodes->createView("x", buff)->apply(sidre::DOUBLE_ID, nodecount, 0, 3);
nodes->createView("y", buff)->apply(sidre::DOUBLE_ID, nodecount, 1, 3);
nodes->createView("z", buff)->apply(sidre::DOUBLE_ID, nodecount, 2, 3);
// _first_example_nodes_end
```

(With the fix) in VisIt I am definitely reading them as external views from the HDF5 file:

```
loading mesh/coordsets/coords/values/x as sidre external view
relay:io::hdf5_read domain 0 : datagroup_0000000/sidre/external/mesh/coordsets/coords/values/x
```

Is this expected? I expected them to simply be a view into a known buffer.

@kennyweiss @agcapps any thoughts?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/axom/sidre/examples/sidre_createdatastore.cpp and trace how the VisIt Blueprint plugin reads the shared-buffer views from the HDF5 paths shown in the report. Compare the expected view representation with the external-view handling, and consider the issue complete when the expected behavior is established and the plugin and stored data agree.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
hpc
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.