+ if(request==MPI_FORTRAN_REQUEST_NULL)
+ return MPI_REQUEST_NULL;
+ return static_cast<MPI_Request>(xbt_dict_get(dict, get_key_id(key, request)));
+}
+
+#define SMPI_F2C_C2F(type, name)\
+int smpi_##name##_add_f(type name){\
+ return smpi_add_f<type>(name, name##_lookup, &name##_id);\
+}\
+int smpi_##name##_c2f(type name){\
+ return smpi_c2f<type>(name, name##_lookup, &name##_id);\
+}\
+static void free_##name(int id) {\
+ free_f<type>(id, name##_lookup);\
+}\
+type smpi_##name##_f2c(int id){\
+ return smpi_f2c<type>(id, name##_lookup);\
+}
+
+SMPI_F2C_C2F(MPI_Comm, comm)
+SMPI_F2C_C2F(MPI_Group, group)
+SMPI_F2C_C2F(MPI_Request, request)
+SMPI_F2C_C2F(MPI_Datatype, type)
+SMPI_F2C_C2F(MPI_Win, win)
+SMPI_F2C_C2F(MPI_Op, op)
+SMPI_F2C_C2F(MPI_Info, info)