Skip to content
Snippets Groups Projects
Commit 643e24fb authored by Danny Auble's avatar Danny Auble
Browse files

smap will read in the size from db2 is it is there.

parent 7bcdbfb8
No related branches found
No related tags found
No related merge requests found
......@@ -35,20 +35,6 @@
#define _DEBUG 0
#ifdef HAVE_BGL_FILES
# include "rm_api.h"
#else
typedef char * pm_partition_id_t;
typedef int rm_connection_type_t;
typedef int rm_partition_mode_t;
typedef uint16_t rm_partition_t;
typedef char * rm_BGL_t;
typedef char * rm_component_id_t;
typedef rm_component_id_t rm_bp_id_t;
typedef int rm_BP_state_t;
typedef int status_t;
#endif
typedef struct {
char *bgl_block_name;
char *nodes;
......
......@@ -45,14 +45,14 @@ void *_resize_handler(int sig);
int main(int argc, char *argv[])
{
log_options_t opts = LOG_OPTS_STDERR_ONLY;
node_info_msg_t *node_info_ptr;
node_info_msg_t *node_info_ptr=NULL;
int error_code;
int height = 40;
int width = 100;
int startx = 0;
int starty = 0;
int end = 0;
int i;
int i, rc;
//char *name;
......@@ -61,8 +61,30 @@ int main(int argc, char *argv[])
#ifdef HAVE_BGL
error_code = slurm_load_node((time_t) NULL, &node_info_ptr, 0);
if (error_code) {
node_info_ptr = NULL;
slurm_perror("slurm_load_node");
#ifdef HAVE_BGL_FILES
rm_size3D_t bp_size;
if ((rc = rm_set_serial("BGL")) != STATUS_OK) {
fatal("init_bgl: rm_set_serial(): %s", bgl_err_str(rc));
return SLURM_ERROR;
}
if ((rc = rm_get_BGL(&bgl)) != STATUS_OK) {
fatal("init_bgl: rm_get_BGL(): %s", bgl_err_str(rc));
return SLURM_ERROR;
}
if ((rc = rm_get_data(bgl, RM_Msize, &bp_size)) != STATUS_OK) {
fatal("init_bgl: rm_get_data(): %s", bgl_err_str(rc));
return SLURM_ERROR;
}
verbose("BlueGene configured with %d x %d x %d base partitions",
bp_size.X, bp_size.Y, bp_size.Z);
DIM_SIZE[X]=bp_size.X;
DIM_SIZE[Y]=bp_size.Y;
DIM_SIZE[Z]=bp_size.Z;
slurm_rm_free_BGL(bgl);
#endif
//slurm_perror("slurm_load_node");
pa_init(NULL);
} else {
pa_init(node_info_ptr);
......
......@@ -56,6 +56,21 @@
# include "src/common/getopt.h"
#endif
#ifdef HAVE_BGL_FILES
# include "rm_api.h"
#else
typedef char * pm_partition_id_t;
typedef int rm_connection_type_t;
typedef int rm_partition_mode_t;
typedef uint16_t rm_partition_t;
typedef char * rm_BGL_t;
typedef char * rm_component_id_t;
typedef rm_component_id_t rm_bp_id_t;
typedef int rm_BP_state_t;
typedef int status_t;
#endif
#include "src/common/macros.h"
#include <slurm/slurm.h>
......@@ -96,6 +111,11 @@ typedef struct {
extern smap_parameters_t params;
extern int DIM_SIZE[PA_SYSTEM_DIMENSIONS];
#ifdef HAVE_BGL_FILES
rm_BGL_t *bgl;
#endif
void parse_command_line(int argc, char *argv[]);
extern pa_system_t *pa_system_ptr;
......
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