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' of framagit.org:simgrid/simgrid
[simgrid.git]
/
src
/
smpi
/
colls
/
allreduce
/
allreduce-mvapich-rs.cpp
diff --git
a/src/smpi/colls/allreduce/allreduce-mvapich-rs.cpp
b/src/smpi/colls/allreduce/allreduce-mvapich-rs.cpp
index
1711f3b
..
669c347
100644
(file)
--- a/
src/smpi/colls/allreduce/allreduce-mvapich-rs.cpp
+++ b/
src/smpi/colls/allreduce/allreduce-mvapich-rs.cpp
@@
-1,4
+1,4
@@
-/* Copyright (c) 2013-201
7
. The SimGrid Team.
+/* Copyright (c) 2013-201
9
. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
@@
-22,6
+22,8
@@
*/
#include "../colls_private.hpp"
*/
#include "../colls_private.hpp"
+#include <algorithm>
+
namespace simgrid{
namespace smpi{
int Coll_allreduce_mvapich2_rs::allreduce(void *sendbuf,
namespace simgrid{
namespace smpi{
int Coll_allreduce_mvapich2_rs::allreduce(void *sendbuf,
@@
-53,7
+55,7
@@
int Coll_allreduce_mvapich2_rs::allreduce(void *sendbuf,
datatype->extent(&true_lb, &true_extent);
extent = datatype->get_extent();
datatype->extent(&true_lb, &true_extent);
extent = datatype->get_extent();
- tmp_buf_free
= smpi_get_tmp_recvbuffer(count * (MAX(extent, true_extent)
));
+ tmp_buf_free
= smpi_get_tmp_recvbuffer(count * std::max(extent, true_extent
));
/* adjust for potential negative lower bound in datatype */
tmp_buf = (void *) ((char *) tmp_buf_free - true_lb);
/* adjust for potential negative lower bound in datatype */
tmp_buf = (void *) ((char *) tmp_buf_free - true_lb);