From: Augustin Degomme Date: Wed, 18 Sep 2013 12:23:13 +0000 (+0200) Subject: yara (yet another redundant algorithm) X-Git-Tag: v3_9_90~113 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/019e1c02614de35699a1573d3e17ee6cd369448a yara (yet another redundant algorithm) --- diff --git a/buildtools/Cmake/AddTests.cmake b/buildtools/Cmake/AddTests.cmake index dfacbc3ff0..5eebdce487 100644 --- a/buildtools/Cmake/AddTests.cmake +++ b/buildtools/Cmake/AddTests.cmake @@ -427,7 +427,7 @@ if(NOT enable_memcheck) ADD_TEST(smpi-alltoallv-coll-${ALLTOALLV_COLL} ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg smpi/alltoallv:${ALLTOALLV_COLL} --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/alltoallv_coll.tesh) ENDFOREACH() - FOREACH (BCAST_COLL default arrival_nb arrival_pattern_aware arrival_pattern_aware_wait arrival_scatter + FOREACH (BCAST_COLL default arrival_pattern_aware arrival_pattern_aware_wait arrival_scatter binomial_tree flattree flattree_pipeline NTSB NTSL NTSL_Isend scatter_LR_allgather scatter_rdb_allgather SMP_binary SMP_binomial SMP_linear ompi mpich ompi_split_bintree ompi_pipeline) ADD_TEST(smpi-bcast-coll-${BCAST_COLL} ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg smpi/bcast:${BCAST_COLL} --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/bcast_coll.tesh) diff --git a/buildtools/Cmake/DefinePackages.cmake b/buildtools/Cmake/DefinePackages.cmake index b6359c4a1e..8abe67d267 100644 --- a/buildtools/Cmake/DefinePackages.cmake +++ b/buildtools/Cmake/DefinePackages.cmake @@ -172,7 +172,6 @@ set(SMPI_SRC src/smpi/colls/alltoallv-ring-one-barrier.c src/smpi/colls/alltoallv-bruck.c src/smpi/colls/alltoallv-ompi-basic-linear.c - src/smpi/colls/bcast-arrival-nb.c src/smpi/colls/bcast-arrival-pattern-aware.c src/smpi/colls/bcast-arrival-pattern-aware-wait.c src/smpi/colls/bcast-arrival-scatter.c diff --git a/src/smpi/colls/bcast-arrival-nb.c b/src/smpi/colls/bcast-arrival-nb.c deleted file mode 100644 index 84a06aed55..0000000000 --- a/src/smpi/colls/bcast-arrival-nb.c +++ /dev/null @@ -1,394 +0,0 @@ -#include "colls_private.h" - -static int bcast_NTSL_segment_size_in_byte = 8192; - -#define HEADER_SIZE 1024 -#define MAX_NODE 1024 - -/* Non-topology-specific pipelined linear-bcast function */ -int smpi_coll_tuned_bcast_arrival_nb(void *buf, int count, - MPI_Datatype datatype, int root, - MPI_Comm comm) -{ - int tag = -COLL_TAG_BCAST; - MPI_Status status; - MPI_Request request; - MPI_Request *send_request_array; - MPI_Request *recv_request_array; - MPI_Status *send_status_array; - MPI_Status *recv_status_array; - - MPI_Status temp_status_array[MAX_NODE]; - - int rank, size; - int i, j; - - int sent_count; - int header_index; - int flag_array[MAX_NODE]; - int already_sent[MAX_NODE]; - int to_clean[MAX_NODE]; - int header_buf[HEADER_SIZE]; - char temp_buf[MAX_NODE]; - - MPI_Aint extent; - extent = smpi_datatype_get_extent(datatype); - - /* destination */ - int to; - - - - rank = smpi_comm_rank(comm); - size = smpi_comm_size(comm); - - - /* segment is segment size in number of elements (not bytes) */ - int segment = bcast_NTSL_segment_size_in_byte / extent; - - /* pipeline length */ - int pipe_length = count / segment; - - /* use for buffer offset for sending and receiving data = segment size in byte */ - int increment = segment * extent; - - /* if the input size is not divisible by segment size => - the small remainder will be done with native implementation */ - int remainder = count % segment; - - /* if root is not zero send to rank zero first - this can be modified to make it faster by using logical src, dst. - */ - if (root != 0) { - if (rank == root) { - smpi_mpi_send(buf, count, datatype, 0, tag, comm); - } else if (rank == 0) { - smpi_mpi_recv(buf, count, datatype, root, tag, comm, &status); - } - } - - /* value == 0 means root has not send data (or header) to the node yet */ - for (i = 0; i < MAX_NODE; i++) { - already_sent[i] = 0; - to_clean[i]=0; - } - // printf("YYY\n"); - - /* when a message is smaller than a block size => no pipeline */ - if (count <= segment) { - if (rank == 0) { - sent_count = 0; - - while (sent_count < (size - 1)) { - - // for (j=0;j<1000;j++) { - for (i = 1; i < size; i++) { - if (already_sent[i] == 0) - smpi_mpi_iprobe(i, MPI_ANY_TAG, comm, &flag_array[i], - MPI_STATUSES_IGNORE); - } - //} - - header_index = 0; - /* recv 1-byte message */ - for (i = 1; i < size; i++) { - - /* message arrive */ - if ((flag_array[i] == 1) && (already_sent[i] == 0)) { - smpi_mpi_recv(temp_buf, 1, MPI_CHAR, i, tag, comm, &status); - header_buf[header_index] = i; - header_index++; - sent_count++; - - /* will send in the next step */ - already_sent[i] = 1; - } - } - - /* send header followed by data */ - 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); - } - - /* randomly MPI_Send to one */ - else { - /* search for the first node that never received data before */ - for (i = 1; i < size; i++) { - 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); - already_sent[i] = 1; - sent_count++; - to_clean[i]=0; - break; - } - } - } - - - } /* while loop */ - - for(i=0; i segment)) { - XBT_WARN("MPI_bcast_arrival_nb use default MPI_bcast."); - smpi_mpi_bcast((char *)buf + (pipe_length * increment), remainder, datatype, root, comm); - } - - return MPI_SUCCESS; -} diff --git a/src/smpi/colls/colls.h b/src/smpi/colls/colls.h index c80fdd5a24..b70a313966 100644 --- a/src/smpi/colls/colls.h +++ b/src/smpi/colls/colls.h @@ -181,7 +181,6 @@ COLL_ALLTOALLVS(COLL_PROTO, COLL_NOsep) int root, MPI_Comm comm) #define COLL_BCASTS(action, COLL_sep) \ -COLL_APPLY(action, COLL_BCAST_SIG, arrival_nb) COLL_sep \ COLL_APPLY(action, COLL_BCAST_SIG, arrival_pattern_aware) COLL_sep \ COLL_APPLY(action, COLL_BCAST_SIG, arrival_pattern_aware_wait) COLL_sep \ COLL_APPLY(action, COLL_BCAST_SIG, arrival_scatter) COLL_sep \