hpcc  1.5.0
About: HPCC (HPC Challenge) benchmark consists of basically 7 tests: HPL, STREAM, RandomAccess, PTRANS, FFTE, DGEMM and b_eff Latency/Bandwidth.
  Fossies Dox: hpcc-1.5.0.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

cblacslt.c File Reference
#include <hpcc.h>
#include <mpi.h>
#include "cblacslt.h"
Include dependency graph for cblacslt.c:

Go to the source code of this file.

Macros

#define DPRN(i, v)   do{printf(__FILE__ "(%d)@%d:" #v "=%g\n",__LINE__,i,(double)(v));fflush(stdout);}while(0)
 
#define CBLACS_INIT   if (! CblacsInitialized) CblacsInit(); else if (CblacsFinalized) do{CblacsWarn();return;}while(0)
 
#define CBLACS_INIT1(v)   if (! CblacsInitialized) CblacsInit();else if (CblacsFinalized)do{CblacsWarn();return(v);}while(0)
 
#define CblacsWarn()   CblacsWarnImp( __FILE__, __LINE__ )
 
#define CBLACS_CHK_CTXT(v)   if (ctxt < 1 || ctxt > CblacsNComms) return v
 
#define CblacsNewBuf(c, s)   malloc((c)*(s))
 
#define CblacsDeleteBuf(b)   free(b)
 

Functions

double dcputime00 (void)
 
double dwalltime00 (void)
 
static void CblacsWarnImp (char *file, int line)
 
static MPI_Comm CblacsGetComm (int ctxt)
 
static MPI_Comm CblacsGetRowComm (int ctxt)
 
static MPI_Comm CblacsGetColComm (int ctxt)
 
static int CblacsSetComm (int ctxt, MPI_Comm comm)
 
static int CblacsSetRowComm (int ctxt, MPI_Comm comm)
 
static int CblacsSetColComm (int ctxt, MPI_Comm comm)
 
static int CblacsNewCtxt ()
 
static int CblacsDeleteCtxt (int *ctxtP)
 
static int CblacsInit ()
 
void Cblacs_pinfo (int *mypnum, int *nprocs)
 
void Cblacs_exit (int NotDone)
 
void Cblacs_abort (int ConTxt, int ErrNo)
 
void Cblacs_get (int ConTxt, int what, int *val)
 
static int CblacsGridNew (int nprow, int npcol, int *ConTxt, MPI_Comm *comm)
 
void Cblacs_gridmap (int *ConTxt, int *umap, int ldumap, int nprow, int npcol)
 
void Cblacs_gridexit (int ConTxt)
 
void Cblacs_gridinfo (int ConTxt, int *nprow, int *npcol, int *myrow, int *mycol)
 
void Cblacs_barrier (int ConTxt, char *scope)
 
static void Cvgred2d (int ConTxt, char *scope, int m, int n, void *A, int lda, int rowRank, int colRank, MPI_Datatype dtype, int dsize, MPI_Op op)
 
void Cdgsum2d (int ConTxt, char *scope, char *top, int m, int n, double *A, int lda, int rdest, int cdest)
 
void Cigsum2d (int ConTxt, char *scope, char *top, int m, int n, int *A, int lda, int rdest, int cdest)
 
void CblacsAbsMax (void *invec, void *inoutvec, int *len, MPI_Datatype *datatype)
 
void CblacsAbsMin (void *invec, void *inoutvec, int *len, MPI_Datatype *datatype)
 
void Cdgamx2d (int ConTxt, char *scope, char *top, int m, int n, double *A, int lda, int *rA, int *cA, int ldia, int rdest, int cdest)
 
void Cdgamn2d (int ConTxt, char *scope, char *top, int m, int n, double *A, int lda, int *rA, int *cA, int ldia, int rdest, int cdest)
 
void Cblacs_dSendrecv (int ctxt, int mSrc, int nSrc, double *Asrc, int ldaSrc, int rdest, int cdest, int mDest, int nDest, double *Adest, int ldaDest, int rsrc, int csrc)
 
static void CblacsBcast (int ConTxt, char *scope, int m, int n, void *A, int lda, int rowRank, int colRank, MPI_Datatype baseType)
 
void Cdgebs2d (int ConTxt, char *scope, char *top, int m, int n, double *A, int lda)
 
void Cdgebr2d (int ConTxt, char *scope, char *top, int m, int n, double *A, int lda, int rsrc, int csrc)
 
