c_print_results.c 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. /*****************************************************************/
  2. /****** C _ P R I N T _ R E S U L T S ******/
  3. /*****************************************************************/
  4. //
  5. // Copyright 2010 Intel Corporation
  6. //
  7. // Licensed under the Apache License, Version 2.0 (the "License");
  8. // you may not use this file except in compliance with the License.
  9. // You may obtain a copy of the License at
  10. //
  11. // http://www.apache.org/licenses/LICENSE-2.0
  12. //
  13. // Unless required by applicable law or agreed to in writing, software
  14. // distributed under the License is distributed on an "AS IS" BASIS,
  15. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16. // See the License for the specific language governing permissions and
  17. // limitations under the License.
  18. //
  19. #include <stdlib.h>
  20. #include <stdio.h>
  21. void c_print_results( char *name,
  22. char class,
  23. int n1,
  24. int n2,
  25. int n3,
  26. int niter,
  27. int nprocs_compiled,
  28. int nprocs_total,
  29. double t,
  30. double mops,
  31. char *optype,
  32. int passed_verification,
  33. char *npbversion,
  34. char *compiletime,
  35. char *mpicc,
  36. char *clink,
  37. char *cmpi_lib,
  38. char *cmpi_inc,
  39. char *cflags,
  40. char *clinkflags )
  41. {
  42. char *evalue="1000";
  43. printf( "\n\n %s Benchmark Completed\n", name );
  44. printf( " Class = %c\n", class );
  45. if( n3 == 0 ) {
  46. long nn = n1;
  47. if ( n2 != 0 ) nn *= n2;
  48. printf( " Size = %12ld\n", nn ); /* as in IS */
  49. }
  50. else
  51. printf( " Size = %3dx %3dx %3d\n", n1,n2,n3 );
  52. printf( " Iterations = %12d\n", niter );
  53. printf( " Time in seconds = %12.2f\n", t );
  54. printf( " Total processes = %12d\n", nprocs_total );
  55. if ( nprocs_compiled != 0 )
  56. printf( " Compiled procs = %12d\n", nprocs_compiled );
  57. printf( " Mop/s total = %12.2f\n", mops );
  58. printf( " Mop/s/process = %12.2f\n", mops/((float) nprocs_total) );
  59. printf( " Operation type = %24s\n", optype);
  60. if( passed_verification )
  61. printf( " Verification = SUCCESSFUL\n" );
  62. else
  63. printf( " Verification = UNSUCCESSFUL\n" );
  64. printf( " Version = %12s\n", npbversion );
  65. printf( " Compile date = %12s\n", compiletime );
  66. printf( "\n Compile options:\n" );
  67. printf( " MPICC = %s\n", mpicc );
  68. printf( " CLINK = %s\n", clink );
  69. printf( " CMPI_LIB = %s\n", cmpi_lib );
  70. printf( " CMPI_INC = %s\n", cmpi_inc );
  71. printf( " CFLAGS = %s\n", cflags );
  72. printf( " CLINKFLAGS = %s\n", clinkflags );
  73. #ifdef SMP
  74. evalue = getenv("MP_SET_NUMTHREADS");
  75. printf( " MULTICPUS = %s\n", evalue );
  76. #endif
  77. printf( "\n\n" );
  78. printf( " Please send the results of this run to:\n\n" );
  79. printf( " NPB Development Team\n" );
  80. printf( " Internet: npb@nas.nasa.gov\n \n" );
  81. printf( " If email is not available, send this to:\n\n" );
  82. printf( " MS T27A-1\n" );
  83. printf( " NASA Ames Research Center\n" );
  84. printf( " Moffett Field, CA 94035-1000\n\n" );
  85. printf( " Fax: 650-604-3957\n\n" );
  86. }