Permalink
Browse files

Added Logic to make it so you can emulate a cray system and not have …

…to enforce the things you do on a real one.
  • Loading branch information...
1 parent 88b0686 commit b86110d27bdf0def261106874336cd84ef021f05 @dannyauble dannyauble committed May 19, 2011
Showing with 72 additions and 31 deletions.
  1. +2 −2 aclocal.m4
  2. +2 −2 auxdir/ltmain.sh
  3. +10 −2 auxdir/x_ac_cray.m4
  4. +3 −0 config.h.in
  5. +44 −21 configure
  6. +2 −0 src/plugins/select/cray/basil_interface.c
  7. +4 −2 src/salloc/Makefile.am
  8. +1 −1 src/salloc/Makefile.in
  9. +4 −1 src/salloc/salloc.c
View
@@ -353,7 +353,7 @@ $$1_PKG_ERRORS
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
-_PKG_TEXT])dnl
+_PKG_TEXT])[]dnl
])
elif test $pkg_failed = untried; then
AC_MSG_RESULT([no])
@@ -364,7 +364,7 @@ path to pkg-config.
_PKG_TEXT
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.])dnl
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
])
else
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
View
@@ -65,15 +65,15 @@
# compiler: $LTCC
# compiler flags: $LTCFLAGS
# linker: $LD (gnu? $with_gnu_ld)
-# $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2ubuntu1
+# $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2ubuntu3
# automake: $automake_version
# autoconf: $autoconf_version
#
# Report bugs to <bug-libtool@gnu.org>.
PROGRAM=ltmain.sh
PACKAGE=libtool
-VERSION="2.2.6b Debian-2.2.6b-2ubuntu1"
+VERSION="2.2.6b Debian-2.2.6b-2ubuntu3"
TIMESTAMP=""
package_revision=1.3017
View
@@ -16,6 +16,7 @@
AC_DEFUN([X_AC_CRAY],
[
ac_have_cray="no"
+ ac_have_real_cray="no"
ac_have_alps_emulation="no"
ac_have_cray_emulation="no"
@@ -52,6 +53,8 @@ AC_DEFUN([X_AC_CRAY],
if test -f /etc/xtrelease || test -d /etc/opt/cray/release; then
ac_have_cray="yes"
+ ac_have_real_cray="yes"
+ AC_DEFINE(HAVE_REAL_CRAY, 1, [Define to 1 for running on a real Cray XT/XE system])
fi
AC_MSG_RESULT([$ac_have_cray])
fi
@@ -62,8 +65,12 @@ AC_DEFUN([X_AC_CRAY],
AC_MSG_ERROR([Cray BASIL requires expat headers/rpm]))
AC_CHECK_LIB(expat, XML_ParserCreate, [],
AC_MSG_ERROR([Cray BASIL requires libexpat.so (i.e. libexpat1-dev)]))
- AC_CHECK_LIB([job], [job_getjid], [],
- AC_MSG_ERROR([Need cray-job (usually in /opt/cray/job/default)]))
+
+ if test "$ac_have_real_cray" = "yes"; then
+ AC_CHECK_LIB([job], [job_getjid], [],
+ AC_MSG_ERROR([Need cray-job (usually in /opt/cray/job/default)]))
+ fi
+
if test -z "$MYSQL_CFLAGS" || test -z "$MYSQL_LIBS"; then
AC_MSG_ERROR([Cray BASIL requires the cray-MySQL-devel-enterprise rpm])
fi
@@ -75,6 +82,7 @@ AC_DEFUN([X_AC_CRAY],
AC_DEFINE(SALLOC_RUN_FOREGROUND, 1, [Define to 1 to require salloc execution in the foreground.])
fi
AM_CONDITIONAL(HAVE_CRAY, test "$ac_have_cray" = "yes")
+ AM_CONDITIONAL(HAVE_REAL_CRAY, test "$ac_have_real_cray" = "yes")
AM_CONDITIONAL(HAVE_ALPS_EMULATION, test "$ac_have_alps_emulation" = "yes")
AM_CONDITIONAL(HAVE_CRAY_EMULATION, test "$ac_have_cray_emulation" = "yes")
])
View
@@ -221,6 +221,9 @@
/* Define if you are compiling with readline. */
#undef HAVE_READLINE
+/* Define to 1 for running on a real Cray XT/XE system */
+#undef HAVE_REAL_CRAY
+
/* Define to 1 if you have the `sched_setaffinity' function. */
#undef HAVE_SCHED_SETAFFINITY
View
@@ -797,6 +797,8 @@ HAVE_CRAY_EMULATION_FALSE
HAVE_CRAY_EMULATION_TRUE
HAVE_ALPS_EMULATION_FALSE
HAVE_ALPS_EMULATION_TRUE
+HAVE_REAL_CRAY_FALSE
+HAVE_REAL_CRAY_TRUE
HAVE_CRAY_FALSE
HAVE_CRAY_TRUE
WITH_PGSQL_FALSE
@@ -7673,13 +7675,13 @@ if test "${lt_cv_nm_interface+set}" = set; then :
else
lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo "\"\$as_me:7676: $ac_compile\"" >&5)
+ (eval echo "\"\$as_me:7678: $ac_compile\"" >&5)
(eval "$ac_compile" 2>conftest.err)
cat conftest.err >&5
- (eval echo "\"\$as_me:7679: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval echo "\"\$as_me:7681: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cat conftest.err >&5
- (eval echo "\"\$as_me:7682: output\"" >&5)
+ (eval echo "\"\$as_me:7684: output\"" >&5)
cat conftest.out >&5
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
lt_cv_nm_interface="MS dumpbin"
@@ -8884,7 +8886,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 8887 "configure"' > conftest.$ac_ext
+ echo '#line 8889 "configure"' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -10672,11 +10674,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:10675: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:10677: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:10679: \$? = $ac_status" >&5
+ echo "$as_me:10681: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -11011,11 +11013,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:11014: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:11016: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:11018: \$? = $ac_status" >&5
+ echo "$as_me:11020: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -11116,11 +11118,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:11119: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:11121: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:11123: \$? = $ac_status" >&5
+ echo "$as_me:11125: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -11171,11 +11173,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:11174: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:11176: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:11178: \$? = $ac_status" >&5
+ echo "$as_me:11180: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -13555,7 +13557,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 13558 "configure"
+#line 13560 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -13651,7 +13653,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 13654 "configure"
+#line 13656 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -15607,11 +15609,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:15610: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15612: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:15614: \$? = $ac_status" >&5
+ echo "$as_me:15616: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -15706,11 +15708,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:15709: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15711: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:15713: \$? = $ac_status" >&5
+ echo "$as_me:15715: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -15758,11 +15760,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:15761: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15763: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:15765: \$? = $ac_status" >&5
+ echo "$as_me:15767: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -19692,6 +19694,7 @@ fi
ac_have_cray="no"
+ ac_have_real_cray="no"
ac_have_alps_emulation="no"
ac_have_cray_emulation="no"
@@ -19739,6 +19742,10 @@ $as_echo_n "checking whether this is a native Cray XT or XE system or have ALPS
if test -f /etc/xtrelease || test -d /etc/opt/cray/release; then
ac_have_cray="yes"
+ ac_have_real_cray="yes"
+
+$as_echo "#define HAVE_REAL_CRAY 1" >>confdefs.h
+
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_have_cray" >&5
$as_echo "$ac_have_cray" >&6; }
@@ -19801,7 +19808,9 @@ else
as_fn_error $? "Cray BASIL requires libexpat.so (i.e. libexpat1-dev)" "$LINENO" 5
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for job_getjid in -ljob" >&5
+
+ if test "$ac_have_real_cray" = "yes"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for job_getjid in -ljob" >&5
$as_echo_n "checking for job_getjid in -ljob... " >&6; }
if test "${ac_cv_lib_job_job_getjid+set}" = set; then :
$as_echo_n "(cached) " >&6
@@ -19848,6 +19857,8 @@ else
as_fn_error $? "Need cray-job (usually in /opt/cray/job/default)" "$LINENO" 5
fi
+ fi
+
if test -z "$MYSQL_CFLAGS" || test -z "$MYSQL_LIBS"; then
as_fn_error $? "Cray BASIL requires the cray-MySQL-devel-enterprise rpm" "$LINENO" 5
fi
@@ -19876,6 +19887,14 @@ else
HAVE_CRAY_FALSE=
fi
+ if test "$ac_have_real_cray" = "yes"; then
+ HAVE_REAL_CRAY_TRUE=
+ HAVE_REAL_CRAY_FALSE='#'
+else
+ HAVE_REAL_CRAY_TRUE='#'
+ HAVE_REAL_CRAY_FALSE=
+fi
+
if test "$ac_have_alps_emulation" = "yes"; then
HAVE_ALPS_EMULATION_TRUE=
HAVE_ALPS_EMULATION_FALSE='#'
@@ -21539,6 +21558,10 @@ if test -z "${HAVE_CRAY_TRUE}" && test -z "${HAVE_CRAY_FALSE}"; then
as_fn_error $? "conditional \"HAVE_CRAY\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${HAVE_REAL_CRAY_TRUE}" && test -z "${HAVE_REAL_CRAY_FALSE}"; then
+ as_fn_error $? "conditional \"HAVE_REAL_CRAY\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${HAVE_ALPS_EMULATION_TRUE}" && test -z "${HAVE_ALPS_EMULATION_FALSE}"; then
as_fn_error $? "conditional \"HAVE_ALPS_EMULATION\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -751,9 +751,11 @@ extern int do_basil_confirm(struct job_record *job_ptr)
int rc;
if (pagg_id == 0) {
+#ifdef HAVE_REAL_CRAY
/* This fallback case is for interactive jobs only */
error("JobId %u has no pagg ID, falling back to SID",
job_ptr->job_id);
+#endif
pagg_id = job_ptr->alloc_sid;
}
@@ -13,9 +13,11 @@ convenience_libs = $(top_builddir)/src/api/libslurm.o -ldl
salloc_LDADD = \
$(convenience_libs)
-if HAVE_CRAY
-salloc_LDADD += -ljob
+
+if HAVE_REAL_CRAY
+ salloc_LDADD += -ljob
endif
+
salloc_LDFLAGS = -export-dynamic $(CMD_LDFLAGS)
force:
@@ -38,7 +38,7 @@ build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
bin_PROGRAMS = salloc$(EXEEXT)
-@HAVE_CRAY_TRUE@am__append_1 = -ljob
+@HAVE_REAL_CRAY_TRUE@am__append_1 = -ljob
subdir = src/salloc
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
View
@@ -72,13 +72,16 @@
#include "src/plugins/select/bluegene/bg_enums.h"
#elif defined(HAVE_CRAY)
#include "src/common/node_select.h"
+
+#ifdef HAVE_REAL_CRAY
/*
* On Cray installations, the libjob headers are not automatically installed
* by default, while libjob.so always is, and kernels are > 2.6. Hence it is
* simpler to just duplicate the single declaration here.
*/
extern uint64_t job_getjid(pid_t pid);
#endif
+#endif
#define MAX_RETRIES 10
#define POLL_SLEEP 3 /* retry interval in seconds */
@@ -547,7 +550,7 @@ static void _set_submit_dir_env(void)
/* Returns 0 on success, -1 on failure */
static int _fill_job_desc_from_opts(job_desc_msg_t *desc)
{
-#ifdef HAVE_CRAY
+#ifdef HAVE_REAL_CRAY
uint64_t pagg_id = job_getjid(getpid());
/*
* Interactive sessions require pam_job.so in /etc/pam.d/common-session

0 comments on commit b86110d

Please sign in to comment.