OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
Bdef.h File Reference
#include "Bconfig.h"

Go to the source code of this file.

Data Structures

struct  bLaCsScOpE
struct  bLaCsCoNtExT
struct  DCOMPLEX
struct  SCOMPLEX
struct  bLaCbUfF

Macros

#define BI_DistType   unsigned short
#define BI_MpiDistType   MPI_UNSIGNED_SHORT
#define BUFFALIGN   8 /* force all buffers to 8 byte alignment */
#define BANYNODE   MPI_ANY_SOURCE
#define PT2PTID   9976 /* TAG used for point to point */
#define NOTINCONTEXT   -1 /* Indicates node called gridmap, but not in grid */
#define MAXNCTXT   10 /* initial guess at max # of contexts */
#define MAXNSYSCTXT   10 /* initial guess at max # of system context */
#define AOPDONE   MPI_REQUEST_NULL
#define BUFWAIT   120 /* Length of time to wait for emergency buff */
#define NORV   1 /* No receiver (only 1 proc in scoped op) */
#define NPOW2   2 /* Number of procs is not a power of 2 */
#define BADSCP   3 /* Scope not row, column or all */
#define INTEGER   3
#define SINGLE   4
#define DOUBLE   6
#define COMPLEX8   5
#define COMPLEX16   7
#define FULLCON   0 /* top is fully connected */
#define RT_SD   1
#define RT_RV   2
#define RT_BS   3
#define RT_BR   4
#define RT_COMB   5
#define SGET_SYSCONTXT   0
#define SGET_MSGIDS   1
#define SGET_DEBUGLVL   2
#define SGET_BLACSCONTXT   10
#define SGET_NR_BS   11
#define SGET_NB_BS   12
#define SGET_NR_CO   13
#define SGET_NB_CO   14
#define SGET_TOPSREPEAT   15
#define SGET_TOPSCOHRNT   16
#define BVOID   void
#define Mlowcase(C)
#define Mgridinfo(ctxt, Ng0, nprow0, npcol0, myrow0, mycol0)
#define Mpcoord(ctxt, node, prow, pcol)
#define Mvpcoord(ctxt, node, prow, pcol)
#define Mkpnum(ctxt, prow, pcol)
#define Mvkpnum(ctxt, prow, pcol)
#define Mscopeid(ctxt)
#define MGetConTxt(Context, ctxtptr)
#define Mmpierror(ierr, rout, ctxt, line, file)
#define ErrPrint
#define F_VOID_FUNC   void
#define F_INT_FUNC   Int
#define F_DOUBLE_FUNC   double
#define F2C_CharTrans(c)
#define F_CHAR   char *
#define Mpval(para)
#define Mpaddress(para)
#define Mwalltime   dwalltime00_
#define Rabs(x)
#define Cabs(z)
#define trsize(diag, m, n, bytes, length)
#define BI_cmvcopy(m, n, A, lda, buff)
#define BI_cvmcopy(m, n, A, lda, buff)
#define BI_zmvcopy(m, n, A, lda, buff)
#define BI_zvmcopy(m, n, A, lda, buff)
#define BI_MPI_TYPE_FREE(t)

Typedefs

typedef struct bLaCsScOpE BLACSSCOPE
typedef struct bLaCsCoNtExT BLACSCONTEXT
typedef struct bLaCbUfF BLACBUFF
typedef void(* VVFUNPTR) (Int, char *, char *)
typedef void(* SDRVPTR) (BLACSCONTEXT *, Int, Int, BLACBUFF *)

Functions

void BI_BlacsWarn (Int ConTxt, Int line, char *file, char *form,...)
void BI_BlacsErr (Int ConTxt, Int line, char *file, char *form,...)
Int BI_ContxtNum (BLACSCONTEXT *ctxt)

Variables

IntBI_COMM_WORLD

Macro Definition Documentation

◆ AOPDONE

#define AOPDONE   MPI_REQUEST_NULL

Definition at line 81 of file Bdef.h.

◆ BADSCP

#define BADSCP   3 /* Scope not row, column or all */

Definition at line 89 of file Bdef.h.

◆ BANYNODE

#define BANYNODE   MPI_ANY_SOURCE

Definition at line 76 of file Bdef.h.

◆ BI_cmvcopy

