Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Energy, onHostDestruction: ensured ptr existence
[simgrid.git] / examples / smpi / NAS / common / c_print_results.c
1 /*****************************************************************/
2 /******     C  _  P  R  I  N  T  _  R  E  S  U  L  T  S     ******/
3 /*****************************************************************/
4 #include <stdlib.h>
5 #include <stdio.h>
6
7 void c_print_results( char   *name,
8                       char   class,
9                       int    n1, 
10                       int    n2,
11                       int    n3,
12                       int    niter,
13                       int    nprocs_compiled,
14                       int    nprocs_total,
15                       double t,
16                       double mops,
17           char   *optype,
18                       int    passed_verification,
19                       char   *npbversion,
20                       char   *compiletime,
21                       char   *mpicc,
22                       char   *clink,
23                       char   *cmpi_lib,
24                       char   *cmpi_inc,
25                       char   *cflags,
26                       char   *clinkflags )
27 {
28     char *evalue="1000";
29
30     printf( "\n\n %s Benchmark Completed\n", name ); 
31
32     printf( " Class           =                        %c\n", class );
33
34     if( n3 == 0 ) {
35         long nn = n1;
36         if ( n2 != 0 ) nn *= n2;
37         printf( " Size            =             %12ld\n", nn );   /* as in IS */
38     }
39     else
40         printf( " Size            =              %3dx %3dx %3d\n", n1,n2,n3 );
41
42     printf( " Iterations      =             %12d\n", niter );
43  
44     printf( " Time in seconds =             %12.2f\n", t );
45
46     printf( " Total processes =             %12d\n", nprocs_total );
47
48     if ( nprocs_compiled != 0 )
49         printf( " Compiled procs  =             %12d\n", nprocs_compiled );
50
51     printf( " Mop/s total     =             %12.2f\n", mops );
52
53     printf( " Mop/s/process   =             %12.2f\n", mops/((float) nprocs_total) );
54
55     printf( " Operation type  = %24s\n", optype);
56
57     if( passed_verification )
58         printf( " Verification    =               SUCCESSFUL\n" );
59     else
60         printf( " Verification    =             UNSUCCESSFUL\n" );
61
62     printf( " Version         =             %12s\n", npbversion );
63
64     printf( " Compile date    =             %12s\n", compiletime );
65
66     printf( "\n Compile options:\n" );
67
68     printf( "    MPICC        = %s\n", mpicc );
69
70     printf( "    CLINK        = %s\n", clink );
71
72     printf( "    CMPI_LIB     = %s\n", cmpi_lib );
73
74     printf( "    CMPI_INC     = %s\n", cmpi_inc );
75
76     printf( "    CFLAGS       = %s\n", cflags );
77
78     printf( "    CLINKFLAGS   = %s\n", clinkflags );
79 #ifdef SMP
80     evalue = getenv("MP_SET_NUMTHREADS");
81     printf( "   MULTICPUS = %s\n", evalue );
82 #endif
83
84     printf( "\n\n" );
85     printf( " Please send the results of this run to:\n\n" );
86     printf( " NPB Development Team\n" );
87     printf( " Internet: npb@nas.nasa.gov\n \n" );
88     printf( " If email is not available, send this to:\n\n" );
89     printf( " MS T27A-1\n" );
90     printf( " NASA Ames Research Center\n" );
91     printf( " Moffett Field, CA  94035-1000\n\n" );
92     printf( " Fax: 650-604-3957\n\n" );
93 }
94