coverage:
enabled: true
exclude_paths:
- - teshsuite/**
+ - 'teshsuite/**'
exclude_paths:
- - src/include/catch.hpp
- - teshsuite/smpi/mpich3-test/**
- - teshsuite/smpi/isp/**
- - **/*_dtd.c
- - **/*_dtd.h
- - **/*yy.c
- - src/xbt/automaton/parserPromela.tab.*
- - src/smpi/colls/**/*
- - examples/smpi/NAS/*
- - src/xbt/RngStream.c
- - include/xbt/RngStream.h
-
\ No newline at end of file
+ - '**/*_dtd.c'
+ - '**/*_dtd.h'
+ - '**/*yy.c'
+ - 'docs/**.py'
+ - 'examples/smpi/NAS/*'
+ - 'include/xbt/RngStream.h'
+ - 'src/include/catch.hpp'
+ - 'src/smpi/colls/**/*'
+ - 'src/xbt/RngStream.c'
+ - 'src/xbt/automaton/parserPromela.tab.*'
+ - 'teshsuite/smpi/isp/**'
+ - 'teshsuite/smpi/mpich3-test/**'
set +x
-cat source/img/graphical-toc.svg \
- | perl -pe 's/(xlink:href="http)/target="_top" $1/' \
+< source/img/graphical-toc.svg \
+ perl -pe 's/(xlink:href="http)/target="_top" $1/' \
| perl -pe 's/(xlink:href=".*?.html)/target="_top" $1/' \
> build/html/graphical-toc.svg
echo "List of missing references:"
-for f in `(grep '<name>' build/xml/msg_8h.xml; \
- grep '<name>' build/xml/namespacesimgrid_1_1s4u.xml; \
- grep '<innerclass refid=' build/xml/namespacesimgrid_1_1s4u.xml ; \
- ) |sed 's/<[^>]*>//g'|sort`
+for f in $( (grep '<name>' build/xml/msg_8h.xml; \
+ grep '<name>' build/xml/namespacesimgrid_1_1s4u.xml; \
+ grep '<innerclass refid=' build/xml/namespacesimgrid_1_1s4u.xml ; \
+ ) | sed 's/<[^>]*>//g' | sort )
do
if grep $f source/*rst | grep -q '.. doxygen[^::]*:: '"$f"'$' ||
echo "$f"
fi
fi
-done
\ No newline at end of file
+done
const std::string mailbox_name = std::string("worker-") + std::to_string(simgrid::s4u::this_actor::get_pid());
simgrid::s4u::MailboxPtr mailbox = simgrid::s4u::Mailbox::by_name(mailbox_name);
- double compute_cost;
while (true) { // Master forcefully kills the workers by the end of the simulation
double* msg = static_cast<double*>(mailbox->get());
- compute_cost = *msg;
+ double compute_cost = *msg;
delete msg;
simgrid::s4u::this_actor::execute(compute_cost);
*/
void Engine::load_platform(std::string platf)
{
- double start = 0;
- double end = 0;
- if (XBT_LOG_ISENABLED(s4u_engine, xbt_log_priority_debug))
- start = xbt_os_time();
+ double start = xbt_os_time();
try {
parse_platform_file(platf);
} catch (xbt_ex& e) {
xbt_die("Error while loading %s: %s", platf.c_str(), e.what());
}
- if (XBT_LOG_ISENABLED(s4u_engine, xbt_log_priority_debug)) {
- end = xbt_os_time();
- XBT_DEBUG("PARSE TIME: %g", (end - start));
- }
+ double end = xbt_os_time();
+ XBT_DEBUG("PARSE TIME: %g", (end - start));
}
void Engine::register_function(std::string name, int (*code)(int, char**))
*/
static int pown( int fanout, int num )
{
- int j, p = 1;
+ int p = 1;
if( num < 0 ) return 0;
if (1==num) return fanout;
if (2==fanout) {
return p<<num;
}
else {
- for( j = 0; j < num; j++ ) { p*= fanout; }
+ for (int j = 0; j < num; j++) {
+ p *= fanout;
+ }
}
return p;
}
int root )
{
int rank, size;
- int schild, sparent;
+ int sparent;
int level; /* location of my rank in the tree structure of size */
int delta; /* number of nodes on my level */
int slimit; /* total number of nodes on levels above me */
int shiftedrank;
- int i;
ompi_coll_tree_t* tree;
XBT_DEBUG("coll:tuned:topo_build_tree Building fo %d rt %d", fanout, root);
tree->tree_root = root;
tree->tree_prev = -1;
tree->tree_nextsize = 0;
- for( i = 0; i < fanout; i++ ) {
- tree->tree_next[i] = -1;
+ for (int i = 0; i < fanout; i++) {
+ tree->tree_next[i] = -1;
}
/* return if we have less than 2 processes */
delta = pown( fanout, level );
/* find my children */
- for( i = 0; i < fanout; i++ ) {
- schild = shiftedrank + delta * (i+1);
+ for (int i = 0; i < fanout; i++) {
+ int schild = shiftedrank + delta * (i+1);
if( schild < size ) {
tree->tree_next[i] = (schild+root)%size;
tree->tree_nextsize = tree->tree_nextsize + 1;
ompi_coll_tuned_topo_build_in_order_bintree( MPI_Comm comm )
{
int rank, size;
- int myrank, rightsize, delta;
- int parent, lchild, rchild;
+ int myrank, delta;
+ int parent;
ompi_coll_tree_t* tree;
/*
while ( 1 ) {
/* Compute the size of the right subtree */
- rightsize = size >> 1;
+ int rightsize = size >> 1;
/* Determine the left and right child of this parent */
- lchild = -1;
- rchild = -1;
+ int lchild = -1;
+ int rchild = -1;
if (size - 1 > 0) {
lchild = parent - 1;
if (lchild > 0) {
int rank, vrank;
int size;
int mask = 1;
- int remote;
ompi_coll_tree_t *bmtree;
int i;
}
while (mask < size) {
- remote = vrank ^ mask;
+ int remote = vrank ^ mask;
if (remote < vrank) {
bmtree->tree_prev = (remote + root) % size;
break;
childs++;
if (childs == MAXTREEFANOUT) {
XBT_DEBUG("coll:tuned:topo:build_bmtree max fanout incorrect %d needed %d", MAXTREEFANOUT, childs);
+ delete bmtree;
return NULL;
}
}
int rank, size;
int srank; /* shifted rank */
int i,maxchainlen;
- int mark,head,len;
+ int mark;
ompi_coll_tree_t *chain;
XBT_DEBUG("coll:tuned:topo:build_chain fo %d rt %d", fanout, root);
*/
if( srank != 0 ) {
int column;
+ int head;
+ int len;
if( srank-1 < (mark * maxchainlen) ) {
column = (srank-1)/maxchainlen;
head = 1+column*maxchainlen;
if( rank == root ) {
chain->tree_prev = -1;
chain->tree_next[0] = (root+1)%size;
- for( i = 1; i < fanout; i++ ) {
+ for (int i = 1; i < fanout; i++) {
chain->tree_next[i] = chain->tree_next[i-1] + maxchainlen;
if( i > mark ) {
chain->tree_next[i]--;
int ompi_coll_tuned_topo_dump_tree (ompi_coll_tree_t* tree, int rank)
{
- int i;
-
XBT_DEBUG("coll:tuned:topo:topo_dump_tree %1d tree root %d"
" fanout %d BM %1d nextsize %d prev %d",
rank, tree->tree_root, tree->tree_bmtree, tree->tree_fanout,
tree->tree_nextsize, tree->tree_prev);
if( tree->tree_nextsize ) {
- for( i = 0; i < tree->tree_nextsize; i++ )
- XBT_DEBUG("[%1d] %d", i, tree->tree_next[i]);
+ for (int i = 0; i < tree->tree_nextsize; i++)
+ XBT_DEBUG("[%1d] %d", i, tree->tree_next[i]);
}
return (0);
}
int Coll_gather_default::gather(void *sendbuf, int sendcount, MPI_Datatype sendtype,
void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm)
{
- int system_tag = COLL_TAG_GATHER;
+ const int system_tag = COLL_TAG_GATHER;
MPI_Aint lb = 0;
MPI_Aint recvext = 0;
count += recvcounts[i];
}
void *tmpbuf = static_cast<void*>(smpi_get_tmp_sendbuffer(count*datatype->get_extent()));
- int ret = MPI_SUCCESS;
- ret = Coll_reduce_default::reduce(sendbuf, tmpbuf, count, datatype, op, 0, comm);
+ int ret = Coll_reduce_default::reduce(sendbuf, tmpbuf, count, datatype, op, 0, comm);
if(ret==MPI_SUCCESS)
ret = Colls::scatterv(tmpbuf, recvcounts, displs, datatype, recvbuf, recvcounts[rank], datatype, 0, comm);
xbt_free(displs);
int Coll_allgather_default::allgather(void *sendbuf, int sendcount, MPI_Datatype sendtype,
void *recvbuf,int recvcount, MPI_Datatype recvtype, MPI_Comm comm)
{
- int system_tag = COLL_TAG_ALLGATHER;
+ const int system_tag = COLL_TAG_ALLGATHER;
MPI_Aint lb = 0;
MPI_Aint recvext = 0;
MPI_Request *requests;
int Coll_allgatherv_default::allgatherv(void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
int *recvcounts, int *displs, MPI_Datatype recvtype, MPI_Comm comm)
{
- int system_tag = COLL_TAG_ALLGATHERV;
+ const int system_tag = COLL_TAG_ALLGATHERV;
MPI_Aint lb = 0;
MPI_Aint recvext = 0;
int Coll_scatter_default::scatter(void *sendbuf, int sendcount, MPI_Datatype sendtype,
void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm)
{
- int system_tag = COLL_TAG_SCATTER;
+ const int system_tag = COLL_TAG_SCATTER;
MPI_Aint lb = 0;
MPI_Aint sendext = 0;
MPI_Request *requests;
int Coll_reduce_default::reduce(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root,
MPI_Comm comm)
{
- int system_tag = COLL_TAG_REDUCE;
+ const int system_tag = COLL_TAG_REDUCE;
MPI_Aint lb = 0;
MPI_Aint dataext = 0;
int Coll_alltoallv_default::alltoallv(void *sendbuf, int *sendcounts, int *senddisps, MPI_Datatype sendtype,
void *recvbuf, int *recvcounts, int *recvdisps, MPI_Datatype recvtype, MPI_Comm comm)
{
- int system_tag = 889;
- int i;
- int count;
+ const int system_tag = 889;
MPI_Aint lb = 0;
MPI_Aint sendext = 0;
MPI_Aint recvext = 0;
if (err == MPI_SUCCESS && size > 1) {
/* Initiate all send/recv to/from others. */
requests = xbt_new(MPI_Request, 2 * (size - 1));
- count = 0;
+ int count = 0;
/* Create all receives that will be posted first */
- for (i = 0; i < size; ++i) {
+ for (int i = 0; i < size; ++i) {
if (i != rank && recvcounts[i] != 0) {
requests[count] = Request::irecv_init(static_cast<char *>(recvbuf) + recvdisps[i] * recvext,
recvcounts[i], recvtype, i, system_tag, comm);
}
}
/* Now create all sends */
- for (i = 0; i < size; ++i) {
+ for (int i = 0; i < size; ++i) {
if (i != rank && sendcounts[i] != 0) {
requests[count] = Request::isend_init(static_cast<char *>(sendbuf) + senddisps[i] * sendext,
sendcounts[i], sendtype, i, system_tag, comm);
Request::startall(count, requests);
XBT_DEBUG("<%d> wait for %d requests", rank, count);
Request::waitall(count, requests, MPI_STATUS_IGNORE);
- for(i = 0; i < count; i++) {
+ for (int i = 0; i < count; i++) {
if(requests[i]!=MPI_REQUEST_NULL)
Request::unref(&requests[i]);
}
int conf_index = 0;
int range_threshold = 0;
int is_two_level = 0;
- int local_size = -1;
MPI_Comm shmem_comm;
//MPI_Comm *shmem_commptr=NULL;
/* Get the size of the communicator */
comm->init_smp();
}
- int i;
if (comm->is_uniform()){
shmem_comm = comm->get_intra_comm();
- local_size = shmem_comm->size();
- i = 0;
+ int local_size = shmem_comm->size();
+ int i = 0;
if (mv2_allgather_table_ppn_conf[0] == -1) {
// Indicating user defined tuning
conf_index = 0;
int range_threshold = 0;
int range_intra_threshold = 0;
long nbytes = 0;
- int comm_size = 0;
int recvtype_size, sendtype_size;
- int rank = -1;
- comm_size = comm->size();
- rank = comm->rank();
+ int comm_size = comm->size();
+ int rank = comm->rank();
if (rank == root) {
recvtype_size=recvtype->size();
MPI_Aint sendtype_size = 0;
long nbytes = 0;
- int range = 0, range_threshold = 0, range_threshold_intra = 0;
- int is_two_level = 0;
int is_commutative = 0;
MPI_Aint true_lb, true_extent;
//is_commutative = op->is_commutative();
{
+ int range = 0, range_threshold = 0, range_threshold_intra = 0;
+ int is_two_level = 0;
+
/* Search for the corresponding system size inside the tuning table */
while ((range < (mv2_size_allreduce_tuning_table - 1)) &&
(comm_size > mv2_allreduce_thresholds_table[range].numproc)) {
int mpi_errno = MPI_SUCCESS;
int i = 0, comm_size = comm->size(), total_count = 0, type_size =
0, nbytes = 0;
- int range = 0;
- int range_threshold = 0;
int is_commutative = 0;
int* disps = new int[comm_size];
nbytes = total_count * type_size;
if (is_commutative) {
+ int range = 0;
+ int range_threshold = 0;
/* Search for the corresponding system size inside the tuning table */
while ((range < (mv2_size_red_scat_tuning_table - 1)) &&
int mpi_errno = MPI_SUCCESS;
// int mpi_errno_ret = MPI_SUCCESS;
int rank, nbytes, comm_size;
- int recvtype_size, sendtype_size;
int partial_sub_ok = 0;
int conf_index = 0;
- int local_size = -1;
- int i;
MPI_Comm shmem_comm;
// MPID_Comm *shmem_commptr=NULL;
if(mv2_scatter_thresholds_table==NULL)
rank = comm->rank();
if (rank == root) {
- sendtype_size=sendtype->size();
- nbytes = sendcnt * sendtype_size;
+ int sendtype_size = sendtype->size();
+ nbytes = sendcnt * sendtype_size;
} else {
- recvtype_size=recvtype->size();
- nbytes = recvcnt * recvtype_size;
+ int recvtype_size = recvtype->size();
+ nbytes = recvcnt * recvtype_size;
}
// check if safe to use partial subscription mode
if (comm->is_uniform()) {
shmem_comm = comm->get_intra_comm();
- local_size = shmem_comm->size();
- i = 0;
+ int local_size = shmem_comm->size();
+ int i = 0;
if (mv2_scatter_table_ppn_conf[0] == -1) {
// Indicating user defined tuning
conf_index = 0;
if (simgrid::smpi::Colls::smpi_coll_cleanup_callback == NULL)
simgrid::smpi::Colls::smpi_coll_cleanup_callback = &smpi_coll_cleanup_mvapich2;
- mv2_allgather_tuning_table** table_ptrs = NULL;
mv2_allgather_num_ppn_conf = 3;
mv2_allgather_thresholds_table = new mv2_allgather_tuning_table*[mv2_allgather_num_ppn_conf];
- table_ptrs = new mv2_allgather_tuning_table*[mv2_allgather_num_ppn_conf];
+ mv2_allgather_tuning_table** table_ptrs = new mv2_allgather_tuning_table*[mv2_allgather_num_ppn_conf];
mv2_size_allgather_tuning_table = new int[mv2_allgather_num_ppn_conf];
mv2_allgather_table_ppn_conf = new int[mv2_allgather_num_ppn_conf];
mv2_allgather_table_ppn_conf[0] = 1;
simgrid::smpi::Colls::smpi_coll_cleanup_callback = &smpi_coll_cleanup_mvapich2;
int agg_table_sum = 0;
- mv2_scatter_tuning_table** table_ptrs = NULL;
mv2_scatter_num_ppn_conf = 3;
mv2_scatter_thresholds_table = new mv2_scatter_tuning_table*[mv2_scatter_num_ppn_conf];
- table_ptrs = new mv2_scatter_tuning_table*[mv2_scatter_num_ppn_conf];
+ mv2_scatter_tuning_table** table_ptrs = new mv2_scatter_tuning_table*[mv2_scatter_num_ppn_conf];
mv2_size_scatter_tuning_table = new int[mv2_scatter_num_ppn_conf];
mv2_scatter_table_ppn_conf = new int[mv2_scatter_num_ppn_conf];
mv2_scatter_table_ppn_conf[0] = 1;