- MPI_Comm_size(comm, &nprocs);
- MPI_Comm_rank(comm, &rank);
-
- MPI_Type_extent(dtype, &extent);
- tmp_buf = (void *) malloc(count * extent);
- if (!tmp_buf) {
- printf("Could not allocate memory for tmp_buf\n");
- return 1;
- }
+ nprocs = smpi_comm_size(comm);
+ rank = smpi_comm_rank(comm);
+
+ extent = smpi_datatype_get_extent(dtype);
+ tmp_buf = (void *) xbt_malloc(count * extent);