File tree Expand file tree Collapse file tree 4 files changed +6
-3
lines changed
Expand file tree Collapse file tree 4 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -654,7 +654,7 @@ void LrtsExit(int exitcode)
654654
655655 ret = runtime_fini ();
656656 UCX_CHECK_PMI_RET (ret , "runtime_fini" );
657- exit (0 );
657+ exit (exitcode );
658658 }
659659}
660660
Original file line number Diff line number Diff line change @@ -71,6 +71,7 @@ void CmiReleaseCommHandle(CmiCommHandle c)
7171}
7272
7373/********************* CONTEXT-SWITCHING FUNCTIONS ******************/
74+ static int _exitcode = 0 ;
7475
7576static void CmiNext (void )
7677{
@@ -81,7 +82,7 @@ static void CmiNext(void)
8182 t = CmiThreads [index ];
8283 if ((t )&& (!CmiBarred [index ])) break ;
8384 index = (index + 1 ) % CmiNumPes ();
84- if (index == orig ) exit (0 );
85+ if (index == orig ) exit (_exitcode );
8586 }
8687 _Cmi_mype = index ;
8788 CthResume (t );
@@ -314,6 +315,7 @@ void ConverseExit(int exitcode)
314315{
315316 ConverseCommonExit ();
316317 CmiThreads [CmiMyPe ()] = 0 ;
318+ _exitcode = exitcode ; // Used in CmiNext()
317319 CmiNext ();
318320}
319321
Original file line number Diff line number Diff line change @@ -1716,7 +1716,7 @@ if (MSG_STATISTIC)
17161716 if (CmiMyRank () == 0 ) CmiExitXpmem ();
17171717 CmiNodeAllBarrier ();
17181718#endif
1719- if (CmiMyRank () == 0 ) LrtsExit ();
1719+ if (CmiMyRank () == 0 ) LrtsExit (exitcode );
17201720#endif
17211721 CmiYield ();
17221722 if (!CharmLibInterOperate || userDrivenMode ) {
Original file line number Diff line number Diff line change 1818NOBGDIRS = \
1919 intercomm_coll \
2020 privatization \
21+ exit \
2122 datatype \
2223
2324FTDIRS = \
You can’t perform that action at this time.
0 commit comments