X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ca2e418072d73461d9c4f1e39e77c9f7380eb3fd..004b932fe967a47a2ded3795af9dc069c3de9671:/src/smpi/colls/bcast-arrival-pattern-aware.cpp diff --git a/src/smpi/colls/bcast-arrival-pattern-aware.cpp b/src/smpi/colls/bcast-arrival-pattern-aware.cpp index 03e4f300eb..93dc6a3602 100644 --- a/src/smpi/colls/bcast-arrival-pattern-aware.cpp +++ b/src/smpi/colls/bcast-arrival-pattern-aware.cpp @@ -67,9 +67,9 @@ int smpi_coll_tuned_bcast_arrival_pattern_aware(void *buf, int count, */ if (root != 0) { if (rank == root) { - smpi_mpi_send(buf, count, datatype, 0, tag, comm); + Request::send(buf, count, datatype, 0, tag, comm); } else if (rank == 0) { - smpi_mpi_recv(buf, count, datatype, root, tag, comm, &status); + Request::recv(buf, count, datatype, root, tag, comm, &status); } } @@ -86,7 +86,7 @@ int smpi_coll_tuned_bcast_arrival_pattern_aware(void *buf, int count, while (sent_count < (size - 1)) { for (i = 1; i < size; i++) { - smpi_mpi_iprobe(i, MPI_ANY_TAG, comm, &flag_array[i], + Request::iprobe(i, MPI_ANY_TAG, comm, &flag_array[i], MPI_STATUSES_IGNORE); } @@ -96,7 +96,7 @@ int smpi_coll_tuned_bcast_arrival_pattern_aware(void *buf, int count, /* message arrive */ if ((flag_array[i] == 1) && (already_sent[i] == 0)) { - smpi_mpi_recv(temp_buf, 1, MPI_CHAR, i, tag, comm, &status); + Request::recv(temp_buf, 1, MPI_CHAR, i, tag, comm, &status); header_buf[header_index] = i; header_index++; sent_count++; @@ -110,8 +110,8 @@ int smpi_coll_tuned_bcast_arrival_pattern_aware(void *buf, int count, if (header_index != 0) { header_buf[header_index] = -1; to = header_buf[0]; - smpi_mpi_send(header_buf, HEADER_SIZE, MPI_INT, to, tag, comm); - smpi_mpi_send(buf, count, datatype, to, tag, comm); + Request::send(header_buf, HEADER_SIZE, MPI_INT, to, tag, comm); + Request::send(buf, count, datatype, to, tag, comm); } /* randomly MPI_Send to one */ @@ -121,8 +121,8 @@ int smpi_coll_tuned_bcast_arrival_pattern_aware(void *buf, int count, if (already_sent[i] == 0) { header_buf[0] = i; header_buf[1] = -1; - smpi_mpi_send(header_buf, HEADER_SIZE, MPI_INT, i, tag, comm); - smpi_mpi_send(buf, count, datatype, i, tag, comm); + Request::send(header_buf, HEADER_SIZE, MPI_INT, i, tag, comm); + Request::send(buf, count, datatype, i, tag, comm); already_sent[i] = 1; sent_count++; break; @@ -138,12 +138,12 @@ int smpi_coll_tuned_bcast_arrival_pattern_aware(void *buf, int count, else { /* send 1-byte message to root */ - smpi_mpi_send(temp_buf, 1, MPI_CHAR, 0, tag, comm); + Request::send(temp_buf, 1, MPI_CHAR, 0, tag, comm); /* wait for header and data, forward when required */ - smpi_mpi_recv(header_buf, HEADER_SIZE, MPI_INT, MPI_ANY_SOURCE, tag, comm, + Request::recv(header_buf, HEADER_SIZE, MPI_INT, MPI_ANY_SOURCE, tag, comm, &status); - smpi_mpi_recv(buf, count, datatype, MPI_ANY_SOURCE, tag, comm, &status); + Request::recv(buf, count, datatype, MPI_ANY_SOURCE, tag, comm, &status); /* search for where it is */ int myordering = 0; @@ -153,9 +153,9 @@ int smpi_coll_tuned_bcast_arrival_pattern_aware(void *buf, int count, /* send header followed by data */ if (header_buf[myordering + 1] != -1) { - smpi_mpi_send(header_buf, HEADER_SIZE, MPI_INT, header_buf[myordering + 1], + Request::send(header_buf, HEADER_SIZE, MPI_INT, header_buf[myordering + 1], tag, comm); - smpi_mpi_send(buf, count, datatype, header_buf[myordering + 1], tag, comm); + Request::send(buf, count, datatype, header_buf[myordering + 1], tag, comm); } } } @@ -178,7 +178,7 @@ int smpi_coll_tuned_bcast_arrival_pattern_aware(void *buf, int count, //iteration++; //start = MPI_Wtime(); for (i = 1; i < size; i++) { - smpi_mpi_iprobe(i, MPI_ANY_TAG, comm, &flag_array[i], + Request::iprobe(i, MPI_ANY_TAG, comm, &flag_array[i], &temp_status_array[i]); } //total = MPI_Wtime() - start; @@ -191,7 +191,7 @@ int smpi_coll_tuned_bcast_arrival_pattern_aware(void *buf, int count, for (i = 1; i < size; i++) { /* message arrive */ if ((flag_array[i] == 1) && (already_sent[i] == 0)) { - smpi_mpi_recv(&temp_buf[i], 1, MPI_CHAR, i, tag, comm, + Request::recv(&temp_buf[i], 1, MPI_CHAR, i, tag, comm, &status); header_buf[header_index] = i; header_index++; @@ -223,7 +223,7 @@ int smpi_coll_tuned_bcast_arrival_pattern_aware(void *buf, int count, //start = MPI_Wtime(); /* send header */ - smpi_mpi_send(header_buf, HEADER_SIZE, MPI_INT, to, tag, comm); + Request::send(header_buf, HEADER_SIZE, MPI_INT, to, tag, comm); //total = MPI_Wtime() - start; //total *= 1000; @@ -235,16 +235,16 @@ int smpi_coll_tuned_bcast_arrival_pattern_aware(void *buf, int count, if (0 == 1) { //if (header_index == 1) { - smpi_mpi_send(buf, count, datatype, to, tag, comm); + Request::send(buf, count, datatype, to, tag, comm); } /* send data - pipeline */ else { for (i = 0; i < pipe_length; i++) { - smpi_mpi_send((char *)buf + (i * increment), segment, datatype, to, tag, comm); + Request::send((char *)buf + (i * increment), segment, datatype, to, tag, comm); } - //smpi_mpi_waitall((pipe_length), send_request_array, send_status_array); + //Request::waitall((pipe_length), send_request_array, send_status_array); } //total = MPI_Wtime() - start; //total *= 1000; @@ -264,16 +264,16 @@ int smpi_coll_tuned_bcast_arrival_pattern_aware(void *buf, int count, to = i; //start = MPI_Wtime(); - smpi_mpi_send(header_buf, HEADER_SIZE, MPI_INT, to, tag, comm); + Request::send(header_buf, HEADER_SIZE, MPI_INT, to, tag, comm); /* still need to chop data so that we can use the same non-root code */ for (j = 0; j < pipe_length; j++) { - smpi_mpi_send((char *)buf + (j * increment), segment, datatype, to, tag, + Request::send((char *)buf + (j * increment), segment, datatype, to, tag, comm); } - //smpi_mpi_send(buf,count,datatype,to,tag,comm); - //smpi_mpi_wait(&request,MPI_STATUS_IGNORE); + //Request::send(buf,count,datatype,to,tag,comm); + //Request::wait(&request,MPI_STATUS_IGNORE); //total = MPI_Wtime() - start; //total *= 1000; @@ -291,7 +291,7 @@ int smpi_coll_tuned_bcast_arrival_pattern_aware(void *buf, int count, } /* while loop */ for(i=0; i