@@ -56,6 +56,7 @@ static void error_stop (int error) __attribute__ ((noreturn));
56
56
static int caf_this_image ;
57
57
static int caf_num_images ;
58
58
static int caf_is_finalized ;
59
+ MPI_Request ibarrier_req ;
59
60
60
61
#if MPI_VERSION >= 3
61
62
MPI_Info mpi_info_same_size ;
@@ -408,6 +409,7 @@ PREFIX (finalize) (void)
408
409
{
409
410
* img_status = STAT_STOPPED_IMAGE ; /* GFC_STAT_STOPPED_IMAGE = 6000 */
410
411
MPI_Win_sync (* stat_tok );
412
+
411
413
MPI_Barrier (CAF_COMM_WORLD );
412
414
413
415
while (caf_static_list != NULL )
@@ -445,6 +447,7 @@ PREFIX (finalize) (void)
445
447
pthread_mutex_lock (& lock_am );
446
448
caf_is_finalized = 1 ;
447
449
pthread_mutex_unlock (& lock_am );
450
+ exit (0 );
448
451
}
449
452
450
453
@@ -2482,6 +2485,25 @@ error_stop (int error)
2482
2485
exit (error );
2483
2486
}
2484
2487
2488
+ /* STOP function for integer arguments. */
2489
+ void
2490
+ PREFIX (stop_numeric ) (int32_t stop_code )
2491
+ {
2492
+ fprintf (stderr , "STOP %d\n" , stop_code );
2493
+ PREFIX (finalize ) ();
2494
+ }
2495
+
2496
+ /* STOP function for string arguments. */
2497
+ void
2498
+ PREFIX (stop_str ) (const char * string , int32_t len )
2499
+ {
2500
+ fputs ("STOP " , stderr );
2501
+ while (len -- )
2502
+ fputc (* (string ++ ), stderr );
2503
+ fputs ("\n" , stderr );
2504
+
2505
+ PREFIX (finalize ) ();
2506
+ }
2485
2507
2486
2508
/* ERROR STOP function for string arguments. */
2487
2509
0 commit comments