From cf8a9a443ddeac9a290e823b096cc0b96f341f3b Mon Sep 17 00:00:00 2001 From: paklui Date: Thu, 1 Sep 2022 14:47:16 -0700 Subject: [PATCH] add skelton for bidir --- CMakeLists.txt | 2 +- include/hpl_comm.h | 7 ++++++- makes/Make.comm | 4 +++- scripts/config/HPL_8GPU.dat | 6 +++--- src/Makefile.am | 2 +- src/Makefile.in | 9 ++++++++- src/comm/HPL_bcast.cpp | 1 + src/comm/HPL_binit.cpp | 1 + src/comm/HPL_bwait.cpp | 1 + testing/ptest/HPL_pdinfo.cpp | 11 ++++++++++- testing/ptest/HPL_pdtest.cpp | 1 + 11 files changed, 36 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 930e8f0..60260a1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 diff --git a/include/hpl_comm.h b/include/hpl_comm.h index 4fe091b..1c281bf 100644 --- a/include/hpl_comm.h +++ b/include/hpl_comm.h @@ -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; /* * --------------------------------------------------------------------- @@ -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 diff --git a/makes/Make.comm b/makes/Make.comm index 9b7c43c..0597108 100644 --- a/makes/Make.comm +++ b/makes/Make.comm @@ -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 @@ -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) diff --git a/scripts/config/HPL_8GPU.dat b/scripts/config/HPL_8GPU.dat index 6397f1b..903503d 100644 --- a/scripts/config/HPL_8GPU.dat +++ b/scripts/config/HPL_8GPU.dat @@ -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) @@ -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) diff --git a/src/Makefile.am b/src/Makefile.am index 2e6d3d4..4064fb0 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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 \ diff --git a/src/Makefile.in b/src/Makefile.in index 139ecba..07e68c8 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -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) \ @@ -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 \ @@ -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 \ @@ -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) \ @@ -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 @@ -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 @@ -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 diff --git a/src/comm/HPL_bcast.cpp b/src/comm/HPL_bcast.cpp index 3621170..80d8d86 100644 --- a/src/comm/HPL_bcast.cpp +++ b/src/comm/HPL_bcast.cpp @@ -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; } diff --git a/src/comm/HPL_binit.cpp b/src/comm/HPL_binit.cpp index ae45d13..8a0d7f4 100644 --- a/src/comm/HPL_binit.cpp +++ b/src/comm/HPL_binit.cpp @@ -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; } diff --git a/src/comm/HPL_bwait.cpp b/src/comm/HPL_bwait.cpp index 49c75f3..0dcc042 100644 --- a/src/comm/HPL_bwait.cpp +++ b/src/comm/HPL_bwait.cpp @@ -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; } diff --git a/testing/ptest/HPL_pdinfo.cpp b/testing/ptest/HPL_pdinfo.cpp index 4eaab51..f540f1a 100644 --- a/testing/ptest/HPL_pdinfo.cpp +++ b/testing/ptest/HPL_pdinfo.cpp @@ -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; } /* @@ -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++; } @@ -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++; } @@ -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 ) { @@ -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 ) { @@ -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 " ); } } } diff --git a/testing/ptest/HPL_pdtest.cpp b/testing/ptest/HPL_pdtest.cpp index eebc99e..195a086 100644 --- a/testing/ptest/HPL_pdtest.cpp +++ b/testing/ptest/HPL_pdtest.cpp @@ -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 ) {