68 #include <papiStdEventDefs.h> 80 if ((*
is_init)() == PAPI_NOT_INITED) {
95 papi_version = (*init)(PAPI_VER_CURRENT);
96 if (papi_version != PAPI_VER_CURRENT) {
97 fprintf(stderr,
"(pid %d): PAPI library initialization failure - expected version %d, dynamic library was version %d. Aborting.\n", getpid(), PAPI_VER_CURRENT, papi_version);
101 if (papi_version < 3) {
102 fprintf(stderr,
"(pid %d): Using PAPI library version %d; expecting version 3 or greater.\n", getpid(), papi_version);
111 { PAPI_PROFIL_POSIX,
"PAPI_PROFIL_POSIX" },
112 { PAPI_PROFIL_RANDOM,
"PAPI_PROFIL_RANDOM" },
113 { PAPI_PROFIL_WEIGHTED,
"PAPI_PROFIL_WEIGHTED" },
114 { PAPI_PROFIL_COMPRESS,
"PAPI_PROFIL_COMPRESS" },
119 { PAPI_PROFIL_FORCE_SW,
"PAPI_PROFIL_FORCE_SW" },
120 { PAPI_PROFIL_DATA_EAR,
"PAPI_PROFIL_DATA_EAR" },
121 { PAPI_PROFIL_INST_EAR,
"PAPI_PROFIL_INST_EAR" },
130 if (strcmp(name, i->
name) == 0)
return i;
143 fprintf(stderr,
"{ hpcpapi_profile_desc_vec_t: %d\n", descvec->
size);
144 for (i = 0; i < descvec->
size; ++i) {
147 fprintf(stderr,
"}\n");
155 const char* pre = (
prefix) ? prefix :
" ";
157 fprintf(stderr,
"%s{ %s (%s) : %"PRIu64
" : %d entries\n", pre,
165 fprintf(stderr,
"%s}\n", pre);
173 PAPI_sprofil_t* sprof = &(desc->
sprofs[idx]);
174 uint64_t ncounters = (sprof->pr_size / desc->
bytesPerCntr);
175 const char* pre = (
prefix) ? prefix :
" ";
176 fprintf(stderr,
"%s[%d](%p): buf %p of size %"PRIu64
" for module at %p\n",
177 pre, idx, sprof, sprof->pr_base, ncounters, sprof->pr_off);
int hpc_init_papi(int(*is_init)(void), int(*init)(int))
const hpcpapi_flagdesc_t * hpcpapi_flag_by_name(const char *name)
void dump_hpcpapi_profile_desc_vec(hpcpapi_profile_desc_vec_t *descvec)
void dump_hpcpapi_profile_desc(hpcpapi_profile_desc_t *desc, const char *prefix)
unsigned int bytesPerCntr
int hpc_init_papi_force(int(*init)(int))
hpcpapi_profile_desc_t * vec
static hpcpapi_flagdesc_t papi_flags[]
void dump_hpcpapi_profile_desc_buf(hpcpapi_profile_desc_t *desc, int idx, const char *prefix)