1
1

Cleanup some bitrot from moving the db framework to opal and from the new mca param system

This commit was SVN r28741.
Этот коммит содержится в:
Ralph Castain 2013-07-09 14:37:08 +00:00
родитель 9366fda374
Коммит 028f5ee7a6
6 изменённых файлов: 27 добавлений и 32 удалений

Просмотреть файл

@ -27,6 +27,7 @@
#include <sqlite3.h>
#include "opal/dss/dss_types.h"
#include "opal/util/argv.h"
#include "opal/util/basename.h"
#include "opal/util/os_dirpath.h"
#include "opal/util/os_path.h"
@ -36,7 +37,6 @@
#include "opal/mca/pstat/base/base.h"
#include "opal/util/show_help.h"
#include "opal/runtime/opal_globals.h"
#include "opal/mca/db/base/base.h"
#include "db_sqlite.h"
@ -119,8 +119,7 @@ static int add_log(const char *table,
sqlite3_stmt *stmt;
opal_output_verbose(2, opal_db_base_framework.framework_output,
"%s Logging data for table %s",
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), table);
"Logging data for table %s", table);
/* setup the insert statement */
for (i=0; i < nkvs; i++) {
@ -177,7 +176,8 @@ static int add_log(const char *table,
if (SQLITE_OK != rc) {
return OPAL_ERROR;
}
opal_output(0, "%s INSERTED ROW %d", OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), (int)sqlite3_last_insert_rowid(dbhandles[active]));
opal_output_verbose(2, opal_db_base_framework.framework_output,
"INSERTED ROW %d", (int)sqlite3_last_insert_rowid(dbhandles[active]));
/* cycle to the next worker thread */
active++;

Просмотреть файл

@ -28,8 +28,7 @@ OPAL_DECLSPEC extern opal_db_base_module_t opal_db_sqlite_module;
{ \
*(r) = sqlite3_ ## f; \
if (*(r) != SQLITE_OK) { \
opal_output(0, "%s: %s failed with status %d: %s", \
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), \
opal_output(0, "%s failed with status %d: %s", \
#f, *(r), sqlite3_errmsg(db)); \
} \
} \
@ -38,8 +37,7 @@ OPAL_DECLSPEC extern opal_db_base_module_t opal_db_sqlite_module;
{ \
*(r) = sqlite3_ ## f; \
if (*(r) != SQLITE_ ## x) { \
opal_output(0, "%s: %s failed with status %d: %s", \
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), \
opal_output(0, "%s failed with status %d: %s", \
#f, *(r), sqlite3_errmsg(db)); \
} \
} \

Просмотреть файл

@ -90,7 +90,7 @@ static int sqlite_component_query(opal_db_base_module_t **module,
*module = NULL;
return OPAL_ERROR;
}
*module = (mca_base_module_t*)&opal_db_sqlite_module;
*module = &opal_db_sqlite_module;
return OPAL_SUCCESS;
}
@ -101,7 +101,7 @@ static int sqlite_component_query(opal_db_base_module_t **module,
static int sqlite_component_close(void)
{
return ORTE_SUCCESS;
return OPAL_SUCCESS;
}
static int sqlite_component_register(void)
@ -124,6 +124,6 @@ static int sqlite_component_register(void)
MCA_BASE_VAR_SCOPE_READONLY,
&mca_db_sqlite_component.num_worker_threads);
return ORTE_SUCCESS;
return OPAL_SUCCESS;
}

Просмотреть файл

@ -55,7 +55,6 @@ orte_sensor_file_component_t mca_sensor_file_component = {
static int orte_sensor_file_register (void)
{
mca_base_component_t *c = &mca_sensor_file_component.super.base_version;
int tmp;
/* lookup parameters */
mca_sensor_file_component.file = NULL;

Просмотреть файл

@ -60,25 +60,25 @@ static int orte_sensor_ft_tester_register (void)
mca_base_component_t *c = &mca_sensor_ft_tester_component.super.base_version;
fail_prob = NULL;
void) mca_base_var_register (c, "fail_prob", "Probability of killing a single executable",
MCA_BASE_VAR_TYPE_STRING, NULL, 0, 0,
OPAL_INFO_LVL_9,
MCA_BASE_VAR_SCOPE_READONLY,
&fail_prob);
(void) mca_base_component_var_register (c, "fail_prob", "Probability of killing a single executable",
MCA_BASE_VAR_TYPE_STRING, NULL, 0, 0,
OPAL_INFO_LVL_9,
MCA_BASE_VAR_SCOPE_READONLY,
&fail_prob);
mca_sensor_ft_tester_component.multi_fail = false;
(void) mca_base_var_register (c, "multi_allowed", "Allow multiple executables to be killed at one time",
MCA_BASE_VAR_TYPE_BOOL, NULL, 0, 0,
OPAL_INFO_LVL_9,
MCA_BASE_VAR_SCOPE_READONLY,
&mca_sensor_ft_tester_component.multi_fail);
(void) mca_base_component_var_register (c, "multi_allowed", "Allow multiple executables to be killed at one time",
MCA_BASE_VAR_TYPE_BOOL, NULL, 0, 0,
OPAL_INFO_LVL_9,
MCA_BASE_VAR_SCOPE_READONLY,
&mca_sensor_ft_tester_component.multi_fail);
daemon_fail_prob = NULL;
(void) mca_base_var_register (c, "daemon_fail_prob", "Probability of killing a daemon",
MCA_BASE_VAR_TYPE_STRING, NULL, 0, 0,
OPAL_INFO_LVL_9,
MCA_BASE_VAR_SCOPE_READONLY,
&daemon_fail_prob);
(void) mca_base_component_var_register (c, "daemon_fail_prob", "Probability of killing a daemon",
MCA_BASE_VAR_TYPE_STRING, NULL, 0, 0,
OPAL_INFO_LVL_9,
MCA_BASE_VAR_SCOPE_READONLY,
&daemon_fail_prob);
return ORTE_SUCCESS;
}

Просмотреть файл

@ -29,10 +29,10 @@
#include "opal/dss/dss.h"
#include "opal/util/output.h"
#include "opal/mca/pstat/pstat.h"
#include "opal/mca/db/db.h"
#include "orte/util/proc_info.h"
#include "orte/util/name_fns.h"
#include "orte/mca/db/db.h"
#include "orte/mca/errmgr/errmgr.h"
#include "orte/mca/odls/odls_types.h"
#include "orte/mca/odls/base/odls_private.h"
@ -281,8 +281,6 @@ static void res_log(opal_buffer_t *sample)
int rc, n, i;
opal_value_t kv[14];
char *node;
opal_diskstats_t *dk;
opal_netstats_t *ns;
if (!log_enabled) {
return;
@ -364,7 +362,7 @@ static void res_log(opal_buffer_t *sample)
kv[i++].data.fval = nst->la15;
/* store it */
if (ORTE_SUCCESS != (rc = orte_db.add_log("nodestats", kv, 12))) {
if (ORTE_SUCCESS != (rc = opal_db.add_log("nodestats", kv, 12))) {
/* don't bark about it - just quietly disable the log */
log_enabled = false;
}
@ -430,7 +428,7 @@ static void res_log(opal_buffer_t *sample)
kv[13].data.tv.tv_sec = st->sample_time.tv_sec;
kv[13].data.tv.tv_usec = st->sample_time.tv_usec;
/* store it */
if (ORTE_SUCCESS != (rc = orte_db.add_log("procstats", kv, 14))) {
if (ORTE_SUCCESS != (rc = opal_db.add_log("procstats", kv, 14))) {
log_enabled = false;
}
for (i=0; i < 14; i++) {