X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f35db13138682b1be530a509d1eeadeafff84ca7..ae0e5607956f1b19a4605d297bc6d51e5e18f845:/src/smpi/colls/bcast/bcast-mvapich-smp.cpp diff --git a/src/smpi/colls/bcast/bcast-mvapich-smp.cpp b/src/smpi/colls/bcast/bcast-mvapich-smp.cpp index a033eea78b..8ac87dbe84 100644 --- a/src/smpi/colls/bcast/bcast-mvapich-smp.cpp +++ b/src/smpi/colls/bcast/bcast-mvapich-smp.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2013-2014. The SimGrid Team. +/* Copyright (c) 2013-2017. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -318,24 +318,22 @@ int Coll_bcast_mvapich2_intra_node::bcast(void *buffer, #endif ) { - if (!is_contig || !is_homogeneous) { - tmp_buf=(void *)smpi_get_tmp_sendbuffer(nbytes); - - /* TODO: Pipeline the packing and communication */ - // position = 0; -/* if (rank == root) {*/ -/* mpi_errno =*/ -/* MPIR_Pack_impl(buffer, count, datatype, tmp_buf, nbytes, &position);*/ -/* if (mpi_errno)*/ -/* MPIU_ERR_POP(mpi_errno);*/ -/* }*/ + if (not is_contig || not is_homogeneous) { + tmp_buf = (void*)smpi_get_tmp_sendbuffer(nbytes); + + /* TODO: Pipeline the packing and communication */ + // position = 0; + /* if (rank == root) {*/ + /* mpi_errno =*/ + /* MPIR_Pack_impl(buffer, count, datatype, tmp_buf, nbytes, &position);*/ + /* if (mpi_errno)*/ + /* MPIU_ERR_POP(mpi_errno);*/ + /* }*/ } shmem_comm = comm->get_intra_comm(); - if (!is_contig || !is_homogeneous) { - mpi_errno = - MPIR_Bcast_inter_node_helper_MV2(tmp_buf, nbytes, MPI_BYTE, - root, comm); + if (not is_contig || not is_homogeneous) { + mpi_errno = MPIR_Bcast_inter_node_helper_MV2(tmp_buf, nbytes, MPI_BYTE, root, comm); } else { mpi_errno = MPIR_Bcast_inter_node_helper_MV2(buffer, count, datatype, root, @@ -344,20 +342,15 @@ int Coll_bcast_mvapich2_intra_node::bcast(void *buffer, /* We are now done with the inter-node phase */ if (nbytes <= mv2_knomial_intra_node_threshold) { - if (!is_contig || !is_homogeneous) { - mpi_errno = MPIR_Shmem_Bcast_MV2(tmp_buf, nbytes, MPI_BYTE, - root, shmem_comm); + if (not is_contig || not is_homogeneous) { + mpi_errno = MPIR_Shmem_Bcast_MV2(tmp_buf, nbytes, MPI_BYTE, root, shmem_comm); } else { mpi_errno = MPIR_Shmem_Bcast_MV2(buffer, count, datatype, root, shmem_comm); } } else { - if (!is_contig || !is_homogeneous) { - mpi_errno = - MPIR_Knomial_Bcast_intra_node_MV2(tmp_buf, nbytes, - MPI_BYTE, - INTRA_NODE_ROOT, - shmem_comm); + if (not is_contig || not is_homogeneous) { + mpi_errno = MPIR_Knomial_Bcast_intra_node_MV2(tmp_buf, nbytes, MPI_BYTE, INTRA_NODE_ROOT, shmem_comm); } else { mpi_errno = MPIR_Knomial_Bcast_intra_node_MV2(buffer, count,