Skip to content

Commit

Permalink
IOSS: Fixes needed for sierra build
Browse files Browse the repository at this point in the history
  • Loading branch information
gdsjaar authored and gsjaardema committed Sep 21, 2023
1 parent 5c558d1 commit 0a3c3db
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@
#include <Ioss_SmartAssert.h>
#include <algorithm>
#include <cgns/Iocgns_StructuredZoneData.h>
#if !defined __NVCC__
#include <fmt/color.h>
#endif
#include <fmt/ostream.h>
#include <string>
#include <tokenize.h>

namespace {
Expand Down Expand Up @@ -362,7 +365,9 @@ namespace Iocgns {
fmt::print(
Ioss::DebugOut(), "{}",
fmt::format(
#if !defined __NVCC__
fg(fmt::color::cyan),
#endif
"\nSplit Zone {} ({}) Adam {} ({}) with intervals {:>12},\twork = {:12}, offset {} "
"{} {}, ordinal {}, ratio {:.3f}\n",
m_name, m_zone, m_adam->m_name, m_adam->m_zone,
Expand Down
8 changes: 7 additions & 1 deletion packages/seacas/libraries/ioss/src/cgns/Iocgns_Utils.C
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,13 @@
#include <Ioss_Wedge6.h>

#include <fmt/chrono.h>
#if !defined __NVCC__
#include <fmt/color.h>
#endif
#include <fmt/ostream.h>
#include <numeric>
#include <set>
#include <string>
#include <tokenize.h>

#include <cgns/Iocgns_StructuredZoneData.h>
Expand Down Expand Up @@ -2562,7 +2565,10 @@ void Iocgns::Utils::decompose_model(std::vector<Iocgns::StructuredZoneData *> &z
px++;
if (verbose && rank == 0) {
fmt::print(Ioss::DebugOut(), "{}",
fmt::format(fg(fmt::color::red),
fmt::format(
#if !defined __NVCC__
fg(fmt::color::red),
#endif
"\nProcessor {} work: {}, workload ratio: {} (exceeds)", i,
fmt::group_digits(work_vector[i]), workload_ratio));
}
Expand Down
12 changes: 11 additions & 1 deletion packages/seacas/libraries/ioss/src/main/io_info.C
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
#include "io_info.h"
#include <Ioss_Hex8.h>
#include <Ioss_Sort.h>
#include <Ioss_StructuredBlock.h>
#include <Ioss_ZoneConnectivity.h>
#include <tokenize.h>
#define FMT_DEPRECATED_OSTREAM
#include <fmt/format.h>
Expand Down Expand Up @@ -263,7 +265,11 @@ namespace {
if (!sb->m_zoneConnectivity.empty()) {
fmt::print("\tConnectivity with other blocks:\n");
for (const auto &zgc : sb->m_zoneConnectivity) {
fmt::print("{}\n", zgc);
#if defined __NVCC__
std::cout << zgc << "\n";
#else
fmt::print("{}\n", zgc);
#endif
}
}
if (!sb->m_boundaryConditions.empty()) {
Expand All @@ -277,7 +283,11 @@ namespace {
});

for (const auto &bc : sb_bc) {
#if defined __NVCC__
std::cout << bc << "\n";
#else
fmt::print("{}\n", bc);
#endif
}
}
if (interFace.compute_bbox()) {
Expand Down

0 comments on commit 0a3c3db

Please sign in to comment.