Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ILP64 support #19

Merged
merged 3 commits into from
Mar 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 3 additions & 2 deletions BLACS/SRC/BI_Arecv.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#include "Bdef.h"

void BI_Arecv(BLACSCONTEXT *ctxt, int src, int msgid, BLACBUFF *bp)
void BI_Arecv(BLACSCONTEXT *ctxt, Int src, Int msgid, BLACBUFF *bp)
{
int i, info, errclass;
Int i, info;
MpiInt errclass;

info=MPI_Irecv(bp->Buff, bp->N, bp->dtype, src, msgid, ctxt->scp->comm,
&bp->Aops[bp->nAops]);
Expand Down
8 changes: 4 additions & 4 deletions BLACS/SRC/BI_ArgCheck.c
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#include "Bdef.h"


void BI_ArgCheck(int ConTxt, int RoutType, char *routine, char scope,
char uplo, char diag, int m, int n, int lda, int nprocs,
int *prows, int *pcols)
void BI_ArgCheck(Int ConTxt, Int RoutType, char *routine, char scope,
char uplo, char diag, Int m, Int n, Int lda, Int nprocs,
Int *prows, Int *pcols)
{
#if (BlacsDebugLvl > 0)
char *srcdest;
int i=1, prow, pcol, Ng, nprow, npcol, myrow, mycol;
Int i=1, prow, pcol, Ng, nprow, npcol, myrow, mycol;
BLACSCONTEXT *ctxt;

MGetConTxt(ConTxt, ctxt);
Expand Down
5 changes: 3 additions & 2 deletions BLACS/SRC/BI_Asend.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#include "Bdef.h"

void BI_Asend(BLACSCONTEXT *ctxt, int dest, int msgid, BLACBUFF *bp)
void BI_Asend(BLACSCONTEXT *ctxt, Int dest, Int msgid, BLACBUFF *bp)
{
int i, info, errclass;
Int i, info;
MpiInt errclass;

info=MPI_Isend(bp->Buff, bp->N, bp->dtype, dest, msgid, ctxt->scp->comm,
&bp->Aops[bp->nAops]);
Expand Down
16 changes: 8 additions & 8 deletions BLACS/SRC/BI_BeComb.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* Robert van de Geijn, et al.
*/
void BI_BeComb(BLACSCONTEXT *ctxt, BLACBUFF *bp, BLACBUFF *bp2,
int N, VVFUNPTR Xvvop)
Int N, VVFUNPTR Xvvop)
/*
* -- V1.1ALPHA (test version) BLACS routine --
* University of Tennessee, October 1, 1995
Expand Down Expand Up @@ -47,15 +47,15 @@ void BI_BeComb(BLACSCONTEXT *ctxt, BLACBUFF *bp, BLACBUFF *bp2,
* ------------------------------------------------------------------------
*/
{
void BI_Ssend(BLACSCONTEXT *, int, int, BLACBUFF *);
void BI_Srecv(BLACSCONTEXT *, int, int, BLACBUFF *);
void BI_Rsend(BLACSCONTEXT *, int, int, BLACBUFF *);
void BI_Arecv(BLACSCONTEXT *, int, int, BLACBUFF *);
void BI_Ssend(BLACSCONTEXT *, Int, Int, BLACBUFF *);
void BI_Srecv(BLACSCONTEXT *, Int, Int, BLACBUFF *);
void BI_Rsend(BLACSCONTEXT *, Int, Int, BLACBUFF *);
void BI_Arecv(BLACSCONTEXT *, Int, Int, BLACBUFF *);
void BI_UpdateBuffs(BLACBUFF *);
BLACBUFF *BI_GetBuff(int);
int BI_BuffIsFree(BLACBUFF *, int);
BLACBUFF *BI_GetBuff(Int);
Int BI_BuffIsFree(BLACBUFF *, Int);

int Np, Iam, dest, msgid, Rmsgid, np2, bit, ierr;
Int Np, Iam, dest, msgid, Rmsgid, np2, bit, ierr;
extern MPI_Status *BI_Stats;

Np = ctxt->scp->Np;
Expand Down
4 changes: 2 additions & 2 deletions BLACS/SRC/BI_BlacsAbort.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include "Bdef.h"

void BI_BlacsAbort(int ErrNo)
void BI_BlacsAbort(Int ErrNo)
{
int ierr;
Int ierr;
fflush(stderr);
fflush(stdout);
ierr=MPI_Abort(MPI_COMM_WORLD, ErrNo);
Expand Down
8 changes: 4 additions & 4 deletions BLACS/SRC/BI_BlacsErr.c
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#include "Bdef.h"

void BI_BlacsErr(int ConTxt, int line, char *file, char *form, ...)
void BI_BlacsErr(Int ConTxt, Int line, char *file, char *form, ...)
{
#ifdef __STDC__
void BI_BlacsAbort(int ErrNo);
void BI_BlacsAbort(Int ErrNo);
#else
void BI_BlacsAbort();
#endif
extern int BI_Iam;
int myrow, mycol;
extern Int BI_Iam;
Int myrow, mycol;
va_list argptr;
char cline[100];
BLACSCONTEXT *ctxt;
Expand Down
6 changes: 3 additions & 3 deletions BLACS/SRC/BI_BlacsWarn.c
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#include "Bdef.h"

void BI_BlacsWarn(int ConTxt, int line, char *file, char *form, ...)
void BI_BlacsWarn(Int ConTxt, Int line, char *file, char *form, ...)
{
extern int BI_Iam;
extern Int BI_Iam;
extern BLACSCONTEXT **BI_MyContxts;
int myrow, mycol;
Int myrow, mycol;
va_list argptr;
char cline[100];

Expand Down
6 changes: 3 additions & 3 deletions BLACS/SRC/BI_BuffIsFree.c
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#include "Bdef.h"

int BI_BuffIsFree(BLACBUFF *bp, int Wait)
Int BI_BuffIsFree(BLACBUFF *bp, Int Wait)
/*
* Check to see if buff is finished with async. operations. If Wait != 0,
* wait for all async. operations to complete.
*/
{
int i, info;
MpiInt i, info;
extern MPI_Status *BI_Stats;
extern int BI_Np;
extern Int BI_Np;


if (!Wait)
Expand Down
6 changes: 3 additions & 3 deletions BLACS/SRC/BI_ContxtNum.c
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#include "Bdef.h"

int BI_ContxtNum(BLACSCONTEXT *ctxt)
Int BI_ContxtNum(BLACSCONTEXT *ctxt)
/*
* Returns the integer ID of ctxt
*/
{
int i;
extern int BI_MaxNCtxt;
Int i;
extern Int BI_MaxNCtxt;
extern BLACSCONTEXT **BI_MyContxts;

if (ctxt == NULL) return(-1);
Expand Down
6 changes: 3 additions & 3 deletions BLACS/SRC/BI_EmergencyBuff.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
* the user-changeable macro value BUFWAIT. If in that time no active *
* buffer becomes inactive, a hang is assumed, and the grid is killed. *
***************************************************************************/
void BI_EmergencyBuff(int length)
void BI_EmergencyBuff(Int length)
{
void BI_UpdateBuffs(BLACBUFF *);

char *cptr;
int i, j;
Int i, j;
double Mwalltime(void);
double t1;
extern int BI_Np;
extern Int BI_Np;
extern BLACBUFF *BI_ReadyB, *BI_ActiveQ;

j = sizeof(BLACBUFF);
Expand Down
8 changes: 4 additions & 4 deletions BLACS/SRC/BI_GetBuff.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@
* it a little more complex. *
***************************************************************************/

BLACBUFF *BI_GetBuff(int length)
BLACBUFF *BI_GetBuff(Int length)
{
void BI_EmergencyBuff(int length);
void BI_EmergencyBuff(Int length);

char *cptr;
int i, j;
extern int BI_Np;
Int i, j;
extern Int BI_Np;
extern BLACBUFF *BI_ReadyB;

/*
Expand Down
6 changes: 3 additions & 3 deletions BLACS/SRC/BI_GetMpiGeType.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include "Bdef.h"
MPI_Datatype BI_GetMpiGeType(BLACSCONTEXT *ctxt, int m, int n, int lda,
MPI_Datatype Dtype, int *N)
MPI_Datatype BI_GetMpiGeType(BLACSCONTEXT *ctxt, Int m, Int n, Int lda,
MPI_Datatype Dtype, Int *N)
{
int info;
Int info;
MPI_Datatype GeType;

/*
Expand Down
17 changes: 8 additions & 9 deletions BLACS/SRC/BI_GetMpiTrType.c
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
#include "Bdef.h"


MPI_Datatype BI_GetMpiTrType(BLACSCONTEXT *ctxt, char uplo, char diag,
int m, int n, int lda, MPI_Datatype Dtype,
int *N)
Int m, Int n, Int lda, MPI_Datatype Dtype,
Int *N)
{
BLACBUFF *BI_GetBuff(int);
BLACBUFF *BI_GetBuff(Int);
MPI_Datatype TrType;
int info, start, i, k;
int *len, *disp;
Int info, start, i, k;
MpiInt *len, *disp;
BLACBUFF *bp;

if (diag == 'u') start = 1;
Expand All @@ -32,9 +31,9 @@ MPI_Datatype BI_GetMpiTrType(BLACSCONTEXT *ctxt, char uplo, char diag,
/*
* Get space to hold the length and displacement values
*/
bp = BI_GetBuff( 2 * n * sizeof(int) );
len = (int *) bp->Buff;
disp = (int *) &bp->Buff[n*sizeof(int)];
bp = BI_GetBuff( 2 * n * sizeof(MpiInt) );
len = (MpiInt *) bp->Buff;
disp = (MpiInt *) &bp->Buff[n*sizeof(MpiInt)];

if (m > n)
{
Expand Down
8 changes: 4 additions & 4 deletions BLACS/SRC/BI_GlobalVars.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
/*
* Define global variables
*/
int BI_MaxNCtxt=0; /* Number of context pointers allocated */
int BI_MaxNSysCtxt=0; /* Number of system ctxt ptrs allocated */
int BI_Iam, BI_Np=(-1); /* My pnum, and # of procs in system */
Int BI_MaxNCtxt=0; /* Number of context pointers allocated */
Int BI_MaxNSysCtxt=0; /* Number of system ctxt ptrs allocated */
Int BI_Iam, BI_Np=(-1); /* My pnum, and # of procs in system */
BLACBUFF *BI_ReadyB=NULL; /* buffer that is ready for use */
BLACBUFF *BI_ActiveQ=NULL; /* pointer to start of active buffer queue */
BLACBUFF BI_AuxBuff;
BLACSCONTEXT **BI_MyContxts=NULL; /* Array of pointers to my contexts */
MPI_Comm *BI_SysContxts=NULL;
int *BI_COMM_WORLD=NULL;
Int *BI_COMM_WORLD=NULL;
MPI_Status *BI_Stats=NULL;
6 changes: 3 additions & 3 deletions BLACS/SRC/BI_HypBR.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#include "Bdef.h"

int BI_HypBR(BLACSCONTEXT *ctxt, BLACBUFF *bp, SDRVPTR send, int src)
Int BI_HypBR(BLACSCONTEXT *ctxt, BLACBUFF *bp, SDRVPTR send, Int src)
{
void BI_Srecv(BLACSCONTEXT *, int, int, BLACBUFF *);
int relnode, bit, Np, Iam, msgid;
void BI_Srecv(BLACSCONTEXT *, Int, Int, BLACBUFF *);
Int relnode, bit, Np, Iam, msgid;

Np = ctxt->scp->Np;
Iam = ctxt->scp->Iam;
Expand Down
4 changes: 2 additions & 2 deletions BLACS/SRC/BI_HypBS.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "Bdef.h"
int BI_HypBS(BLACSCONTEXT *ctxt, BLACBUFF *bp, SDRVPTR send)
Int BI_HypBS(BLACSCONTEXT *ctxt, BLACBUFF *bp, SDRVPTR send)
{
int bit, Np, Iam, msgid;
Int bit, Np, Iam, msgid;

Np = ctxt->scp->Np;
if (Np < 2) return(NORV);
Expand Down
6 changes: 3 additions & 3 deletions BLACS/SRC/BI_IdringBR.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#include "Bdef.h"

void BI_IdringBR(BLACSCONTEXT *ctxt, BLACBUFF *bp, SDRVPTR send, int src, int step)
void BI_IdringBR(BLACSCONTEXT *ctxt, BLACBUFF *bp, SDRVPTR send, Int src, Int step)
{
void BI_Srecv(BLACSCONTEXT *, int, int, BLACBUFF *);
int Np, Iam, msgid, dest;
void BI_Srecv(BLACSCONTEXT *, Int, Int, BLACBUFF *);
Int Np, Iam, msgid, dest;

Np = ctxt->scp->Np;
Iam = ctxt->scp->Iam;
Expand Down
4 changes: 2 additions & 2 deletions BLACS/SRC/BI_IdringBS.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include "Bdef.h"

void BI_IdringBS(BLACSCONTEXT *ctxt, BLACBUFF *bp, SDRVPTR send, int step)
void BI_IdringBS(BLACSCONTEXT *ctxt, BLACBUFF *bp, SDRVPTR send, Int step)
{
int Np, Iam, msgid;
Int Np, Iam, msgid;

Np = ctxt->scp->Np;
if (Np < 2) return;
Expand Down
16 changes: 8 additions & 8 deletions BLACS/SRC/BI_MpathBR.c
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#include "Bdef.h"

void BI_MpathBR(BLACSCONTEXT *ctxt, BLACBUFF *bp, SDRVPTR send, int src, int npaths)
void BI_MpathBR(BLACSCONTEXT *ctxt, BLACBUFF *bp, SDRVPTR send, Int src, Int npaths)
{
void BI_Arecv(BLACSCONTEXT *, int, int, BLACBUFF *);
int BI_BuffIsFree(BLACBUFF *, int);
void BI_Arecv(BLACSCONTEXT *, Int, Int, BLACBUFF *);
Int BI_BuffIsFree(BLACBUFF *, Int);

int pathlen; /* the minimal length of each path */
int mydist; /* my distance from src */
int faredge; /* node at far end of path */
int lastlong; /* distance to node on end of last path with extra node */
int Np, Iam, msgid, Np_1, dest;
Int pathlen; /* the minimal length of each path */
Int mydist; /* my distance from src */
Int faredge; /* node at far end of path */
Int lastlong; /* distance to node on end of last path with extra node */
Int Np, Iam, msgid, Np_1, dest;

msgid = Mscopeid(ctxt);
BI_Arecv(ctxt, BANYNODE, msgid, bp);
Expand Down
12 changes: 6 additions & 6 deletions BLACS/SRC/BI_MpathBS.c
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#include "Bdef.h"

void BI_MpathBS(BLACSCONTEXT *ctxt, BLACBUFF *bp, SDRVPTR send, int npaths)
void BI_MpathBS(BLACSCONTEXT *ctxt, BLACBUFF *bp, SDRVPTR send, Int npaths)
{
int pathlen; /* the length of each path */
int dist; /* the distance to the node closest to src on each path */
int pdest; /* part of dest calculation -- saves unneeded ops */
int lastlong; /* number of paths with extra node */
int Np, Iam, msgid, Np_1, dir;
Int pathlen; /* the length of each path */
Int dist; /* the distance to the node closest to src on each path */
Int pdest; /* part of dest calculation -- saves unneeded ops */
Int lastlong; /* number of paths with extra node */
Int Np, Iam, msgid, Np_1, dir;

Np = ctxt->scp->Np;
if (Np < 2) return;
Expand Down
18 changes: 9 additions & 9 deletions BLACS/SRC/BI_MringComb.c
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
#include "Bdef.h"
void BI_MringComb(BLACSCONTEXT *ctxt, BLACBUFF *bp, BLACBUFF *bp2,
int N, VVFUNPTR Xvvop, int dest, int nrings)
Int N, VVFUNPTR Xvvop, Int dest, Int nrings)
{
void BI_Ssend(BLACSCONTEXT *, int, int, BLACBUFF *);
void BI_Srecv(BLACSCONTEXT *, int, int, BLACBUFF *);
void BI_MpathBS(BLACSCONTEXT *, BLACBUFF *, SDRVPTR, int);
void BI_MpathBR(BLACSCONTEXT *, BLACBUFF *, SDRVPTR, int, int);
void BI_Ssend(BLACSCONTEXT *, Int, Int, BLACBUFF *);
void BI_Srecv(BLACSCONTEXT *, Int, Int, BLACBUFF *);
void BI_MpathBS(BLACSCONTEXT *, BLACBUFF *, SDRVPTR, Int);
void BI_MpathBR(BLACSCONTEXT *, BLACBUFF *, SDRVPTR, Int, Int);

int Np, Iam, msgid, i, inc, mysrc, mydest, Np_1;
int mydist, ringlen, myring;
int nearedge, faredge; /* edge closest and farthest from dest */
int REBS; /* Is result leave-on-all? */
Int Np, Iam, msgid, i, inc, mysrc, mydest, Np_1;
Int mydist, ringlen, myring;
Int nearedge, faredge; /* edge closest and farthest from dest */
Int REBS; /* Is result leave-on-all? */

Np = ctxt->scp->Np;
if (Np < 2) return;
Expand Down
6 changes: 3 additions & 3 deletions BLACS/SRC/BI_Pack.c
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#include "Bdef.h"
BLACBUFF *BI_Pack(BLACSCONTEXT *ctxt,BVOID *A,BLACBUFF *bp,MPI_Datatype Dtype)
{
BLACBUFF *BI_GetBuff(int);
int i, info, one=1;
BLACBUFF *BI_GetBuff(Int);
MpiInt i, info, one=1;
MPI_Aint eltsiz;
#ifdef ZeroByteTypeBug
char *cptr;
extern BLACBUFF BI_AuxBuff;
extern int BI_Np;
extern Int BI_Np;
#endif

/*
Expand Down
4 changes: 2 additions & 2 deletions BLACS/SRC/BI_Rsend.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#include "Bdef.h"


void BI_Rsend(BLACSCONTEXT *ctxt, int dest, int msgid, BLACBUFF *bp)
void BI_Rsend(BLACSCONTEXT *ctxt, Int dest, Int msgid, BLACBUFF *bp)
{
int info;
Int info;

info=MPI_Rsend(bp->Buff, bp->N, bp->dtype, dest, msgid, ctxt->scp->comm);
}
Loading