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
Spell check.
[simgrid.git]
/
src
/
smpi
/
colls
/
alltoallv
/
alltoallv-ompi-basic-linear.cpp
diff --git
a/src/smpi/colls/alltoallv/alltoallv-ompi-basic-linear.cpp
b/src/smpi/colls/alltoallv/alltoallv-ompi-basic-linear.cpp
index
cbfd6e0
..
de140a3
100644
(file)
--- a/
src/smpi/colls/alltoallv/alltoallv-ompi-basic-linear.cpp
+++ b/
src/smpi/colls/alltoallv/alltoallv-ompi-basic-linear.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
@@
-17,9
+17,9
@@
namespace simgrid{
namespace smpi{
int
namespace simgrid{
namespace smpi{
int
-Coll_alltoallv_ompi_basic_linear::alltoallv(
void *sbuf, int *scounts,
int *sdisps,
+Coll_alltoallv_ompi_basic_linear::alltoallv(
const void *sbuf, const int *scounts, const
int *sdisps,
MPI_Datatype sdtype,
MPI_Datatype sdtype,
- void *rbuf,
int *rcounts,
int *rdisps,
+ void *rbuf,
const int *rcounts, const
int *rdisps,
MPI_Datatype rdtype,
MPI_Comm comm)
{
MPI_Datatype rdtype,
MPI_Comm comm)
{
@@
-30,7
+30,7
@@
Coll_alltoallv_ompi_basic_linear::alltoallv(void *sbuf, int *scounts, int *sdisp
MPI_Request *preq;
size = comm->size();
rank = comm->rank();
MPI_Request *preq;
size = comm->size();
rank = comm->rank();
- MPI_Request
*ireqs= static_cast<MPI_Request*>(xbt_malloc(sizeof(MPI_Request) * size * 2))
;
+ MPI_Request
* ireqs = new MPI_Request[size * 2]
;
XBT_DEBUG(
"coll:tuned:alltoallv_intra_basic_linear rank %d", rank);
XBT_DEBUG(
"coll:tuned:alltoallv_intra_basic_linear rank %d", rank);
@@
-56,7
+56,7
@@
Coll_alltoallv_ompi_basic_linear::alltoallv(void *sbuf, int *scounts, int *sdisp
/* Post all receives first */
for (i = 0; i < size; ++i) {
/* Post all receives first */
for (i = 0; i < size; ++i) {
- if (i == rank
|| 0 == rcounts[i]
) {
+ if (i == rank) {
continue;
}
continue;
}
@@
-72,7
+72,7
@@
Coll_alltoallv_ompi_basic_linear::alltoallv(void *sbuf, int *scounts, int *sdisp
/* Now post all sends */
for (i = 0; i < size; ++i) {
/* Now post all sends */
for (i = 0; i < size; ++i) {
- if (i == rank
|| 0 == scounts[i]
) {
+ if (i == rank) {
continue;
}
continue;
}
@@
-101,7
+101,7
@@
Coll_alltoallv_ompi_basic_linear::alltoallv(void *sbuf, int *scounts, int *sdisp
if(ireqs[i]!=MPI_REQUEST_NULL)
Request::unref(&ireqs[i]);
}
if(ireqs[i]!=MPI_REQUEST_NULL)
Request::unref(&ireqs[i]);
}
-
free(ireqs)
;
+
delete[] ireqs
;
return MPI_SUCCESS;
}
return MPI_SUCCESS;
}