void Cigebs2d (int ConTxt, char *scope, char *top, int m, int n, int *A, int lda)
 
void Cigebr2d (int ConTxt, char *scope, char *top, int m, int n, int *A, int lda, int rsrc, int csrc)
 

Variables

static int CblacsInitialized = 0
 
static int CblacsFinalized
 
struct {
   MPI_Comm   comm
 
   MPI_Comm   rowComm
 
   MPI_Comm   colComm
 
   unsigned int   taken
 
CblacsComms [10]
 
static int CblacsNComms
 

Macro Definition Documentation

◆ CBLACS_CHK_CTXT

#define CBLACS_CHK_CTXT (   v)    if (ctxt < 1 || ctxt > CblacsNComms) return v

Definition at line 45 of file cblacslt.c.

◆ CBLACS_INIT

#define CBLACS_INIT   if (! CblacsInitialized) CblacsInit(); else if (CblacsFinalized) do{CblacsWarn();return;}while(0)

Definition at line 23 of file cblacslt.c.

◆ CBLACS_INIT1

#define CBLACS_INIT1 (   v)    if (! CblacsInitialized) CblacsInit();else if (CblacsFinalized)do{CblacsWarn();return(v);}while(0)

Definition at line 24 of file cblacslt.c.

◆ CblacsDeleteBuf

#define CblacsDeleteBuf (   b)    free(b)

Definition at line 125 of file cblacslt.c.

◆ CblacsNewBuf

#define CblacsNewBuf (   c,
 
)    malloc((c)*(s))

Definition at line 124 of file cblacslt.c.

◆ CblacsWarn

#define CblacsWarn ( )    CblacsWarnImp( __FILE__, __LINE__ )

Definition at line 25 of file cblacslt.c.

◆ DPRN

