int range = 0;
int range_threshold = 0;
int conf_index = 0;
- comm_size = smpi_comm_size(comm);
+ comm_size = comm->size();
sendtype_size=smpi_datatype_size(sendtype);
recvtype_size=smpi_datatype_size(recvtype);
MPI_Comm shmem_comm;
//MPI_Comm *shmem_commptr=NULL;
/* Get the size of the communicator */
- comm_size = smpi_comm_size(comm);
+ comm_size = comm->size();
recvtype_size=smpi_datatype_size(recvtype);
nbytes = recvtype_size * recvcount;
if(mv2_allgather_table_ppn_conf==NULL)
init_mv2_allgather_tables_stampede();
- if(smpi_comm_get_leaders_comm(comm)==MPI_COMM_NULL){
- smpi_comm_init_smp(comm);
+ if(comm->get_leaders_comm()==MPI_COMM_NULL){
+ comm->init_smp();
}
int i;
- if (smpi_comm_is_uniform(comm)){
- shmem_comm = smpi_comm_get_intra_comm(comm);
- local_size = smpi_comm_size(shmem_comm);
+ if (comm->is_uniform()){
+ shmem_comm = comm->get_intra_comm();
+ local_size = shmem_comm->size();
i = 0;
if (mv2_allgather_table_ppn_conf[0] == -1) {
// Indicating user defined tuning
/* intracommunicator */
if(is_two_level ==1){
if(partial_sub_ok ==1){
- if (smpi_comm_is_blocked(comm)){
+ if (comm->is_blocked()){
mpi_errno = MPIR_2lvl_Allgather_MV2(sendbuf, sendcount, sendtype,
recvbuf, recvcount, recvtype,
comm);
int comm_size = 0;
int recvtype_size, sendtype_size;
int rank = -1;
- comm_size = smpi_comm_size(comm);
- rank = smpi_comm_rank(comm);
+ comm_size = comm->size();
+ rank = comm->rank();
if (rank == root) {
recvtype_size=smpi_datatype_size(recvtype);
range_intra_threshold++;
}
- if (smpi_comm_is_blocked(comm) ) {
+ if (comm->is_blocked() ) {
// Set intra-node function pt for gather_two_level
MV2_Gather_intra_node_function =
mv2_gather_thresholds_table[range].intra_node[range_intra_threshold].
if(mv2_allgatherv_thresholds_table==NULL)
init_mv2_allgatherv_tables_stampede();
- comm_size = smpi_comm_size(comm);
+ comm_size = comm->size();
total_count = 0;
for (i = 0; i < comm_size; i++)
total_count += recvcounts[i];
//int rank = 0,
int comm_size = 0;
- comm_size = smpi_comm_size(comm);
- //rank = smpi_comm_rank(comm);
+ comm_size = comm->size();
+ //rank = comm->rank();
if (count == 0) {
return MPI_SUCCESS;
if(is_two_level == 1){
// check if shm is ready, if not use other algorithm first
if (is_commutative) {
- if(smpi_comm_get_leaders_comm(comm)==MPI_COMM_NULL){
- smpi_comm_init_smp(comm);
+ if(comm->get_leaders_comm()==MPI_COMM_NULL){
+ comm->init_smp();
}
mpi_errno = MPIR_Allreduce_two_level_MV2(sendbuf, recvbuf, count,
datatype, op, comm);
if (count == 0)
return MPI_SUCCESS;
- if(smpi_comm_get_leaders_comm(comm)==MPI_COMM_NULL){
- smpi_comm_init_smp(comm);
+ if(comm->get_leaders_comm()==MPI_COMM_NULL){
+ comm->init_smp();
}
if(!mv2_bcast_thresholds_table)
init_mv2_bcast_tables_stampede();
- comm_size = smpi_comm_size(comm);
- //rank = smpi_comm_rank(comm);
+ comm_size = comm->size();
+ //rank = comm->rank();
is_contig=1;
/* if (HANDLE_GET_KIND(datatype) == HANDLE_KIND_BUILTIN)*/
} else
#endif /* defined(CHANNEL_MRAIL_GEN2) */
{
- shmem_comm = smpi_comm_get_intra_comm(comm);
+ shmem_comm = comm->get_intra_comm();
if (!is_contig || !is_homogeneous) {
mpi_errno =
MPIR_Bcast_tune_inter_node_helper_MV2(tmp_buf, nbytes, MPI_BYTE,
int sendtype_size;
int is_two_level = 0;
- comm_size = smpi_comm_size(comm);
+ comm_size = comm->size();
sendtype_size=smpi_datatype_size(datatype);
nbytes = count * sendtype_size;
if(is_two_level == 1)
{
if (is_commutative == 1) {
- if(smpi_comm_get_leaders_comm(comm)==MPI_COMM_NULL){
- smpi_comm_init_smp(comm);
+ if(comm->get_leaders_comm()==MPI_COMM_NULL){
+ comm->init_smp();
}
mpi_errno = MPIR_Reduce_two_level_helper_MV2(sendbuf, recvbuf, count,
datatype, op, root, comm);
MPI_Comm comm)
{
int mpi_errno = MPI_SUCCESS;
- int i = 0, comm_size = smpi_comm_size(comm), total_count = 0, type_size =
+ int i = 0, comm_size = comm->size(), total_count = 0, type_size =
0, nbytes = 0;
int range = 0;
int range_threshold = 0;
if(mv2_scatter_thresholds_table==NULL)
init_mv2_scatter_tables_stampede();
- if(smpi_comm_get_leaders_comm(comm)==MPI_COMM_NULL){
- smpi_comm_init_smp(comm);
+ if(comm->get_leaders_comm()==MPI_COMM_NULL){
+ comm->init_smp();
}
- comm_size = smpi_comm_size(comm);
+ comm_size = comm->size();
- rank = smpi_comm_rank(comm);
+ rank = comm->rank();
if (rank == root) {
sendtype_size=smpi_datatype_size(sendtype);
}
// check if safe to use partial subscription mode
- if (smpi_comm_is_uniform(comm)) {
+ if (comm->is_uniform()) {
- shmem_comm = smpi_comm_get_intra_comm(comm);
- local_size = smpi_comm_size(shmem_comm);
+ shmem_comm = comm->get_intra_comm();
+ local_size = shmem_comm->size();
i = 0;
if (mv2_scatter_table_ppn_conf[0] == -1) {
// Indicating user defined tuning
if( (MV2_Scatter_function == &MPIR_Scatter_MV2_two_level_Direct) ||
(MV2_Scatter_function == &MPIR_Scatter_MV2_two_level_Binomial)) {
- if( smpi_comm_is_blocked(comm)) {
+ if( comm->is_blocked()) {
MV2_Scatter_intra_function = mv2_scatter_thresholds_table[conf_index][range].intra_node[range_threshold_intra]
.MV2_pt_Scatter_function;