#define BI_cmvcopy ( m,
n,
A,
lda,
buff )
Value:
BI_smvcopy(2*(m), (n), (float *) (A), 2*(lda), (float *) (buff))
void BI_smvcopy(Int m, Int n, float *A, Int lda, float *buff)
Definition BI_smvcopy.c:2
n

Definition at line 290 of file Bdef.h.

290#define BI_cmvcopy(m, n, A, lda, buff) \
291 BI_smvcopy(2*(m), (n), (float *) (A), 2*(lda), (float *) (buff))

◆ BI_cvmcopy

#define BI_cvmcopy ( m,
n,
A,
lda,
buff )
Value:
BI_svmcopy(2*(m), (n), (float *) (A), 2*(lda), (float *) (buff))
void BI_svmcopy(Int m, Int n, float *A, Int lda, float *buff)
Definition BI_svmcopy.c:3

Definition at line 292 of file Bdef.h.

292#define BI_cvmcopy(m, n, A, lda, buff) \
293 BI_svmcopy(2*(m), (n), (float *) (A), 2*(lda), (float *) (buff))

◆ BI_DistType

#define BI_DistType   unsigned short

Definition at line 72 of file Bdef.h.

◆ BI_MPI_TYPE_FREE

#define BI_MPI_TYPE_FREE ( t)
Value:
MPI_Type_free(t)

Definition at line 305 of file Bdef.h.

◆ BI_MpiDistType

#define BI_MpiDistType   MPI_UNSIGNED_SHORT

Definition at line 73 of file Bdef.h.

◆ BI_zmvcopy

#define BI_zmvcopy ( m,
n,
A,
lda,
buff )
Value:
BI_dmvcopy(2*(m), (n), (double *) (A), 2*(lda), (double *) (buff))
void BI_dmvcopy(Int m, Int n, double *A, Int lda, double *buff)
Definition BI_dmvcopy.c:2

Definition at line 294 of file Bdef.h.

294#define BI_zmvcopy(m, n, A, lda, buff) \
295 BI_dmvcopy(2*(m), (n), (double *) (A), 2*(lda), (double *) (buff))

◆ BI_zvmcopy

#define BI_zvmcopy ( m,
n,
A,
lda,
buff )
Value:
BI_dvmcopy(2*(m), (n), (double *) (A), 2*(lda), (double *) (buff))
void BI_dvmcopy(Int m, Int n, double *A, Int lda, double *buff)
Definition BI_dvmcopy.c:3

Definition at line 296 of file Bdef.h.

296#define BI_zvmcopy(m, n, A, lda, buff) \
297 BI_dvmcopy(2*(m), (n), (double *) (A), 2*(lda), (double *) (buff))

◆ BUFFALIGN

#define BUFFALIGN   8 /* force all buffers to 8 byte alignment */

Definition at line 75 of file Bdef.h.

◆ BUFWAIT

#define BUFWAIT   120 /* Length of time to wait for emergency buff */

Definition at line 82 of file Bdef.h.

◆ BVOID

#define BVOID   void

Definition at line 136 of file Bdef.h.

◆ Cabs

#define Cabs ( z)
Value:
( (((z).i) < 0 ? ((z).i) * -1 : ((z).i)) + (((z).r) < 0 ? ((z).r) * -1 : ((z).r)) )

Definition at line 270 of file Bdef.h.

◆ COMPLEX16

#define COMPLEX16   7

Definition at line 98 of file Bdef.h.

◆ COMPLEX8

#define COMPLEX8   5

Definition at line 97 of file Bdef.h.

◆ DOUBLE

#define DOUBLE   6

Definition at line 96 of file Bdef.h.

◆ ErrPrint

#define ErrPrint
Value:
{ \
extern Int BI_Iam; \
fprintf(stderr, "%d: line %d of file %s\n", BI_Iam, __LINE__, __FILE__); \
}
Int BI_Iam
#define Int
Definition Bconfig.h:22

Definition at line 222 of file Bdef.h.

222#define ErrPrint \
223{ \
224 extern Int BI_Iam; \
225 fprintf(stderr, "%d: line %d of file %s\n", BI_Iam, __LINE__, __FILE__); \
226}

◆ F2C_CharTrans

#define F2C_CharTrans ( c)
Value:
*(c)

Definition at line 246 of file Bdef.h.

◆ F_CHAR

#define F_CHAR   char *

Definition at line 247 of file Bdef.h.

