1
1
##*****************************************************************************
2
## $Id: x_ac_bluegene.m4 18361 2009-08-10 20:58:02Z jette $
2
## $Id: x_ac_bluegene.m4 20908 2010-08-06 17:51:35Z da $
3
3
##*****************************************************************************
5
5
# Morris Jette <jette1@llnl.gov>
22
22
# test for bluegene emulation mode
24
AC_ARG_ENABLE(bluegene-emulation, AS_HELP_STRING(--enable-bluegene-emulation, deprecated use --enable-bgl-emulation),
24
AC_ARG_ENABLE(bluegene-emulation, AS_HELP_STRING(--enable-bluegene-emulation, deprecated use --enable-bgl-emulation),
25
25
[ case "$enableval" in
26
26
yes) bluegene_emulation=yes ;;
27
27
no) bluegene_emulation=no ;;
28
28
*) AC_MSG_ERROR([bad value "$enableval" for --enable-bluegene-emulation]) ;;
31
AC_ARG_ENABLE(bgl-emulation, AS_HELP_STRING(--enable-bgl-emulation,Run SLURM in BGL mode on a non-bluegene system),
31
AC_ARG_ENABLE(bgl-emulation, AS_HELP_STRING(--enable-bgl-emulation,Run SLURM in BGL mode on a non-bluegene system),
32
32
[ case "$enableval" in
33
33
yes) bgl_emulation=yes ;;
34
34
no) bgl_emulation=no ;;
35
35
*) AC_MSG_ERROR([bad value "$enableval" for --enable-bgl-emulation]) ;;
38
38
if test "x$bluegene_emulation" = "xyes" -o "x$bgl_emulation" = "xyes"; then
39
39
AC_DEFINE(HAVE_3D, 1, [Define to 1 if 3-dimensional architecture])
40
40
AC_DEFINE(SYSTEM_DIMENSIONS, 3, [3-dimensional architecture])
52
52
for bg_dir in $trydb2dir "" $bg_default_dirs; do
53
53
# Skip directories that don't exist
54
54
if test ! -z "$bg_dir" -a ! -d "$bg_dir" ; then
58
58
# Search for required BG API libraries in the directory
59
59
if test -z "$have_bg_ar" -a -f "$bg_dir/lib64/libbglbridge.so" ; then
61
61
bg_bridge_so="$bg_dir/lib64/libbglbridge.so"
62
62
bg_ldflags="$bg_ldflags -L$bg_dir/lib64 -L/usr/lib64 -Wl,--unresolved-symbols=ignore-in-shared-libs -lbglbridge -lbgldb -ltableapi -lbglmachine -lexpat -lsaymessage"
65
65
# Search for required DB2 library in the directory
66
66
if test -z "$have_db2" -a -f "$bg_dir/lib64/libdb2.so" ; then
68
68
bg_db2_so="$bg_dir/lib64/libdb2.so"
69
69
bg_ldflags="$bg_ldflags -L$bg_dir/lib64 -ldb2"
72
72
# Search for headers in the directory
73
73
if test -z "$have_bg_hdr" -a -f "$bg_dir/include/rm_api.h" ; then
75
bg_includes="-I$bg_dir/include"
75
bg_includes="-I$bg_dir/include"
79
79
if test ! -z "$have_bg_ar" -a ! -z "$have_bg_hdr" -a ! -z "$have_db2" ; then
80
80
# ac_with_readline="no"
81
81
# Test to make sure the api is good
83
83
saved_LDFLAGS="$LDFLAGS"
84
84
LDFLAGS="$saved_LDFLAGS $bg_ldflags -m64"
85
AC_LINK_IFELSE([AC_LANG_PROGRAM([[ int rm_set_serial(char *); ]], [[ rm_set_serial(""); ]])],[have_bg_files=yes],[AC_MSG_ERROR(There is a problem linking to the BG/L api.)])
86
LDFLAGS="$saved_LDFLAGS"
85
AC_LINK_IFELSE([AC_LANG_PROGRAM([[ int rm_set_serial(char *); ]], [[ rm_set_serial(""); ]])],[have_bg_files=yes],[AC_MSG_ERROR(There is a problem linking to the BG/L api.)])
86
LDFLAGS="$saved_LDFLAGS"
89
89
if test ! -z "$have_bg_files" ; then
90
90
BG_INCLUDES="$bg_includes"
92
92
AC_DEFINE(HAVE_3D, 1, [Define to 1 if 3-dimensional architecture])
93
93
AC_DEFINE(SYSTEM_DIMENSIONS, 3, [3-dimensional architecture])
94
94
AC_DEFINE(HAVE_BG, 1, [Define to 1 if emulating or running on Blue Gene system])
101
101
AC_MSG_CHECKING(for BG serial value)
103
103
AC_ARG_WITH(bg-serial,
104
AS_HELP_STRING(--with-bg-serial=NAME,set BG_SERIAL value), [bg_serial="$withval"])
104
AS_HELP_STRING(--with-bg-serial=NAME,set BG_SERIAL value), [bg_serial="$withval"])
105
105
AC_MSG_RESULT($bg_serial)
106
AC_DEFINE_UNQUOTED(BG_SERIAL, "$bg_serial", [Define the BG_SERIAL value])
106
AC_DEFINE_UNQUOTED(BG_SERIAL, "$bg_serial", [Define the BG_SERIAL value])
107
107
#define ac_bluegene_loaded so we don't load another bluegene conf
108
108
ac_bluegene_loaded=yes
114
114
AC_DEFUN([X_AC_BGP],
116
116
# test for bluegene emulation mode
117
AC_ARG_ENABLE(bgp-emulation, AS_HELP_STRING(--enable-bgp-emulation,Run SLURM in BG/P mode on a non-bluegene system),
117
AC_ARG_ENABLE(bgp-emulation, AS_HELP_STRING(--enable-bgp-emulation,Run SLURM in BG/P mode on a non-bluegene system),
118
118
[ case "$enableval" in
119
119
yes) bgp_emulation=yes ;;
120
120
no) bgp_emulation=no ;;
121
121
*) AC_MSG_ERROR([bad value "$enableval" for --enable-bgp-emulation]) ;;
124
124
# Skip if already set
125
if test "x$ac_bluegene_loaded" = "xyes" ; then
125
if test "x$ac_bluegene_loaded" = "xyes" ; then
126
126
bg_default_dirs=""
127
127
elif test "x$bgp_emulation" = "xyes"; then
128
128
AC_DEFINE(HAVE_3D, 1, [Define to 1 if 3-dimensional architecture])
136
136
ac_bluegene_loaded=yes
138
138
bg_default_dirs="/bgsys/drivers/ppcfloor"
141
141
libname=bgpbridge
143
143
for bg_dir in $trydb2dir "" $bg_default_dirs; do
144
144
# Skip directories that don't exist
145
145
if test ! -z "$bg_dir" -a ! -d "$bg_dir" ; then
149
149
soloc=$bg_dir/lib64/lib$libname.so
150
150
# Search for required BG API libraries in the directory
151
151
if test -z "$have_bg_ar" -a -f "$soloc" ; then
153
153
bg_ldflags="$bg_ldflags -L$bg_dir/lib64 -L/usr/lib64 -Wl,--unresolved-symbols=ignore-in-shared-libs -l$libname"
156
156
# Search for headers in the directory
157
157
if test -z "$have_bg_hdr" -a -f "$bg_dir/include/rm_api.h" ; then
159
bg_includes="-I$bg_dir/include"
159
bg_includes="-I$bg_dir/include"
163
163
if test ! -z "$have_bgp_ar" -a ! -z "$have_bgp_hdr" ; then
164
164
# ac_with_readline="no"
165
165
# Test to make sure the api is good
166
saved_LDFLAGS="$LDFLAGS"
166
saved_LDFLAGS="$LDFLAGS"
167
167
LDFLAGS="$saved_LDFLAGS $bg_ldflags -m64"
168
AC_LINK_IFELSE([AC_LANG_PROGRAM([[ int rm_set_serial(char *); ]], [[ rm_set_serial(""); ]])],[have_bgp_files=yes],[AC_MSG_ERROR(There is a problem linking to the BG/P api.)])
169
LDFLAGS="$saved_LDFLAGS"
168
AC_LINK_IFELSE([AC_LANG_PROGRAM([[ int rm_set_serial(char *); ]], [[ rm_set_serial(""); ]])],[have_bgp_files=yes],[AC_MSG_ERROR(There is a problem linking to the BG/P api.)])
169
LDFLAGS="$saved_LDFLAGS"
172
172
if test ! -z "$have_bgp_files" ; then
173
173
BG_INCLUDES="$bg_includes"
174
CFLAGS="$CFLAGS -m64"
174
CFLAGS="$CFLAGS -m64"
175
175
AC_DEFINE(HAVE_3D, 1, [Define to 1 if 3-dimensional architecture])
176
176
AC_DEFINE(SYSTEM_DIMENSIONS, 3, [3-dimensional architecture])
177
177
AC_DEFINE(HAVE_BG, 1, [Define to 1 if emulating or running on Blue Gene system])
179
179
AC_DEFINE(HAVE_FRONT_END, 1, [Define to 1 if running slurmd on front-end only])
180
180
AC_DEFINE(HAVE_BG_FILES, 1, [Define to 1 if have Blue Gene files])
181
181
AC_DEFINE_UNQUOTED(BG_BRIDGE_SO, "$soloc", [Define the BG_BRIDGE_SO value])
183
183
AC_MSG_CHECKING(for BG serial value)
185
185
AC_ARG_WITH(bg-serial,, [bg_serial="$withval"])
186
186
AC_MSG_RESULT($bg_serial)
187
AC_DEFINE_UNQUOTED(BG_SERIAL, "$bg_serial", [Define the BG_SERIAL value])
187
AC_DEFINE_UNQUOTED(BG_SERIAL, "$bg_serial", [Define the BG_SERIAL value])
188
188
#define ac_bluegene_loaded so we don't load another bluegene conf
189
189
ac_bluegene_loaded=yes