Skip to content

Commit

Permalink
EXODUS: Better control over exodus verbosity
Browse files Browse the repository at this point in the history
  • Loading branch information
gdsjaar committed Jul 11, 2024
1 parent e90f721 commit dcfafb8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
12 changes: 9 additions & 3 deletions packages/seacas/libraries/exodus/src/ex_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -2090,9 +2090,15 @@ int exi_handle_mode(unsigned int my_mode, int is_parallel, int run_version)
* unless specified differently via environment.
*/
{
char *option = getenv("EXODUS_VERBOSE");
if (option != NULL) {
exoptval = EX_VERBOSE;
if (exoptval != EX_VERBOSE) {
/* Avoid getenv call if already in verbose mode */
char *option = getenv("EXODUS_VERBOSE");
if (option != NULL) {
exoptval = EX_VERBOSE;
if (option[0] != 'q') {
fprintf(stderr, "EXODUS: Setting EX_VERBOSE mode since EXODUS_VERBOSE environment variable is set.\n");
}
}
}
ex_opts(exoptval); /* call required to set ncopts first time through */
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,13 @@ namespace Ioex {
"IOEX: Setting EX_VERBOSE|EX_DEBUG because EX_DEBUG environment variable is set.\n");
ex_opts(EX_VERBOSE | EX_DEBUG);
}
// This is also done down in the exodus library, but helps logic to do it here...
if (util().get_environment("EXODUS_VERBOSE", isParallel)) {
fmt::print(
Ioss::DebugOut(),
"IOEX: Exodus error reporting set to VERBOSE because EXODUS_VERBOSE environment variable is set.\n");
ex_opts(EX_VERBOSE);
}

if (!is_input()) {
if (util().get_environment("EX_MODE", exodusMode, isParallel)) {
Expand Down

0 comments on commit dcfafb8

Please sign in to comment.