+/* Copyright (c) 2011-2017. The SimGrid Team. All rights reserved. */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
+
#include "../colls_private.h"
+#include "src/smpi/smpi_status.hpp"
+
+namespace simgrid{
+namespace smpi{
static int scatter_for_bcast(
int root,
recv_size, MPI_BYTE, src,
COLL_TAG_BCAST, comm, &status);
/* query actual size of data received */
- curr_size=smpi_mpi_get_count(&status, MPI_BYTE);
+ curr_size=Status::get_count(&status, MPI_BYTE);
}
break;
}
return mpi_errno;
}
+
int
-smpi_coll_tuned_bcast_scatter_rdb_allgather (
+Coll_bcast_scatter_rdb_allgather::bcast (
void *buffer,
int count,
MPI_Datatype datatype,
((char *)tmp_buf + recv_offset),
(nbytes-recv_offset < 0 ? 0 : nbytes-recv_offset),
MPI_BYTE, dst, COLL_TAG_BCAST, comm, &status);
- recv_size=smpi_mpi_get_count(&status, MPI_BYTE);
+ recv_size=Status::get_count(&status, MPI_BYTE);
curr_size += recv_size;
}
comm, &status);
/* nprocs_completed is also equal to the no. of processes
whose data we don't have */
- recv_size=smpi_mpi_get_count(&status, MPI_BYTE);
+ recv_size=Status::get_count(&status, MPI_BYTE);
curr_size += recv_size;
/* printf("Rank %d, recv from %d, offset %d, size %d\n", rank, dst, offset, recv_size);
fflush(stdout);*/
xbt_die("we didn't receive enough !");
}
- if (!is_contig || !is_homogeneous)
- {
- if (rank != root)
- {
- position = 0;
- mpi_errno = MPI_Unpack(tmp_buf, nbytes, &position, buffer,
- count, datatype, comm);
- if (mpi_errno) xbt_die("error when unpacking %d", mpi_errno);
- }
+ if (not is_contig || not is_homogeneous) {
+ if (rank != root) {
+ position = 0;
+ mpi_errno = MPI_Unpack(tmp_buf, nbytes, &position, buffer, count, datatype, comm);
+ if (mpi_errno)
+ xbt_die("error when unpacking %d", mpi_errno);
+ }
}
fn_exit:
/* xbt_free(tmp_buf);*/
return mpi_errno;
}
+
+}
+}