00001
00028 #ifndef __CPERFDMF_H__
00029 #define __CPERFDMF_H__
00030
00031
00032
00036 typedef struct cperfdmf_trial_t {
00038 int appId;
00040 int expId;
00042 int trialId;
00043 char *name;
00044 int numNodes;
00045 int numContextsPerNode;
00046 int numThreadsPerContext;
00047 int numMetrics;
00048 char *problemDefinition;
00049 char *time;
00050 char *userData;
00051 } cperfdmf_trial_t;
00052
00053
00057 typedef struct cperfdmf_experiment_t {
00058 int appId;
00059 char *compilerCcName;
00060 char *compilerCcVersion;
00061 char *compilerCppName;
00062 char *compilerCppVersion;
00063 char *compilerJavaDirpath;
00064 char *compilerJavaVersion;
00065 char *compilerUserData;
00066 char *configArchitecture;
00067 char *configCc;
00068 char *configCpp;
00069 char *configJdk;
00070 char *configPrefix;
00071 char *configProfile;
00072 char *configUserData;
00073 int expId;
00074 char *name;
00075 char *systemArch;
00076 char *systemL1CacheSize;
00077 char *systemL2CacheSize;
00078 char *systemMachineType;
00079 char *systemMemorySize;
00080 char *systemName;
00081 char *systemOS;
00082 char *systemProcessorAmount;
00083 char *systemUserData;
00084 char *userData;
00085 } cperfdmf_experiment_t;
00086
00087
00091 typedef struct cperfdmf_application_t {
00092 char *name;
00093 int appId;
00094 char *language;
00095 char *paraDiag;
00096 char *usage;
00097 char *execOptions;
00098 char *description;
00099 char *version;
00100
00101 } cperfdmf_application_t;
00102
00103
00107 typedef struct cperfdmf_profile_t {
00108 double exclusive;
00109 double exclusivePercent;
00110 double inclusive;
00111 double inclusivePerCall;
00112 double inclusivePercent;
00113 int numCalls;
00114 int numSubroutines;
00115 int *groups;
00116 int numGroups;
00117
00118
00119
00120
00121
00122
00123
00124 } cperfdmf_profile_t;
00125
00126
00130 typedef struct cperfdmf_userEvent_t {
00131 char* name;
00132 int numSamples;
00133 double maxValue;
00134 double minValue;
00135 double meanValue;
00136 double sumSquared;
00137 } cperfdmf_userEvent_t;
00138
00139
00146 typedef enum {
00147 CPERFDMF_OK = 0,
00148 CPERFDMF_ERR = -1,
00149 CPERFDMF_NON_EXISTENT = -2,
00150 CPERFDMF_ERR_NO_PROFILES = -3,
00151 CPERFDMF_ERR_INTERNAL_ERROR = -6,
00152 CPERFDMF_ERR_DB_NOT_INITIALIZED = -7,
00153 CPERFDMF_ERR_SESSION_NOT_INITIALIZED = -8,
00154 CPERFDMF_ERR_JAVA_EXCEPTION = -9
00155 } cperfdmf_error_t;
00156
00157
00158 #ifdef __cplusplus
00159 extern "C" {
00160 #endif
00161
00169 int cperfdmf_initialize();
00170
00175 void cperfdmf_finalize();
00176
00177
00178
00179
00184
00196 int cperfdmf_connectDB(char *configFile, char *password);
00197
00198
00211 int cperfdmf_getApplications(cperfdmf_application_t** applications, int* numApplications);
00212
00213
00228 int cperfdmf_getExperiments(cperfdmf_experiment_t** experiments, int* numExperiments, int applicationId);
00229
00230
00245 int cperfdmf_getTrials(cperfdmf_trial_t** trials, int *numTrials, int experimentId);
00246
00247
00258 int cperfdmf_loadTrial(int trialId);
00259
00260
00273 int cperfdmf_saveApplication(cperfdmf_application_t* application);
00274
00275
00276
00289 int cperfdmf_saveExperiment(cperfdmf_experiment_t* experiment);
00290
00291
00292
00303 int cperfdmf_saveTrial(cperfdmf_trial_t* trial);
00304
00305
00319 int cperfdmf_uploadTauOutput(int* trialId, char* path, int experimentId);
00320
00321
00332 int cperfdmf_deleteApplication(int applicationId);
00333
00344 int cperfdmf_deleteExperiment(int experimentId);
00345
00356 int cperfdmf_deleteTrial(int trialId);
00357
00358
00367 void cperfdmf_freeApplicationList(cperfdmf_application_t* applications, int numApplications);
00368
00369
00378 void cperfdmf_freeExperimentList(cperfdmf_experiment_t* experiments, int numExperiments);
00379
00380
00389 void cperfdmf_freeTrialList(cperfdmf_trial_t* trials, int numTrials);
00390
00392
00393
00404 int cperfdmf_loadTauOutput(char *path);
00405
00406
00420 int cperfdmf_getMetrics(char*** metrics, int* numMetrics);
00421
00422
00436 int cperfdmf_getFunctions(char*** functions, int* numFunctions);
00437
00438
00450 int cperfdmf_getNumNodes(int* numNodes);
00451
00452
00465 int cperfdmf_getNumContexts(int* numContexts, int node);
00466
00467
00481 int cperfdmf_getNumThreads(int* numThreads, int node, int context);
00482
00483
00497 int cperfdmf_getMeanValues(cperfdmf_profile_t *prof, int functionId, int metric);
00498
00512 int cperfdmf_getTotalValues(cperfdmf_profile_t* prof, int functionId, int metric);
00513
00530 int cperfdmf_getValues(cperfdmf_profile_t* prof, int functionId, int metric, int node, int context, int thread);
00531
00532
00533
00534
00546 int cperfdmf_queryNodeExists(int* exists, int node);
00547
00548
00561 int cperfdmf_queryContextExists(int* exists, int node, int context);
00562
00563
00577 int cperfdmf_queryThreadExists(int* exists, int node, int context, int thread);
00578
00579
00593 int cperfdmf_getGroups(char*** groups, int* numGroups);
00594
00595
00611 int cperfdmf_getUserEvents(cperfdmf_userEvent_t **userEvents, int *numUserEvents, int node, int context, int thread);
00612
00613
00620 char *cperfdmf_getExtendedError(void);
00621
00622
00631 char *cperfdmf_errToString(int code);
00632
00633
00634
00635 #ifdef __cplusplus
00636 }
00637 #endif
00638
00639
00640
00641 #endif