30 #include "CombBLAS/CombBLAS.h" 48 #include "papi_combblas_global.h" 63 #define MAX_ITERS 20000 67 #define PERCENTS 4 // testing with 4 different percentiles 75 template <
typename PARMAT>
99 time_t mylatest =
static_cast<int64_t>(GlobalMT.
rand() * 10000);
117 void CheckPAPI(
int errorcode,
char [] errorstring)
119 if (errorcode != PAPI_OK)
121 PAPI_perror(errorcode, errorstring, PAPI_MAX_STR_LEN);
122 fprintf(stderr,
"PAPI error (%d): %s\n", errorcode, errorstring);
129 int main(
int argc,
char* argv[])
134 int provided, flag, claimed;
135 MPI_Init_thread(&argc, &argv, MPI_THREAD_FUNNELED, &provided );
136 MPI_Is_thread_main( &flag );
138 SpParHelper::Print(
"This thread called init_thread but Is_thread_main gave false\n");
139 MPI_Query_thread( &claimed );
140 if (claimed != provided)
141 SpParHelper::Print(
"Query thread gave different thread level than requested\n");
143 MPI_Init(&argc, &argv);
144 int cblas_splits = 1;
147 MPI_Comm_size(MPI_COMM_WORLD,&nprocs);
148 MPI_Comm_rank(MPI_COMM_WORLD,&myrank);
154 retval = PAPI_library_init(PAPI_VER_CURRENT);
155 if (retval != PAPI_VER_CURRENT && retval > 0)
157 fprintf(stderr,
"PAPI library version mismatch!\en");