SCALAPACK 2.2.2
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches
blacs_set_.c
Go to the documentation of this file.
1#include "Bdef.h"
2
3#if (INTFACE == C_CALL)
4void Cblacs_set(Int ConTxt, Int what, Int *val)
5#else
6F_VOID_FUNC blacs_set_(Int *ConTxt, Int *what, Int *val)
7#endif
8{
9 BLACSCONTEXT *ctxt;
10
11 switch( Mpval(what) )
12 {
13 case SGET_SYSCONTXT:
14 BI_BlacsWarn(Mpval(ConTxt), __LINE__, __FILE__,
15 "Cannot set BLACS system context, can only BLACS_GET");
16 break;
17 case SGET_MSGIDS:
18 BI_BlacsWarn(Mpval(ConTxt), __LINE__, __FILE__,
19 "No need to set message ID range due to MPI communicator.");
20 break;
21 case SGET_DEBUGLVL:
22 BI_BlacsWarn(Mpval(ConTxt), __LINE__, __FILE__,
23 "Cannot set BLACS debug level; must recompile to change");
24 break;
26 BI_BlacsWarn(Mpval(ConTxt), __LINE__, __FILE__,
27 "Cannot set BLACS context, can only BLACS_GET");
28 break;
29 case SGET_NR_BS:
30 MGetConTxt(Mpval(ConTxt), ctxt);
31 if (*val) ctxt->Nr_bs = *val;
32 else BI_BlacsWarn(Mpval(ConTxt), __LINE__, __FILE__,
33 "BSBR nrings cannot be set to zero");
34 break;
35 case SGET_NB_BS:
36 MGetConTxt(Mpval(ConTxt), ctxt);
37 if (*val > 0) ctxt->Nb_bs = *val + 1;
38 else BI_BlacsWarn(Mpval(ConTxt), __LINE__, __FILE__,
39 "Illegal BSBR nbranches (%d); must be strictly positive",
40 *val);
41 break;
42 case SGET_NR_CO:
43 MGetConTxt(Mpval(ConTxt), ctxt);
44 if (*val) ctxt->Nr_co = *val;
45 else BI_BlacsWarn(Mpval(ConTxt), __LINE__, __FILE__,
46 "COMB nrings cannot be set to zero");
47 break;
48 case SGET_NB_CO:
49 MGetConTxt(Mpval(ConTxt), ctxt);
50 if (*val > 0) ctxt->Nb_co = *val + 1;
51 else BI_BlacsWarn(Mpval(ConTxt), __LINE__, __FILE__,
52 "Illegal COMB nbranches (%d); must be strictly positive",
53 *val);
54 break;
55 case SGET_TOPSREPEAT:
56 MGetConTxt(Mpval(ConTxt), ctxt);
57 ctxt->TopsRepeat = *val;
58 break;
59 case SGET_TOPSCOHRNT:
60 MGetConTxt(Mpval(ConTxt), ctxt);
61 ctxt->TopsCohrnt = *val;
62 break;
63 default:
64 BI_BlacsWarn(Mpval(ConTxt), __LINE__, __FILE__, "Unknown WHAT (%d)",
65 Mpval(what));
66 }
67}
#define Int
Definition Bconfig.h:22
#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
void Cblacs_set()
F_VOID_FUNC blacs_set_(Int *ConTxt, Int *what, Int *val)
Definition blacs_set_.c:6
Int TopsCohrnt
Definition Bdef.h:28
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