File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ F_VOID_FUNC blacs_exit_(Int *NotDone)
1212 Int BI_BuffIsFree (BLACBUFF * , Int );
1313 BLACBUFF * bp ;
1414 extern BLACBUFF * BI_ReadyB , * BI_ActiveQ , BI_AuxBuff ;
15+ extern MPI_Status * BI_Stats ;
1516 Int i ;
1617 extern Int BI_MaxNCtxt , BI_Np ;
1718 extern BLACSCONTEXT * * BI_MyContxts ;
@@ -30,6 +31,7 @@ F_VOID_FUNC blacs_exit_(Int *NotDone)
3031 free (bp );
3132 }
3233 free (BI_AuxBuff .Aops );
34+ free (BI_Stats );
3335
3436/*
3537 * Reset parameters to initial values
@@ -39,7 +41,12 @@ F_VOID_FUNC blacs_exit_(Int *NotDone)
3941 BI_Np = -1 ;
4042 if (!Mpval (NotDone ))
4143 {
42- MPI_Finalize ();
44+ free (BI_COMM_WORLD );
45+ BI_COMM_WORLD = NULL ;
46+ MPI_Finalize ();
4347 }
4448 BI_ReadyB = NULL ;
49+ BI_ActiveQ = NULL ;
50+ BI_AuxBuff .Aops = NULL ;
51+ BI_Stats = NULL ;
4552}
Original file line number Diff line number Diff line change @@ -20,9 +20,9 @@ F_VOID_FUNC blacs_pinfo_(Int *mypnum, Int *nprocs)
2020
2121 BI_COMM_WORLD = (Int * ) malloc (sizeof (Int ));
2222 * BI_COMM_WORLD = MPI_Comm_c2f (MPI_COMM_WORLD );
23- MPI_Comm_size (MPI_COMM_WORLD , & Np );
24- MPI_Comm_rank (MPI_COMM_WORLD , & Iam );
2523 }
24+ MPI_Comm_size (MPI_COMM_WORLD , & Np );
25+ MPI_Comm_rank (MPI_COMM_WORLD , & Iam );
2626 * mypnum = BI_Iam = Iam ;
2727 * nprocs = BI_Np = Np ;
2828}
You can’t perform that action at this time.
0 commit comments