Skip to content

Adios2 update #136

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

Merged
merged 13 commits into from
May 27, 2025
Merged

Adios2 update #136

merged 13 commits into from
May 27, 2025

Conversation

usmanriaz07
Copy link

@usmanriaz07 usmanriaz07 commented Apr 18, 2025

This PR:

  • modifies the writing function from omega_h mesh to adios2 file to get rid of data that does not need to be saved explicitly, and use of multi-dimensional arrays for data where needed.
  • updates the corresponding read function from adios2 to omega_h.
  • moves the function write_mesh () to header file.

The updated output of bpls on a mesh written to an adios2 (.bp) file is given below. In this file, mesh/planes/0 is the pre name provided to the writer function.

  int32_t  mesh/planes/0/comm_size                {1}
  int32_t  mesh/planes/0/dim                      {1}
  int32_t  mesh/planes/0/downward_adj/1_to_0      {1526, 2}
  int32_t  mesh/planes/0/downward_adj/2_to_1      {994, 3}
  int8_t   mesh/planes/0/downward_codes/2         {994, 3}
  int32_t  mesh/planes/0/family                   {1}
  int32_t  mesh/planes/0/mesh_version             {1}
  int32_t  mesh/planes/0/nghost_layers            {1}
  int32_t  mesh/planes/0/nverts                   {1}
  int32_t  mesh/planes/0/parting                  {1}
  int32_t  mesh/planes/0/rank                     {1}
  int8_t   mesh/planes/0/tags/0/class_dim/data    {533, 1}
  int32_t  mesh/planes/0/tags/0/class_id/data     {533, 1}
  double   mesh/planes/0/tags/0/coordinates/data  {533, 2}
  int8_t   mesh/planes/0/tags/1/class_dim/data    {1526, 1}
  int32_t  mesh/planes/0/tags/1/class_id/data     {1526, 1}
  int8_t   mesh/planes/0/tags/2/class_dim/data    {994, 1}
  int32_t  mesh/planes/0/tags/2/class_id/data     {994, 1}

Copy link
Collaborator

@jacobmerson jacobmerson left a comment

Choose a reason for hiding this comment

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

Looks reasonable to me. Can you post the output of bpls on a mesh file created with this?

Copy link

@cwsmith cwsmith left a comment

Choose a reason for hiding this comment

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

Looks good. Thank you.

I left one comment below.

Do we have any test cases for serial/parallel adios2 read/write?

@jacobmerson
Copy link
Collaborator

@cwsmith I believe this is ready to merge when you return.

Copy link

@cwsmith cwsmith left a comment

Choose a reason for hiding this comment

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

Looks good. A few small comments are below.

It looks like this is the current test case that writes then reads via the adios2 api:

omega_h/src/CMakeLists.txt

Lines 668 to 671 in 09a5171

test_basefunc(adios2_io 1 ./adios2_io
${CMAKE_SOURCE_DIR}/meshes/unitbox_cutTriCube_1k.osh
${CMAKE_SOURCE_DIR}/meshes/plate_6elem.osh
output.bp)

Would providing adios2osh and osh2adios converter utilities (as done for gmsh, exodus, etc.) be useful for the applications that need adios2 meshes?

@usmanriaz07
Copy link
Author

Would providing adios2osh and osh2adios converter utilities (as done for gmsh, exodus, etc.) be useful for the applications that need adios2 meshes?

Seegyoung has already added those utilities (bp2osh and osh2bp).
https://github.com/SCOREC/omega_h/blob/master/src/CMakeLists.txt#L665-L666

@cwsmith
Copy link

cwsmith commented May 21, 2025

/runtests

Copy link

Test Result: success (details)

@cwsmith
Copy link

cwsmith commented May 21, 2025

If @jacobmerson is all set then I think this can be merged.

@jacobmerson jacobmerson merged commit 81f65b6 into master May 27, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants