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

Revert "BLUEGENE - move function into common location for smap to be able to see."

This reverts commit e245c7bd.
parent e245c7bd
No related branches found
No related tags found
No related merge requests found
......@@ -1639,50 +1639,3 @@ extern char *give_geo(uint16_t *int_geo, int dims, bool with_sep)
return geo;
}
/*
* Convert a BG API error code to a string
* IN inx - error code from any of the BG Bridge APIs
* RET - string describing the error condition
*/
extern const char *bg_err_str(int inx)
{
static char tmp_char[10];
switch (inx) {
case SLURM_SUCCESS:
return "Slurm Success";
case SLURM_ERROR:
return "Slurm Error";
case BG_ERROR_BLOCK_NOT_FOUND:
return "Block not found";
case BG_ERROR_BOOT_ERROR:
return "Block boot error";
case BG_ERROR_JOB_NOT_FOUND:
return "Job not found";
case BG_ERROR_MP_NOT_FOUND:
return "Midplane not found";
case BG_ERROR_SWITCH_NOT_FOUND:
return "Switch not found";
case BG_ERROR_BLOCK_ALREADY_DEFINED:
return "Block already defined";
case BG_ERROR_JOB_ALREADY_DEFINED:
return "Job already defined";
case BG_ERROR_CONNECTION_ERROR:
return "Connection error";
case BG_ERROR_INTERNAL_ERROR:
return "Internal error";
case BG_ERROR_INVALID_INPUT:
return "Invalid input";
case BG_ERROR_INCONSISTENT_DATA:
return "Inconsistent data";
case BG_ERROR_NO_IOBLOCK_CONNECTED:
return "No IO Block Connected";
}
/* I know this isn't the best way to handle this, but it only
happens very rarely and usually in debugging, so it
hopefully isn't really all that bad.
*/
snprintf(tmp_char, sizeof(tmp_char), "%u ?", inx);
return tmp_char;
}
......@@ -552,6 +552,4 @@ extern char *ba_passthroughs_string(uint16_t passthrough);
extern char *give_geo(uint16_t *int_geo, int dims, bool with_sep);
extern const char *bg_err_str(int inx);
#endif
......@@ -554,3 +554,51 @@ extern int node_already_down(char *node_name)
return 0;
}
/*
* Convert a BG API error code to a string
* IN inx - error code from any of the BG Bridge APIs
* RET - string describing the error condition
*/
extern const char *bg_err_str(int inx)
{
static char tmp_char[10];
switch (inx) {
case SLURM_SUCCESS:
return "Slurm Success";
case SLURM_ERROR:
return "Slurm Error";
case BG_ERROR_BLOCK_NOT_FOUND:
return "Block not found";
case BG_ERROR_BOOT_ERROR:
return "Block boot error";
case BG_ERROR_JOB_NOT_FOUND:
return "Job not found";
case BG_ERROR_MP_NOT_FOUND:
return "Midplane not found";
case BG_ERROR_SWITCH_NOT_FOUND:
return "Switch not found";
case BG_ERROR_BLOCK_ALREADY_DEFINED:
return "Block already defined";
case BG_ERROR_JOB_ALREADY_DEFINED:
return "Job already defined";
case BG_ERROR_CONNECTION_ERROR:
return "Connection error";
case BG_ERROR_INTERNAL_ERROR:
return "Internal error";
case BG_ERROR_INVALID_INPUT:
return "Invalid input";
case BG_ERROR_INCONSISTENT_DATA:
return "Inconsistent data";
case BG_ERROR_NO_IOBLOCK_CONNECTED:
return "No IO Block Connected";
}
/* I know this isn't the best way to handle this, but it only
happens very rarely and usually in debugging, so it
hopefully isn't really all that bad.
*/
snprintf(tmp_char, sizeof(tmp_char), "%u ?", inx);
return tmp_char;
}
......@@ -81,6 +81,7 @@ extern int free_block_list(uint32_t job_id, List track_list,
bool destroy, bool wait);
extern int read_bg_conf();
extern int node_already_down(char *node_name);
extern const char *bg_err_str(int inx);
#endif /* _BG_CORE_H_ */
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