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

Support clean build with no curses library.

parent 7793ffe9
No related branches found
No related tags found
No related merge requests found
......@@ -24,9 +24,12 @@ AC_DEFUN([X_AC_NCURSES],
AC_SUBST(NCURSES)
if test "$ac_have_ncurses" = "yes"; then
NCURSES="-lncurses"
ac_have_some_curses="yes"
elif test "$ac_have_curses" = "yes"; then
NCURSES="-lcurses"
ac_have_some_curses="yes"
else
AC_MSG_ERROR([Can not find curses or ncurses library.])
AC_MSG_NOTICE([Can not build smap without curses or ncurses library])
ac_have_some_curses="no"
fi
])
......@@ -44,7 +44,7 @@ AC_CHECK_HEADERS(mcheck.h values.h socket.h sys/socket.h \
stdbool.h sys/ipc.h sys/shm.h sys/sem.h errno.h \
stdlib.h dirent.h pthread.h sys/prctl.h \
sysint.h inttypes.h termcap.h netdb.h sys/socket.h \
sys/systemcfg.h ncurses.h curses.h\
sys/systemcfg.h ncurses.h curses.h \
)
AC_HEADER_SYS_WAIT
AC_HEADER_TIME
......@@ -103,7 +103,10 @@ LIBS="$PTHREAD_LIBS $LIBS"
X_AC_BGL
X_AC_SLURM_SEMAPHORE
X_AC_NCURSES
AM_CONDITIONAL(HAVE_SOME_CURSES, test "x$ac_have_some_curses" = "xyes")
AC_SUBST(HAVE_SOME_CURSES)
dnl checks for system services.
dnl
......
......@@ -173,12 +173,7 @@ rm -rf $RPM_BUILD_ROOT
%doc COPYING
%doc etc/slurm.conf.example
%doc doc/html
%{_bindir}/scancel
%{_bindir}/scontrol
%{_bindir}/sinfo
%{_bindir}/smap
%{_bindir}/squeue
%{_bindir}/srun
%{_bindir}/*
%{_sbindir}/slurmctld
%{_sbindir}/slurmd
%{_libdir}/*.so*
......
......@@ -29,7 +29,21 @@
/* This must be included first for AIX systems */
#include "src/common/macros.h"
#include <curses.h>
#ifndef _GNU_SOURCE
# define _GNU_SOURCE
#endif
#if HAVE_CONFIG_H
# include "config.h"
#endif
#if HAVE_CURSES_H
# include <curses.h>
#endif
#if HAVE_NCURSES_H
# include <ncurses.h>
#endif
#include "src/api/node_select_info.h"
#include "src/common/read_config.h"
#include "src/common/parse_spec.h"
......
/*****************************************************************************\
* bluegene.h - header for blue gene configuration processing module.
*
* $Id$
* $Id$
*****************************************************************************
* Copyright (C) 2004 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
......@@ -42,13 +42,7 @@
#include "src/common/macros.h"
#include "src/slurmctld/slurmctld.h"
#include "src/partition_allocator/partition_allocator.h"
#ifdef HAVE_BGL_FILES
# include "src/plugins/select/bluegene/wrap_rm_api.h"
#else
# include "src/smap/smap.h"
#endif
#include "src/plugins/select/bluegene/wrap_rm_api.h"
#define USER_NAME "slurm"
......
......@@ -3,19 +3,58 @@
#ifndef ATTACH_BGL_H
#define ATTACH_BGL_H
/* Over-ride attach_bgl.h inclusion due to problems in compiling it
* with gcc and missing externals in that file */
#if HAVE_CONFIG_H
# include "config.h"
#endif
#ifdef HAVE_BGL_FILES
/* Over-ride attach_bgl.h inclusion due to problems in compiling it
* with gcc and missing externals in that file */
/* MPI Debug support */
/* MPI Debug support */
typedef struct {
const char * host_name; /* Something we can pass to inet_addr */
const char * executable_name; /* The name of the image */
int pid; /* The pid of the process */
} MPIR_PROCDESC;
typedef struct {
const char * host_name; /* Something we can pass to inet_addr */
const char * executable_name; /* The name of the image */
int pid; /* The pid of the process */
} MPIR_PROCDESC;
# include "rm_api.h"
#else
typedef char * pm_partition_id_t;
typedef int rm_connection_type_t;
typedef int rm_partition_mode_t;
typedef int rm_partition_state_t;
typedef uint16_t rm_partition_t;
typedef char * rm_BGL_t;
typedef char * rm_component_id_t;
typedef rm_component_id_t rm_bp_id_t;
typedef int rm_BP_state_t;
/* these are the typedefs that we will need to have
* if we want the states on the Front End Node of a BGL system
* make certain they match the rm_api.h values on the Service Node */
enum rm_partition_state {RM_PARTITION_FREE,
RM_PARTITION_CONFIGURING,
RM_PARTITION_READY,
RM_PARTITION_BUSY,
RM_PARTITION_DEALLOCATING,
RM_PARTITION_ERROR,
RM_PARTITION_NAV};
typedef enum status {STATUS_OK = 0,
PARTITION_NOT_FOUND = -1,
JOB_NOT_FOUND = -2,
BP_NOT_FOUND = -3,
SWITCH_NOT_FOUND = -4,
JOB_ALREADY_DEFINED=-5,
CONNECTION_ERROR=-10,
INTERNAL_ERROR = -11,
INVALID_INPUT=-12,
INCOMPATIBLE_STATE=-13,
INCONSISTENT_DATA=-14
}status_t;
#endif
#include "rm_api.h"
#endif
# $Id$
#
# Makefile for smap
# NOTE: smap is only built and installed if HAVE_SOME_CURSES is set.
# That means we have either curses or ncurses installed.
#
AUTOMAKE_OPTIONS = foreign
LIBS=$(NCURSES)
INCLUDES = -I$(top_srcdir) $(BGL_INCLUDES)
if HAVE_SOME_CURSES
bin_PROGRAMS = smap
smap_LDADD = \
$(top_builddir)/src/partition_allocator/libpartition_allocator.la
noinst_HEADERS = smap.h
smap_SOURCES = smap.c job_functions.c partition_functions.c configure_functions.c grid_functions.c opts.c
smap_SOURCES = smap.c \
job_functions.c partition_functions.c \
configure_functions.c grid_functions.c opts.c
force:
$(smap_LDADD) : force
......@@ -20,3 +28,12 @@ $(smap_LDADD) : force
smap_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) $(BGL_LDFLAGS)
else
EXTRA_smap_SOURCES = smap.h smap.c \
job_functions.c partition_functions.c \
configure_functions.c grid_functions.c opts.c
endif
......@@ -60,49 +60,14 @@
#include "src/common/hostlist.h"
#include "src/common/list.h"
#include "src/common/macros.h"
//#include "src/slurmctld/slurmctld.h"
#include "src/partition_allocator/partition_allocator.h"
#include "src/common/slurm_protocol_api.h"
#ifdef HAVE_BGL_FILES
# include "src/plugins/select/bluegene/wrap_rm_api.h"
#else
typedef char * pm_partition_id_t;
typedef int rm_connection_type_t;
typedef int rm_partition_mode_t;
typedef int rm_partition_state_t;
typedef uint16_t rm_partition_t;
typedef char * rm_BGL_t;
typedef char * rm_component_id_t;
typedef rm_component_id_t rm_bp_id_t;
typedef int rm_BP_state_t;
/* these are the typedefs that we will need to have */
/* if we want the states on the fen in a bgl system */
enum rm_partition_state {RM_PARTITION_FREE,
RM_PARTITION_CONFIGURING,
RM_PARTITION_READY,
RM_PARTITION_BUSY,
RM_PARTITION_DEALLOCATING,
RM_PARTITION_ERROR,
RM_PARTITION_NAV};
typedef enum status {STATUS_OK = 0,
PARTITION_NOT_FOUND = -1,
JOB_NOT_FOUND = -2,
BP_NOT_FOUND = -3,
SWITCH_NOT_FOUND = -4,
JOB_ALREADY_DEFINED=-5,
CONNECTION_ERROR=-10,
INTERNAL_ERROR = -11,
INVALID_INPUT=-12,
INCOMPATIBLE_STATE=-13,
INCONSISTENT_DATA=-14,
}status_t;
#endif
#include "src/plugins/select/bluegene/wrap_rm_api.h"
/* getopt_long options, integers but not characters */
#define OPT_LONG_HELP 0x100
#define OPT_LONG_USAGE 0x101
#define OPT_LONG_HELP 0x100
#define OPT_LONG_USAGE 0x101
#define OPT_LONG_HIDE 0x102
enum { JOBS, SLURMPART, BGLPART, COMMANDS };
......@@ -111,7 +76,6 @@ typedef void (*sighandler_t) (int);
/* Input parameters */
typedef struct {
//Both
bool all_flag;
bool no_header;
......
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