Skip to content

Commit 6ff274c

Browse files
committed
modified LBANN_WARNING to call H2 logging LBANN_WARN
1 parent 3590a3d commit 6ff274c

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

include/lbann/utils/exception.hpp

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#define LBANN_UTILS_EXCEPTION_HPP_INCLUDED
2929

3030
#include "lbann/comm.hpp"
31+
#include "lbann/utils/logging.hpp"
3132

3233
#include <exception>
3334
#include <iostream>
@@ -50,22 +51,7 @@
5051
} while (0)
5152

5253
// Macro to print a warning to standard error stream.
53-
#define LBANN_WARNING(...) \
54-
do { \
55-
const int rank_LBANN_WARNING = lbann::get_rank_in_world(); \
56-
std::cerr << lbann::build_string( \
57-
"LBANN warning", \
58-
(rank_LBANN_WARNING >= 0 \
59-
? " on rank " + std::to_string(rank_LBANN_WARNING) \
60-
: std::string()), \
61-
" (", \
62-
__FILE__, \
63-
":", \
64-
__LINE__, \
65-
"): ", \
66-
__VA_ARGS__) \
67-
<< std::endl; \
68-
} while (0)
54+
#define LBANN_WARNING(...) LBANN_WARN(lbann::logging::LBANN_Logger_ID::LOG_RT, __VA_ARGS__)
6955

7056
// Macro to print a message to standard cout stream.
7157
#define LBANN_MSG(...) \

0 commit comments

Comments
 (0)