Commit af2869b5 authored by Dmitry I. Lyakh's avatar Dmitry I. Lyakh
Browse files

Added more error output to track tensor existence domain issue ...


Signed-off-by: default avatarDmitry I. Lyakh <quant4me@gmail.com>
parent fb7a168a
......@@ -504,8 +504,10 @@ public:
<< "Tensor " << tensor_name << " violates this requirement!" << std::endl;
const auto & tensor_domain_ranks = tensor_domain.getProcessRanks();
const auto & other_tensors_domain_ranks = other_tensors_domain.getProcessRanks();
std::cout << tensor_name << ":" << std::endl;
for(const auto & proc_rank: tensor_domain_ranks) std::cout << " " << proc_rank;
std::cout << std::endl;
print_variadic_pack(std::forward<Args>(tensor_names)...); std::cout << ":" << std::endl;
for(const auto & proc_rank: other_tensors_domain_ranks) std::cout << " " << proc_rank;
std::cout << std::endl;
assert(false);
......
/** ExaTN: Error handling
REVISION: 2020/10/22
REVISION: 2021/09/27
Copyright (C) 2018-2020 Dmitry I. Lyakh (Liakh)
Copyright (C) 2018-2020 Oak Ridge National Laboratory (UT-Battelle) **/
Copyright (C) 2018-2021 Dmitry I. Lyakh (Liakh)
Copyright (C) 2018-2021 Oak Ridge National Laboratory (UT-Battelle) **/
#ifndef EXATN_ERRORS_HPP_
#define EXATN_ERRORS_HPP_
......@@ -45,6 +45,18 @@ inline void make_sure(bool condition,
return;
}
inline void print_variadic_pack()
{
return;
}
template <typename Arg, typename... Args>
inline void print_variadic_pack(Arg&& arg, Args&&... args)
{
std::cout << std::forward<Arg>(arg) << " ";
return print_variadic_pack(std::forward<Args>(args)...);
}
} //namespace exatn
#endif //EXATN_ERRORS_HPP_
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment