SCALAPACK 2.2.2
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches
blacs_get_.c
Go to the documentation of this file.
1#include "Bdef.h"
2#if (INTFACE == C_CALL)
3void Cblacs_get(Int ConTxt, Int what, Int *val)
4#else
5F_VOID_FUNC blacs_get_(Int *ConTxt, Int *what, Int *val)
6#endif
7{
8 Int Csys2blacs_handle(MPI_Comm);
9 Int ierr, *iptr;
11 Int comm;
12 BLACSCONTEXT *ctxt;
13
14 switch( Mpval(what) )
15 {
16 case SGET_SYSCONTXT:
17 if (BI_COMM_WORLD == NULL) Cblacs_pinfo(val, &ierr);
18#if (INTFACE == C_CALL)
19 *val = Csys2blacs_handle(MPI_COMM_WORLD);
20#else
21 *val = *BI_COMM_WORLD;
22#endif
23 break;
24 case SGET_MSGIDS:
25 if (BI_COMM_WORLD == NULL) Cblacs_pinfo(val, &val[1]);
26 iptr = &val[1];
27 ierr=MPI_Comm_get_attr(MPI_COMM_WORLD, MPI_TAG_UB, (BVOID **) &iptr,&flag);
28 val[0] = 0;
29 val[1] = *iptr;
30 break;
31 case SGET_DEBUGLVL:
32 *val = BlacsDebugLvl;
33 break;
35 MGetConTxt(Mpval(ConTxt), ctxt);
36#if (INTFACE == C_CALL)
37 *val = Csys2blacs_handle(ctxt->pscp.comm);
38#else /* if user called the fortran interface to the BLACS */
39 *val = MPI_Comm_c2f(ctxt->pscp.comm);
40#endif
41 break;
42 case SGET_NR_BS:
43 MGetConTxt(Mpval(ConTxt), ctxt);
44 *val = ctxt->Nr_bs;
45 break;
46 case SGET_NB_BS:
47 MGetConTxt(Mpval(ConTxt), ctxt);
48 *val = ctxt->Nb_bs - 1;
49 break;
50 case SGET_NR_CO:
51 MGetConTxt(Mpval(ConTxt), ctxt);
52 *val = ctxt->Nr_co;
53 break;
54 case SGET_NB_CO:
55 MGetConTxt(Mpval(ConTxt), ctxt);
56 *val = ctxt->Nb_co - 1;
57 break;
58 case SGET_TOPSREPEAT:
59 MGetConTxt(Mpval(ConTxt), ctxt);
60 *val = ctxt->TopsRepeat;
61 break;
62 case SGET_TOPSCOHRNT:
63 MGetConTxt(Mpval(ConTxt), ctxt);
64 *val = ctxt->TopsCohrnt;
65 break;
66 default:
67 BI_BlacsWarn(Mpval(ConTxt), __LINE__, __FILE__, "Unknown WHAT (%d)",
68 Mpval(what));
69 }
70}
#define Int
Definition Bconfig.h:22
#define BlacsDebugLvl
Definition Bconfig.h:108
#define MpiInt
Definition Bconfig.h:25
Int * BI_COMM_WORLD
#define SGET_DEBUGLVL
Definition Bdef.h:116
#define SGET_MSGIDS
Definition Bdef.h:115
#define SGET_NB_CO
Definition Bdef.h:121
#define SGET_BLACSCONTXT
Definition Bdef.h:117
#define MGetConTxt(Context, ctxtptr)
Definition Bdef.h:200
#define F_VOID_FUNC
Definition Bdef.h:232
#define SGET_TOPSREPEAT
Definition Bdef.h:122
#define Mpval(para)
Definition Bdef.h:261
#define SGET_SYSCONTXT
Definition Bdef.h:114
#define SGET_TOPSCOHRNT
Definition Bdef.h:123
#define SGET_NR_CO
Definition Bdef.h:120
#define SGET_NR_BS
Definition Bdef.h:118
void BI_BlacsWarn(Int ConTxt, Int line, char *file, char *form,...)
Definition BI_BlacsWarn.c:3
#define SGET_NB_BS
Definition Bdef.h:119
#define BVOID
Definition Bdef.h:136
void Cblacs_pinfo()
void Cblacs_get()
F_VOID_FUNC blacs_get_(Int *ConTxt, Int *what, Int *val)
Definition blacs_get_.c:5
*fortran !University of Stuttgart All rights reserved Inc All rights reserved ! $COPYRIGHT$ !Additional copyrights may follow ! $HEADER$ !WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING !Do ***not ***copy this file to the directory where your Fortran !fortran application is compiled unless it is absolutely necessary !Most !modern Fortran compilers now support the I command line flag
Definition mpif.h:26
Int TopsCohrnt
Definition Bdef.h:28
BLACSSCOPE pscp
Definition Bdef.h:25
Int Nb_bs
Definition Bdef.h:29
Int TopsRepeat
Definition Bdef.h:27
Int Nr_bs
Definition Bdef.h:29
Int Nb_co
Definition Bdef.h:30
Int Nr_co
Definition Bdef.h:30
MPI_Comm comm
Definition Bdef.h:15