rank = smpi_comm_rank(comm);
size = smpi_comm_size(comm);
- /* extract the rank,size information for the intra-node
- * communicator */
+ /* extract the rank,size information for the intra-node communicator */
recvtype_extent=smpi_datatype_get_extent(recvtype);
shmem_comm = smpi_comm_get_intra_comm(comm);
local_size = smpi_comm_size(shmem_comm);
if (local_rank == 0) {
- /* Node leader. Extract the rank, size information for the leader
- * communicator */
+ /* Node leader. Extract the rank, size information for the leader communicator */
leader_comm = smpi_comm_get_leaders_comm(comm);
if(leader_comm==MPI_COMM_NULL){
leader_comm = MPI_COMM_WORLD;
- /*
// INTER_binomial_reduce
// only root node for each SMP
+ /*
if (intra_rank == 0) {
mask = 1;
}
*/
- /*
// INTER_binomial_bcast
- if (intra_rank == 0) {
- mask = 1;
- while (mask < inter_comm_size) {
- if (inter_rank & mask) {
- src = (inter_rank - mask) * num_core;
+// if (intra_rank == 0) {
+// mask = 1;
+// while (mask < inter_comm_size) {
+// if (inter_rank & mask) {
+// src = (inter_rank - mask) * num_core;
//printf("Node %d recv from node %d when mask is %d\n", rank, src, mask);
- smpi_mpi_recv(recv_buf, count, dtype, src, tag, comm, &status);
- break;
- }
- mask <<= 1;
- }
-
- mask >>= 1;
+// smpi_mpi_recv(recv_buf, count, dtype, src, tag, comm, &status);
+// break;
+// }
+// mask <<= 1;
+// }
+//
+// mask >>= 1;
//printf("My rank = %d my mask = %d\n", rank,mask);
- while (mask > 0) {
- if (inter_rank < inter_comm_size) {
- dst = (inter_rank + mask) * num_core;
- if (dst < comm_size) {
- //printf("Node %d send to node %d when mask is %d\n", rank, dst, mask);
- smpi_mpi_send(recv_buf, count, dtype, dst, tag, comm);
- }
- }
- mask >>= 1;
- }
- }
- */
-
+// while (mask > 0) {
+// if (inter_rank < inter_comm_size) {
+// dst = (inter_rank + mask) * num_core;
+// if (dst < comm_size) {
+// //printf("Node %d send to node %d when mask is %d\n", rank, dst, mask);
+// smpi_mpi_send(recv_buf, count, dtype, dst, tag, comm);
+// }
+// }
+// mask >>= 1;
+// }
+// }
// INTRA_binomial_bcast
- /*
// INTER_binomial_reduce
// only root node for each SMP
- if (intra_rank == 0) {
-
- mask = 1;
- while (mask < inter_comm_size) {
- if ((mask & inter_rank) == 0) {
- src = (inter_rank | mask) * num_core;
- if (src < comm_size) {
- smpi_mpi_recv(tmp_buf, count, dtype, src, tag, comm, &status);
- (* uop) (tmp_buf, recv_buf, &count, &dtype);
+// if (intra_rank == 0) {
+//
+// mask = 1;
+// while (mask < inter_comm_size) {
+// if ((mask & inter_rank) == 0) {
+// src = (inter_rank | mask) * num_core;
+// if (src < comm_size) {
+// smpi_mpi_recv(tmp_buf, count, dtype, src, tag, comm, &status);
+// (* uop) (tmp_buf, recv_buf, &count, &dtype);
//printf("Node %d recv from node %d when mask is %d\n", rank, src, mask);
- }
- }
- else {
- dst = (inter_rank & (~mask)) * num_core;
- smpi_mpi_send(recv_buf, count, dtype, dst, tag, comm);
+// }
+// }
+// else {
+// dst = (inter_rank & (~mask)) * num_core;
+// smpi_mpi_send(recv_buf, count, dtype, dst, tag, comm);
//printf("Node %d send to node %d when mask is %d\n", rank, dst, mask);
- break;
- }
- mask <<=1;
- }
- }
- */
+// break;
+// }
+// mask <<=1;
+// }
+// }
- /*
// INTER_binomial_bcast
- if (intra_rank == 0) {
- mask = 1;
- while (mask < inter_comm_size) {
- if (inter_rank & mask) {
- src = (inter_rank - mask) * num_core;
+// if (intra_rank == 0) {
+// mask = 1;
+// while (mask < inter_comm_size) {
+// if (inter_rank & mask) {
+// src = (inter_rank - mask) * num_core;
//printf("Node %d recv from node %d when mask is %d\n", rank, src, mask);
- smpi_mpi_recv(recv_buf, count, dtype, src, tag, comm, &status);
- break;
- }
- mask <<= 1;
- }
-
- mask >>= 1;
+// smpi_mpi_recv(recv_buf, count, dtype, src, tag, comm, &status);
+// break;
+// }
+// mask <<= 1;
+// }
+//
+// mask >>= 1;
//printf("My rank = %d my mask = %d\n", rank,mask);
- while (mask > 0) {
- if (inter_rank < inter_comm_size) {
- dst = (inter_rank + mask) * num_core;
- if (dst < comm_size) {
+// while (mask > 0) {
+// if (inter_rank < inter_comm_size) {
+// dst = (inter_rank + mask) * num_core;
+// if (dst < comm_size) {
//printf("Node %d send to node %d when mask is %d\n", rank, dst, mask);
- smpi_mpi_send(recv_buf, count, dtype, dst, tag, comm);
- }
- }
- mask >>= 1;
- }
- }
- */
+// smpi_mpi_send(recv_buf, count, dtype, dst, tag, comm);
+// }
+// }
+// mask >>= 1;
+// }
+// }
// INTRA_binomial_bcast
mask >>= 1;
}
-
smpi_free_tmp_buffer(tmp_buf);
return MPI_SUCCESS;
}
*/
//if (is_homogeneous) {
type_size=smpi_datatype_size(datatype);
- //} /*else {*/
+ //}
+/* else {*/
/* MPIR_Pack_size_impl(1, datatype, &type_size);*/
/* }*/
nbytes = (size_t) (count) * (type_size);
#include "colls_private.h"
-
// This selector is based on information gathered on the Stampede cluster, with Intel MPI 4.1.3.049, and from the intel reference manual. The data was gathered launching runs with 1,2,4,8,16 processes per node.
-
#define INTEL_MAX_NB_THRESHOLDS 32
#define INTEL_MAX_NB_NUMPROCS 12
#define INTEL_MAX_NB_PPN 5 /* 1 2 4 8 16 ppn */
7 - Shumilin's ring algorithm
8 - Ring algorithm
-
-//as Shumilin's ring algorithm is unknown, default to ring'
+ as Shumilin's ring algorithm is unknown, default to ring'
*/
const double b2 = 9.7128;
const double a3 = 0.0422 / 1024.0; /* [1/B] */
const double b3 = 1.1614;
- //const double a4 = 0.0033 / 1024.0; /* [1/B] */
+ //const double a4 = 0.0033 / 1024.0; [1/B]
//const double b4 = 1.6761;
- //const int max_requests = 0; /* no limit on # of outstanding requests */
+ /* no limit on # of outstanding requests */
+ //const int max_requests = 0;
communicator_size = smpi_comm_size(comm);
return smpi_coll_tuned_reduce_ompi_binary( sendbuf, recvbuf, count, datatype, op, root,
comm/*, module, segsize, max_requests*/);
}
- /*if (communicator_size > (a4 * message_size + b4)) {
+// if (communicator_size > (a4 * message_size + b4)) {
// Pipeline_32K
- segsize = 32*1024;
- } else {
+// segsize = 32*1024;
+// } else {
// Pipeline_64K
- segsize = 64*1024;
- }*/
+// segsize = 64*1024;
+// }
return smpi_coll_tuned_reduce_ompi_pipeline (sendbuf, recvbuf, count, datatype, op, root, comm/*, module,
segsize, max_requests*/);
/** Additional data for the callback.
Alternatively it can be used as a pointer to the data. */
void* data;
- //** Optional callback used to free the data field */
+ /** Optional callback used to free the data field */
void (*free_function)(void*);
};
int i, j;
char *opt;
- // _XBT_LOGV(log).threshold = xbt_log_priority_debug; /* uncomment to set the LOG category to debug directly */
+ /* uncomment to set the LOG category to debug directly */
+ // _XBT_LOGV(log).threshold = xbt_log_priority_debug;
xbt_log_connect_categories();
-/* synchro_crashtest -- tries to crash the logging mechanism by doing // logs*/
+/* synchro_crashtest -- tries to crash the logging mechanism by doing parallel logs*/
/* Copyright (c) 2007-2014. The SimGrid Team.
* All rights reserved. */