natefoo / slurm-drmaa

DRMAA for Slurm: Implementation of the DRMAA C bindings for Slurm
GNU General Public License v3.0
48 stars 22 forks source link

Slurm 20.11.0 "Slurm libraries/headers not found" #43

Closed holtgrewe closed 3 years ago

holtgrewe commented 3 years ago

./configure fails

# ./configure
[...]
checking for SLURM library dir... /usr/lib
checking for slurmdb_users_get in -lslurm... yes
Using slurm libraries -lslurm 
checking for usable SLURM libraries/headers... *** The SLURM test program failed to link or run. See the file config.log
*** for the exact error that occured.
no
configure: error: 
Slurm libraries/headers not found;
add --with-slurm-inc and --with-slurm-lib with appropriate locations.

The relevant section in config.log

configure:13429: ./conftest
conftest: error: resolve_ctls_from_dns_srv: res_nsearch error: No error
conftest: error: fetch_config: DNS SRV lookup failed
conftest: error: _establish_config_source: failed to fetch config
conftest: fatal: Could not establish a configuration source
configure:13429: $? = 1
configure: program exited with status 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "DRMAA for Slurm"
| #define PACKAGE_TARNAME "slurm-drmaa"
| #define PACKAGE_VERSION "1.2.0-dev.71cd5be"
| #define PACKAGE_STRING "DRMAA for Slurm 1.2.0-dev.71cd5be"
| #define PACKAGE_BUGREPORT "nate@bx.psu.edu"
| #define PACKAGE_URL ""
| #define PACKAGE "slurm-drmaa"
| #define VERSION "1.2.0-dev.71cd5be"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #define LT_OBJDIR ".libs/"
| #define HAVE_PTHREAD_PRIO_INHERIT 1
| #define HAVE_LIBSLURM 1
| /* end confdefs.h.  */
|  #include "slurm/slurm.h"
| int
| main ()
| {
|  job_desc_msg_t job_req; /*at least check for declared structs */
|                  return 0;
| 
|   ;
|   return 0;
| }
configure:13444: result: no
configure:13450: error: 

It looks like this is the culprit:

conftest: error: resolve_ctls_from_dns_srv: res_nsearch error: No error
conftest: error: fetch_config: DNS SRV lookup failed
conftest: error: _establish_config_source: failed to fetch config
conftest: fatal: Could not establish a configuration source

It worked with the previous version that I used (20.02).

It looks like there now is a slurm_library_init and this subsequently requires a working slurm configuration and installation to run.

holtgrewe commented 3 years ago

OK, writing the following into a file and export SLURM_CONF=/tmp/slurm.fake.conf makes configure run through.

# /tmp/slurm.fake.conf
ClusterName=linux
ControlMachine=linux0
SlurmctldPort=6817
SlurmdPort=6818
AuthType=auth/munge
StateSaveLocation=/var/spool/slurm/ctld
SlurmdSpoolDir=/var/spool/slurm/d
SwitchType=switch/none
MpiDefault=none
SlurmctldPidFile=/var/run/slurmctld.pid
SlurmdPidFile=/var/run/slurmd.pid
ProctrackType=proctrack/pgid
ReturnToService=0
SlurmctldTimeout=300
SlurmdTimeout=300
InactiveLimit=0
MinJobAge=300
KillWait=30
Waittime=0
SchedulerType=sched/backfill
SelectType=select/cons_tres
SelectTypeParameters=CR_Core
SlurmctldDebug=info
SlurmctldLogFile=/var/log/slurmctld.log
SlurmdDebug=info
SlurmdLogFile=/var/log/slurmd.log
JobCompType=jobcomp/none
NodeName=linux[1-32] Procs=1 State=UNKNOWN
PartitionName=debug Nodes=ALL Default=YES MaxTime=INFINITE State=UP
natefoo commented 3 years ago

Looks like you got it working, it's unclear to me whether there's anything that should be addressed in slurm-drmaa but if you think that's the case, please let me know.

holtgrewe commented 3 years ago

Thanks for taking the time to look at this.

I think the configure script should write a temporary config file and set the environment variable before compiling the test programs. Otherwise configure will fail.