message: Report preconditioner info in solver benchmark
diff: @@ -216,6 +216,49 @@ const std::map<std::string, std::function<std::unique_ptr<gko::LinOpFactory>(
  }}};
  +void write_precond_info(const gko::LinOp *precond,
  + rapidjson::Value &precond_info,
  + rapidjson::MemoryPoolAllocator<> &allocator)
  +{
  + if (auto jacobi =
  + dynamic_cast<const gko::preconditioner::Jacobi<etype> *>(precond)) {
  + // extract block sizes
  + auto bdata = jacobi->get_parameters().block_pointers.get_const_data();
  + add_or_set_member(precond_info, "block_sizes",
  + rapidjson::Value(rapidjson::kArrayType), allocator);
  + for (auto i = 0u; i < jacobi->get_num_blocks(); ++i) {
  + precond_info["block_sizes"].PushBack(bdata[i + 1] - bdata[i],
  + allocator);
  + }
  +
  + // extract block precisions
  + auto pdata = jacobi->get_parameters()
  + .storage_optimization.block_wise.get_const_data();
  + if (pdata) {
  + add_or_set_member(precond_info, "block_precisions",
  + rapidjson::Value(rapidjson::kArrayType),
  + allocator);
  + for (auto i = 0u; i < jacobi->get_num_blocks(); ++i) {
  + precond_info["block_precisions"].PushBack(
  + static_cast<int>(pdata[i]), allocator);
  + }
  + }
  +
  + // extract condition numbers
  + auto cdata = jacobi->get_conditioning();
  + if (cdata) {
  + add_or_set_member(precond_info, "block_conditioning",
  + rapidjson::Value(rapidjson::kArrayType),
  + allocator);
  + for (auto i = 0u; i < jacobi->get_num_blocks(); ++i) {
  + precond_info["block_conditioning"].PushBack(cdata[i],
  + allocator);
  + }
  + }
  + }
  +}
  +
  +
  template <typename RandomEngine>
  void solve_system(
  const std::string &solver_name, const std::string &precond_name,
  @@ -259,6 +302,16 @@ void solve_system(
  gen_logger->write_data(solver_json["generate"]["components"], allocator,
  1);
  + if (auto prec =
  + dynamic_cast<const gko::Preconditionable *>(lend(solver))) {
  + add_or_set_member(solver_json, "preconditioner",
  + rapidjson::Value(rapidjson::kObjectType),
  + allocator);
  + write_precond_info(lend(clone(get_executor()->get_master(),
  + prec->get_preconditioner())),
  + solver_json["preconditioner"], allocator);
  + }
  +
  auto apply_logger = std::make_shared<OperationLogger>(exec);
  exec->add_logger(apply_logger);
  auto res_logger = std::make_shared<ResidualLogger<etype>>(
  