}
MPI_Comm PMPI_Comm_f2c(MPI_Fint comm){
+ if(comm==-1)
+ return MPI_COMM_NULL;
return static_cast<MPI_Comm>(simgrid::smpi::Comm::f2c(comm));
}
MPI_Fint PMPI_Comm_c2f(MPI_Comm comm){
+ if(comm==MPI_COMM_NULL)
+ return -1;
return comm->c2f();
}
static int zero = 0;
static int tag_ub = INT_MAX;
static int last_used_code = MPI_ERR_LASTCODE;
+ static int universe_size;
if (comm==MPI_COMM_NULL){
*flag = 0;
return MPI_SUCCESS;
case MPI_UNIVERSE_SIZE:
*flag = 1;
- *static_cast<int**>(attr_value) = &smpi_universe_size;
+ universe_size = smpi_get_universe_size();
+ *static_cast<int**>(attr_value) = &universe_size;
return MPI_SUCCESS;
case MPI_LASTUSEDCODE:
*flag = 1;