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
The eager limit size itself is part of the RDV protocol.
[simgrid.git]
/
src
/
smpi
/
smpi_base.c
diff --git
a/src/smpi/smpi_base.c
b/src/smpi/smpi_base.c
index
a60f209
..
2e192a0
100644
(file)
--- a/
src/smpi/smpi_base.c
+++ b/
src/smpi/smpi_base.c
@@
-1,3
+1,9
@@
+/* Copyright (c) 2007, 2008, 2009, 2010. 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 "private.h"
#include "xbt/time.h"
#include "private.h"
#include "xbt/time.h"
@@
-55,7
+61,7
@@
static MPI_Request build_request(void* buf, int count, MPI_Datatype datatype, in
request->complete = 0;
request->match = MPI_REQUEST_NULL;
request->flags = flags;
request->complete = 0;
request->match = MPI_REQUEST_NULL;
request->flags = flags;
- if(request->size <
=
EAGER_LIMIT) {
+ if(request->size < EAGER_LIMIT) {
request->ack = MPI_REQUEST_NULL;
} else {
request->ack = xbt_new(s_smpi_mpi_request_t, 1);
request->ack = MPI_REQUEST_NULL;
} else {
request->ack = xbt_new(s_smpi_mpi_request_t, 1);
@@
-90,7
+96,7
@@
MPI_Request smpi_mpi_recv_init(void* buf, int count, MPI_Datatype datatype, int
void smpi_mpi_start(MPI_Request request) {
xbt_assert0(request->complete == 0, "Cannot start a non-finished communication");
void smpi_mpi_start(MPI_Request request) {
xbt_assert0(request->complete == 0, "Cannot start a non-finished communication");
- if(request->size > EAGER_LIMIT) {
+ if(request->size >
=
EAGER_LIMIT) {
print_request("RDV ack", request->ack);
smpi_mpi_wait(&request->ack, MPI_STATUS_IGNORE);
}
print_request("RDV ack", request->ack);
smpi_mpi_wait(&request->ack, MPI_STATUS_IGNORE);
}
@@
-187,6
+193,9
@@
static void finish_wait(MPI_Request* request, MPI_Status* status) {
}
if(((*request)->flags & NON_PERSISTENT) == NON_PERSISTENT) {
smpi_mpi_request_free(request);
}
if(((*request)->flags & NON_PERSISTENT) == NON_PERSISTENT) {
smpi_mpi_request_free(request);
+ } else {
+ (*request)->rdv = NULL;
+ (*request)->pair = NULL;
}
}
}
}