Skip to content

Commit e986d97

Browse files
authored
Merge pull request pmodels#7260 from hzhou/2501_hydra_slurm
hydra: remove dependency on libslurm Approved-by: Ken Raffenetti
2 parents 0fdc8d6 + 4caed1b commit e986d97

File tree

2 files changed

+2
-38
lines changed

2 files changed

+2
-38
lines changed

src/pm/hydra/configure.ac

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -439,14 +439,6 @@ AM_CONDITIONAL([HYDRA_HAVE_HWLOC], [test "${pac_have_hwloc}" = "yes"])
439439
AC_MSG_CHECKING([available processor topology libraries])
440440
AC_MSG_RESULT([$available_topolibs])
441441

442-
#########################################################################
443-
# Slurm hostlist parsing
444-
#########################################################################
445-
PAC_CHECK_HEADER_LIB_OPTIONAL([slurm],[slurm/slurm.h],[slurm],[slurm_hostlist_create])
446-
if test "$pac_have_slurm" = "yes" ; then
447-
AC_DEFINE(HAVE_SLURM,1,[Define if slurm is available])
448-
fi
449-
450442
#########################################################################
451443
# POSIX Regcomp
452444
#########################################################################

src/pm/hydra/lib/tools/bootstrap/external/slurm_query_node_list.c

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@
99
#include "slurm.h"
1010

1111
/* START UNIT - list_to_nodes */
12-
#if defined(HAVE_SLURM)
13-
#include <slurm/slurm.h> /* for slurm_hostlist_create */
14-
#elif defined(HAVE_POSIX_REGCOMP)
12+
#if defined(HAVE_POSIX_REGCOMP)
1513
#include <regex.h> /* for POSIX regular expressions */
1614

1715
#define MAX_GMATCH 5 /* max number of atoms in group matches + 1 */
@@ -23,33 +21,7 @@
2321
static int *tasks_per_node = NULL;
2422
static struct HYD_node *global_node_list = NULL;
2523

26-
#if defined(HAVE_SLURM)
27-
static HYD_status list_to_nodes(char *str)
28-
{
29-
hostlist_t *hostlist;
30-
char *host;
31-
int k = 0;
32-
HYD_status status = HYD_SUCCESS;
33-
34-
if ((hostlist = slurm_hostlist_create(str)) == NULL) {
35-
status = HYD_FAILURE;
36-
goto fn_fail;
37-
}
38-
39-
for (host = slurm_hostlist_shift(hostlist); host; host = slurm_hostlist_shift(hostlist)) {
40-
status = HYDU_add_to_node_list(host, tasks_per_node[k++], &global_node_list);
41-
HYDU_ERR_POP(status, "unable to add to node list\n");
42-
}
43-
44-
slurm_hostlist_destroy(hostlist);
45-
46-
fn_exit:
47-
return status;
48-
49-
fn_fail:
50-
goto fn_exit;
51-
}
52-
#elif defined(HAVE_POSIX_REGCOMP)
24+
#if defined(HAVE_POSIX_REGCOMP)
5325
static HYD_status list_to_nodes(char *str)
5426
{
5527
regex_t gmatch_old[2];

0 commit comments

Comments
 (0)