Skip to content

Commit

Permalink
add skelton for bidir
Browse files Browse the repository at this point in the history
  • Loading branch information
paklui committed Sep 1, 2022
1 parent 9611c45 commit cf8a9a4
Show file tree
Hide file tree
Showing 11 changed files with 36 additions and 9 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ src/pgesv/HPL_pdupdateNT.cpp
src/pgesv/HPL_pdupdateNN.cpp src/pgesv/HPL_pdupdateTN.cpp src/pgesv/HPL_pdupdateTT.cpp
src/pgesv/HPL_pdupdateTN.cpp src/pgesv/HPL_pdupdateTT.cpp
src/pauxil/HPL_pwarn.cpp src/comm/HPL_bcast.cpp src/comm/HPL_blong.cpp
src/comm/HPL_blonM.cpp src/comm/HPL_1ring.cpp src/comm/HPL_2ring.cpp
src/comm/HPL_blonM.cpp src/comm/HPL_bidir.cpp src/comm/HPL_1ring.cpp src/comm/HPL_2ring.cpp
src/comm/HPL_1rinM.cpp src/comm/HPL_2rinM.cpp src/comm/HPL_packL.cpp
src/comm/HPL_sdrv.cpp src/comm/HPL_send.cpp src/pgesv/HPL_pdlaswp00N.cpp
src/comm/HPL_recv.cpp src/grid/HPL_reduce.cpp src/comm/HPL_binit.cpp
Expand Down
7 changes: 6 additions & 1 deletion include/hpl_comm.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ typedef enum
HPL_2RING_M = 404, /* Increasing 2-ring (modified) */
HPL_BLONG = 405, /* long broadcast */
HPL_BLONG_M = 406, /* long broadcast (modified) */
HPL_IBCAST = 407 /* default bcast in MPI */
HPL_IBCAST = 407, /* default bcast in MPI */
HPL_BIDIR = 408 /* bidirectional */
} HPL_T_TOP;
/*
* ---------------------------------------------------------------------
Expand Down Expand Up @@ -160,6 +161,10 @@ int HPL_binit_blonM STDC_ARGS( ( HPL_T_panel * ) );
int HPL_bcast_blonM STDC_ARGS( ( HPL_T_panel *, int * ) );
int HPL_bwait_blonM STDC_ARGS( ( HPL_T_panel * ) );

int HPL_binit_bidir STDC_ARGS( ( HPL_T_panel * ) );
int HPL_bcast_bidir STDC_ARGS( ( HPL_T_panel *, int * ) );
int HPL_bwait_bidir STDC_ARGS( ( HPL_T_panel * ) );

#endif
/*
* End of hpl_comm.h
Expand Down
4 changes: 3 additions & 1 deletion makes/Make.comm
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ INCdep = \
#
HPL_comobj = \
HPL_1ring.o HPL_1rinM.o HPL_2ring.o \
HPL_2rinM.o HPL_blong.o HPL_blonM.o \
HPL_2rinM.o HPL_blong.o HPL_bidir.o HPL_blonM.o \
HPL_packL.o HPL_copyL.o HPL_binit.o \
HPL_bcast.o HPL_bwait.o HPL_send.o \
HPL_recv.o HPL_sdrv.o
Expand Down Expand Up @@ -84,6 +84,8 @@ HPL_2rinM.o : ../HPL_2rinM.cpp $(INCdep)
$(CC) -o $@ -c $(CCFLAGS) ../HPL_2rinM.cpp
HPL_blong.o : ../HPL_blong.cpp $(INCdep)
$(CC) -o $@ -c $(CCFLAGS) ../HPL_blong.cpp
HPL_bidir.o : ../HPL_bidir.cpp $(INCdep)
$(CC) -o $@ -c $(CCFLAGS) ../HPL_bidir.cpp
HPL_blonM.o : ../HPL_blonM.cpp $(INCdep)
$(CC) -o $@ -c $(CCFLAGS) ../HPL_blonM.cpp
HPL_packL.o : ../HPL_packL.cpp $(INCdep)
Expand Down
6 changes: 3 additions & 3 deletions scripts/config/HPL_8GPU.dat
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Innovative Computing Laboratory, University of Tennessee
HPL.out output file name (if any)
0 device out (6=stdout,7=stderr,file)
1 # of problems sizes (N)
256512 N
255360 256000 256512 N
1 # of NBs
384 NBs
0 PMAP process mapping (0=Row-,1=Column-major)
Expand All @@ -19,8 +19,8 @@ HPL.out output file name (if any)
2 NDIVs
1 # of recursive panel fact.
2 RFACTs (0=left, 1=Crout, 2=Right)
1 # of broadcast
6 BCASTs (0=1rg,1=1rM,2=2rg,3=2rM,4=Lng,5=LnM,6=ibcast)
8 # of broadcast
7 BCASTs (0=1rg,1=1rM,2=2rg,3=2rM,4=Lng,5=LnM,6=ibcast)
1 # of lookahead depth
1 DEPTHs (>=0)
1 SWAP (0=bin-exch,1=long,2=mix)
Expand Down
2 changes: 1 addition & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ blas/HPL_dscal.c blas/HPL_dtrsm.c blas/HPL_dtrsv.c blas/HPL_idamax.c \
blas/HPL_dgemv.c blas/HPL_dscal.c blas/HPL_daxpy.c \
blas/HPL_dcopy.c blas/HPL_dgemm.c blas/HPL_dgemv.c blas/HPL_dger.c \
comm/HPL_sdrv.c comm/HPL_send.c comm/HPL_recv.c comm/HPL_bcast.c \
comm/HPL_binit.c comm/HPL_bwait.c comm/HPL_blong.c comm/HPL_1ring.c \
comm/HPL_binit.c comm/HPL_bwait.c comm/HPL_blong.c comm/HPL_bidir.c comm/HPL_1ring.c \
comm/HPL_1rinM.c comm/HPL_2rinM.c comm/HPL_2ring.c comm/HPL_blonM.c comm/HPL_packL.c \
grid/HPL_reduce.c grid/HPL_sum.c grid/HPL_grid_info.c grid/HPL_grid_init.c \
grid/HPL_all_reduce.c grid/HPL_broadcast.c grid/HPL_grid_exit.c grid/HPL_max.c \
Expand Down
9 changes: 8 additions & 1 deletion src/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ am_libhpl_a_OBJECTS = auxil/HPL_dlatcpy.$(OBJEXT) \
comm/HPL_recv.$(OBJEXT) comm/HPL_bcast.$(OBJEXT) \
comm/HPL_binit.$(OBJEXT) comm/HPL_bwait.$(OBJEXT) \
comm/HPL_blong.$(OBJEXT) comm/HPL_1ring.$(OBJEXT) \
comm/HPL_bidir.$(OBJEXT) comm/HPL_1ring.$(OBJEXT) \
comm/HPL_1rinM.$(OBJEXT) comm/HPL_2rinM.$(OBJEXT) \
comm/HPL_2ring.$(OBJEXT) comm/HPL_blonM.$(OBJEXT) \
comm/HPL_packL.$(OBJEXT) grid/HPL_reduce.$(OBJEXT) \
Expand Down Expand Up @@ -229,6 +230,7 @@ am__depfiles_remade = auxil/$(DEPDIR)/HPL_dlacpy.Po \
comm/$(DEPDIR)/HPL_2rinM.Po comm/$(DEPDIR)/HPL_2ring.Po \
comm/$(DEPDIR)/HPL_bcast.Po comm/$(DEPDIR)/HPL_binit.Po \
comm/$(DEPDIR)/HPL_blonM.Po comm/$(DEPDIR)/HPL_blong.Po \
comm/$(DEPDIR)/HPL_bidir.Po \
comm/$(DEPDIR)/HPL_bwait.Po comm/$(DEPDIR)/HPL_packL.Po \
comm/$(DEPDIR)/HPL_recv.Po comm/$(DEPDIR)/HPL_sdrv.Po \
comm/$(DEPDIR)/HPL_send.Po grid/$(DEPDIR)/HPL_all_reduce.Po \
Expand Down Expand Up @@ -428,7 +430,7 @@ blas/HPL_dscal.c blas/HPL_dtrsm.c blas/HPL_dtrsv.c blas/HPL_idamax.c \
blas/HPL_dgemv.c blas/HPL_dscal.c blas/HPL_daxpy.c \
blas/HPL_dcopy.c blas/HPL_dgemm.c blas/HPL_dgemv.c blas/HPL_dger.c \
comm/HPL_sdrv.c comm/HPL_send.c comm/HPL_recv.c comm/HPL_bcast.c \
comm/HPL_binit.c comm/HPL_bwait.c comm/HPL_blong.c comm/HPL_1ring.c \
comm/HPL_binit.c comm/HPL_bwait.c comm/HPL_blong.c comm/HPL_bidir.c comm/HPL_1ring.c \
comm/HPL_1rinM.c comm/HPL_2rinM.c comm/HPL_2ring.c comm/HPL_blonM.c comm/HPL_packL.c \
grid/HPL_reduce.c grid/HPL_sum.c grid/HPL_grid_info.c grid/HPL_grid_init.c \
grid/HPL_all_reduce.c grid/HPL_broadcast.c grid/HPL_grid_exit.c grid/HPL_max.c \
Expand Down Expand Up @@ -583,6 +585,8 @@ comm/HPL_bwait.$(OBJEXT): comm/$(am__dirstamp) \
comm/$(DEPDIR)/$(am__dirstamp)
comm/HPL_blong.$(OBJEXT): comm/$(am__dirstamp) \
comm/$(DEPDIR)/$(am__dirstamp)
comm/HPL_bidir.$(OBJEXT): comm/$(am__dirstamp) \
comm/$(DEPDIR)/$(am__dirstamp)
comm/HPL_1ring.$(OBJEXT): comm/$(am__dirstamp) \
comm/$(DEPDIR)/$(am__dirstamp)
comm/HPL_1rinM.$(OBJEXT): comm/$(am__dirstamp) \
Expand Down Expand Up @@ -818,6 +822,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@comm/$(DEPDIR)/HPL_binit.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@comm/$(DEPDIR)/HPL_blonM.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@comm/$(DEPDIR)/HPL_blong.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@comm/$(DEPDIR)/HPL_bidir.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@comm/$(DEPDIR)/HPL_bwait.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@comm/$(DEPDIR)/HPL_packL.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@comm/$(DEPDIR)/HPL_recv.Po@am__quote@ # am--include-marker
Expand Down Expand Up @@ -1086,6 +1091,7 @@ distclean: distclean-am
-rm -f comm/$(DEPDIR)/HPL_binit.Po
-rm -f comm/$(DEPDIR)/HPL_blonM.Po
-rm -f comm/$(DEPDIR)/HPL_blong.Po
-rm -f comm/$(DEPDIR)/HPL_bidir.Po
-rm -f comm/$(DEPDIR)/HPL_bwait.Po
-rm -f comm/$(DEPDIR)/HPL_packL.Po
-rm -f comm/$(DEPDIR)/HPL_recv.Po
Expand Down Expand Up @@ -1233,6 +1239,7 @@ maintainer-clean: maintainer-clean-am
-rm -f comm/$(DEPDIR)/HPL_binit.Po
-rm -f comm/$(DEPDIR)/HPL_blonM.Po
-rm -f comm/$(DEPDIR)/HPL_blong.Po
-rm -f comm/$(DEPDIR)/HPL_bidir.Po
-rm -f comm/$(DEPDIR)/HPL_bwait.Po
-rm -f comm/$(DEPDIR)/HPL_packL.Po
-rm -f comm/$(DEPDIR)/HPL_recv.Po
Expand Down
1 change: 1 addition & 0 deletions src/comm/HPL_bcast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ int HPL_bcast
case HPL_BLONG_M : ierr = HPL_bcast_blonM( PANEL, IFLAG ); break;
case HPL_BLONG : ierr = HPL_bcast_blong( PANEL, IFLAG ); break;
case HPL_IBCAST : ierr = HPL_BE_bcast_ibcast( PANEL, IFLAG, HPL_TR); break;
case HPL_BIDIR : ierr = HPL_bcast_bidir( PANEL, IFLAG ); break;
default : ierr = HPL_SUCCESS;
}

Expand Down
1 change: 1 addition & 0 deletions src/comm/HPL_binit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ int HPL_binit
case HPL_BLONG_M : ierr = HPL_binit_blonM( PANEL ); break;
case HPL_BLONG : ierr = HPL_binit_blong( PANEL ); break;
case HPL_IBCAST : ierr = HPL_BE_binit_ibcast(PANEL, HPL_TR); break;
case HPL_BIDIR : ierr = HPL_binit_bidir( PANEL ); break;
default : ierr = HPL_SUCCESS;
}

Expand Down
1 change: 1 addition & 0 deletions src/comm/HPL_bwait.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ int HPL_bwait
case HPL_BLONG_M : ierr = HPL_bwait_blonM( PANEL ); break;
case HPL_BLONG : ierr = HPL_bwait_blong( PANEL ); break;
case HPL_IBCAST : ierr = HPL_BE_bwait_ibcast(PANEL, HPL_TR); break;
case HPL_BIDIR : ierr = HPL_bwait_bidir( PANEL ); break;
default : ierr = HPL_SUCCESS;
}

Expand Down
11 changes: 10 additions & 1 deletion testing/ptest/HPL_pdinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,7 @@ void HPL_pdinfo
else if( j == 4 ) TP[ i ] = HPL_BLONG;
else if( j == 5 ) TP[ i ] = HPL_BLONG_M;
else if( j == 6 ) TP[ i ] = HPL_IBCAST;
else if( j == 7 ) TP[ i ] = HPL_BIDIR;
else TP[ i ] = HPL_1RING_M;
}
/*
Expand Down Expand Up @@ -714,7 +715,8 @@ void HPL_pdinfo
else if( TP[i] == HPL_2RING_M ) iwork[j] = 3;
else if( TP[i] == HPL_BLONG ) iwork[j] = 4;
else if( TP[i] == HPL_BLONG_M ) iwork[j] = 5;
else if( TP[i] == HPL_IBCAST ) iwork[j] = 6;
else if( TP[i] == HPL_IBCAST ) iwork[j] = 6;
else if( TP[i] == HPL_BIDIR ) iwork[j] = 7;
j++;
}
for( i = 0; i < *NDHS; i++ ) { iwork[j] = DH[i]; j++; }
Expand Down Expand Up @@ -759,6 +761,7 @@ void HPL_pdinfo
else if( iwork[j] == 4 ) TP[i] = HPL_BLONG;
else if( iwork[j] == 5 ) TP[i] = HPL_BLONG_M;
else if( iwork[j] == 6 ) TP[i] = HPL_IBCAST;
else if( iwork[j] == 7 ) TP[i] = HPL_BIDIR;
j++;
}
for( i = 0; i < *NDHS; i++ ) { DH[i] = iwork[j]; j++; }
Expand Down Expand Up @@ -1024,6 +1027,8 @@ void HPL_pdinfo
HPL_fprintf( TEST->outfp, " BlongM " );
else if( TP[i] == HPL_IBCAST )
HPL_fprintf( TEST->outfp, " IBCAST " );
else if( TP[i] == HPL_BIDIR )
HPL_fprintf( TEST->outfp, " BIDIR " );
}
if( *NTPS > 8 )
{
Expand All @@ -1044,6 +1049,8 @@ void HPL_pdinfo
HPL_fprintf( TEST->outfp, " BlongM " );
else if( TP[i] == HPL_IBCAST )
HPL_fprintf( TEST->outfp, " IBCAST " );
else if( TP[i] == HPL_BIDIR )
HPL_fprintf( TEST->outfp, " BIDIR " );
}
if( *NTPS > 16 )
{
Expand All @@ -1064,6 +1071,8 @@ void HPL_pdinfo
HPL_fprintf( TEST->outfp, " BlongM " );
else if( TP[i] == HPL_IBCAST )
HPL_fprintf( TEST->outfp, " IBCAST " );
else if( TP[i] == HPL_BIDIR )
HPL_fprintf( TEST->outfp, " BIDIR " );
}
}
}
Expand Down
1 change: 1 addition & 0 deletions testing/ptest/HPL_pdtest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ void HPL_pdtest
else if( ALGO->btopo == HPL_2RING_M ) ctop = '3';
else if( ALGO->btopo == HPL_BLONG ) ctop = '4';
else if( ALGO->btopo == HPL_IBCAST ) ctop = '6';
else if( ALGO->btopo == HPL_BIDIR ) ctop = '7';
else /* if( ALGO->btopo == HPL_BLONG_M ) */ ctop = '5';

if( wtime[0] > HPL_rzero ) {
Expand Down

0 comments on commit cf8a9a4

Please sign in to comment.