print_results.c 3.5 KB

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