-void smpi_comm_use(MPI_Comm comm){
- if (comm == MPI_COMM_UNINITIALIZED)
- comm = smpi_process_comm_world();
- smpi_group_use(comm->group);
- comm->refcount++;
-}
-
-void smpi_comm_cleanup_attributes(MPI_Comm comm){
- if(comm->attributes !=nullptr){
- xbt_dict_cursor_t cursor = nullptr;
- char* key;
- void* value;
- int flag;
- xbt_dict_foreach (comm->attributes, cursor, key, value) {
- smpi_comm_key_elem elem = static_cast<smpi_comm_key_elem>(xbt_dict_get_or_null(smpi_comm_keyvals, key));
- if (elem != nullptr && elem->delete_fn != nullptr)
- elem->delete_fn(comm, atoi(key), value, &flag);
- }
- xbt_dict_free(&comm->attributes);