[Patch] Linpack-pc broken as a performance benchmark
Hal Finkel
hfinkel at anl.gov
Wed Oct 30 14:13:03 PDT 2013
----- Original Message -----
> Hi all,
>
> SingleSource/Benchmark/Linpack is broken as a performance benchmark.
> It uses the time to execute a set of functions to determine the time
> to run another set of functions.
>
> {
> time1 = second();
> pass = pass + 1;
> for ( i = 0 ; i < ntimes ; i++)
> {
> matgen(a,lda,n,b,&norma);
> dgefa(a,lda,n,ipvt,&info );
> }
> time2 = second() - time1;
> fprintf (stderr,"%10d times %6.2f seconds\n", ntimes,
> 0.0);
> if (0 /*time2 > 5.0*/)
> {
> pass = 0;
> }
> if (pass < 0)
> {
> if (0 /*time2 < 0.1*/)
> {
> ntimes = ntimes * 10;
> }
> else
> {
> ntimes = ntimes * 2;
> }
> }
> }
> while (pass < 0);
>
> ntimes = 5.0 * (double)ntimes / time2; // <<< BAD
>
>
> Later it runs:
>
> for (j=1 ; j<6 ; j++)
> {
>
> t1 = second();
>
> for (i = 0; i < ntimes; i++) <<< !!!!
> {
> matgen(a,lda,n,b,&norma);
> dgefa(a,lda,n,ipvt,&info );
> }
>
> atime[0][j] = (second() - t1 - tm2)/ntimes;
>
> t1 = second();
>
> for (i = 0; i < ntimes; i++) <<< !!!!
> {
> dgesl(a,lda,n,ipvt,b,0);
> }
>
> atime[1][j] = (second() - t1)/ntimes;
> total = atime[0][j] + atime[1][j];
> atime[2][j] = total;
> atime[3][j] = ops/(1.0e6*total);
> atime[4][j] = 2.0/atime[3][j];
> atime[5][j] = total/cray;
> atime[3][6] = atime[3][6] + atime[3][j];
>
> print_time(j);
> }
>
>
> The attached patch fixes this by setting “ntimes” to arbitrary 10000.
> The benchmark then runs in about 30 secs on a recent mac.
30 seconds sounds good to me. However, some of the embedded folks may complain ;) -- We should probably have it depend on whether SMALL_PROBLEM_SIZE is in effect or not. (You can add a preprocessor define in the makefile when SMALL_PROBLEM_SIZE is defined, and let that set it to be a factor of 10 smaller).
-Hal
>
> This is going to cause a one time break in the performance numbers
> for this benchmark. But after that it can really be considered a
> “performance” benchmark.
>
> Okay to commit?
>
> Thanks,
> Arnold
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
--
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory
More information about the llvm-commits
mailing list