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
Fix memory leaks.
[simgrid.git]
/
src
/
smpi
/
mpi
/
smpi_datatype.cpp
diff --git
a/src/smpi/mpi/smpi_datatype.cpp
b/src/smpi/mpi/smpi_datatype.cpp
index
4db6870
..
d60ea40
100644
(file)
--- a/
src/smpi/mpi/smpi_datatype.cpp
+++ b/
src/smpi/mpi/smpi_datatype.cpp
@@
-198,6
+198,12
@@
bool Datatype::is_basic()
return (flags_ & DT_FLAG_BASIC);
}
return (flags_ & DT_FLAG_BASIC);
}
+bool Datatype::is_replayable()
+{
+ return ((this==MPI_BYTE)||(this==MPI_DOUBLE)||(this==MPI_INT)||
+ (this==MPI_CHAR)||(this==MPI_SHORT)||(this==MPI_LONG)||(this==MPI_FLOAT));
+}
+
size_t Datatype::size(){
return size_;
}
size_t Datatype::size(){
return size_;
}
@@
-271,7
+277,7
@@
int Datatype::copy(void *sendbuf, int sendcount, MPI_Datatype sendtype,
// FIXME Handle the case of a partial shared malloc.
if(smpi_privatize_global_variables == SMPI_PRIVATIZE_MMAP){
// FIXME Handle the case of a partial shared malloc.
if(smpi_privatize_global_variables == SMPI_PRIVATIZE_MMAP){
- smpi_switch_data_segment(s
mpi_process()->index
());
+ smpi_switch_data_segment(s
imgrid::s4u::Actor::self()->getPid
());
}
/* First check if we really have something to do */
if (recvcount > 0 && recvbuf != sendbuf) {
}
/* First check if we really have something to do */
if (recvcount > 0 && recvbuf != sendbuf) {
@@
-283,9
+289,9
@@
int Datatype::copy(void *sendbuf, int sendcount, MPI_Datatype sendtype,
if (not smpi_process()->replaying())
memcpy(recvbuf, sendbuf, count);
} else if (not(sendtype->flags() & DT_FLAG_DERIVED)) {
if (not smpi_process()->replaying())
memcpy(recvbuf, sendbuf, count);
} else if (not(sendtype->flags() & DT_FLAG_DERIVED)) {
- recvtype->unserialize(
sendbuf, recvbuf, recvcount/
recvtype->size(), MPI_REPLACE);
+ recvtype->unserialize(
sendbuf, recvbuf, count /
recvtype->size(), MPI_REPLACE);
} else if (not(recvtype->flags() & DT_FLAG_DERIVED)) {
} else if (not(recvtype->flags() & DT_FLAG_DERIVED)) {
- sendtype->serialize(sendbuf, recvbuf,
sendcount/
sendtype->size());
+ sendtype->serialize(sendbuf, recvbuf,
count /
sendtype->size());
}else{
void * buf_tmp = xbt_malloc(count);
}else{
void * buf_tmp = xbt_malloc(count);