-/* Copyright (c) 2013-2014. The SimGrid Team.
+/* Copyright (c) 2013-2019. 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 "../colls_private.hpp"
#ifndef BCAST_ARRIVAL_PATTERN_AWARE_HEADER_SIZE
#define BCAST_ARRIVAL_PATTERN_AWARE_HEADER_SIZE 128
#ifndef BCAST_ARRIVAL_PATTERN_AWARE_MAX_NODE
#define BCAST_ARRIVAL_PATTERN_AWARE_MAX_NODE 128
#endif
-
+namespace simgrid{
+namespace smpi{
/* Non-topology-specific pipelined linear-bcast function */
int Coll_bcast_arrival_scatter::bcast(void *buf, int count,
MPI_Datatype datatype, int root,
MPI_Comm comm)
{
int tag = -COLL_TAG_BCAST;//in order to use ANY_TAG, make this one positive
- int header_tag = 10;
+ int header_tag = -10;
MPI_Status status;
int curr_remainder;
if (count < size) {
XBT_WARN("MPI_bcast_arrival_scatter use default MPI_bcast.");
Colls::bcast(buf, count, datatype, root, comm);
- return MPI_SUCCESS;
+ return MPI_SUCCESS;
}
0, tag, comm, &status);
/* at this point all nodes in this set perform all-gather operation */
-
+
to = (myordering == (total_nodes - 1)) ? header_buf[0] : header_buf[myordering + 1];
from = (myordering == 0) ? header_buf[total_nodes - 1] : header_buf[myordering - 1];
return MPI_SUCCESS;
}
+
+}
+}