◆ F_DOUBLE_FUNC

#define F_DOUBLE_FUNC   double

Definition at line 234 of file Bdef.h.

◆ F_INT_FUNC

#define F_INT_FUNC   Int

Definition at line 233 of file Bdef.h.

◆ F_VOID_FUNC

#define F_VOID_FUNC   void

Definition at line 232 of file Bdef.h.

◆ FULLCON

#define FULLCON   0 /* top is fully connected */

Definition at line 100 of file Bdef.h.

◆ INTEGER

#define INTEGER   3

Definition at line 94 of file Bdef.h.

◆ MAXNCTXT

#define MAXNCTXT   10 /* initial guess at max # of contexts */

Definition at line 79 of file Bdef.h.

◆ MAXNSYSCTXT

#define MAXNSYSCTXT   10 /* initial guess at max # of system context */

Definition at line 80 of file Bdef.h.

◆ MGetConTxt

#define MGetConTxt ( Context,
ctxtptr )
Value:
{\
(ctxtptr) = BI_MyContxts[(Context)];\
}
BLACSCONTEXT ** BI_MyContxts
struct bLaCsCoNtExT BLACSCONTEXT
Definition Bdef.h:22

Definition at line 200 of file Bdef.h.

200#define MGetConTxt(Context, ctxtptr)\
201{\
202 extern BLACSCONTEXT **BI_MyContxts;\
203 (ctxtptr) = BI_MyContxts[(Context)];\
204}

◆ Mgridinfo

#define Mgridinfo ( ctxt,
Ng0,
nprow0,
npcol0,
myrow0,
mycol0 )
Value:
{\
(Ng0) = (ctxt)->ascp.Np;\
(nprow0) = (ctxt)->cscp.Np;\
(npcol0) = (ctxt)->rscp.Np;\
(myrow0) = (ctxt)->cscp.Iam;\
(mycol0) = (ctxt)->rscp.Iam;\
}

Definition at line 150 of file Bdef.h.

150#define Mgridinfo(ctxt, Ng0, nprow0, npcol0, myrow0, mycol0)\
151{\
152 (Ng0) = (ctxt)->ascp.Np;\
153 (nprow0) = (ctxt)->cscp.Np;\
154 (npcol0) = (ctxt)->rscp.Np;\
155 (myrow0) = (ctxt)->cscp.Iam;\
156 (mycol0) = (ctxt)->rscp.Iam;\
157}

◆ Mkpnum

#define Mkpnum ( ctxt,
prow,
pcol )
Value:
( (prow)*(ctxt)->rscp.Np+(pcol) )

Definition at line 173 of file Bdef.h.

◆ Mlowcase

#define Mlowcase ( C)
Value:
( ((C) > 64 && (C) < 91) ? (C) | 32 : (C) )

Definition at line 145 of file Bdef.h.

◆ Mmpierror

#define Mmpierror ( ierr,
rout,
ctxt,
line,
file )

Definition at line 217 of file Bdef.h.

◆ Mpaddress

#define Mpaddress ( para)
Value:
(para)

Definition at line 262 of file Bdef.h.

◆ Mpcoord

#define Mpcoord ( ctxt,
node,
prow,
pcol )
Value:
{\
(prow) = (node) / (ctxt)->rscp.Np;\
(pcol) = (node) % (ctxt)->rscp.Np;\
}

Definition at line 165 of file Bdef.h.

165#define Mpcoord(ctxt, node, prow, pcol)\
166{\
167 (prow) = (node) / (ctxt)->rscp.Np;\
168 (pcol) = (node) % (ctxt)->rscp.Np;\
169}

◆ Mpval

#define Mpval ( para)
Value:
(*(para))

Definition at line 261 of file Bdef.h.

◆ Mscopeid

#define Mscopeid ( ctxt)
Value:
(ctxt)->scp->ScpId; \
if (++(ctxt)->scp->ScpId == (ctxt)->scp->MaxId) \
(ctxt)->scp->ScpId = (ctxt)->scp->MinId;

Definition at line 179 of file Bdef.h.

179#define Mscopeid(ctxt) (ctxt)->scp->ScpId; \
180 if (++(ctxt)->scp->ScpId == (ctxt)->scp->MaxId) \
181 (ctxt)->scp->ScpId = (ctxt)->scp->MinId;

