Skip to content
Snippets Groups Projects
Commit 0d9f3480 authored by Morris Jette's avatar Morris Jette
Browse files

Restore local enum declaration to header

This reverts commit 0f7b0ba3 (Mon 16 May),
"select/cray: move local enum declaration back into function" since the
emulation code depends on it.
02_Cray_BUG-Fix-basil_geometry-column-names.diff from Gerrit Renker, CSCS
parent 410f5abb
No related branches found
No related tags found
No related merge requests found
......@@ -521,6 +521,27 @@ void cray_close_sdb(MYSQL *handle);
/** Find out interconnect chip: Gemini (XE) or SeaStar (XT) */
extern int cray_is_gemini_system(MYSQL *handle);
/*
* Column positions used by basil_geometry() and fetch_stmt() in
* libemulate.
*/
enum query_columns {
/* integer data */
COL_X, /* X coordinate */
COL_Y, /* Y coordinate */
COL_Z, /* Z coordinate */
COL_CAB, /* cabinet position */
COL_ROW, /* row position */
COL_CAGE, /* cage number (0..2) */
COL_SLOT, /* slot number (0..7) */
COL_CPU, /* node number (0..3) */
COL_CORES, /* number of cores per node */
COL_MEMORY, /* rounded-down memory in MB */
/* string data */
COL_TYPE, /* {service, compute } */
COLUMN_COUNT /* sentinel */
};
#endif /* HAVE_CRAY */
......
......@@ -327,23 +327,7 @@ extern int basil_geometry(struct node_record *node_ptr_array, int node_cnt)
"WHERE processor_id = ? ";
const int PARAM_COUNT = 1; /* node id */
MYSQL_BIND params[PARAM_COUNT];
/* Output parameters */
enum query_columns {
/* integer data */
COL_X, /* X coordinate */
COL_Y, /* Y coordinate */
COL_Z, /* Z coordinate */
COL_CAB, /* cabinet position */
COL_ROW, /* row position */
COL_CAGE, /* cage number (0..2) */
COL_SLOT, /* slot number (0..7) */
COL_CPU, /* node number (0..3) */
COL_CORES, /* number of cores per node */
COL_MEMORY, /* rounded-down memory in MB */
/* string data */
COL_TYPE, /* {service, compute} */
COLUMN_COUNT /* sentinel */
};
int x_coord, y_coord, z_coord;
int cab, row, cage, slot, cpu;
unsigned int node_cpus, node_mem;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment