A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' into mc
[simgrid.git]
/
src
/
smpi
/
colls
/
allreduce-smp-binomial.c
diff --git
a/src/smpi/colls/allreduce-smp-binomial.c
b/src/smpi/colls/allreduce-smp-binomial.c
index
cf68dfb
..
97183fb
100644
(file)
--- a/
src/smpi/colls/allreduce-smp-binomial.c
+++ b/
src/smpi/colls/allreduce-smp-binomial.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"
/* IMPLEMENTED BY PITCH PATARASUK
Non-topoloty-specific (however, number of cores/node need to be changed)
#include "colls_private.h"
/* IMPLEMENTED BY PITCH PATARASUK
Non-topoloty-specific (however, number of cores/node need to be changed)
@@
-32,20
+38,15
@@
int smpi_coll_tuned_allreduce_smp_binomial(void *send_buf, void *recv_buf,
{
int comm_size, rank;
void *tmp_buf;
{
int comm_size, rank;
void *tmp_buf;
- int tag =
50
;
+ int tag =
COLL_TAG_ALLREDUCE
;
int mask, src, dst;
int mask, src, dst;
- 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;
MPI_Status status;
MPI_Status status;
- /*
- #ifdef MPICH2_REDUCTION
- MPI_User_function * uop = MPIR_Op_table[op % 16 - 1];
- #else
- MPI_User_function *uop;
- struct MPIR_OP *op_ptr;
- op_ptr = MPIR_ToPointer(op);
- uop = op_ptr->op;
- #endif
- */
comm_size=smpi_comm_size(comm);
rank=smpi_comm_rank(comm);
comm_size=smpi_comm_size(comm);
rank=smpi_comm_rank(comm);