◆ Mvkpnum

#define Mvkpnum ( ctxt,
prow,
pcol )
Value:
( (prow)*(ctxt)->rscp.Np+(pcol) )

Definition at line 174 of file Bdef.h.

◆ Mvpcoord

#define Mvpcoord ( ctxt,
node,
prow,
pcol )
Value:
Mpcoord((ctxt), (node), (prow), (pcol));
#define Mpcoord(ctxt, node, prow, pcol)
Definition Bdef.h:165

Definition at line 170 of file Bdef.h.

170#define Mvpcoord(ctxt, node, prow, pcol) \
171 Mpcoord((ctxt), (node), (prow), (pcol));

◆ Mwalltime

#define Mwalltime   dwalltime00_

Definition at line 263 of file Bdef.h.

◆ NORV

#define NORV   1 /* No receiver (only 1 proc in scoped op) */

Definition at line 87 of file Bdef.h.

◆ NOTINCONTEXT

#define NOTINCONTEXT   -1 /* Indicates node called gridmap, but not in grid */

Definition at line 78 of file Bdef.h.

◆ NPOW2

#define NPOW2   2 /* Number of procs is not a power of 2 */

Definition at line 88 of file Bdef.h.

◆ PT2PTID

#define PT2PTID   9976 /* TAG used for point to point */

Definition at line 77 of file Bdef.h.

◆ Rabs

#define Rabs ( x)
Value:
( (x) < 0 ? (x) * -1 : (x) )

Definition at line 269 of file Bdef.h.

◆ RT_BR

#define RT_BR   4

Definition at line 108 of file Bdef.h.

◆ RT_BS

#define RT_BS   3

Definition at line 107 of file Bdef.h.

◆ RT_COMB

#define RT_COMB   5

Definition at line 109 of file Bdef.h.

◆ RT_RV

#define RT_RV   2

Definition at line 106 of file Bdef.h.

◆ RT_SD

#define RT_SD   1

Definition at line 105 of file Bdef.h.

◆ SGET_BLACSCONTXT

#define SGET_BLACSCONTXT   10

Definition at line 117 of file Bdef.h.

◆ SGET_DEBUGLVL

#define SGET_DEBUGLVL   2

Definition at line 116 of file Bdef.h.

◆ SGET_MSGIDS

#define SGET_MSGIDS   1

Definition at line 115 of file Bdef.h.

◆ SGET_NB_BS

#define SGET_NB_BS   12

Definition at line 119 of file Bdef.h.

◆ SGET_NB_CO

#define SGET_NB_CO   14

Definition at line 121 of file Bdef.h.

◆ SGET_NR_BS

#define SGET_NR_BS   11

Definition at line 118 of file Bdef.h.

◆ SGET_NR_CO

#define SGET_NR_CO   13

Definition at line 120 of file Bdef.h.

◆ SGET_SYSCONTXT

#define SGET_SYSCONTXT   0

Definition at line 114 of file Bdef.h.

◆ SGET_TOPSCOHRNT

#define SGET_TOPSCOHRNT   16

Definition at line 123 of file Bdef.h.

◆ SGET_TOPSREPEAT

#define SGET_TOPSREPEAT   15

Definition at line 122 of file Bdef.h.

◆ SINGLE

#define SINGLE   4

Definition at line 95 of file Bdef.h.

◆ trsize

#define trsize ( diag,
m,
n,
bytes,
length )
Value:
{\
if ( (diag) == 'u' ) (length) = 1;\
else (length) = 0;\
if ( (m) > (n) )\
(length) = ( (n) * ( (m) - (n) ) + ( (n)*(n) ) - ( (n)*(n) )/2 +\
(n)/2 - (n) * (length) ) * (bytes);\
else\
(length) = ( (m) * ( (n) - (m) ) + ( (m)*(m) ) - ( (m)*(m) )/2 +\
(m)/2 - (m) * (length) ) * (bytes);\
}

Definition at line 275 of file Bdef.h.

275#define trsize(diag, m, n, bytes, length)\
276{\
277 if ( (diag) == 'u' ) (length) = 1;\
278 else (length) = 0;\
279 if ( (m) > (n) )\
280 (length) = ( (n) * ( (m) - (n) ) + ( (n)*(n) ) - ( (n)*(n) )/2 +\
281 (n)/2 - (n) * (length) ) * (bytes);\
282 else\
283 (length) = ( (m) * ( (n) - (m) ) + ( (m)*(m) ) - ( (m)*(m) )/2 +\
284 (m)/2 - (m) * (length) ) * (bytes);\
285}

