Skip to content

Conversation

@ebchin
Copy link
Member

@ebchin ebchin commented Apr 17, 2025

Summary

  • This PR is a small addition to the axom spack recipe.
  • It does the following:
    • Enables setting AXOM_USE_64BIT_INDEXTYPE through the spack variant int64
  • It also enables AXOM_USE_64BIT_INDEXTYPE by default (see Issues related to axom::IndexType #718). As such axom::IndexType will default to std::int64_t instead of std::int32_t.

Context

Recently, we've been running large problems in Tribol which have needed this option. Exposing it to the spack recipe will simplify enabling this in our TPL builds.

@ebchin ebchin requested review from kennyweiss and white238 April 17, 2025 17:01
Copy link
Member

@kennyweiss kennyweiss left a comment

Choose a reason for hiding this comment

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

Thanks for adding this variant @ebchin

I wonder if there's a better name we could use for this though (but nothing comes immediately to mind). I checked the hypre package, and they use int64 for an equivalent option, so I suppose we should go with this.

See: https://github.com/spack/spack/blob/f0a7388496a5cb062d7ec6541273b6cc697ba051/var/spack/repos/builtin/packages/hypre/package.py#L65

@kennyweiss
Copy link
Member

Side question for axom team -- we previously discussed setting the default IndexType to 64-bit.

Would this be a good time to do this? E.g. by making the default spack variant +int64?
See: #718

@ebchin
Copy link
Member Author

ebchin commented Apr 17, 2025

Yeah, the int64 name came from hypre. Happy to change if there's a consensus on something better.

@rhornung67
Copy link
Member

@kennyweiss I think changing the default index type in Axom to 64-bit int is a good idea. It would probably prevent some user issues and others can set it to a lower resolution type if they want/need to.

@kennyweiss
Copy link
Member

kennyweiss commented Apr 17, 2025

Thanks @rhornung67.

In that case, @ebchin -- could you please change the default for int64 to True?

(we'll change the default CMake option on the axom side in a follow-up PR).


// 3D Elvira makes polyhedral meshes
auto srcTopologyView = views::make_unstructured_polyhedral_topology<int>::view(n_src_topology);
auto srcTopologyView =
Copy link
Member

Choose a reason for hiding this comment

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

@BradWhitlock -- this was failing w/ axom::IndexType == std::int64_t. Change the template to axom::IndexType fixed it and seems to be the right thing to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants