X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/1faf1e4ac5d8295ab562c45a5507a471ad4540a6..e7ca102c2884a457fb10de086fbaf074506c02e1:/src/smpi/colls/allreduce-smp-rsag.c diff --git a/src/smpi/colls/allreduce-smp-rsag.c b/src/smpi/colls/allreduce-smp-rsag.c index 573f5c62b1..8d751c88da 100644 --- a/src/smpi/colls/allreduce-smp-rsag.c +++ b/src/smpi/colls/allreduce-smp-rsag.c @@ -1,3 +1,9 @@ +/* Copyright (c) 2013-2014. 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" /* change number of core per smp-node @@ -22,7 +28,10 @@ int smpi_coll_tuned_allreduce_smp_rsag(void *send_buf, void *recv_buf, int tag = COLL_TAG_ALLREDUCE; int mask, src, dst; MPI_Status status; - int num_core = NUM_CORE; + int num_core = simcall_host_get_core(SIMIX_host_self()); + // do we use the default one or the number of cores in the platform ? + // if the number of cores is one, the platform may be simulated with 1 node = 1 core + if (num_core == 1) num_core = NUM_CORE; /* #ifdef MPICH2_REDUCTION MPI_User_function * uop = MPIR_Op_table[op % 16 - 1];