~bkerensa/ubuntu/raring/valgrind/merge-from-deb

« back to all changes in this revision

Viewing changes to auxprogs/libmpiwrap.c

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt
  • Date: 2008-06-19 09:57:35 UTC
  • mfrom: (1.2.3 upstream)
  • mto: This revision was merged to the branch mainline in revision 24.
  • Revision ID: james.westby@ubuntu.com-20080619095735-0w0fyjp7znob3pek
Tags: upstream-3.3.1
ImportĀ upstreamĀ versionĀ 3.3.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1403
1403
   return err;
1404
1404
}
1405
1405
 
 
1406
/* --- Waitany --- */
 
1407
int WRAPPER_FOR(PMPI_Waitany)( int count,
 
1408
                               MPI_Request* requests,
 
1409
                               int* index,
 
1410
                               MPI_Status* status )
 
1411
{
 
1412
   MPI_Request* requests_before = NULL;
 
1413
   OrigFn       fn;
 
1414
   int          err, i;
 
1415
   VALGRIND_GET_ORIG_FN(fn);
 
1416
   before("Waitany");
 
1417
   if (0) fprintf(stderr, "Waitany: %d\n", count);
 
1418
   check_mem_is_addressable_untyped(index, sizeof(int));
 
1419
   check_mem_is_addressable_untyped(status, sizeof(MPI_Status));
 
1420
   for (i = 0; i < count; i++) {
 
1421
      check_mem_is_defined_untyped(&requests[i], sizeof(MPI_Request));
 
1422
   }
 
1423
   requests_before = clone_Request_array( count, requests );
 
1424
   CALL_FN_W_WWWW(err, fn, count,requests,index,status);
 
1425
   if (err == MPI_SUCCESS && *index >= 0 && *index < count) {
 
1426
      maybe_complete(False/*err in status?*/, 
 
1427
                     requests_before[*index], requests[*index], status);
 
1428
      make_mem_defined_if_addressable_untyped(status, sizeof(MPI_Status));
 
1429
   }
 
1430
   if (requests_before)
 
1431
      free(requests_before);
 
1432
   after("Waitany", err);
 
1433
   return err;
 
1434
}
 
1435
 
1406
1436
/* --- Waitall --- */
1407
1437
int WRAPPER_FOR(PMPI_Waitall)( int count, 
1408
1438
                               MPI_Request* requests,
2542
2572
DEFAULT_WRAPPER_W_3W(Unpublish_name)
2543
2573
DEFAULT_WRAPPER_W_7W(Unpack_external)
2544
2574
/* DEFAULT_WRAPPER_W_3W(Waitall) */
2545
 
DEFAULT_WRAPPER_W_4W(Waitany)
 
2575
/* DEFAULT_WRAPPER_W_4W(Waitany) */
2546
2576
/* DEFAULT_WRAPPER_W_2W(Wait) */
2547
2577
DEFAULT_WRAPPER_W_5W(Waitsome)
2548
2578
DEFAULT_WRAPPER_W_1W(Win_c2f)