if (TRACE_smpi_view_internals() && ((req->flags_ & RECV) != 0)){
int rank = smpi_process()->index();
int src_traced = (req->src_ == MPI_ANY_SOURCE ? req->real_src_ : req->src_);
- TRACE_smpi_recv(rank, src_traced, rank,req->tag_);
+ TRACE_smpi_recv(src_traced, rank,req->tag_);
}
if(req->detached_sender_ != nullptr){
//integrate pseudo-timing for buffering of small messages, do not bother to execute the simcall if 0
char key[KEY_SIZE];
if(id==MPI_FORTRAN_REQUEST_NULL)
return static_cast<MPI_Request>(MPI_REQUEST_NULL);
- return static_cast<MPI_Request>(xbt_dict_get(F2C::f2c_lookup(), get_key_id(key, id)));
+ return static_cast<MPI_Request>(F2C::f2c_lookup()->at(get_key_id(key, id)));
}
-int Request::add_f() {
- if(F2C::f2c_lookup()==nullptr){
- F2C::set_f2c_lookup(xbt_dict_new_homogeneous(nullptr));
+int Request::add_f()
+{
+ if (F2C::f2c_lookup() == nullptr) {
+ F2C::set_f2c_lookup(new std::unordered_map<std::string, F2C*>);
}
char key[KEY_SIZE];
- xbt_dict_set(F2C::f2c_lookup(), get_key_id(key, F2C::f2c_id()), this, nullptr);
+ (*(F2C::f2c_lookup()))[get_key_id(key, F2C::f2c_id())] = this;
F2C::f2c_id_increment();
return F2C::f2c_id()-1;
}
-void Request::free_f(int id) {
+void Request::free_f(int id)
+{
if (id != MPI_FORTRAN_REQUEST_NULL) {
char key[KEY_SIZE];
- xbt_dict_remove(F2C::f2c_lookup(), get_key_id(key, id));
+ F2C::f2c_lookup()->erase(get_key_id(key, id));
}
}
}
}
-
-
-