~ubuntu-branches/ubuntu/trusty/slurm-llnl/trusty

« back to all changes in this revision

Viewing changes to auxdir/x_ac_bluegene.m4

  • Committer: Bazaar Package Importer
  • Author(s): Gennaro Oliva
  • Date: 2010-09-03 18:03:29 UTC
  • mfrom: (3.3.8 sid)
  • Revision ID: james.westby@ubuntu.com-20100903180329-t0t8mtvk2eoctoso
Tags: 2.1.14-1
New upstream release 

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
##*****************************************************************************
4
4
#  AUTHOR:
5
5
#    Morris Jette <jette1@llnl.gov>
8
8
#    X_AC_BG
9
9
#
10
10
#  DESCRIPTION:
11
 
#    Test for Blue Gene/L specific files. 
 
11
#    Test for Blue Gene/L specific files.
12
12
#    If found define HAVE_BG and HAVE_FRONT_END.
13
13
##*****************************************************************************
14
14
 
21
21
 
22
22
        # test for bluegene emulation mode
23
23
 
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])  ;;
29
 
        esac ]) 
 
29
        esac ])
30
30
 
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])  ;;
36
 
        esac ]) 
37
 
        
 
36
        esac ])
 
37
 
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
55
 
                        continue;
 
55
                        continue;
56
56
                fi
57
57
 
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
60
 
                        have_bg_ar=yes
 
60
                        have_bg_ar=yes
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"
63
 
                fi
64
 
      
 
63
                fi
 
64
 
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
67
 
                        have_db2=yes
 
67
                        have_db2=yes
68
68
                        bg_db2_so="$bg_dir/lib64/libdb2.so"
69
69
                        bg_ldflags="$bg_ldflags -L$bg_dir/lib64 -ldb2"
70
70
                fi
71
71
 
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
74
 
                        have_bg_hdr=yes
75
 
                        bg_includes="-I$bg_dir/include"
 
74
                        have_bg_hdr=yes
 
75
                        bg_includes="-I$bg_dir/include"
76
76
                fi
77
77
        done
78
 
        
 
78
 
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
82
 
                have_bg_files=yes
 
82
                have_bg_files=yes
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"
87
87
        fi
88
88
 
89
89
        if test ! -z "$have_bg_files" ; then
90
90
                BG_INCLUDES="$bg_includes"
91
 
                CFLAGS="$CFLAGS -m64"
 
91
                CFLAGS="$CFLAGS -m64"
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)
102
102
                bg_serial="BGL"
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
109
109
        fi
114
114
AC_DEFUN([X_AC_BGP],
115
115
[
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])  ;;
122
 
        esac ]) 
 
122
        esac ])
123
123
 
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
137
137
        else
138
138
                bg_default_dirs="/bgsys/drivers/ppcfloor"
139
 
        fi      
140
 
        
 
139
        fi
 
140
 
141
141
        libname=bgpbridge
142
142
 
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
146
 
                        continue;
 
146
                        continue;
147
147
                fi
148
148
 
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
152
 
                        have_bgp_ar=yes
 
152
                        have_bgp_ar=yes
153
153
                        bg_ldflags="$bg_ldflags -L$bg_dir/lib64 -L/usr/lib64 -Wl,--unresolved-symbols=ignore-in-shared-libs -l$libname"
154
 
                fi
155
 
      
 
154
                fi
 
155
 
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
158
 
                        have_bgp_hdr=yes
159
 
                        bg_includes="-I$bg_dir/include"
 
158
                        have_bgp_hdr=yes
 
159
                        bg_includes="-I$bg_dir/include"
160
160
                fi
161
161
        done
162
 
        
 
162
 
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"
170
170
        fi
171
171
 
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])
182
 
                
 
182
 
183
183
                AC_MSG_CHECKING(for BG serial value)
184
 
                bg_serial="BGP"
 
184
                bg_serial="BGP"
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
190
190
        fi