Skip to content
Snippets Groups Projects
Commit c4c89d98 authored by Moe Jette's avatar Moe Jette
Browse files

Add macros to wrap rm_free_BGL for systems lacking multiple base

partitions and faultly BGL driver.
parent b9714e3f
No related branches found
No related tags found
No related merge requests found
...@@ -151,6 +151,22 @@ typedef enum {false, true} bool; ...@@ -151,6 +151,22 @@ typedef enum {false, true} bool;
# endif # endif
#endif #endif
#ifdef HAVE_BGL_FILES
/* We can't free the data on single base partition system without wires,
* It could also be a problem with old drivers (fails with driver 410).
* Once this is fixed, just call rm_free_BGL() directly. The bgl pointer
* should also be made into a non-static variable. Tests before calls
* to rm_get_BGL should be removed. */
# define slurm_rm_free_BGL(bgl) \
_STMT_START { \
int i; \
if ((rm_get_data(bgl, RM_SwitchNum, &i) == STATUS_OK) && (i > 0)) { \
if (rm_free_BGL(bgl) == STATUS_OK) bgl = NULL; \
} \
} _STMT_END
#endif
#ifdef WITH_PTHREADS #ifdef WITH_PTHREADS
# define slurm_mutex_init(mutex) \ # define slurm_mutex_init(mutex) \
......
...@@ -635,7 +635,7 @@ static void _read_part_db2(void) ...@@ -635,7 +635,7 @@ static void _read_part_db2(void)
/* Add node name to existing BGL partition record */ /* Add node name to existing BGL partition record */
hostlist_push(block_ptr->hostlist, bgl_node); hostlist_push(block_ptr->hostlist, bgl_node);
} }
#ifdef _DEBUG #if _DEBUG
fprintf(stderr, "part=%s, node=%s conn=%s mode=%s\n", fprintf(stderr, "part=%s, node=%s conn=%s mode=%s\n",
part_id, bgl_node, part_id, bgl_node,
_convert_conn_type(block_ptr->bgl_conn_type), _convert_conn_type(block_ptr->bgl_conn_type),
...@@ -646,20 +646,7 @@ static void _read_part_db2(void) ...@@ -646,20 +646,7 @@ static void _read_part_db2(void)
/* perform post-processing for each bluegene partition */ /* perform post-processing for each bluegene partition */
list_for_each(block_list, _post_block_read, NULL); list_for_each(block_list, _post_block_read, NULL);
/* We can't free the data on single base partition system slurm_rm_free_BGL(bgl);
* without wires, could also be a problem with old drivers.
* this fails with driver level 410. */
if ((rc = rm_get_data(bgl, RM_SwitchNum, &i)) != STATUS_OK) {
fprintf(stderr, "rm_get_data(RM_SwitchNum): %s\n",
bgl_err_str(rc));
return;
}
if (i == 0)
return;
if ((rc = rm_free_BGL(bgl)) != STATUS_OK)
fprintf(stderr, "rm_free_BGL(): %s\n", bgl_err_str(rc));
else
bgl = NULL;
#endif #endif
} }
......
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