hpl_ptest.h 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. /*
  2. * -- High Performance Computing Linpack Benchmark (HPL)
  3. * HPL - 2.0 - September 10, 2008
  4. * Antoine P. Petitet
  5. * University of Tennessee, Knoxville
  6. * Innovative Computing Laboratory
  7. * (C) Copyright 2000-2008 All Rights Reserved
  8. *
  9. * -- Copyright notice and Licensing terms:
  10. *
  11. * Redistribution and use in source and binary forms, with or without
  12. * modification, are permitted provided that the following conditions
  13. * are met:
  14. *
  15. * 1. Redistributions of source code must retain the above copyright
  16. * notice, this list of conditions and the following disclaimer.
  17. *
  18. * 2. Redistributions in binary form must reproduce the above copyright
  19. * notice, this list of conditions, and the following disclaimer in the
  20. * documentation and/or other materials provided with the distribution.
  21. *
  22. * 3. All advertising materials mentioning features or use of this
  23. * software must display the following acknowledgement:
  24. * This product includes software developed at the University of
  25. * Tennessee, Knoxville, Innovative Computing Laboratory.
  26. *
  27. * 4. The name of the University, the name of the Laboratory, or the
  28. * names of its contributors may not be used to endorse or promote
  29. * products derived from this software without specific written
  30. * permission.
  31. *
  32. * -- Disclaimer:
  33. *
  34. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  35. * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  36. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  37. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY
  38. * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  39. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  40. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  41. * DATA OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  42. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  43. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  44. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  45. */
  46. #ifndef HPL_PTEST_H
  47. #define HPL_PTEST_H
  48. /*
  49. * ---------------------------------------------------------------------
  50. * Include files
  51. * ---------------------------------------------------------------------
  52. */
  53. #include "hpl_misc.h"
  54. #include "hpl_blas.h"
  55. #include "hpl_auxil.h"
  56. #include "hpl_gesv.h"
  57. #include "hpl_pmisc.h"
  58. #include "hpl_pauxil.h"
  59. #include "hpl_panel.h"
  60. #include "hpl_pgesv.h"
  61. #include "hpl_ptimer.h"
  62. #include "hpl_pmatgen.h"
  63. /*
  64. * ---------------------------------------------------------------------
  65. * Data Structures
  66. * ---------------------------------------------------------------------
  67. */
  68. typedef struct HPL_S_test
  69. {
  70. double epsil; /* epsilon machine */
  71. double thrsh; /* threshold */
  72. FILE * outfp; /* output stream (only in proc 0) */
  73. int kfail; /* # of tests failed */
  74. int kpass; /* # of tests passed */
  75. int kskip; /* # of tests skipped */
  76. int ktest; /* total number of tests */
  77. } HPL_T_test;
  78. /*
  79. * ---------------------------------------------------------------------
  80. * #define macro constants for testing only
  81. * ---------------------------------------------------------------------
  82. */
  83. #define HPL_LINE_MAX 256
  84. #define HPL_MAX_PARAM 20
  85. #define HPL_ISEED 100
  86. /*
  87. * ---------------------------------------------------------------------
  88. * global timers for timing analysis only
  89. * ---------------------------------------------------------------------
  90. */
  91. #ifdef HPL_DETAILED_TIMING
  92. #define HPL_TIMING_BEG 11 /* timer 0 reserved, used by main */
  93. #define HPL_TIMING_N 6 /* number of timers defined below */
  94. #define HPL_TIMING_RPFACT 11 /* starting from here, contiguous */
  95. #define HPL_TIMING_PFACT 12
  96. #define HPL_TIMING_MXSWP 13
  97. #define HPL_TIMING_UPDATE 14
  98. #define HPL_TIMING_LASWP 15
  99. #define HPL_TIMING_PTRSV 16
  100. #endif
  101. /*
  102. * ---------------------------------------------------------------------
  103. * Function prototypes
  104. * ---------------------------------------------------------------------
  105. */
  106. void HPL_pdinfo
  107. STDC_ARGS( (
  108. HPL_T_test *,
  109. int *,
  110. int *,
  111. int *,
  112. int *,
  113. HPL_T_ORDER *,
  114. int *,
  115. int *,
  116. int *,
  117. int *,
  118. HPL_T_FACT *,
  119. int *,
  120. int *,
  121. int *,
  122. int *,
  123. int *,
  124. HPL_T_FACT *,
  125. int *,
  126. HPL_T_TOP *,
  127. int *,
  128. int *,
  129. HPL_T_SWAP *,
  130. int *,
  131. int *,
  132. int *,
  133. int *,
  134. int *
  135. ) );
  136. void HPL_pdtest
  137. STDC_ARGS( (
  138. HPL_T_test *,
  139. HPL_T_grid *,
  140. HPL_T_palg *,
  141. const int,
  142. const int
  143. ) );
  144. #endif
  145. /*
  146. * End of hpl_ptest.h
  147. */