~ubuntu-branches/ubuntu/vivid/mpich/vivid-proposed

« back to all changes in this revision

Viewing changes to src/mpid/pamid/subconfigure.m4

  • Committer: Package Import Robot
  • Author(s): Anton Gladky
  • Date: 2014-04-01 20:24:20 UTC
  • mfrom: (5.2.4 sid)
  • Revision ID: package-import@ubuntu.com-20140401202420-t5ey1ia2klt5dkq3
Tags: 3.1-4
* [c3e3398] Disable test_primitives, which is unreliable on some platforms.
            (Closes: #743047)
* [265a699] Add minimal autotest.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
[#] start of __file__
 
2
dnl begin_generated_IBM_copyright_prolog                             
 
3
dnl                                                                  
 
4
dnl This is an automatically generated copyright prolog.             
 
5
dnl After initializing,  DO NOT MODIFY OR MOVE                       
 
6
dnl  --------------------------------------------------------------- 
 
7
dnl Licensed Materials - Property of IBM                             
 
8
dnl Blue Gene/Q 5765-PER 5765-PRP                                    
 
9
dnl                                                                  
 
10
dnl (C) Copyright IBM Corp. 2011, 2012 All Rights Reserved           
 
11
dnl US Government Users Restricted Rights -                          
 
12
dnl Use, duplication, or disclosure restricted                       
 
13
dnl by GSA ADP Schedule Contract with IBM Corp.                      
 
14
dnl                                                                  
 
15
dnl  --------------------------------------------------------------- 
 
16
dnl                                                                  
 
17
dnl end_generated_IBM_copyright_prolog                               
 
18
dnl -*- mode: makefile-gmake; -*-
 
19
 
2
20
dnl MPICH_SUBCFG_BEFORE=src/mpid/common/sched
3
21
dnl MPICH_SUBCFG_BEFORE=src/mpid/common/datatype
4
22
dnl MPICH_SUBCFG_BEFORE=src/mpid/common/thread
8
26
AC_DEFUN([PAC_SUBCFG_PREREQ_]PAC_SUBCFG_AUTO_SUFFIX,[
9
27
AM_CONDITIONAL([BUILD_PAMID],[test "$device_name" = "pamid"])
10
28
 
 
29
AC_ARG_VAR([PAMILIBNAME],[can be used to override the name of the PAMI library (default: "pami")])
 
30
original_PAMILIBNAME=${PAMILIBNAME}
 
31
PAMILIBNAME=${PAMILIBNAME:-"pami"}
 
32
AC_SUBST(PAMILIBNAME)
 
33
export PAMILIBNAME
 
34
 
11
35
dnl this subconfigure.m4 handles the configure work for the ftb subdir too
12
36
dnl this AM_CONDITIONAL only works because enable_ftb is set very early on by
13
37
dnl autoconf's argument parsing code.  The "action-if-given" from the
17
41
AM_COND_IF([BUILD_PAMID],[
18
42
 
19
43
pamid_platform=${device_args}
 
44
if test x"$pamid_platform" == "x"; then
 
45
  AS_CASE([$host],
 
46
        [*-bgq-*],[pamid_platform=BGQ])
 
47
fi
 
48
 
 
49
AC_MSG_NOTICE([Using the pamid platform '$pamid_platform'])
 
50
 
20
51
 
21
52
# Set a value for the maximum processor name.
22
53
MPID_MAX_PROCESSOR_NAME=128
 
54
PM_REQUIRES_PMI=pmi2
 
55
if test "${pamid_platform}" = "PE" ; then
 
56
        PM_REQUIRES_PMI=pmi2/poe
 
57
elif test "${pamid_platform}" = "BGQ" ; then
 
58
  MPID_DEFAULT_CROSS_FILE=${master_top_srcdir}/src/mpid/pamid/cross/bgq8
 
59
  MPID_DEFAULT_PM=no
 
60
fi
23
61
 
24
62
MPID_DEVICE_TIMER_TYPE=double
25
63
MPID_MAX_THREAD_LEVEL=MPI_THREAD_MULTIPLE
29
67
build_mpid_common_datatype=yes
30
68
build_mpid_common_thread=yes
31
69
 
 
70
 
32
71
])dnl end AM_COND_IF(BUILD_PAMID,...)
33
72
])dnl end PREREQ
34
73
AC_DEFUN([PAC_SUBCFG_BODY_]PAC_SUBCFG_AUTO_SUFFIX,[
68
107
#
69
108
if test "${pamid_platform}" = "BGQ" ; then
70
109
 
 
110
  AC_MSG_CHECKING([for BGQ system software directory])
 
111
 
71
112
  #
72
113
  # Specify the default bgq system software paths
73
114
  #
74
 
  bgq_driver_search_path="${BGQ_INSTALL_DIR} /bgsys/drivers/ppcfloor "
75
 
  for bgq_version in `echo 1 2 3 4`; do
76
 
    for bgq_release in `echo 1 2 3 4`; do
77
 
      for bgq_mod in `echo 0 1 2 3 4`; do
 
115
  bgq_driver_search_path="${BGQ_INSTALL_DIR} "
 
116
  for bgq_version in `echo 4 3 2 1`; do
 
117
    for bgq_release in `echo 4 3 2 1`; do
 
118
      for bgq_mod in `echo 4 3 2 1 0`; do
78
119
        bgq_driver_search_path+="/bgsys/drivers/V${bgq_version}R${bgq_release}M${bgq_mod}/ppc64 "
79
120
      done
80
121
    done
84
125
  for bgq_driver in $bgq_driver_search_path ; do
85
126
    if test -d ${bgq_driver}/spi/include ; then
86
127
 
 
128
      found_bgq_driver=yes
 
129
 
87
130
      PAC_APPEND_FLAG([-I${bgq_driver}],                        [CPPFLAGS])
88
 
      PAC_APPEND_FLAG([-I${bgq_driver}/comm/sys/include],       [CPPFLAGS])
89
 
      PAC_APPEND_FLAG([-I${bgq_driver}/spi/include],            [CPPFLAGS])
90
131
      PAC_APPEND_FLAG([-I${bgq_driver}/spi/include/kernel/cnk], [CPPFLAGS])
91
 
 
92
 
      PAC_APPEND_FLAG([-I${bgq_driver}],                        [WRAPPER_CPPFLAGS])
93
 
      PAC_APPEND_FLAG([-I${bgq_driver}/comm/sys/include],       [WRAPPER_CPPFLAGS])
94
 
      PAC_APPEND_FLAG([-I${bgq_driver}/spi/include],            [WRAPPER_CPPFLAGS])
95
 
      PAC_APPEND_FLAG([-I${bgq_driver}/spi/include/kernel/cnk], [WRAPPER_CPPFLAGS])
96
 
 
97
132
      PAC_APPEND_FLAG([-L${bgq_driver}/spi/lib],                [LDFLAGS])
98
 
 
99
 
      PAC_APPEND_FLAG([-L${bgq_driver}/spi/lib],                [WRAPPER_LDFLAGS])
100
 
      PAC_APPEND_FLAG([-L${bgq_driver}/comm/sys/lib],           [WRAPPER_LDFLAGS])
101
 
 
102
 
      PAC_APPEND_FLAG([-L${bgq_driver}/spi/lib],                [WRAPPER_LDFLAGS])
103
 
      PAC_APPEND_FLAG([-L${bgq_driver}/comm/sys/lib],           [WRAPPER_LDFLAGS])
 
133
      PAC_APPEND_FLAG([-L${bgq_driver}/spi/lib],                [WRAPPER_LDFLAGS])
 
134
 
 
135
      dnl If the '--with-pami' and the '--with-pami-include' configure options
 
136
      dnl were NOT specified then test for a V1R2M1+ comm include directory.
 
137
      dnl
 
138
      AS_IF([test "x${with_pami_include}" = "x" ],
 
139
        [AS_IF([test "x${with_pami}" = "x" ],
 
140
          [AS_IF([test -d ${bgq_driver}/comm/include ],
 
141
            [PAC_APPEND_FLAG([-I${bgq_driver}/comm/include],    [CPPFLAGS])],
 
142
            [PAC_APPEND_FLAG([-I${bgq_driver}/comm/sys/include],[CPPFLAGS])])])])
 
143
 
 
144
      dnl If the '--with-pami' and the '--with-pami-lib' configure options were
 
145
      dnl NOT specified then
 
146
      dnl
 
147
      dnl   if a custom pami library name was NOT specified then test for a
 
148
      dnl   V1R2M1+ pami lib in a V1R2M1+ comm lib directory then test for a
 
149
      dnl   pre-V1R2M1 pami lib in a pre-V1R2M1 comm lib directory; otherwise
 
150
      dnl
 
151
      dnl   if a custom pami library name WAS specified then test for a custom
 
152
      dnl   pami lib in a V1R2M1+ comm lib directory then test for a custom
 
153
      dnl   pami lib in a pre-V1R2M1 comm lib directory
 
154
      dnl
 
155
      AS_IF([test "x${with_pami_lib}" = "x" ],
 
156
        [AS_IF([test "x${with_pami}" = "x" ],
 
157
          [AS_IF([test "x${original_PAMILIBNAME}" = "x" ],
 
158
            [AS_IF([test -f ${bgq_driver}/comm/lib/libpami-gcc.a ],
 
159
              [PAMILIBNAME=pami-gcc
 
160
               PAC_APPEND_FLAG([-L${bgq_driver}/comm/lib],      [LDFLAGS])
 
161
               PAC_APPEND_FLAG([-L${bgq_driver}/comm/lib],      [WRAPPER_LDFLAGS])],
 
162
              [AS_IF([test -f ${bgq_driver}/comm/sys/lib/libpami.a ],
 
163
                [PAC_APPEND_FLAG([-L${bgq_driver}/comm/sys/lib],[LDFLAGS])
 
164
                 PAC_APPEND_FLAG([-L${bgq_driver}/comm/sys/lib],[WRAPPER_LDFLAGS])])])],
 
165
            [AS_IF([test -f ${bgq_driver}/comm/lib/lib${PAMILIBNAME}.a ],
 
166
              [PAC_APPEND_FLAG([-L${bgq_driver}/comm/lib],      [LDFLAGS])
 
167
               PAC_APPEND_FLAG([-L${bgq_driver}/comm/lib],      [WRAPPER_LDFLAGS])],
 
168
              [AS_IF([test -f ${bgq_driver}/comm/sys/lib/lib${PAMILIBNAME}.a ],
 
169
                [PAC_APPEND_FLAG([-L${bgq_driver}/comm/sys/lib],[LDFLAGS])
 
170
                 PAC_APPEND_FLAG([-L${bgq_driver}/comm/sys/lib],[WRAPPER_LDFLAGS])])])])])])
104
171
 
105
172
      break
106
173
    fi
107
174
  done
108
175
 
 
176
  if test "x${found_bgq_driver}" = "xyes"; then
 
177
    AC_MSG_RESULT('$bgq_driver')
 
178
  else
 
179
    AC_MSG_RESULT('no')
 
180
  fi
 
181
 
109
182
  #
110
183
  # The bgq compile requires these libraries.
111
184
  #
112
 
  PAC_APPEND_FLAG([-lpami],      [WRAPPER_LIBS])
113
 
  PAC_APPEND_FLAG([-lSPI],       [WRAPPER_LIBS])
114
 
  PAC_APPEND_FLAG([-lSPI_cnk],   [WRAPPER_LIBS])
115
 
  PAC_APPEND_FLAG([-lrt],        [WRAPPER_LIBS])
116
 
  PAC_APPEND_FLAG([-lpthread],   [WRAPPER_LIBS])
117
 
  PAC_APPEND_FLAG([-lstdc++],    [WRAPPER_LIBS])
 
185
  PAC_APPEND_FLAG([-lSPI],            [LIBS])
 
186
  PAC_APPEND_FLAG([-lSPI_cnk],        [LIBS])
 
187
  PAC_APPEND_FLAG([-lrt],             [LIBS])
 
188
  PAC_APPEND_FLAG([-lpthread],        [LIBS])
 
189
  PAC_APPEND_FLAG([-lstdc++],         [LIBS])
 
190
 
 
191
  AC_SEARCH_LIBS([PAMI_Send], [${PAMILIBNAME} pami-gcc])
 
192
 
118
193
 
119
194
  # For some reason, on bgq, libtool will incorrectly attempt a static link
120
195
  # of libstdc++.so unless this '-all-static' option is used. This seems to
121
196
  # be a problem specific to libstdc++.
122
197
  #
123
 
  # Only the 'cpi' and 'mpichversion' executables have this problem.
 
198
  # Only the 'cpi', 'mpivars', and 'mpichversion' executables have this problem.
124
199
  MPID_LIBTOOL_STATIC_FLAG="-all-static"
125
200
fi
126
201
 
127
 
 
 
202
if test "${pamid_platform}" = "PE" ; then
 
203
        MPID_MAX_ERROR_STRING=512
 
204
fi
128
205
#
129
206
# Check for gnu-style option to enable all warnings; if specified, then
130
207
# add gnu option to treat all warnings as errors.
142
219
PAC_APPEND_FLAG([-I${master_top_srcdir}/src/mpid/common/thread],   [CPPFLAGS])
143
220
PAC_APPEND_FLAG([-I${master_top_srcdir}/src/mpid/common/sched],    [CPPFLAGS])
144
221
 
 
222
dnl
 
223
dnl Check for PAMI_IN_PLACE
 
224
dnl
 
225
AC_MSG_CHECKING([for PAMI_IN_PLACE support])
 
226
have_pami_in_place=0
 
227
AC_COMPILE_IFELSE(
 
228
  [AC_LANG_PROGRAM([[#include "pami.h"]],
 
229
                   [[void * foo = PAMI_IN_PLACE;]])],
 
230
  have_pami_in_place=1
 
231
)
 
232
if test "$have_pami_in_place" != "0"; then
 
233
  AC_DEFINE(HAVE_PAMI_IN_PLACE,1,[Define if PAMI_IN_PLACE is defined in pami.h])
 
234
  AC_MSG_RESULT('yes')
 
235
else
 
236
  AC_DEFINE(PAMI_IN_PLACE,((void *) -1L),[Define if PAMI_IN_PLACE is not defined in pami.h])
 
237
  AC_MSG_RESULT('no')
 
238
fi
 
239
 
 
240
dnl
 
241
dnl Check for PAMI_CLIENT_NONCONTIG
 
242
dnl
 
243
AC_MSG_CHECKING([for PAMI_CLIENT_NONCONTIG support])
 
244
have_pami_client_noncontig=0
 
245
AC_COMPILE_IFELSE(
 
246
  [AC_LANG_PROGRAM([[#include "pami.h"]],
 
247
                   [[int foo = PAMI_CLIENT_NONCONTIG;]])],
 
248
  have_pami_client_noncontig=1
 
249
)
 
250
if test "$have_pami_client_noncontig" != "0"; then
 
251
  AC_DEFINE(HAVE_PAMI_CLIENT_NONCONTIG,1,[Define if PAMI_CLIENT_NONCONTIG is defined in pami.h])
 
252
  AC_MSG_RESULT('yes')
 
253
else
 
254
  AC_MSG_RESULT('no')
 
255
fi
 
256
 
 
257
dnl
 
258
dnl Check for PAMI_CLIENT_MEMORY_OPTIMIZE
 
259
dnl
 
260
AC_MSG_CHECKING([for PAMI_CLIENT_MEMORY_OPTIMIZE support])
 
261
have_pami_client_memory_optimize=0
 
262
AC_COMPILE_IFELSE(
 
263
  [AC_LANG_PROGRAM([[#include "pami.h"]],
 
264
                   [[int foo = PAMI_CLIENT_MEMORY_OPTIMIZE;]])],
 
265
  have_pami_client_memory_optimize=1
 
266
)
 
267
if test "$have_pami_client_memory_optimize" != "0"; then
 
268
  AC_DEFINE(HAVE_PAMI_CLIENT_MEMORY_OPTIMIZE,1,[Define if PAMI_CLIENT_MEMORY_OPTIMIZE is defined in pami.h])
 
269
  AC_MSG_RESULT('yes')
 
270
else
 
271
  AC_MSG_RESULT('no')
 
272
fi
 
273
 
 
274
dnl
 
275
dnl Check for PAMI_GEOMETRY_NONCONTIG
 
276
dnl
 
277
AC_MSG_CHECKING([for PAMI_GEOMETRY_NONCONTIG support])
 
278
have_pami_geometry_noncontig=0
 
279
AC_COMPILE_IFELSE(
 
280
  [AC_LANG_PROGRAM([[#include "pami.h"]],
 
281
                   [[int foo = PAMI_GEOMETRY_NONCONTIG;]])],
 
282
  have_pami_geometry_noncontig=1
 
283
)
 
284
if test "$have_pami_geometry_noncontig" != "0"; then
 
285
  AC_DEFINE(HAVE_PAMI_GEOMETRY_NONCONTIG,1,[Define if PAMI_GEOMETRY_NONCONTIG is defined in pami.h])
 
286
  AC_MSG_RESULT('yes')
 
287
else
 
288
  AC_MSG_RESULT('no')
 
289
fi
 
290
 
 
291
dnl
 
292
dnl Check for PAMI_GEOMETRY_MEMORY_OPTIMIZE
 
293
dnl
 
294
AC_MSG_CHECKING([for PAMI_GEOMETRY_MEMORY_OPTIMIZE support])
 
295
have_pami_geometry_memory_optimize=0
 
296
AC_COMPILE_IFELSE(
 
297
  [AC_LANG_PROGRAM([[#include "pami.h"]],
 
298
                   [[int foo = PAMI_GEOMETRY_MEMORY_OPTIMIZE;]])],
 
299
  have_pami_geometry_memory_optimize=1
 
300
)
 
301
if test "$have_pami_geometry_memory_optimize" != "0"; then
 
302
  AC_DEFINE(HAVE_PAMI_GEOMETRY_MEMORY_OPTIMIZE,1,[Define if PAMI_GEOMETRY_MEMORY_OPTIMIZE is defined in pami.h])
 
303
  AC_MSG_RESULT('yes')
 
304
else
 
305
  AC_MSG_RESULT('no')
 
306
fi
 
307
 
 
308
 
 
309
 
 
310
 
 
311
 
 
312
 
 
313
 
 
314
 
 
315
 
 
316
 
 
317
 
145
318
])dnl end AM_COND_IF(BUILD_PAMID,...)
146
319
])dnl end _BODY
147
320