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

Change #if HAVE_TOTALVIEW to #ifdef HAVE_TOTALVIEW

Change Makefile to load with totalview library.
parent 6402cb6e
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......@@ -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
......
......@@ -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
......
......@@ -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++];
......
......@@ -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)
{
......
......@@ -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
......
......@@ -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
......
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