-
- sb = (int *)malloc(size*chunk*sizeof(int));
- if ( !sb ) {
- perror( "can't allocate send buffer" );
- MPI_Abort(MPI_COMM_WORLD,EXIT_FAILURE);
- }
- rb = (int *)malloc(size*chunk*sizeof(int));
- if ( !rb ) {
- perror( "can't allocate recv buffer");
- free(sb);
- MPI_Abort(MPI_COMM_WORLD,EXIT_FAILURE);
+
+
+ /*
+ SMPI addition : we want to test all three alltoall algorithms, thus we use three diffrent sizes
+ this is the code that handles these cases
+ if (sendsize < 200 && size > 12) {
+ retval =
+ smpi_coll_tuned_alltoall_bruck(sendbuf, sendcount, sendtype,
+ recvbuf, recvcount, recvtype,
+ comm);
+ } else if (sendsize < 3000) {
+ retval =
+ smpi_coll_tuned_alltoall_basic_linear(sendbuf, sendcount,
+ sendtype, recvbuf,
+ recvcount, recvtype, comm);
+ } else {
+ retval =
+ smpi_coll_tuned_alltoall_pairwise(sendbuf, sendcount, sendtype,
+ recvbuf, recvcount, recvtype,
+ comm);