@@ -287,7 +287,6 @@ void mutex_lock(MPI_Win win, int image_index, int index, int *stat,
287
287
288
288
if (error_called == 1 )
289
289
{
290
- /* MPIX_Comm_agree( CAF_COMM_WORLD, &completed ); */
291
290
/* communicator_shrink(&lock_comm); */
292
291
communicator_shrink (& CAF_COMM_WORLD );
293
292
error_called = 0 ;
@@ -319,7 +318,6 @@ void mutex_lock(MPI_Win win, int image_index, int index, int *stat,
319
318
320
319
if (error_called == 1 )
321
320
{
322
- /* MPIX_Comm_agree( CAF_COMM_WORLD, &completed ); */
323
321
//communicator_shrink(&lock_comm);
324
322
communicator_shrink (& CAF_COMM_WORLD );
325
323
error_called = 0 ;
@@ -518,6 +516,10 @@ PREFIX (finalize) (void)
518
516
519
517
completed = 1 ;
520
518
519
+ printf ("finalizing\n" );
520
+
521
+ MPI_Cancel (& lock_req );
522
+ MPI_Request_free (& lock_req );
521
523
MPI_Barrier (CAF_COMM_WORLD );
522
524
523
525
while (caf_static_list != NULL )
@@ -649,8 +651,7 @@ void *
649
651
650
652
if (error_called == 1 )
651
653
{
652
- /* MPIX_Comm_agree( CAF_COMM_WORLD, &completed ); */
653
- //communicator_shrink(&lock_comm);
654
+ /* communicator_shrink(&lock_comm); */
654
655
communicator_shrink (& CAF_COMM_WORLD );
655
656
error_called = 0 ;
656
657
}
@@ -818,8 +819,7 @@ PREFIX (sync_all) (int *stat, char *errmsg, int errmsg_len)
818
819
819
820
if (error_called == 1 )
820
821
{
821
- /* MPIX_Comm_agree( CAF_COMM_WORLD, &completed ); */
822
- //communicator_shrink(&lock_comm);
822
+ /* communicator_shrink(&lock_comm); */
823
823
communicator_shrink (& CAF_COMM_WORLD );
824
824
error_called = 0 ;
825
825
}
0 commit comments