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 my late sunday commit
[simgrid.git]
/
src
/
smpi
/
smpi_request.cpp
diff --git
a/src/smpi/smpi_request.cpp
b/src/smpi/smpi_request.cpp
index
29661e8
..
c7a048b
100644
(file)
--- a/
src/smpi/smpi_request.cpp
+++ b/
src/smpi/smpi_request.cpp
@@
-33,7
+33,7
@@
Request::Request(void *buf, int count, MPI_Datatype datatype, int src, int dst,
{
void *old_buf = nullptr;
// FIXME Handle the case of a partial shared malloc.
- if
(((((flags & RECV) != 0) && ((flags & ACCUMULATE) !=0)) || (datatype->flags() & DT_FLAG_DERIVED))) { // && (!smpi_is_shared(buf_)))
{
+ if
((((flags & RECV) != 0) && ((flags & ACCUMULATE) != 0)) || (datatype->flags() & DT_FLAG_DERIVED))
{
// This part handles the problem of non-contiguous memory
old_buf = buf;
if (count==0){
@@
-517,24
+517,22
@@
int Request::test(MPI_Request * request, MPI_Status * status) {
int Request::testsome(int incount, MPI_Request requests[], int *indices, MPI_Status status[])
{
- int i;
int count = 0;
int count_dead = 0;
MPI_Status stat;
MPI_Status *pstat = status == MPI_STATUSES_IGNORE ? MPI_STATUS_IGNORE : &stat;
- for(i = 0; i < incount; i++) {
- if((requests[i] != MPI_REQUEST_NULL)) {
- if(test(&requests[i], pstat)) {
- indices[i] = 1;
- count++;
- if(status != MPI_STATUSES_IGNORE) {
- status[i] = *pstat;
- }
- if ((requests[i] != MPI_REQUEST_NULL) && requests[i]->flags_ & NON_PERSISTENT)
- requests[i]=MPI_REQUEST_NULL;
+ for (int i = 0; i < incount; i++) {
+ if (requests[i] != MPI_REQUEST_NULL) {
+ if (test(&requests[i], pstat)) {
+ indices[i] = 1;
+ count++;
+ if (status != MPI_STATUSES_IGNORE)
+ status[i] = *pstat;
+ if ((requests[i] != MPI_REQUEST_NULL) && requests[i]->flags_ & NON_PERSISTENT)
+ requests[i] = MPI_REQUEST_NULL;
}
- }
else
{
+ }
else
{
count_dead++;
}
}
@@
-691,7
+689,8
@@
void Request::finish_wait(MPI_Request* request, MPI_Status * status)
MPI_Datatype datatype = req->old_type_;
// FIXME Handle the case of a partial shared malloc.
- if((((req->flags_ & ACCUMULATE) != 0) || (datatype->flags() & DT_FLAG_DERIVED))){// && (!smpi_is_shared(req->old_buf_))){
+ if (((req->flags_ & ACCUMULATE) != 0) ||
+ (datatype->flags() & DT_FLAG_DERIVED)) { // && (!smpi_is_shared(req->old_buf_))){
if (!smpi_process()->replaying()){
if( smpi_privatize_global_variables != 0 && (static_cast<char*>(req->old_buf_) >= smpi_start_data_exe)