27 #ifndef LBANN_UNIT_TEST_MPI_TEST_HELPERS_HPP_ 28 #define LBANN_UNIT_TEST_MPI_TEST_HELPERS_HPP_ 36 #define LBANN_ASSERT_POINTER(ptr) \ 39 throw ::unit_test::utilities::BadPointer( \ 40 __FILE__, __LINE__, #ptr); \ 49 std::string
const& var_name)
52 file,
":", line,
": \"", var_name,
"\" is null.")}
61 size_t as_size(T
const& size) noexcept {
return static_cast<size_t>(size); }
80 #endif // LBANN_UNIT_TEST_MPI_TEST_HELPERS_HPP_ BadPointer(std::string const &file, unsigned int line, std::string const &var_name)
std::string build_string(Args &&... args)
Build a string from the arguments.
void register_world_comm(lbann::lbann_comm &comm) noexcept
Set the world communicator for this session.
size_t as_size(T const &size) noexcept
lbann::lbann_comm & current_world_comm()
Get the world communicator for this MPI session.
void reset_world_comm() noexcept
Clear the world communicator for this session.