SCALAPACK 2.2.2
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches
blacs_exit_.c
Go to the documentation of this file.
1#include "Bdef.h"
2
3#if (INTFACE == C_CALL)
4void Cblacs_exit(Int NotDone)
5#else
7#endif
8{
13 BLACBUFF *bp;
15 extern MPI_Status *BI_Stats;
16 Int i;
17 extern Int BI_MaxNCtxt, BI_Np;
19/*
20 * Destroy all contexts
21 */
22 for (i=0; i < BI_MaxNCtxt; i++) if (BI_MyContxts[i]) Cblacs_gridexit(i);
23 free(BI_MyContxts);
24
25 if (BI_ReadyB) free(BI_ReadyB);
26 while (BI_ActiveQ != NULL)
27 {
28 bp = BI_ActiveQ;
29 BI_BuffIsFree(bp, 1); /* wait for async sends to complete */
30 BI_ActiveQ = bp->next;
31 free(bp);
32 }
33 free (BI_AuxBuff.Aops);
34 free (BI_Stats);
35
36/*
37 * Reset parameters to initial values
38 */
39 BI_MaxNCtxt = 0;
40 BI_MyContxts = NULL;
41 BI_Np = -1;
42 if (!Mpval(NotDone))
43 {
44 free(BI_COMM_WORLD);
45 BI_COMM_WORLD = NULL;
46 MPI_Finalize();
47 }
48 BI_ReadyB = NULL;
49 BI_ActiveQ = NULL;
50 BI_AuxBuff.Aops = NULL;
51 BI_Stats = NULL;
52}
Int BI_BuffIsFree(BLACBUFF *bp, Int Wait)
BLACBUFF * BI_GetBuff(Int length)
Definition BI_GetBuff.c:37
MPI_Status * BI_Stats
BLACBUFF * BI_ReadyB
Int BI_Np
BLACSCONTEXT ** BI_MyContxts
BLACBUFF * BI_ActiveQ
Int BI_MaxNCtxt
BLACBUFF BI_AuxBuff
void BI_UpdateBuffs(BLACBUFF *Newbp)
#define Int
Definition Bconfig.h:22
Int * BI_COMM_WORLD
#define F_VOID_FUNC
Definition Bdef.h:232
#define Mpval(para)
Definition Bdef.h:261
void Cblacs_gridexit()
void Cblacs_exit()
F_VOID_FUNC blacs_exit_(Int *NotDone)
Definition blacs_exit_.c:6
MPI_Request * Aops
Definition Bdef.h:59
BLACBUFF * next
Definition Bdef.h:62