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

Updates to use latest Trilinos develop branch #1255

Merged
merged 7 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Clone
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Check formatting
uses: DoozyX/clang-format-lint-action@v0.13
uses: DoozyX/clang-format-lint-action@v0.16.2
with:
source: 'nalu.C unit_tests.C ./include ./src ./unit_tests'
extensions: 'H,h,cpp,C'
clangFormatVersion: 13
clangFormatVersion: 16
CPU-Trilinos:
needs: Formatting
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion include/AssembleElemSolverAlgorithm.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class AssembleElemSolverAlgorithm : public SolverAlgorithm
auto& b = ngpMesh.get_bucket(entityRank, bktId);

#if !defined(KOKKOS_ENABLE_GPU)
ThrowAssertMsg(
STK_ThrowAssertMsg(
b.topology().num_nodes() == (unsigned)nodesPerEntity_,
"AssembleElemSolverAlgorithm expected nodesPerEntity_ = "
<< nodesPerEntity_
Expand Down
4 changes: 2 additions & 2 deletions include/AssembleFaceElemSolverAlgorithm.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class AssembleFaceElemSolverAlgorithm : public SolverAlgorithm
auto& b = ngpMesh.get_bucket(sideRank, bktId);

#if !defined(KOKKOS_ENABLE_GPU)
ThrowAssertMsg(
STK_ThrowAssertMsg(
b.topology().num_nodes() == (unsigned)nodesPerFace_,
"AssembleFaceElemSolverAlgorithm expected nodesPerEntity_ = "
<< nodesPerFace_
Expand Down Expand Up @@ -111,7 +111,7 @@ class AssembleFaceElemSolverAlgorithm : public SolverAlgorithm
stk::mesh::Entity face =
b[bktIndex * simdLen + numFacesProcessed + simdFaceIndex];
const auto ngpFaceIndex = ngpMesh.fast_mesh_index(face);
// ThrowAssertMsg(
// STK_ThrowAssertMsg(
// bulk.num_elements(face) == 1,
// "Expecting just 1 element attached to face!");
int thisElemFaceOrdinal =
Expand Down
18 changes: 9 additions & 9 deletions include/CopyAndInterleave.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ copy_and_interleave(
for (unsigned viewIndex = 0; viewIndex < numViews; ++viewIndex) {
for (int simdIndex = 0; simdIndex < simdElems; ++simdIndex) {
src[simdIndex] = data[simdIndex]->get_1D_view_by_index(viewIndex).data();
NGP_ThrowAssert(
STK_NGP_ThrowAssert(
data[simdIndex]->get_1D_view_by_index(viewIndex).size() ==
simdData.get_1D_view_by_index(viewIndex).size());
NGP_ThrowAssert(src[simdIndex] != nullptr);
NGP_ThrowAssert(
STK_NGP_ThrowAssert(src[simdIndex] != nullptr);
STK_NGP_ThrowAssert(
src[simdIndex][0] ==
data[simdIndex]->get_1D_view_by_index(viewIndex).data()[0]);
}
Expand All @@ -74,11 +74,11 @@ copy_and_interleave(
for (unsigned viewIndex = 0; viewIndex < numViews; ++viewIndex) {
for (int simdIndex = 0; simdIndex < simdElems; ++simdIndex) {
src[simdIndex] = data[simdIndex]->get_2D_view_by_index(viewIndex).data();
NGP_ThrowAssert(
STK_NGP_ThrowAssert(
data[simdIndex]->get_2D_view_by_index(viewIndex).size() ==
simdData.get_2D_view_by_index(viewIndex).size());
NGP_ThrowAssert(src[simdIndex] != nullptr);
NGP_ThrowAssert(
STK_NGP_ThrowAssert(src[simdIndex] != nullptr);
STK_NGP_ThrowAssert(
src[simdIndex][0] ==
data[simdIndex]->get_2D_view_by_index(viewIndex).data()[0]);
}
Expand All @@ -89,11 +89,11 @@ copy_and_interleave(
for (unsigned viewIndex = 0; viewIndex < numViews; ++viewIndex) {
for (int simdIndex = 0; simdIndex < simdElems; ++simdIndex) {
src[simdIndex] = data[simdIndex]->get_3D_view_by_index(viewIndex).data();
NGP_ThrowAssert(
STK_NGP_ThrowAssert(
data[simdIndex]->get_3D_view_by_index(viewIndex).size() ==
simdData.get_3D_view_by_index(viewIndex).size());
NGP_ThrowAssert(src[simdIndex] != nullptr);
NGP_ThrowAssert(
STK_NGP_ThrowAssert(src[simdIndex] != nullptr);
STK_NGP_ThrowAssert(
src[simdIndex][0] ==
data[simdIndex]->get_3D_view_by_index(viewIndex).data()[0]);
}
Expand Down
2 changes: 1 addition & 1 deletion include/ElemDataRequests.h
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ class ElemDataRequests
get_coordinates_field(const COORDS_TYPES cType) const
{
auto it = coordsFields_.find(cType);
NGP_ThrowRequireMsg(
STK_NGP_ThrowRequireMsg(
it != coordsFields_.end(),
"ElemDataRequests:get_coordinates_field: Coordinates field "
"must be registered to ElemDataRequests before access");
Expand Down
10 changes: 5 additions & 5 deletions include/MultiDimViews.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class MultiDimViews
views_3D_size(0),
views_4D_size(0)
{
NGP_ThrowRequireMsg(
STK_NGP_ThrowRequireMsg(
(numNeededViews.num1DViews <= maxViewsPerDim ||
numNeededViews.num2DViews <= maxViewsPerDim ||
numNeededViews.num3DViews <= maxViewsPerDim ||
Expand Down Expand Up @@ -176,7 +176,7 @@ class MultiDimViews
KOKKOS_FUNCTION
void add_1D_view(unsigned ordinal, const SharedMemView1D& view)
{
NGP_ThrowRequire(ordinal < maxFieldOrdinals);
STK_NGP_ThrowRequire(ordinal < maxFieldOrdinals);
#if !defined(KOKKOS_ENABLE_GPU)
views_1D[views_1D_size] = new SharedMemView1D;
*views_1D[views_1D_size] = view;
Expand All @@ -190,7 +190,7 @@ class MultiDimViews
KOKKOS_FUNCTION
void add_2D_view(unsigned ordinal, const SharedMemView2D& view)
{
NGP_ThrowRequire(ordinal < maxFieldOrdinals);
STK_NGP_ThrowRequire(ordinal < maxFieldOrdinals);
#if !defined(KOKKOS_ENABLE_GPU)
views_2D[views_2D_size] = new SharedMemView2D;
*views_2D[views_2D_size] = view;
Expand All @@ -204,7 +204,7 @@ class MultiDimViews
KOKKOS_FUNCTION
void add_3D_view(unsigned ordinal, const SharedMemView3D& view)
{
NGP_ThrowRequire(ordinal < maxFieldOrdinals);
STK_NGP_ThrowRequire(ordinal < maxFieldOrdinals);
#if !defined(KOKKOS_ENABLE_GPU)
views_3D[views_3D_size] = new SharedMemView3D;
*views_3D[views_3D_size] = view;
Expand All @@ -218,7 +218,7 @@ class MultiDimViews
KOKKOS_FUNCTION
void add_4D_view(unsigned ordinal, const SharedMemView4D& view)
{
NGP_ThrowRequire(ordinal < maxFieldOrdinals);
STK_NGP_ThrowRequire(ordinal < maxFieldOrdinals);
#if !defined(KOKKOS_ENABLE_GPU)
views_4D[views_4D_size] = new SharedMemView4D;
*views_4D[views_4D_size] = view;
Expand Down
Loading