|
From: Sreedhar B K. <srk...@us...> - 2007-08-02 12:31:44
|
Update of /cvsroot/x10/x10.apps/experiments/RandomAccess/hpcc/hpl/testing/ptest In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv21245/hpcc/hpl/testing/ptest Added Files: HPL_pddriver.c HPL_pdinfo.c HPL_pdtest.c Log Message: Streamlined dirs/files for RandomAccess Benchmark Autorun. --- NEW FILE: HPL_pdinfo.c --- /* * -- High Performance Computing Linpack Benchmark (HPL) * HPL - 1.0a - January 20, 2004 * Antoine P. Petitet * University of Tennessee, Knoxville * Innovative Computing Laboratories * (C) Copyright 2000-2004 All Rights Reserved * * -- Copyright notice and Licensing terms: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions, and the following disclaimer in the [...1126 lines suppressed...] HPL_fprintf( TEST->outfp, "%s\n", "- The following scaled residual checks will be computed:" ); HPL_fprintf( TEST->outfp, "%s\n", " 1) ||Ax-b||_oo / ( eps * ||A||_1 * N )" ); HPL_fprintf( TEST->outfp, "%s\n", " 2) ||Ax-b||_oo / ( eps * ||A||_1 * ||x||_1 )" ); HPL_fprintf( TEST->outfp, "%s\n", " 3) ||Ax-b||_oo / ( eps * ||A||_oo * ||x||_oo * N )" ); HPL_fprintf( TEST->outfp, "%s %21.6e\n", "- The relative machine precision (eps) is taken to be", TEST->epsil ); HPL_fprintf( TEST->outfp, "%s %11.1f\n\n", "- Computational tests pass if scaled residuals are less than ", TEST->thrsh ); } } /* * End of HPL_pdinfo */ } --- NEW FILE: HPL_pdtest.c --- /* * -- High Performance Computing Linpack Benchmark (HPL) * HPL - 1.0a - January 20, 2004 * Antoine P. Petitet * University of Tennessee, Knoxville * Innovative Computing Laboratories * (C) Copyright 2000-2004 All Rights Reserved * * -- Copyright notice and Licensing terms: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions, and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * 3. All advertising materials mentioning features or use of this * software must display the following acknowledgement: * This product includes software developed at the University of * Tennessee, Knoxville, Innovative Computing Laboratories. * * 4. The name of the University, the name of the Laboratory, or the * names of its contributors may not be used to endorse or promote * products derived from this software without specific written * permission. * * -- Disclaimer: * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * --------------------------------------------------------------------- */ /* * Include files */ #include "hpl.h" #include <hpccmema.h> #ifdef HPL_STDC_HEADERS void HPL_pdtest ( HPL_T_test * TEST, HPL_T_grid * GRID, HPL_T_palg * ALGO, const int N, const int NB, HPL_RuntimeData * rdata ) #else void HPL_pdtest ( TEST, GRID, ALGO, N, NB, rdata ) HPL_T_test * TEST; HPL_T_grid * GRID; HPL_T_palg * ALGO; const int N; const int NB; HPL_RuntimeData * rdata; #endif { /* * Purpose * ======= * * HPL_pdtest performs one test given a set of parameters such as the * process grid, the problem size, the distribution blocking factor ... * This function generates the data, calls and times the linear system * solver, checks the accuracy of the obtained vector solution and * writes this information to the file pointed to by TEST->outfp. * * Arguments * ========= * * TEST (global input) HPL_T_test * * On entry, TEST points to a testing data structure: outfp * specifies the output file where the results will be printed. * It is only defined and used by the process 0 of the grid. * thrsh specifies the threshhold value for the test ratio. * Concretely, a test is declared "PASSED" if and only if all * of the following inequalities are satisfied: * ||Ax-b||_oo / ( epsil * ||A||_1 * N ) < thrsh, * ||Ax-b||_oo / ( epsil * ||A||_1 * ||x||_1 ) < thrsh, * ||Ax-b||_oo / ( epsil * ||A||_oo * ||x||_oo * N ) < thrsh. * epsil is the relative machine precision of the distributed * computer. Finally the test counters, kfail, kpass, kskip and * ktest are updated as follows: if the test passes, kpass is * incremented by one; if the test fails, kfail is incremented * by one; if the test is skipped, kskip is incremented by one. * ktest is left unchanged. * * GRID (local input) HPL_T_grid * * On entry, GRID points to the data structure containing the * process grid information. * * ALGO (global input) HPL_T_palg * * On entry, ALGO points to the data structure containing the * algorithmic parameters to be used for this test. * * N (global input) const int * On entry, N specifies the order of the coefficient matrix A. * N must be at least zero. * * NB (global input) const int * On entry, NB specifies the blocking factor used to partition * and distribute the matrix A. NB must be larger than one. * * --------------------------------------------------------------------- */ /* * .. Local Variables .. */ #ifdef HPL_DETAILED_TIMING double HPL_w[HPL_TIMING_N]; #endif HPL_T_pmat mat; double wtime[1]; int info[3]; double Anorm1, AnormI, Gflops, Xnorm1, XnormI, resid0, resid1, resid2, resid3; double * Bptr; void * vptr = NULL; static int first=1; int ii, ip2, mycol, myrow, npcol, nprow, nq; char ctop, cpfact, crfact; /* .. * .. Executable Statements .. */ (void) HPL_grid_info( GRID, &nprow, &npcol, &myrow, &mycol ); mat.n = N; mat.nb = NB; mat.info = 0; mat.mp = HPL_numroc( N, NB, NB, myrow, 0, nprow ); nq = HPL_numroc( N, NB, NB, mycol, 0, npcol ); mat.nq = nq + 1; /* * Allocate matrix, right-hand-side, and vector solution x. [ A | b ] is * N by N+1. One column is added in every process column for the solve. * The result however is stored in a 1 x N vector replicated in every * process row. In every process, A is lda * (nq+1), x is 1 * nq and the * workspace is mp. * * Ensure that lda is a multiple of ALIGN and not a power of 2 */ mat.ld = ( ( Mmax( 1, mat.mp ) - 1 ) / ALGO->align ) * ALGO->align; do { ii = ( mat.ld += ALGO->align ); ip2 = 1; while( ii > 1 ) { ii >>= 1; ip2 <<= 1; } } while( mat.ld == ip2 ); /* * Allocate dynamic memory */ vptr = (void*)HPCC_malloc( (ALGO->align + (mat.ld+1)*(mat.nq))*sizeof(double) ); info[0] = (vptr == NULL); info[1] = myrow; info[2] = mycol; (void) HPL_all_reduce( (void *)(info), 3, HPL_INT, HPL_max, GRID->all_comm ); if( info[0] != 0 ) { if( ( myrow == 0 ) && ( mycol == 0 ) ) HPL_pwarn( TEST->outfp, __LINE__, "HPL_pdtest", "[%d,%d] %s", info[1], info[2], "Memory allocation failed for A, x and b. Skip." ); (TEST->kskip)++; return; } /* * generate matrix and right-hand-side, [ A | b ] which is N by N+1. */ mat.A = (double *)HPL_PTR( vptr, ((size_t)(ALGO->align) * sizeof(double) ) ); mat.X = mat.A + (mat.ld * mat.nq); HPL_pdmatgen( GRID, N, N+1, NB, mat.A, mat.ld, HPL_ISEED ); #ifdef HPL_CALL_VSIPL mat.block = vsip_blockbind_d( (vsip_scalar_d *)(mat.A), (vsip_length)(mat.ld * mat.nq), VSIP_MEM_NONE ); #endif /* * Solve linear system */ HPL_ptimer_boot(); (void) HPL_barrier( GRID->all_comm ); HPL_ptimer( 0 ); HPL_pdgesv( GRID, ALGO, &mat ); HPL_ptimer( 0 ); #ifdef HPL_CALL_VSIPL (void) vsip_blockrelease_d( mat.block, VSIP_TRUE ); vsip_blockdestroy_d( mat.block ); #endif /* * Gather max of all CPU and WALL clock timings and print timing results */ HPL_ptimer_combine( GRID->all_comm, HPL_AMAX_PTIME, HPL_WALL_PTIME, 1, 0, wtime ); if( ( myrow == 0 ) && ( mycol == 0 ) ) { if( first ) { HPL_fprintf( TEST->outfp, "%s%s\n", "======================================", "======================================" ); HPL_fprintf( TEST->outfp, "%s%s\n", "T/V N NB P Q", " Time Gflops" ); HPL_fprintf( TEST->outfp, "%s%s\n", "--------------------------------------", "--------------------------------------" ); if( TEST->thrsh <= HPL_rzero ) first = 0; } /* * 2/3 N^3 - 1/2 N^2 flops for LU factorization + 2 N^2 flops for solve. * Print WALL time */ rdata->Gflops = Gflops = ( ( (double)(N) / 1.0e+9 ) * ( (double)(N) / wtime[0] ) ) * ( ( 2.0 / 3.0 ) * (double)(N) + ( 3.0 / 2.0 ) ); rdata->cpfact = cpfact = ( ( ALGO->pfact == HPL_LEFT_LOOKING ) ? 'L' : ( ( ALGO->pfact == HPL_CROUT ) ? 'C' : 'R' ) ); rdata->crfact = crfact = ( ( ALGO->rfact == HPL_LEFT_LOOKING ) ? 'L' : ( ( ALGO->rfact == HPL_CROUT ) ? 'C' : 'R' ) ); if( ALGO->btopo == HPL_1RING ) ctop = '0'; else if( ALGO->btopo == HPL_1RING_M ) ctop = '1'; else if( ALGO->btopo == HPL_2RING ) ctop = '2'; else if( ALGO->btopo == HPL_2RING_M ) ctop = '3'; else if( ALGO->btopo == HPL_BLONG ) ctop = '4'; else /* if( ALGO->btopo == HPL_BLONG_M ) */ ctop = '5'; rdata->ctop = ctop; rdata->eps = TEST->epsil; rdata->order = ( GRID->order == HPL_ROW_MAJOR ? 'R' : 'C' ); rdata->depth = ALGO->depth; rdata->nbdiv = ALGO->nbdiv; rdata->nbmin = ALGO->nbmin; rdata->time = wtime[0]; rdata->N = N; rdata->NB = NB; rdata->nprow = nprow; rdata->npcol = npcol; if( wtime[0] > HPL_rzero ) HPL_fprintf( TEST->outfp, "W%c%1d%c%c%1d%c%1d%12d %5d %5d %5d %18.2f %18.3e\n", ( GRID->order == HPL_ROW_MAJOR ? 'R' : 'C' ), ALGO->depth, ctop, crfact, ALGO->nbdiv, cpfact, ALGO->nbmin, N, NB, nprow, npcol, wtime[0], Gflops ); } #ifdef HPL_DETAILED_TIMING HPL_ptimer_combine( GRID->all_comm, HPL_AMAX_PTIME, HPL_WALL_PTIME, HPL_TIMING_N, HPL_TIMING_BEG, HPL_w ); if( ( myrow == 0 ) && ( mycol == 0 ) ) { HPL_fprintf( TEST->outfp, "%s%s\n", "--VVV--VVV--VVV--VVV--VVV--VVV--VVV--V", "VV--VVV--VVV--VVV--VVV--VVV--VVV--VVV-" ); /* * Recursive panel factorization */ if( HPL_w[HPL_TIMING_RPFACT-HPL_TIMING_BEG] > HPL_rzero ) HPL_fprintf( TEST->outfp, "Max aggregated wall time rfact . . . : %18.2f\n", HPL_w[HPL_TIMING_RPFACT-HPL_TIMING_BEG] ); /* * Panel factorization */ if( HPL_w[HPL_TIMING_PFACT-HPL_TIMING_BEG] > HPL_rzero ) HPL_fprintf( TEST->outfp, "+ Max aggregated wall time pfact . . : %18.2f\n", HPL_w[HPL_TIMING_PFACT-HPL_TIMING_BEG] ); /* * Panel factorization (swap) */ if( HPL_w[HPL_TIMING_MXSWP-HPL_TIMING_BEG] > HPL_rzero ) HPL_fprintf( TEST->outfp, "+ Max aggregated wall time mxswp . . : %18.2f\n", HPL_w[HPL_TIMING_MXSWP-HPL_TIMING_BEG] ); /* * Update */ if( HPL_w[HPL_TIMING_UPDATE-HPL_TIMING_BEG] > HPL_rzero ) HPL_fprintf( TEST->outfp, "Max aggregated wall time update . . : %18.2f\n", HPL_w[HPL_TIMING_UPDATE-HPL_TIMING_BEG] ); /* * Update (swap) */ if( HPL_w[HPL_TIMING_LASWP-HPL_TIMING_BEG] > HPL_rzero ) HPL_fprintf( TEST->outfp, "+ Max aggregated wall time laswp . . : %18.2f\n", HPL_w[HPL_TIMING_LASWP-HPL_TIMING_BEG] ); /* * Upper triangular system solve */ if( HPL_w[HPL_TIMING_PTRSV-HPL_TIMING_BEG] > HPL_rzero ) HPL_fprintf( TEST->outfp, "Max aggregated wall time up tr sv . : %18.2f\n", HPL_w[HPL_TIMING_PTRSV-HPL_TIMING_BEG] ); if( TEST->thrsh <= HPL_rzero ) HPL_fprintf( TEST->outfp, "%s%s\n", "======================================", "======================================" ); } #endif /* * Quick return, if I am not interested in checking the computations */ if( TEST->thrsh <= HPL_rzero ) { (TEST->kpass)++; if( vptr ) HPCC_free( vptr ); return; } /* * Check info returned by solve */ if( mat.info != 0 ) { if( ( myrow == 0 ) && ( mycol == 0 ) ) HPL_pwarn( TEST->outfp, __LINE__, "HPL_pdtest", "%s %d, %s", "Error code returned by solve is", mat.info, "skip" ); (TEST->kskip)++; if( vptr ) HPCC_free( vptr ); return; } /* * Check computation, re-generate [ A | b ], compute norm 1 and inf of A and x, * and norm inf of b - A x. Display residual checks. */ HPL_pdmatgen( GRID, N, N+1, NB, mat.A, mat.ld, HPL_ISEED ); rdata->Anorm1 = Anorm1 = HPL_pdlange( GRID, HPL_NORM_1, N, N, NB, mat.A, mat.ld ); rdata->AnormI = AnormI = HPL_pdlange( GRID, HPL_NORM_I, N, N, NB, mat.A, mat.ld ); /* * Because x is distributed in process rows, switch the norms */ rdata->XnormI = XnormI = HPL_pdlange( GRID, HPL_NORM_1, 1, N, NB, mat.X, 1 ); rdata->Xnorm1 = Xnorm1 = HPL_pdlange( GRID, HPL_NORM_I, 1, N, NB, mat.X, 1 ); /* * If I own b, compute ( b - A x ) and ( - A x ) otherwise */ Bptr = mat.A + mat.ld * nq; if( mycol == HPL_indxg2p( N, NB, NB, 0, npcol ) ) { HPL_dgemv( HplColumnMajor, HplNoTrans, mat.mp, nq, -HPL_rone, mat.A, mat.ld, mat.X, 1, HPL_rone, Bptr, 1 ); } else if( nq > 0 ) { HPL_dgemv( HplColumnMajor, HplNoTrans, mat.mp, nq, -HPL_rone, mat.A, mat.ld, mat.X, 1, HPL_rzero, Bptr, 1 ); } else { for( ii = 0; ii < mat.mp; ii++ ) Bptr[ii] = HPL_rzero; } /* * Reduce the distributed residual in process column 0 */ if( mat.mp > 0 ) (void) HPL_reduce( Bptr, mat.mp, HPL_DOUBLE, HPL_sum, 0, GRID->row_comm ); /* * Compute || b - A x ||_oo */ rdata->RnormI = resid0 = HPL_pdlange( GRID, HPL_NORM_I, N, 1, NB, Bptr, mat.ld ); /* * Computes and displays norms, residuals ... */ if( ( Anorm1 == HPL_rzero ) || ( AnormI == HPL_rzero ) || ( Xnorm1 == HPL_rzero ) || ( Xnorm1 == HPL_rzero ) || ( N <= 0 ) ) { resid1 = resid2 = resid3 = HPL_rzero; } else { resid1 = resid0 / ( TEST->epsil * Anorm1 * (double)(N) ); resid2 = resid0 / ( TEST->epsil * Anorm1 * Xnorm1 ); resid3 = resid0 / ( TEST->epsil * AnormI * XnormI * (double)(N) ); } if( ( Mmax( resid1, resid2 ) < TEST->thrsh ) && ( resid3 < TEST->thrsh ) ) (TEST->kpass)++; else (TEST->kfail)++; if( ( myrow == 0 ) && ( mycol == 0 ) ) { HPL_fprintf( TEST->outfp, "%s%s\n", "--------------------------------------", "--------------------------------------" ); HPL_fprintf( TEST->outfp, "%s%16.7f%s%s\n", "||Ax-b||_oo / ( eps * ||A||_1 * N ) = ", resid1, " ...... ", ( resid1 < TEST->thrsh ? "PASSED" : "FAILED" ) ); HPL_fprintf( TEST->outfp, "%s%16.7f%s%s\n", "||Ax-b||_oo / ( eps * ||A||_1 * ||x||_1 ) = ", resid2, " ...... ", ( resid2 < TEST->thrsh ? "PASSED" : "FAILED" ) ); HPL_fprintf( TEST->outfp, "%s%16.7f%s%s\n", "||Ax-b||_oo / ( eps * ||A||_oo * ||x||_oo * N ) = ", resid3, " ...... ", ( resid3 < TEST->thrsh ? "PASSED" : "FAILED" ) ); if( ( resid1 >= TEST->thrsh ) || ( resid2 >= TEST->thrsh ) || ( resid3 >= TEST->thrsh ) ) { HPL_fprintf( TEST->outfp, "%s%18.6f\n", "||Ax-b||_oo . . . . . . . . . . . . . . . . . = ", resid0 ); HPL_fprintf( TEST->outfp, "%s%18.6f\n", "||A||_oo . . . . . . . . . . . . . . . . . . . = ", AnormI ); HPL_fprintf( TEST->outfp, "%s%18.6f\n", "||A||_1 . . . . . . . . . . . . . . . . . . . = ", Anorm1 ); HPL_fprintf( TEST->outfp, "%s%18.6f\n", "||x||_oo . . . . . . . . . . . . . . . . . . . = ", XnormI ); HPL_fprintf( TEST->outfp, "%s%18.6f\n", "||x||_1 . . . . . . . . . . . . . . . . . . . = ", Xnorm1 ); } } if( vptr ) HPCC_free( vptr ); /* * End of HPL_pdtest */ } --- NEW FILE: HPL_pddriver.c --- /* * -- High Performance Computing Linpack Benchmark (HPL) * HPL - 1.0a - January 20, 2004 * Antoine P. Petitet * University of Tennessee, Knoxville * Innovative Computing Laboratories * (C) Copyright 2000-2004 All Rights Reserved * * -- Copyright notice and Licensing terms: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions, and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * 3. All advertising materials mentioning features or use of this * software must display the following acknowledgement: * This product includes software developed at the University of * Tennessee, Knoxville, Innovative Computing Laboratories. * * 4. The name of the University, the name of the Laboratory, or the * names of its contributors may not be used to endorse or promote * products derived from this software without specific written * permission. * * -- Disclaimer: * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * --------------------------------------------------------------------- */ /* * Include files */ #include "hpl.h" #ifdef HPL_STDC_HEADERS int HPL_main ( int ARGC, char * * ARGV, HPL_RuntimeData * rdata, int *failure ) #else int HPL_main( ARGC, ARGV, rdata, failure ) /* * .. Scalar Arguments .. */ int ARGC; /* * .. Array Arguments .. */ char * * ARGV; HPL_RuntimeData * rdata; int *failure; #endif { /* * Purpose * ======= * * main is the main driver program for testing the HPL routines. * This program is driven by a short data file named "HPL.dat". * * --------------------------------------------------------------------- */ /* * .. Local Variables .. */ int nval [HPL_MAX_PARAM], nbval [HPL_MAX_PARAM], pval [HPL_MAX_PARAM], qval [HPL_MAX_PARAM], nbmval[HPL_MAX_PARAM], ndvval[HPL_MAX_PARAM], ndhval[HPL_MAX_PARAM]; HPL_T_FACT pfaval[HPL_MAX_PARAM], rfaval[HPL_MAX_PARAM]; HPL_T_TOP topval[HPL_MAX_PARAM]; HPL_T_grid grid; HPL_T_palg algo; HPL_T_test test; int L1notran, Unotran, align, equil, in, inb, inbm, indh, indv, ipfa, ipq, irfa, itop, mycol, myrow, ns, nbs, nbms, ndhs, ndvs, npcol, npfs, npqs, nprow, nrfs, ntps, rank, size, tswap; HPL_T_ORDER pmapping; HPL_T_FACT rpfa; HPL_T_SWAP fswap; HPL_RuntimeData rdataCur; /* .. * .. Executable Statements .. */ /* MPI_Init( &ARGC, &ARGV ); */ #ifdef HPL_CALL_VSIPL vsip_init((void*)0); #endif MPI_Comm_rank( MPI_COMM_WORLD, &rank ); MPI_Comm_size( MPI_COMM_WORLD, &size ); /* * Read and check validity of test parameters from input file * * HPL Version 1.0, Linpack benchmark input file * Your message here * HPL.out output file name (if any) * 6 device out (6=stdout,7=stderr,file) * 4 # of problems sizes (N) * 29 30 34 35 Ns * 4 # of NBs * 1 2 3 4 NBs * 0 PMAP process mapping (0=Row-,1=Column-major) * 3 # of process grids (P x Q) * 2 1 4 Ps * 2 4 1 Qs * 16.0 threshold * 3 # of panel fact * 0 1 2 PFACTs (0=left, 1=Crout, 2=Right) * 2 # of recursive stopping criterium * 2 4 NBMINs (>= 1) * 1 # of panels in recursion * 2 NDIVs * 3 # of recursive panel fact. * 0 1 2 RFACTs (0=left, 1=Crout, 2=Right) * 1 # of broadcast * 0 BCASTs (0=1rg,1=1rM,2=2rg,3=2rM,4=Lng,5=LnM) * 1 # of lookahead depth * 0 DEPTHs (>=0) * 2 SWAP (0=bin-exch,1=long,2=mix) * 4 swapping threshold * 0 L1 in (0=transposed,1=no-transposed) form * 0 U in (0=transposed,1=no-transposed) form * 1 Equilibration (0=no,1=yes) * 8 memory alignment in double (> 0) */ HPL_pdinfo( &test, &ns, nval, &nbs, nbval, &pmapping, &npqs, pval, qval, &npfs, pfaval, &nbms, nbmval, &ndvs, ndvval, &nrfs, rfaval, &ntps, topval, &ndhs, ndhval, &fswap, &tswap, &L1notran, &Unotran, &equil, &align ); /* * Loop over different process grids - Define process grid. Go to bottom * of process grid loop if this case does not use my process. */ for( ipq = 0; ipq < npqs; ipq++ ) { (void) HPL_grid_init( MPI_COMM_WORLD, pmapping, pval[ipq], qval[ipq], &grid ); (void) HPL_grid_info( &grid, &nprow, &npcol, &myrow, &mycol ); if( ( myrow < 0 ) || ( myrow >= nprow ) || ( mycol < 0 ) || ( mycol >= npcol ) ) goto label_end_of_npqs; for( in = 0; in < ns; in++ ) { /* Loop over various problem sizes */ for( inb = 0; inb < nbs; inb++ ) { /* Loop over various blocking factors */ for( indh = 0; indh < ndhs; indh++ ) { /* Loop over various lookahead depths */ for( itop = 0; itop < ntps; itop++ ) { /* Loop over various broadcast topologies */ for( irfa = 0; irfa < nrfs; irfa++ ) { /* Loop over various recursive factorizations */ for( ipfa = 0; ipfa < npfs; ipfa++ ) { /* Loop over various panel factorizations */ for( inbm = 0; inbm < nbms; inbm++ ) { /* Loop over various recursive stopping criteria */ for( indv = 0; indv < ndvs; indv++ ) { /* Loop over various # of panels in recursion */ /* * Set up the algorithm parameters */ algo.btopo = topval[itop]; algo.depth = ndhval[indh]; algo.nbmin = nbmval[inbm]; algo.nbdiv = ndvval[indv]; algo.pfact = rpfa = pfaval[ipfa]; if( L1notran != 0 ) { if( rpfa == HPL_LEFT_LOOKING ) algo.pffun = HPL_pdpanllN; else if( rpfa == HPL_CROUT ) algo.pffun = HPL_pdpancrN; else algo.pffun = HPL_pdpanrlN; algo.rfact = rpfa = rfaval[irfa]; if( rpfa == HPL_LEFT_LOOKING ) algo.rffun = HPL_pdrpanllN; else if( rpfa == HPL_CROUT ) algo.rffun = HPL_pdrpancrN; else algo.rffun = HPL_pdrpanrlN; if( Unotran != 0 ) algo.upfun = HPL_pdupdateNN; else algo.upfun = HPL_pdupdateNT; } else { if( rpfa == HPL_LEFT_LOOKING ) algo.pffun = HPL_pdpanllT; else if( rpfa == HPL_CROUT ) algo.pffun = HPL_pdpancrT; else algo.pffun = HPL_pdpanrlT; algo.rfact = rpfa = rfaval[irfa]; if( rpfa == HPL_LEFT_LOOKING ) algo.rffun = HPL_pdrpanllT; else if( rpfa == HPL_CROUT ) algo.rffun = HPL_pdrpancrT; else algo.rffun = HPL_pdrpanrlT; if( Unotran != 0 ) algo.upfun = HPL_pdupdateTN; else algo.upfun = HPL_pdupdateTT; } algo.fswap = fswap; algo.fsthr = tswap; algo.equil = equil; algo.align = align; HPL_pdtest( &test, &grid, &algo, nval[in], nbval[inb], &rdataCur ); if (0 == myrow && 0 == mycol) if (rdata->Gflops < rdataCur.Gflops) *rdata = rdataCur; } } } } } } } } (void) HPL_grid_exit( &grid ); label_end_of_npqs: ; } /* * Print ending messages, close output file, exit. */ if( rank == 0 ) { if (test.kfail || test.kskip) *failure = 1; test.ktest = test.kpass + test.kfail + test.kskip; #ifndef HPL_DETAILED_TIMING HPL_fprintf( test.outfp, "%s%s\n", "======================================", "======================================" ); #else if( test.thrsh > HPL_rzero ) HPL_fprintf( test.outfp, "%s%s\n", "======================================", "======================================" ); #endif HPL_fprintf( test.outfp, "\n%s %6d %s\n", "Finished", test.ktest, "tests with the following results:" ); if( test.thrsh > HPL_rzero ) { HPL_fprintf( test.outfp, " %6d %s\n", test.kpass, "tests completed and passed residual checks," ); HPL_fprintf( test.outfp, " %6d %s\n", test.kfail, "tests completed and failed residual checks," ); HPL_fprintf( test.outfp, " %6d %s\n", test.kskip, "tests skipped because of illegal input values." ); } else { HPL_fprintf( test.outfp, " %6d %s\n", test.kpass, "tests completed without checking," ); HPL_fprintf( test.outfp, " %6d %s\n", test.kskip, "tests skipped because of illegal input values." ); } HPL_fprintf( test.outfp, "%s%s\n", "--------------------------------------", "--------------------------------------" ); HPL_fprintf( test.outfp, "\nEnd of Tests.\n" ); HPL_fprintf( test.outfp, "%s%s\n", "======================================", "======================================" ); if( ( test.outfp != stdout ) && ( test.outfp != stderr ) ) (void) fclose( test.outfp ); } #ifdef HPL_CALL_VSIPL vsip_finalize((void*)0); #endif /* MPI_Finalize(); */ /* exit( 0 ); */ return( 0 ); /* * End of main */ } |