-/* Copyright (c) 2010-2017. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2010-2018. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
}
}
-void mpi_comm_get_attr_ (int* comm, int* comm_keyval, void *attribute_val, int *flag, int* ierr){
-
- *ierr = MPI_Comm_get_attr (simgrid::smpi::Comm::f2c(*comm), *comm_keyval, attribute_val, flag);
+void mpi_comm_get_attr_ (int* comm, int* comm_keyval, int *attribute_val, int *flag, int* ierr){
+ int* value = nullptr;
+ *ierr = MPI_Comm_get_attr (simgrid::smpi::Comm::f2c(*comm), *comm_keyval, &value, flag);
+ *attribute_val = *value;
}
void mpi_comm_set_attr_ (int* comm, int* comm_keyval, void *attribute_val, int* ierr){