- MPI_Comm_size(comm, &num_procs);
- MPI_Comm_rank(comm, &rank);
-
- MPI_Type_extent(recv_type, &extent);
-
- tmp_buff = (char *) malloc(num_procs * recv_count * extent);
- if (!tmp_buff) {
- printf("alltoall-bruck:53: cannot allocate memory\n");
- MPI_Finalize();
- exit(failure);
- }
-
- disps = (int *) malloc(sizeof(int) * num_procs);
- if (!disps) {
- printf("alltoall-bruck:61: cannot allocate memory\n");
- MPI_Finalize();
- exit(failure);
- }