Typedef Documentation

◆ BLACBUFF

typedef struct bLaCbUfF BLACBUFF

Definition at line 53 of file Bdef.h.

◆ BLACSCONTEXT

typedef struct bLaCsCoNtExT BLACSCONTEXT

Definition at line 22 of file Bdef.h.

◆ BLACSSCOPE

typedef struct bLaCsScOpE BLACSSCOPE

Definition at line 12 of file Bdef.h.

◆ SDRVPTR

typedef void(* SDRVPTR) (BLACSCONTEXT *, Int, Int, BLACBUFF *)

Definition at line 69 of file Bdef.h.

◆ VVFUNPTR

typedef void(* VVFUNPTR) (Int, char *, char *)

Definition at line 68 of file Bdef.h.

Function Documentation

◆ BI_BlacsErr()

void BI_BlacsErr ( Int ConTxt,
Int line,
char * file,
char * form,
... )

Definition at line 3 of file BI_BlacsErr.c.

4{
5#ifdef __STDC__
6 void BI_BlacsAbort(Int ErrNo);
7#else
8 void BI_BlacsAbort();
9#endif
10 extern Int BI_Iam;
11 Int myrow, mycol;
12 va_list argptr;
13 char cline[100];
14 BLACSCONTEXT *ctxt;
15
16 va_start(argptr, form);
17 vsprintf(cline, form, argptr);
18 va_end(argptr);
19
20 if (ConTxt > -1)
21 {
22 MGetConTxt(ConTxt, ctxt);
23 myrow = ctxt->cscp.Iam;
24 mycol = ctxt->rscp.Iam;
25 }
26 else myrow = mycol = -1;
27
28 fprintf(stderr,
29"BLACS ERROR '%s'\nfrom {%d,%d}, pnum=%d, Contxt=%d, on line %d of file '%s'.\n\n",
30 cline, myrow, mycol, BI_Iam, ConTxt, line, file);
31
33}
void BI_BlacsAbort(Int ErrNo)
#define MGetConTxt(Context, ctxtptr)
Definition Bdef.h:200
BLACSSCOPE rscp
Definition Bdef.h:25
BLACSSCOPE cscp
Definition Bdef.h:25
Int Iam
Definition Bdef.h:17

◆ BI_BlacsWarn()

void BI_BlacsWarn ( Int ConTxt,
Int line,
char * file,
char * form,
... )

Definition at line 3 of file BI_BlacsWarn.c.

4{
5 extern Int BI_Iam;
7 Int myrow, mycol;
8 va_list argptr;
9 char cline[100];
10
11 va_start(argptr, form);
12 vsprintf(cline, form, argptr);
13 va_end(argptr);
14
15 if (ConTxt > -1)
16 {
17 myrow = BI_MyContxts[ConTxt]->cscp.Iam;
18 mycol = BI_MyContxts[ConTxt]->rscp.Iam;
19 }
20 else myrow = mycol = -1;
21
22 fprintf(stderr,
23"BLACS WARNING '%s'\nfrom {%d,%d}, pnum=%d, Contxt=%d, on line %d of file '%s'.\n\n",
24 cline, myrow, mycol, BI_Iam, ConTxt, line, file);
25}

◆ BI_ContxtNum()

Int BI_ContxtNum ( BLACSCONTEXT * ctxt)

Definition at line 3 of file BI_ContxtNum.c.

7{
8 Int i;
9 extern Int BI_MaxNCtxt;
11
12 if (ctxt == NULL) return(-1);
13 for (i=0; i < BI_MaxNCtxt; i++) if (BI_MyContxts[i] == ctxt) break;
14 if (i == BI_MaxNCtxt)
15 BI_BlacsErr(-1, -1, "BLACS INTERNAL ROUTINE", "illegal context");
16 return(i);
17}
Int BI_MaxNCtxt
void BI_BlacsErr(Int ConTxt, Int line, char *file, char *form,...)
Definition BI_BlacsErr.c:3

Variable Documentation

◆ BI_COMM_WORLD

Int* BI_COMM_WORLD
extern

Definition at line 13 of file BI_GlobalVars.c.