- if (not Host::EXTENSION_ID.valid())
- Host::EXTENSION_ID = simgrid::s4u::Host::extension_create<Host>();
+ static const std::unordered_map<std::string, SmpiOperation> name_to_op_enum{
+ {"smpi/or", SmpiOperation::RECV}, {"smpi/os", SmpiOperation::SEND}, {"smpi/ois", SmpiOperation::ISEND}};
+ if (cost_cbs.find(name_to_op_enum.at(op)) != cost_cbs.end() &&
+ (host->get_property(op) || not config::is_default(op.c_str()))) {
+ XBT_WARN("SMPI (host: %s): mismatch cost functions for %s. Only user's callback will be used.", host->get_cname(),
+ op.c_str());
+ }
+}