@@ -678,7 +678,8 @@ void *
678
678
MPI_Win_flush (caf_this_image - 1 , * p );
679
679
# endif // CAF_MPI_LOCK_UNLOCK
680
680
free (init_array );
681
- PREFIX (sync_all ) (NULL ,NULL ,0 );
681
+ MPI_Barrier (CAF_COMM_WORLD );
682
+ /* PREFIX(sync_all) (NULL,NULL,0); */
682
683
}
683
684
684
685
caf_static_t * tmp = malloc (sizeof (caf_static_t ));
@@ -754,7 +755,8 @@ PREFIX (deregister) (caf_token_t *token, int *stat, char *errmsg, int errmsg_len
754
755
caf_runtime_error (msg );
755
756
}
756
757
757
- PREFIX (sync_all ) (NULL , NULL , 0 );
758
+ /* PREFIX (sync_all) (NULL, NULL, 0); */
759
+ MPI_Barrier (CAF_COMM_WORLD );
758
760
759
761
caf_static_t * tmp = caf_tot , * prev = caf_tot , * next = caf_tot ;
760
762
MPI_Win * p = * token ;
@@ -811,6 +813,13 @@ PREFIX (sync_all) (int *stat, char *errmsg, int errmsg_len)
811
813
{
812
814
int ierr = 0 ;
813
815
816
+ /* if(error_called == 1) */
817
+ /* { */
818
+ /* communicator_shrink(&CAF_COMM_WORLD); */
819
+ /* error_called = 0; */
820
+ /* ierr = STAT_FAILED_IMAGE; */
821
+ /* } */
822
+
814
823
if (unlikely (caf_is_finalized ))
815
824
ierr = STAT_STOPPED_IMAGE ;
816
825
else if (ierr != STAT_FAILED_IMAGE )
@@ -819,7 +828,6 @@ PREFIX (sync_all) (int *stat, char *errmsg, int errmsg_len)
819
828
explicit_flush ();
820
829
#endif
821
830
MPI_Barrier (CAF_COMM_WORLD );
822
- ierr = 0 ;
823
831
}
824
832
825
833
if (error_called == 1 )
@@ -833,8 +841,8 @@ PREFIX (sync_all) (int *stat, char *errmsg, int errmsg_len)
833
841
* stat = ierr ;
834
842
else if (ierr == STAT_FAILED_IMAGE )
835
843
error_stop (ierr );
836
-
837
- if (ierr != STAT_FAILED_IMAGE )
844
+
845
+ if (ierr != 0 && ierr != STAT_FAILED_IMAGE )
838
846
{
839
847
char * msg ;
840
848
if (caf_is_finalized )
0 commit comments