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
model-checker : fix detection of dangling pointers in system state comparison
[simgrid.git]
/
src
/
smpi
/
smpi_base.c
diff --git
a/src/smpi/smpi_base.c
b/src/smpi/smpi_base.c
index
88e9307
..
bb00f04
100644
(file)
--- a/
src/smpi/smpi_base.c
+++ b/
src/smpi/smpi_base.c
@@
-1,4
+1,4
@@
-/* Copyright (c) 2007
, 2008, 2009, 2010
. The SimGrid Team.
+/* Copyright (c) 2007
-2013
. 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
@@
-320,6
+320,7
@@
void smpi_mpi_start(MPI_Request request)
if(request->flags & PREPARED)request->flags &= ~PREPARED;
if(request->flags & RECV) {
print_request("New recv", request);
if(request->flags & PREPARED)request->flags &= ~PREPARED;
if(request->flags & RECV) {
print_request("New recv", request);
+ //FIXME: if receive is posted with a large size, but send is smaller, mailboxes may not match !
if (request->size < sg_cfg_get_int("smpi/async_small_thres"))
mailbox = smpi_process_mailbox_small();
else
if (request->size < sg_cfg_get_int("smpi/async_small_thres"))
mailbox = smpi_process_mailbox_small();
else
@@
-345,7
+346,7
@@
void smpi_mpi_start(MPI_Request request)
#ifdef HAVE_TRACING
int rank = smpi_process_index();
if (TRACE_smpi_view_internals()) {
#ifdef HAVE_TRACING
int rank = smpi_process_index();
if (TRACE_smpi_view_internals()) {
- TRACE_smpi_send(rank, rank, receiver);
+ TRACE_smpi_send(rank, rank, receiver
,request->size
);
}
#endif
/* if(receiver == MPI_UNDEFINED) {*/
}
#endif
/* if(receiver == MPI_UNDEFINED) {*/
@@
-443,7
+444,7
@@
MPI_Request smpi_isend_init(void *buf, int count, MPI_Datatype datatype,
{
MPI_Request request =
build_request(buf==MPI_BOTTOM ? (void*)0 : buf , count, datatype, smpi_process_index(), smpi_group_index(smpi_comm_group(comm), dst), tag,
{
MPI_Request request =
build_request(buf==MPI_BOTTOM ? (void*)0 : buf , count, datatype, smpi_process_index(), smpi_group_index(smpi_comm_group(comm), dst), tag,
- comm, NON_PERSISTENT | SEND | PREPARED);
+ comm, NON_PERSISTENT |
ISEND |
SEND | PREPARED);
return request;
}
return request;
}
@@
-676,6
+677,8
@@
int smpi_mpi_testall(int count, MPI_Request requests[],
if(requests[i]!= MPI_REQUEST_NULL){
if (smpi_mpi_test(&requests[i], pstat)!=1){
flag=0;
if(requests[i]!= MPI_REQUEST_NULL){
if (smpi_mpi_test(&requests[i], pstat)!=1){
flag=0;
+ }else{
+ requests[i]=MPI_REQUEST_NULL;
}
}else{
smpi_empty_status(pstat);
}
}else{
smpi_empty_status(pstat);
@@
-752,7
+755,7
@@
void smpi_mpi_wait(MPI_Request * request, MPI_Status * status)
simcall_comm_wait((*request)->action, -1.0);
}
finish_wait(request, status);
simcall_comm_wait((*request)->action, -1.0);
}
finish_wait(request, status);
-
+ request=MPI_REQUEST_NULL;
// FIXME for a detached send, finish_wait is not called:
}
// FIXME for a detached send, finish_wait is not called:
}
@@
-881,7
+884,7
@@
int smpi_mpi_testsome(int incount, MPI_Request requests[], int *indices,
for(i = 0; i < incount; i++) {
if((requests[i] != MPI_REQUEST_NULL)) {
if(smpi_mpi_test(&requests[i], pstat)) {
for(i = 0; i < incount; i++) {
if((requests[i] != MPI_REQUEST_NULL)) {
if(smpi_mpi_test(&requests[i], pstat)) {
- indices[
count] = i
;
+ indices[
i] = 1
;
count++;
if(status != MPI_STATUSES_IGNORE) {
status[i] = *pstat;
count++;
if(status != MPI_STATUSES_IGNORE) {
status[i] = *pstat;