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
typos
[simgrid.git]
/
src
/
smpi
/
smpi_base.c
diff --git
a/src/smpi/smpi_base.c
b/src/smpi/smpi_base.c
index
4d58f24
..
18914fa
100644
(file)
--- a/
src/smpi/smpi_base.c
+++ b/
src/smpi/smpi_base.c
@@
-5,7
+5,7
@@
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "private.h"
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "private.h"
-#include "xbt/
time
.h"
+#include "xbt/
virtu
.h"
#include "mc/mc.h"
#include "xbt/replay.h"
#include <errno.h>
#include "mc/mc.h"
#include "xbt/replay.h"
#include <errno.h>
@@
-50,7
+50,7
@@
static MPI_Request build_request(void *buf, int count,
s_smpi_subtype_t *subtype = datatype->substruct;
if(datatype->has_subtype == 1){
s_smpi_subtype_t *subtype = datatype->substruct;
if(datatype->has_subtype == 1){
- // This part handles the problem of non-contig
n
ous memory
+ // This part handles the problem of non-contig
u
ous memory
old_buf = buf;
buf = malloc(count*smpi_datatype_size(datatype));
if (flags & SEND) {
old_buf = buf;
buf = malloc(count*smpi_datatype_size(datatype));
if (flags & SEND) {
@@
-59,7
+59,7
@@
static MPI_Request build_request(void *buf, int count,
}
request->buf = buf;
}
request->buf = buf;
- // This part handles the problem of non-contig
n
ous memory (for the
+ // This part handles the problem of non-contig
u
ous memory (for the
// unserialisation at the reception)
request->old_buf = old_buf;
request->old_type = datatype;
// unserialisation at the reception)
request->old_buf = old_buf;
request->old_type = datatype;
@@
-178,9
+178,10
@@
void smpi_mpi_start(MPI_Request request)
if(request->old_type->has_subtype == 0){
oldbuf = request->buf;
request->detached = 1;
if(request->old_type->has_subtype == 0){
oldbuf = request->buf;
request->detached = 1;
- request->buf = malloc(request->size);
- if (oldbuf)
+ if (oldbuf){
+ request->buf = malloc(request->size);
memcpy(request->buf,oldbuf,request->size);
memcpy(request->buf,oldbuf,request->size);
+ }
}
XBT_DEBUG("Send request %p is detached; buf %p copied into %p",request,oldbuf,request->buf);
}
}
XBT_DEBUG("Send request %p is detached; buf %p copied into %p",request,oldbuf,request->buf);
}