#define DPRN (   i,
 
)    do{printf(__FILE__ "(%d)@%d:" #v "=%g\n",__LINE__,i,(double)(v));fflush(stdout);}while(0)

Definition at line 18 of file cblacslt.c.

Function Documentation

◆ Cblacs_abort()

void Cblacs_abort ( int  ConTxt,
int  ErrNo 
)

Definition at line 167 of file cblacslt.c.

References Cblacs_gridinfo(), and CBLACS_INIT.

◆ Cblacs_barrier()

void Cblacs_barrier ( int  ConTxt,
char *  scope 
)

Definition at line 313 of file cblacslt.c.

References CBLACS_INIT, CblacsGetColComm(), CblacsGetComm(), CblacsGetRowComm(), CblacsWarn, and comm.

Referenced by PTRANS().

◆ Cblacs_dSendrecv()

void Cblacs_dSendrecv ( int  ctxt,
int  mSrc,
int  nSrc,
double *  Asrc,
int  ldaSrc,
int  rdest,
int  cdest,
int  mDest,
int  nDest,
double *  Adest,
int  ldaDest,
int  rsrc,
int  csrc 
)

Definition at line 561 of file cblacslt.c.

References CBLACS_INIT, CblacsGetComm(), CblacsGetRowComm(), CblacsWarn, comm, and rowComm.

Referenced by pdtrans().

◆ Cblacs_exit()

void Cblacs_exit ( int  NotDone)

Definition at line 160 of file cblacslt.c.

References CBLACS_INIT, and CblacsFinalized.

Referenced by PTRANS().

◆ Cblacs_get()

void Cblacs_get ( int  ConTxt,
int  what,
int *  val 
)

Definition at line 184 of file cblacslt.c.

References CBLACS_INIT, CblacsWarn, and SGET_SYSCONTXT.

Referenced by PTRANS().

◆ Cblacs_gridexit()

void Cblacs_gridexit ( int  ConTxt)

Definition at line 285 of file cblacslt.c.

References CBLACS_INIT, and CblacsDeleteCtxt().

Referenced by PTRANS().

◆ Cblacs_gridinfo()

void Cblacs_gridinfo ( int  ConTxt,
int *  nprow,
int *  npcol,
int *  myrow,
int *  mycol 
)

Definition at line 291 of file cblacslt.c.

References CBLACS_INIT, CblacsGetColComm(), CblacsGetComm(), CblacsGetRowComm(), and comm.

Referenced by Cblacs_abort(), pdtrans(), PTRANS(), and pxerbla().

◆ Cblacs_gridmap()

void Cblacs_gridmap ( int *  ConTxt,
int *  umap,
int  ldumap,
int  nprow,
int  npcol 
)

◆ Cblacs_pinfo()

void Cblacs_pinfo ( int *  mypnum,
int *  nprocs 
)

Definition at line 153 of file cblacslt.c.

References CBLACS_INIT.

Referenced by Cblacs_gridmap(), and PTRANS().

◆ CblacsAbsMax()

void CblacsAbsMax ( void *  invec,
void *  inoutvec,
int *  len,
MPI_Datatype *  datatype 
)

Definition at line 455 of file cblacslt.c.

References CblacsWarn.

Referenced by Cdgamx2d().

◆ CblacsAbsMin()

void CblacsAbsMin ( void *  invec,
void *  inoutvec,
int *  len,
MPI_Datatype *  datatype 
)

Definition at line 466 of file cblacslt.c.

References CblacsWarn.

Referenced by Cdgamn2d().

◆ CblacsBcast()

static void CblacsBcast ( int  ConTxt,
char *  scope,
int  m,
int  n,
void *  A,
int  lda,
int  rowRank,
int  colRank,
MPI_Datatype  baseType 
)
static

Definition at line 619 of file cblacslt.c.

References CblacsGetColComm(), CblacsGetComm(), CblacsGetRowComm(), CblacsWarn, and comm.

Referenced by Cdgebr2d(), Cdgebs2d(), Cigebr2d(), and Cigebs2d().

◆ CblacsDeleteCtxt()

static int CblacsDeleteCtxt ( int *  ctxtP)
static

Definition at line 95 of file cblacslt.c.

References CblacsComms, CblacsNComms, CblacsWarn, colComm, comm, rowComm, and taken.

Referenced by Cblacs_gridexit(), and Cblacs_gridmap().

◆ CblacsGetColComm()

static MPI_Comm CblacsGetColComm ( int  ctxt)
static

Definition at line 57 of file cblacslt.c.

References CBLACS_CHK_CTXT, and CblacsComms.

Referenced by Cblacs_barrier(), Cblacs_gridinfo(), CblacsBcast(), and Cvgred2d().

◆ CblacsGetComm()

static MPI_Comm CblacsGetComm ( int  ctxt)
static

◆ CblacsGetRowComm()

static MPI_Comm CblacsGetRowComm ( int  ctxt)
static

Definition at line 52 of file cblacslt.c.

References CBLACS_CHK_CTXT, and CblacsComms.

Referenced by Cblacs_barrier(), Cblacs_dSendrecv(), Cblacs_gridinfo(), CblacsBcast(), and Cvgred2d().

◆ CblacsGridNew()

static int CblacsGridNew ( int  nprow,
int  npcol,
int *  ConTxt,
MPI_Comm *  comm 
)
static

Definition at line 199 of file cblacslt.c.

References CBLACS_INIT1, CblacsGetComm(), CblacsNewCtxt(), and comm.

Referenced by Cblacs_gridmap().

◆ CblacsInit()

static int CblacsInit ( )
static

Definition at line 128 of file cblacslt.c.

References CblacsComms, CblacsFinalized, CblacsInitialized, CblacsNComms, and CblacsWarn.

◆ CblacsNewCtxt()

static int CblacsNewCtxt ( )
static

Definition at line 82 of file cblacslt.c.

References CblacsComms, CblacsNComms, and taken.

Referenced by CblacsGridNew().

◆ CblacsSetColComm()

static int CblacsSetColComm ( int  ctxt,
MPI_Comm  comm 
)
static

Definition at line 75 of file cblacslt.c.

References CBLACS_CHK_CTXT, CblacsComms, and comm.

Referenced by Cblacs_gridmap().

◆ CblacsSetComm()

static int CblacsSetComm ( int  ctxt,
MPI_Comm  comm 
)
static

Definition at line 63 of file cblacslt.c.

References CBLACS_CHK_CTXT, CblacsComms, and comm.

Referenced by Cblacs_gridmap().

◆ CblacsSetRowComm()

static int CblacsSetRowComm ( int  ctxt,
MPI_Comm  comm 
)
static

Definition at line 69 of file cblacslt.c.

References CBLACS_CHK_CTXT, CblacsComms, and comm.

Referenced by Cblacs_gridmap().

◆ CblacsWarnImp()

static void CblacsWarnImp ( char *  file,
int  line 
)
static

Definition at line 35 of file cblacslt.c.

◆ Cdgamn2d()

void Cdgamn2d ( int  ConTxt,
char *  scope,
char *  top,
int  m,
int  n,
double *  A,
int  lda,
int *  rA,
int *  cA,
int  ldia,
int  rdest,
int  cdest 
)

Definition at line 550 of file cblacslt.c.

References CBLACS_INIT, CblacsAbsMin(), CblacsWarn, and Cvgred2d().

Referenced by slcombine_().

◆ Cdgamx2d()

void Cdgamx2d ( int  ConTxt,
char *  scope,
char *  top,
int  m,
int  n,
double *  A,
int  lda,
int *  rA,
int *  cA,
int  ldia,
int  rdest,
int  cdest 
)

Definition at line 540 of file cblacslt.c.

References CBLACS_INIT, CblacsAbsMax(), CblacsWarn, and Cvgred2d().

Referenced by pdmatcmp(), and slcombine_().

◆ Cdgebr2d()

void Cdgebr2d ( int  ConTxt,
char *  scope,
char *  top,
int  m,
int  n,
double *  A,
int  lda,
int  rsrc,
int  csrc 
)

Definition at line 748 of file cblacslt.c.

References CBLACS_INIT, and CblacsBcast().

◆ Cdgebs2d()

void Cdgebs2d ( int  ConTxt,
char *  scope,
char *  top,
int  m,
int  n,
double *  A,
int  lda 
)

Definition at line 703 of file cblacslt.c.

References CBLACS_INIT, and CblacsBcast().

◆ Cdgsum2d()

void Cdgsum2d ( int  ConTxt,
char *  scope,
char *  top,
int  m,
int  n,
double *  A,
int  lda,
int  rdest,
int  cdest 
)

Definition at line 444 of file cblacslt.c.

References CBLACS_INIT, and Cvgred2d().

Referenced by slcombine_().

◆ Cigebr2d()

void Cigebr2d ( int  ConTxt,
char *  scope,
char *  top,
int  m,
int  n,
int *  A,
int  lda,
int  rsrc,
int  csrc 
)

Definition at line 758 of file cblacslt.c.

References CBLACS_INIT, and CblacsBcast().

◆ Cigebs2d()

void Cigebs2d ( int  ConTxt,
char *  scope,
char *  top,
int  m,
int  n,
int *  A,
int  lda 
)

Definition at line 753 of file cblacslt.c.

References CBLACS_INIT, and CblacsBcast().

◆ Cigsum2d()

void Cigsum2d ( int  ConTxt,
char *  scope,
char *  top,
int  m,
int  n,
int *  A,
int  lda,
int  rdest,
int  cdest 
)

Definition at line 449 of file cblacslt.c.

References CBLACS_INIT, and Cvgred2d().

Referenced by PTRANS().

◆ Cvgred2d()

static void Cvgred2d ( int  ConTxt,
char *  scope,
int  m,
int  n,
void *  A,
int  lda,
int  rowRank,
int  colRank,
MPI_Datatype  dtype,
int  dsize,
MPI_Op  op 
)
static

◆ dcputime00()

double dcputime00 ( void  )

Definition at line 30 of file cblacslt.c.

References HPL_ptimer_cputime().

Referenced by slcombine_(), and sltimer_().

◆ dwalltime00()

double dwalltime00 ( void  )

Definition at line 32 of file cblacslt.c.

Referenced by slcombine_(), and sltimer_().

Variable Documentation

◆ CblacsComms

◆ CblacsFinalized

int CblacsFinalized
static

Definition at line 27 of file cblacslt.c.

Referenced by Cblacs_exit(), and CblacsInit().

◆ CblacsInitialized

int CblacsInitialized = 0
static

Definition at line 27 of file cblacslt.c.

Referenced by CblacsInit().

◆ CblacsNComms

int CblacsNComms
static

Definition at line 43 of file cblacslt.c.

Referenced by CblacsDeleteCtxt(), CblacsInit(), and CblacsNewCtxt().

◆ colComm

MPI_Comm colComm

Definition at line 42 of file cblacslt.c.

Referenced by Cblacs_gridmap(), and CblacsDeleteCtxt().

◆ comm

◆ rowComm

MPI_Comm rowComm

Definition at line 42 of file cblacslt.c.

Referenced by Cblacs_dSendrecv(), Cblacs_gridmap(), and CblacsDeleteCtxt().

◆ taken

unsigned int taken

Definition at line 42 of file cblacslt.c.

Referenced by CblacsDeleteCtxt(), and CblacsNewCtxt().