Skip to content

Commit

Permalink
SEACAS: Kluge/Fix for NVCC compiler error and warning
Browse files Browse the repository at this point in the history
  • Loading branch information
gdsjaar committed Sep 25, 2024
1 parent 0b2099d commit d3803ff
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions packages/seacas/applications/cpup/cpup.C
Original file line number Diff line number Diff line change
Expand Up @@ -715,19 +715,25 @@ namespace {
fmt::print(stderr, " {:14} cells, {:14} nodes ", fmt::group_digits(num_cell),
fmt::group_digits(num_node));

#if defined(__NVCC__)
#define CONST
#else
#define CONST const
#endif
if (!sb->m_zoneConnectivity.empty()) {
fmt::print(stderr, "\n\tConnectivity with other blocks:\n");
for (const auto &zgc : sb->m_zoneConnectivity) {
for (CONST auto &zgc : sb->m_zoneConnectivity) {
fmt::print(stderr, "{}\n", zgc);
}
}

if (!sb->m_boundaryConditions.empty()) {
fmt::print(stderr, "\tBoundary Conditions:\n");
for (const auto &bc : sb->m_boundaryConditions) {
for (CONST auto &bc : sb->m_boundaryConditions) {
fmt::print(stderr, "{}\n", bc);
}
}
#undef CONST
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4811,7 +4811,7 @@ namespace Ioex {
std::vector<INT> proc_id(elementCount, myProcessor);
const auto &blocks = region->get_element_blocks();
for (const auto &block : blocks) {
put_field_internal(block, block->get_field("proc_id"), Data(proc_id), -1);
put_field_internal(block, block->get_field("proc_id"), Data(proc_id), 0);
}
}

Expand Down

0 comments on commit d3803ff

Please sign in to comment.