source: trunk/sys/libupc/upc_c_print_results.c @ 426

Last change on this file since 426 was 1, checked in by alain, 7 years ago

First import

File size: 2.1 KB
Line 
1/* http://threads.hpcl.gwu.edu/sites/npb-upc/wiki */
2#include <stdlib.h>
3#include <stdio.h>
4
5void c_print_results( const char   *name,
6        const char   class,
7        int    n1,
8        int    n2,
9        int    n3,
10        int    niter,
11        int    nthreads,
12        double t,
13        double mops,
14        char   *optype,
15        int    passed_verification,
16        const char   *npbversion,
17        const char   *compiletime,
18        const char   *cc,
19        const char   *clink,
20        const char   *c_lib,
21        const char   *c_inc,
22        const char   *cflags,
23        const char   *clinkflags,
24        const char   *rand)
25{
26    char *evalue="1000";
27
28    printf( "\n\n %s Benchmark Completed\n", name );
29
30    printf( " Class           =                        %c\n", class );
31
32    if( n2 == 0 && n3 == 0 )
33        printf( " Size            =             %12d\n", n1 );   /* as in IS */
34    else
35        printf( " Size            =              %3dx%3dx%3d\n", n1,n2,n3 );
36
37    printf( " Iterations      =             %12d\n", niter );
38    printf( " Threads         =             %12d\n", nthreads );
39    printf( " Time in seconds =             %12.2f\n", t );
40    printf( " Mop/s total     =             %12.2f\n", mops );
41    printf( " Operation type  = %24s\n", optype);
42
43    if( passed_verification )
44        printf( " Verification    =               SUCCESSFUL\n" );
45    else
46        printf( " Verification    =             UNSUCCESSFUL\n" );
47
48    printf( " Version         =             %12s\n", npbversion );
49    printf( " Compile date    =             %12s\n", compiletime );
50    printf( "\n Compile options:\n" );
51    printf( "    CC           = %s\n", cc );
52    printf( "    CLINK        = %s\n", clink );
53    printf( "    C_LIB        = %s\n", c_lib );
54    printf( "    C_INC        = %s\n", c_inc );
55    printf( "    CFLAGS       = %s\n", cflags );
56    printf( "    CLINKFLAGS   = %s\n", clinkflags );
57    printf( "    RAND         = %s\n", rand );
58#ifdef SMP
59    evalue = getenv("MP_SET_NUMTHREADS");
60    printf( "   MULTICPUS = %s\n", evalue );
61#else
62    evalue = NULL;
63#endif
64}
65
Note: See TracBrowser for help on using the repository browser.