diff --git a/src/srun/Makefile.am b/src/srun/Makefile.am index 2de6a4c8a1d1fde9147ee718dd867aa6609633b6..14e518d313fe3a2b849f3cfc3ae08ea7961456bc 100644 --- a/src/srun/Makefile.am +++ b/src/srun/Makefile.am @@ -2,10 +2,16 @@ AUTOMAKE_OPTIONS = foreign INCLUDES = -I$(top_srcdir) $(POPT_INCLUDES) +if WITH_TOTALVIEW +totalview = slurm_auth_authd.c +else +auth_sources = slurm_auth_authd.c +endif + bin_PROGRAMS = srun srun_SOURCES = srun.c opt.c env.c opt.h env.h job.c job.h net.c net.h \ msg.c msg.h io.c io.h launch.h launch.c attach.h srun_LDADD = $(top_builddir)/src/common/libcommon.la \ $(top_builddir)/src/api/libslurm.la \ - $(POPT_LIBS) + $(POPT_LIBS) $(TOTALVIEW_LIBS) diff --git a/src/srun/job.h b/src/srun/job.h index 78a86c5be4e52c6d7752dda23cdd26ca5633fab9..9d7d4e6d1e06a964f3ad8c086655e04b884a5bf1 100644 --- a/src/srun/job.h +++ b/src/srun/job.h @@ -74,7 +74,7 @@ typedef struct srun_job { task_state_t *task_state; /* ntask task states */ pthread_mutex_t task_mutex; -#if HAVE_LIBELAN3 +#ifdef HAVE_LIBELAN3 qsw_jobinfo_t qsw_job; #endif diff --git a/src/srun/launch.c b/src/srun/launch.c index 7f57d41948977f6dfabe0d2cc56357cbd3f326e0..40c1d4dbe7e38d9d27524565331c9f9c81c76041 100644 --- a/src/srun/launch.c +++ b/src/srun/launch.c @@ -126,7 +126,7 @@ launch(void *arg) msg_array_ptr[i].cwd = opt.cwd; msg_array_ptr[i].nnodes = job->nhosts; msg_array_ptr[i].nprocs = opt.nprocs; -#if HAVE_LIBELAN3 +#ifdef HAVE_LIBELAN3 msg_array_ptr[i].qsw_job = job->qsw_job; #endif @@ -136,7 +136,7 @@ launch(void *arg) msg_array_ptr[i].srun_node_id = (uint32_t)i; msg_array_ptr[i].io_port = ntohs(job->ioport[i%job->niofds]); msg_array_ptr[i].resp_port = ntohs(job->jaddr[i%job->njfds].sin_port); -#if HAVE_TOTALVIEW +#ifdef HAVE_TOTALVIEW if (opt.totalview) msg_array_ptr[i].task_flags &= TASK_TOTALVIEW_DEBUG; #endif diff --git a/src/srun/msg.c b/src/srun/msg.c index d41a6900a921059c04e1e628bd097c522942ed08..9d6d2f6e71d35a82e86007d894d7f80a5f43c9d3 100644 --- a/src/srun/msg.c +++ b/src/srun/msg.c @@ -44,7 +44,7 @@ #include <src/srun/job.h> #include <src/srun/opt.h> -#if HAVE_TOTALVIEW +#ifdef HAVE_TOTALVIEW #include <src/srun/attach.h> #endif @@ -83,7 +83,7 @@ _launch_handler(job_t *job, slurm_msg_t *resp) if (msg->srun_node_id >= 0 && msg->srun_node_id < job->nhosts) { job->host_state[msg->srun_node_id] = SRUN_HOST_REPLIED; -#if HAVE_TOTALVIEW +#ifdef HAVE_TOTALVIEW if (opt.totalview) { MPIR_PROCDESC * tv_tasks; tv_tasks = &MPIR_proctable[MPIR_proctable_size++]; diff --git a/src/srun/opt.c b/src/srun/opt.c index fdc9ec296fa422a75c618dc7152541622e0cd996..34db0831b79b0eb91f247a7ab319b99147c427f0 100644 --- a/src/srun/opt.c +++ b/src/srun/opt.c @@ -48,7 +48,7 @@ #include <src/common/xstring.h> #include <src/common/list.h> -#if HAVE_TOTALVIEW +#ifdef HAVE_TOTALVIEW #include <src/srun/attach.h> #endif #include <src/srun/env.h> @@ -290,7 +290,7 @@ static bool opt_verify(poptContext); /* return command name from its full path name */ static char * base_name(char* command); -#if HAVE_TOTALVIEW +#ifdef HAVE_TOTALVIEW static bool _under_totalview(void); #endif @@ -548,7 +548,7 @@ static void opt_default() opt.batch = false; opt.share = false; opt.fail_kill = false; -#if HAVE_TOTALVIEW +#ifdef HAVE_TOTALVIEW opt.totalview = _under_totalview(); #endif @@ -1203,7 +1203,7 @@ void opt_list() } #endif /* __DEBUG */ -#if HAVE_TOTALVIEW +#ifdef HAVE_TOTALVIEW /* Determine if srun is under the control of a TotalView debugger or not */ static bool _under_totalview(void) { diff --git a/src/srun/opt.h b/src/srun/opt.h index b40f7baaf969c0606d575dc1861d9ad4da6a9122..2ff82bcb8efdc23e915a08b04b0bd4f26936d74b 100644 --- a/src/srun/opt.h +++ b/src/srun/opt.h @@ -136,7 +136,7 @@ typedef struct srun_options { bool batch; /* --batch, -b */ bool fail_kill; /* --kill, -k */ bool share; /* --share, -s */ -#if HAVE_TOTALVIEW +#ifdef HAVE_TOTALVIEW bool totalview; /* srun controlled by TotalView */ #endif diff --git a/src/srun/srun.c b/src/srun/srun.c index d8e563b7333e1cbeb1dce34476070c3664201cf8..53e1bf0aac88522935cd4fb240c7cb83b1d31663 100644 --- a/src/srun/srun.c +++ b/src/srun/srun.c @@ -111,7 +111,7 @@ static void fwd_signal(job_t *job, int signo); static void p_fwd_signal(slurm_msg_t *req_array_ptr, job_t *job); static void *p_signal_task(void *args); -#if HAVE_LIBELAN3 +#ifdef HAVE_LIBELAN3 # include <src/common/qsw.h> static void qsw_standalone(job_t *job); #endif @@ -162,7 +162,7 @@ main(int ac, char **av) } else if (opt.no_alloc) { printf("do not allocate resources\n"); job = job_create(NULL); -#if HAVE_LIBELAN3 +#ifdef HAVE_LIBELAN3 qsw_standalone(job); #endif } else if ( (resp = existing_allocation()) ) { @@ -401,7 +401,7 @@ sig_kill_alloc(int signum) -#if HAVE_LIBELAN3 +#ifdef HAVE_LIBELAN3 static void qsw_standalone(job_t *job) { @@ -462,7 +462,7 @@ create_job_step(job_t *job) job->stepid = resp->job_step_id; job->cred = resp->credentials; -#if HAVE_LIBELAN3 +#ifdef HAVE_LIBELAN3 job->qsw_job= resp->qsw_job; #endif