1##
2## Copyright (C) by Argonne National Laboratory
3##     See COPYRIGHT in top-level directory
4##
5
6dnl Process this file with autoconf to produce a configure script.
7AC_PREREQ(2.67)
8dnl
9dnl aclocal_cache.m4, included by sowing/confdb/aclocal.m4, fixes
10dnl bugs in autoconf caching.
11dnl
12dnl
13dnl Environment variables that affect behavior of the test configure
14dnl MPICH_FAST
15dnl
16dnl The file name here refers to a file in the source being configured
17dnl FIXME this is the old style, needs updating to new style
18dnl AC_INIT(include/mpitest.h)
19m4_include([version.m4])
20AC_INIT([mpich-testsuite],
21        MPICH_VERSION_m4,
22        [discuss@mpich.org],
23        [mpich-testsuite],
24        [http://www.mpich.org/])
25
26AC_CONFIG_HEADER(include/mpitestconf.h)
27AH_TOP([/*
28 * Copyright (C) by Argonne National Laboratory
29 *     See COPYRIGHT in top-level directory
30 */
31#ifndef MPITESTCONF_H_INCLUDED
32#define MPITESTCONF_H_INCLUDED
33])
34AH_BOTTOM([#endif])
35
36VERSION=MPICH_VERSION_m4
37AC_SUBST(VERSION)
38AC_CONFIG_AUX_DIR([confdb])
39AC_CONFIG_MACRO_DIR([confdb])
40dnl
41echo "RUNNING CONFIGURE FOR MPI TESTS"
42
43AM_INIT_AUTOMAKE([-Wall -Werror -Wno-portability-recursive foreign 1.12.3 silent-rules subdir-objects])
44AM_MAINTAINER_MODE([enable])
45
46# Non-verbose make by default
47m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
48
49if test -z "$mpich_top_srcdir" ; then
50    if test -z "$top_srcdir" ; then
51       use_top_srcdir=$srcdir
52    else
53       use_top_srcdir=$top_srcdir
54    fi
55    case "$use_top_srcdir" in
56    /*) ;;
57    *)
58        use_top_srcdir=`(cd $use_top_srcdir && pwd)`
59        ;;
60    esac
61    if test -f $use_top_srcdir/../../maint/version.m4 ; then
62        mpich_top_srcdir=`cd $use_top_srcdir && cd ../.. && pwd`
63    fi
64fi
65AC_SUBST(mpich_top_srcdir)
66
67# these (in particular main_top_srcdir) are needed to regenerate
68# the f90 files from the f77 files
69AC_ARG_VAR([main_top_builddir],[path to the MPICH top-level build directory (if present)])
70AC_ARG_VAR([main_top_srcdir],[path to the MPICH top-level source directory (if present)])
71
72# Ensure that main_top_srcdir is set if maintainer mode for is set,
73# since some of the Makefile targets require it.
74if test "X$main_top_srcdir" = "X" -a "$USE_MAINTAINER_MODE" = "yes" ; then
75    if test -z "$top_srcdir" ; then
76       use_top_srcdir=$srcdir
77    else
78       use_top_srcdir=$top_srcdir
79    fi
80    # Make use_top_srcdir absolute
81    case "$use_top_srcdir" in
82    /*) ;;
83    *)
84        use_top_srcdir=`(cd $use_top_srcdir && pwd)`
85        ;;
86    esac
87    # Now, see if we can find the f77tof90 routine
88    if test -x $use_top_srcdir/maint/f77tof90 ; then
89        main_top_srcdir=$use_top_srcdir
90    else
91        AC_MSG_ERROR([Unable to find main source file - reconfigure using --disable-maintainer_mode])
92    fi
93fi
94
95AC_ARG_ENABLE(echo,
96	[AC_HELP_STRING([--enable-echo],[Turn on strong echoing. The default is enable=no.])],
97	[set -x])
98
99AC_ARG_ENABLE(fortran,
100[  --enable-fortran=option - Control the level of Fortran support in the MPICH implementation.
101        yes|all   - Enable all available Fortran implementations (F77, F90, F08)
102        f77       - Enable Fortran 77 support
103        f90       - Enable Fortran 90 support
104        f08       - Enable Fortran 2008 support
105        no|none   - No Fortran support
106],,[enable_fortran=f77,f90])
107
108save_IFS="$IFS"
109IFS=","
110enable_f77=no
111enable_fc=no
112enable_f08=no
113for option in $enable_fortran ; do
114    case "$option" in
115        yes|all)
116                enable_f77=yes
117                enable_fc=yes
118                enable_f08=yes
119                ;;
120        no|none)
121                enable_f77=no
122                enable_fc=no
123                enable_f08=no
124                ;;
125        f77)
126                enable_f77=yes
127                ;;
128        f90)
129                enable_fc=yes
130                ;;
131        f08)
132                enable_f08=yes
133                ;;
134        *)
135                IFS="$save_IFS"
136                AC_MSG_WARN([Unknown value $option for --enable-fortran])
137                IFS=","
138                ;;
139    esac
140done
141IFS="$save_IFS"
142
143# DTPools switch
144AC_ARG_ENABLE([dtpools],
145              [AC_HELP_STRING([--disable-dtpools],[Disable dtpools tests])],,
146              [enable_dtpools=yes])
147
148if test "x${enable_dtpools}" = "xyes"; then
149    DTP_SWITCH="ON"
150else
151    DTP_SWITCH="OFF"
152fi
153
154AC_SUBST(DTP_SWITCH)
155
156AC_ARG_ENABLE(cxx,
157	[AC_HELP_STRING([--enable-cxx],[Turn on C++ tests (default)])],,[enable_cxx=yes])
158
159AC_ARG_ENABLE(romio,
160	[AC_HELP_STRING([--enable-romio],[Enable ROMIO MPI I/O implementation])],,
161	[enable_romio=yes])
162
163AC_ARG_ENABLE(spawn,
164	[AC_HELP_STRING([--enable-spawn],
165		[Enable tests of the dynamic process parts of MPI-2 (default)])],,
166	[enable_spawn=yes])
167
168AC_ARG_ENABLE(rma,
169	[AC_HELP_STRING([--enable-rma],[Enable tests of the one sided parts of MPI-2 (default)])],,
170	[enable_rma=yes])
171
172AC_ARG_ENABLE(long-double-complex,
173	[AC_HELP_STRING([--enable-long-double-complex],
174		[Enable tests involving MPI_LONG_DOUBLE_COMPLEX (default)])],,
175	[enable_long_double_complex=yes])
176AC_ARG_ENABLE(long-double,
177	[AC_HELP_STRING([--enable-long-double-complex],
178		[Enable tests involving MPI_LONG_DOUBLE and related types (default)])],,
179	[enable_long_double=yes])
180
181AC_ARG_ENABLE(checkerrors,
182	[AC_HELP_STRING([--enable-checkerrors],
183		[Add some tests for checking for errors in user programs])],,
184	[enable_checkerrors=yes])
185
186AC_ARG_ENABLE(perftest,
187	[AC_HELP_STRING([--enable-perftest],
188		[Include tests for basic performance consistency (default)])],,
189	[enable_perftest=yes])
190
191AC_ARG_ENABLE(large-tests,
192	[AC_HELP_STRING([--enable-large-tests],
193		[Enable tests which require large (>2GB per proc) amount of memory])],,
194	[enable_large_tests=no])
195
196AC_ARG_ENABLE(ft-tests,
197	[AC_HELP_STRING([--enable-ft-tests],
198		[Include tests for fault tolerance (default no)])],,
199	[enable_ft_tests=no])
200
201AC_ARG_ENABLE(comm-overlap-tests,
202	[AC_HELP_STRING([--enable-comm-overlap-tests],
203		[Include tests for communicator overlap (default)])],,
204	[enable_comm_overlap_tests=yes])
205
206AC_ARG_ENABLE(checkfaults,
207	[AC_HELP_STRING([--enable-checkfaults],
208		[Add some tests for checking on handling of faults in user programs])],,
209	[enable_checkfaults=no])
210
211AC_ARG_ENABLE(checkpointing,
212	[AC_HELP_STRING([--enable-checkpointing],
213		[Add some tests for checkpointing])],,
214	[enable_checkpointing=no])
215
216AC_ARG_ENABLE(fast,
217	[AC_HELP_STRING([--enable-fast],
218		[Indicates that the MPI implementation may have been
219		built for fastest operation, such as building without
220		error checking.  Has the effect of
221		--enable-checkerrors=no])],,)
222
223AC_ARG_ENABLE(strictmpi,
224	[AC_HELP_STRING([--enable-strictmpi],
225		[Only test for operations specifically defined by the
226		MPI standard.  This turns off tests for some common
227		extensions, including for combinations of predefined
228		datatypes and predefined MPI_Op s.])],,
229	[enable_strictmpi=no])
230
231AC_ARG_ENABLE(threads,
232	[--enable-threads=level - Specify the level of thread support expected from the
233				MPI implementation.  The following levels are supported.
234
235	single - No threads (MPI_THREAD_SINGLE)
236	funneled - Only the main thread calls MPI (MPI_THREAD_FUNNELED)
237	serialized - User serializes calls to MPI (MPI_THREAD_SERIALIZED)
238	multiple - Fully multi-threaded (MPI_THREAD_MULTIPLE)
239
240	The default is funneled.  If enabled and no level is
241	specified, the level is set to multiple.  If disabled, the
242	level is set to single.  If the environment variable
243	MPICH_THREAD_LEVEL is set, that thread level is used (this is
244	to let MPICH build for the correct thread support without
245	requiring a specific --enable-threads argument.],,
246	[enable_threads=default])
247
248AC_ARG_ENABLE(xfail,
249	[AC_HELP_STRING([--enable-xfail],
250		[Run tests marked for expected failure])],,
251	[enable_xfail=no])
252
253AC_ARG_ENABLE(gpu-tests-only,
254        [AC_HELP_STRING([--enable-gpu-tests-only],
255                [Run only GPU tests])],,
256        [enable_gpu_tests_only=no])
257
258# DTPools test generation
259AC_ARG_WITH(dtpools-datatypes,
260    [AC_HELP_STRING([--with-dtpools-datatypes=typelist],
261        [Comma separated list of MPI datatypes to use for DTPools tests
262         generation. Typelist can be of the form: 'MPI_INT,MPI_DOUBLE,...',
263         for single element types, 'MPI_INT:4+MPI_DOUBLE:8,...', for multiple
264         element types, or a combination of both.])],,[with_dtpools_datatypes=MPI_INT,MPI_INT:4+MPI_DOUBLE:8])
265
266# parse args for typegen.sh script
267dtp_args="--with-dtpools-datatypes=${with_dtpools_datatypes}"
268
269AC_CONFIG_COMMANDS([gentests],[$srcdir/maint/gentests_dtp.sh $dtp_args],[dtp_args="$dtp_args"])
270AC_CONFIG_COMMANDS([gputests],[$srcdir/maint/generate_gpu_tests.sh])
271#Test collectives algorithms with CVARs
272AC_CONFIG_COMMANDS([collcvartests],[$srcdir/maint/test_coll_algos.sh])
273
274AC_ARG_WITH(mpi,
275	[AC_HELP_STRING([--with-mpi=dir],
276		[Use the selected MPI; compilation scripts for mpicc,
277		mpifort and mpicxx should be in dir/bin])],,)
278
279AC_ARG_WITH(pm,
280	AC_HELP_STRING([--with-pm=name],
281		[Specify the process manager for MPICH.  "no" or "none" are
282                 valid values.  Multiple process managers may be specified as
283                 long as they all use the same pmi interface by separating them
284                 with colons.  The mpiexec for the first named process manager
285                 will be installed.  Example: "--with-pm=hydra:gforker"
286                 builds the two process managers hydra and gforker;
287                 only the mpiexec from hydra is installed into the bin
288                 directory.]),,with_pm=default)
289
290if test "$with_pm" = "none" ; then
291    # add "none" as synonym for "no" to agree with older erroneous docs
292    with_pm="no"
293fi
294if test "$MPID_NO_PM" = yes ; then
295    if test "$with_pm" != "default" -a "$with_pm" != no ; then
296        AC_MSG_ERROR([The PM chosen ($with_pm) is is not valid for the selected device ($with_device)])
297    fi
298    # This is used to change with_pm=default to with_pm=no in the case
299    # where the device does not want a PM
300    with_pm=no
301fi
302if test -z "$with_pm" ; then
303    with_pm="no"
304fi
305if test "$with_pmi" = "uni" -a "$with_pm" = "default" ; then
306    with_pm="no"
307fi
308if test "$with_pm" = "default" -o "$with_pm" = "yes" ; then
309   if test ! -z "$MPID_DEFAULT_PM" ; then
310      with_pm=${MPID_DEFAULT_PM}
311   else
312      with_pm=hydra
313   fi
314fi
315
316# Get the first pm specified
317if test "$with_pm" != "no" ; then
318    first_pm="`echo $with_pm | sed -e 's/:.*//' -e 's/,.*//'`"
319else
320    first_pm=""
321fi
322
323AC_ARG_WITH(config-args,
324	[AC_HELP_STRING([--with-config-args=filename],
325		[Specify configure argument file that contains the
326		values of variables that configure reads,
327		e.g. CC,CFLAGS,F77,FFLAGS,FC,FCFLAGS....  If the
328		filename does not begin with / (absolute path), . or
329		.. (relative path), the filename will be assumed to be
330		$top_srcdir/configargs/<filename>.cfg.])],,
331	[with_config_args=no])
332
333if test "$with_config_args" != "no" ; then
334    case "$with_config_args" in
335        /*|../*|./*)
336            config_args_file="$with_config_args"
337            ;;
338        *)
339            config_args_file="$srcdir/configargs/$with_config_args.cfg"
340            ;;
341    esac
342    if test -s "$config_args_file" ; then
343        AC_MSG_RESULT([Reading the configure arguments in ${config_args_file}.])
344        . $config_args_file
345        # Export all the variables in $config_args_file
346        # i.e. CC,CFLAGS, F77/FFLAGS, FC/FCFLAGS, CXX/CXXFLAGS and friends...
347        config_args_vars=`grep -v '^#' $config_args_file | sed -e 's/=.*//g'`
348        for var in $config_args_vars ; do
349            eval value=\$"$var"
350            echo "Exporting $var=$value ..."
351            export $var
352        done
353    else
354        AC_MSG_WARN([Non-existent ${config_args_file}.])
355    fi
356fi
357
358# First, determine whether we are/can support the language bindings
359#
360# Since F90/F90FLAGS are replaced by FC/FCFLAGS, rather than silently
361# substituting them, i.e. FC=$F90 and FCFLAGS=$F90FLAGS, we choose to emit
362# an error message and abort to avoid any ambiguous/hidden bug in choosing
363# Fortran90 compilers.
364if test -n "$F90" -o -n "$F90FLAGS" ; then
365    AC_MSG_ERROR([F90 and F90FLAGS are replaced by FC and FCFLAGS respectively in this configure, please unset F90/F90FLAGS and set FC/FCFLAGS instead and rerun configure again.])
366fi
367
368# ------------------------------------------------------------------------
369dnl use AC_ARG_VAR to mark FROM_MPICH as "precious" to autoconf so that
370dnl automatic re-runs of config.status preserve its value correctly
371AC_ARG_VAR([FROM_MPICH],[should be set to "yes" if this configure script is being invoked by the main MPICH configure])
372AC_ARG_VAR([MPICH_THREAD_LEVEL],
373           [the MPI thread level supported by the enclosing MPICH build (when built within MPICH)])
374# ------------------------------------------------------------------------
375
376if test "$enable_threads" = "yes" ; then
377    enable_threads=multiple
378elif test "$enable_threads" = "no" ; then
379    enable_threads=single
380elif test "$enable_threads" = default ; then
381    if test -n "$MPICH_THREAD_LEVEL" ; then
382        case $MPICH_THREAD_LEVEL in
383            MPI_THREAD_MULTIPLE)
384            enable_threads=multiple
385            ;;
386            MPI_THREAD_SERIALIZED)
387            enable_threads=serialized
388            ;;
389            MPI_THREAD_FUNNELED)
390            enable_threads=funneled
391            ;;
392            MPI_THREAD_SINGLE)
393            enable_threads=single
394            ;;
395        esac
396    else
397        enable_threads=funneled
398    fi
399fi
400
401# errordir is substituted into the testlist file as errors when the
402# tests should check error handling and as a comment (#) otherwise.
403errordir="#"
404if test "$enable_checkerrors" = "yes" ; then
405    errordir=errors
406fi
407AC_SUBST(errordir)
408
409# The performance tests are not part of the MPI standard
410perfdir="perf"
411if test "$enable_strictmpi" = "yes" -o "$enable_perftest" = "no" ; then
412     perfdir="#"
413fi
414AC_SUBST(perfdir)
415
416# The ft tests are not part of the MPI standard and some of the netmods can't handle them
417ftdir="#ft"
418if test "$first_pm" = "hydra" -a  "$enable_strictmpi" = "no" -a "$enable_ft_tests" = "yes" ; then
419    ftdir="ft"
420fi
421AC_SUBST(ftdir)
422
423# Setup "comm_overlap" variable based on whether comm_overlap tests
424# are enabled or not
425if test "${enable_comm_overlap_tests}" = "yes" ; then
426   comm_overlap=""
427else
428   comm_overlap="#"
429fi
430AC_SUBST(comm_overlap)
431
432#
433# Only run the threads tests if multiple is specified
434if test "$enable_threads" = "multiple" -o "$enable_threads" = "runtime" ; then
435    threadsdir="threads"
436fi
437#
438# Only run the checkpointing tests if enabled
439ckpointdir="#ckpoint"
440if test "$enable_checkpointing" = "yes" ; then
441    ckpointdir="ckpoint"
442fi
443AC_SUBST(ckpointdir)
444
445#
446# Only run xfail tests if enabled
447RUN_XFAIL=false
448if test "$enable_xfail" = "yes" ; then
449    RUN_XFAIL=true
450fi
451AC_SUBST(RUN_XFAIL)
452
453PAC_LOAD_BASE_CACHE
454PAC_VPATH_CHECK()
455PAC_PROG_MAKE
456
457MPILIBLOC=""
458AC_SUBST(MPILIBLOC)
459
460# more variables that must be marked precious for proper re-configure operation
461AC_ARG_VAR([MPICH_ENABLE_F77],["yes" if the enclosing MPICH build supports Fortran 77])
462AC_ARG_VAR([MPICH_ENABLE_FC],["yes" if the enclosing MPICH build supports modern Fortran])
463AC_ARG_VAR([MPICH_ENABLE_CXX],["yes" if the enclosing MPICH build supports C++])
464
465# If we're building from MPICH, check the MPICH_ENABLE_xxx environment
466# variables for enable defaults
467if test "$FROM_MPICH" = yes ; then
468    if test -n "$MPICH_ENABLE_F77" ; then
469        enable_f77=$MPICH_ENABLE_F77
470    fi
471    if test -n "$MPICH_ENABLE_FC" ; then
472        enable_fc=$MPICH_ENABLE_FC
473    fi
474    if test -n "$MPICH_ENABLE_CXX" ; then
475        enable_cxx=$MPICH_ENABLE_CXX
476    fi
477    namepub_tests="#"
478    if test -n "$nameserv_name" ; then
479        namepub_tests=""
480    fi
481    AC_SUBST(namepub_tests)
482fi
483
484# Some MPI-2 implementations (including some of the MPICH shared-memory
485# channels and BG/L) leave out the dynamic process routines.  This
486# allows tests to avoid reporting failure for these routines.
487# This can be controlled by either a --disable-spawn argument or by
488# setting the environment variable MPI_NO_SPAWN to yes.
489AC_ARG_VAR([MPI_NO_SPAWN],[set to "yes" to disable dynamic process tests])
490if test "$enable_spawn" = "yes" -a "$MPI_NO_SPAWN" != "yes" ; then
491    spawndir=spawn
492    AC_DEFINE(HAVE_MPI_SPAWN,1,[Define if Dynamic Process functionality is available])
493fi
494AC_SUBST(spawndir)
495
496# Also allow rma to be disabled
497AC_ARG_VAR([MPI_NO_RMA],[set to "yes" to disable one-sided tests])
498rmadir=rma
499if test "$enable_rma" != yes ; then
500    rmadir="#"
501elif test "$MPI_NO_RMA"  = yes ; then
502    rmadir="#"
503else
504    AC_DEFINE(HAVE_MPI_WIN_CREATE,1,[Define if MPI_Win_create is available])
505fi
506AC_SUBST(rmadir)
507
508faultsdir=#
509if test "$enable_checkfaults" = "yes" ; then
510    faultsdir=faults
511fi
512AC_SUBST(faultsdir)
513#
514MPI_IS_STRICT=false
515AC_SUBST(MPI_IS_STRICT)
516if test "$enable_strictmpi" = "yes" ; then
517    MPI_IS_STRICT=true
518    AC_DEFINE(USE_STRICT_MPI,1,[Define if only operations defined in MPI should be tested])
519fi
520#
521# At this writing, MPICH has many MPIX routines, and the test suite includes
522# them.  As these are not MPI routines (yet), they are invalid and incorrect
523# when this test suite is used for other MPI implementations, including those
524# based on earlier versions of MPICH.
525MPI_HAS_MPIX=no
526#
527# Hack to detect build from within MPICH.  Ensure strictmpi not selected.
528if test "$FROM_MPICH" = "yes" -a "$enable_strictmpi" = "no" ; then
529   MPI_HAS_MPIX=yes
530fi
531AC_SUBST(MPI_HAS_MPIX)
532
533# Prepend @mpix@ to lines of tests in testlist.in which are MPIX tests so that
534# we can skip running these tests when we do strict MPI test.
535mpix="#"
536if test "$enable_strictmpi" = "no"; then
537    mpix=""
538fi
539AC_SUBST(mpix)
540
541# Use the conditional variable BUILD_MPIX_TESTS to conditionally add MPIX tests
542# to noninst_PROGRAMS to skip building the tests when we do strict MPI test
543AM_CONDITIONAL([BUILD_MPIX_TESTS], [test "$enable_strictmpi" = "no"])
544
545# preserve these values across a reconfigure
546AC_ARG_VAR([WRAPPER_CFLAGS],[])
547AC_ARG_VAR([WRAPPER_CPPFLAGS],[])
548AC_ARG_VAR([WRAPPER_LDFLAGS],[])
549AC_ARG_VAR([WRAPPER_LIBS],[])
550AC_ARG_VAR([WRAPPER_FFLAGS],[])
551AC_ARG_VAR([WRAPPER_FCFLAGS],[])
552AC_ARG_VAR([WRAPPER_CXXFLAGS],[])
553
554# Attach program prefix and suffix to executable names
555PAC_GET_EXENAME("mpicc", MPICC_NAME)
556PAC_GET_EXENAME("mpif77", MPIF77_NAME)
557PAC_GET_EXENAME("mpifort", MPIFORT_NAME)
558PAC_GET_EXENAME("mpicxx", MPICXX_NAME)
559PAC_GET_EXENAME("mpiexec", MPIEXEC_NAME)
560
561if test "$FROM_MPICH" = "yes" ; then
562    # perform configure tests with the normal compilers ($CC/$F77/etc), but use
563    # the WRAPPER_xFLAGS computed by MPICH as our flags instead.  Then at the
564    # end of configure we will empty out these flags and set our compilers to
565    # the installed compiler wrappers
566    CFLAGS="$WRAPPER_CFLAGS"
567    CPPFLAGS="$WRAPPER_CPPFLAGS"
568    LDFLAGS="$WRAPPER_LDFLAGS"
569    FFLAGS="$WRAPPER_FFLAGS"
570    FCFLAGS="$WRAPPER_FCFLAGS"
571    CXXFLAGS="$WRAPPER_CXXFLAGS"
572
573    # WRAPPER_LIBS contains currently non-existent libs like "-lopa" and "-lmpl"
574    # right now, so set LIBS to the user-specified libs for now.
575    # FIXME Does this need to be an AC_ARG_VAR?
576    LIBS="$MPICH_LIBS"
577
578elif test -n "$with_mpi" ; then
579    if test -z "$MPICC" ; then
580        CC=$with_mpi/bin/$MPICC_NAME
581    else
582        CC=$MPICC
583    fi
584    if test -z "$MPIF77" ; then
585        F77=$with_mpi/bin/$MPIF77_NAME
586    else
587        F77=$MPIF77
588    fi
589    if test -z "$MPIFC" ; then
590        FC=$with_mpi/bin/$MPIFORT_NAME
591    else
592        FC=$MPIFC
593    fi
594    if test -z "$MPICXX" ; then
595        CXX=$with_mpi/bin/$MPICXX_NAME
596    else
597        CXX=$MPICXX
598    fi
599    if test -z "$MPIEXEC" ; then
600        MPIEXEC=$with_mpi/bin/$MPIEXEC_NAME
601    fi
602else
603    # Try to use mpicc etc names
604    if test -z "$MPICC" ; then
605        AC_PATH_PROG(MPICC,$MPICC_NAME mpcc)
606    fi
607    if test "x$MPICC" != "x" ; then
608        CC=$MPICC
609    fi
610    if test -z "$MPIF77" ; then
611        AC_PATH_PROG(MPIF77,$MPIF77_NAME mpf77)
612    fi
613    if test "x$MPIF77" != "x" ; then
614        F77=$MPIF77
615    fi
616    if test -z "$MPIFC" ; then
617        AC_PATH_PROG(MPIFC,$MPIFORT_NAME mpftn)
618    fi
619    if test "x$MPIFC" != "x" ; then
620        FC=$MPIFC
621    fi
622    if test -z "$MPICXX" ; then
623        # We left mpiCC off of this list because mpicc and mpiCC are the
624        # same on Mac OSX systems.
625        AC_PATH_PROG(MPICXX,$MPICXX_NAME mpCC)
626    fi
627    if test "x$MPICXX" != "x" ; then
628        CXX=$MPICXX
629    fi
630    if test -z "$MPIEXEC" ; then
631        AC_PATH_PROG(MPIEXEC,$MPIEXEC_NAME)
632    fi
633fi
634# Make sure we export CC before configuring DTPools, since MPI is
635# needed to build the library.
636export CC
637AC_CONFIG_SUBDIRS([dtpools])
638
639# Running C compiler tests
640AC_PROG_CC
641AC_PROG_CC_C99
642AM_PROG_CC_C_O
643
644# Note that some versions of autoconf will insist that the compiler
645# produce executables at this point, which is why we must do something
646# special for building within MPICH
647
648# Ensure that we can compile an MPI program before we go any further
649# We don't use a cached value here because this is a sanity check
650# The exception is if we are executing this configure from within the
651# MPICH configure - in that case, the
652if test "$FROM_MPICH" != "yes" ; then
653    AC_MSG_CHECKING([whether we can compile and link MPI programs in C])
654    AC_LINK_IFELSE([
655AC_LANG_PROGRAM([#include "mpi.h"],[MPI_Init(0,0);MPI_Finalize();])
656    ],[mpi_compile_works=yes],[mpi_compile_works=no])
657AC_MSG_RESULT($mpi_compile_works)
658
659    if test "$mpi_compile_works" != "yes" ; then
660       AC_MSG_ERROR([Unable to compile and/or link an MPI program!  Check config.log])
661    fi
662fi
663dnl We cannot use AC_C_LONG_DOUBLE
664dnl because it does not support cross-compilation.  Instead, we use the
665dnl same test in the MPICH configure.
666# Check on support for long double and long long types.  Do this before the
667# structure alignment test because it will test for including those
668# types as well
669#
670# If --disable-long-double is selected, then bypass this test.
671# Some MPI implementations may choose to not support long double because
672# their C compilers are inconsistent on the length of long double (this
673# is the case on the Cray, with Cray, PGI, and GNU not agreeing on the
674# size of long double)
675if test "$enable_long_double" = "yes" ; then
676    AC_CACHE_CHECK([whether long double is supported],pac_cv_have_long_double,[
677    AC_COMPILE_IFELSE([
678        AC_LANG_PROGRAM([],[long double a;])
679    ],[pac_cv_have_long_double=yes],[pac_cv_have_long_double=no])
680])
681    if test "$pac_cv_have_long_double" = "yes" ; then
682        AC_DEFINE(HAVE_LONG_DOUBLE,1,[Define if long double is supported])
683    fi
684fi
685AC_CACHE_CHECK([whether long long is supported],pac_cv_have_long_long,[
686    AC_COMPILE_IFELSE([
687        AC_LANG_PROGRAM([],[long long a;])
688    ],[pac_cv_have_long_long=yes],[pac_cv_have_long_long=no])
689])
690if test "$pac_cv_have_long_long" = yes ; then
691    AC_DEFINE(HAVE_LONG_LONG,1,[Define if compiler supports long long])
692fi
693#
694# Check for const and restrict (used in some of the performance tests)
695AC_C_CONST
696AC_C_RESTRICT
697
698# not using libtool for the test suite, so no LT_INIT.  Instead, test here
699# for Library programs
700AC_PROG_RANLIB
701AM_PROG_AR
702
703# Check for --enable-strict
704PAC_ARG_STRICT
705
706# General headers
707AC_HEADER_STDC
708dnl AC_CHECK_HEADERS(stdarg.h unistd.h string.h stdlib.h memory.h stdint.h)
709dnl unistd.h string.h stdlib.h memory.h stdint.h are checked by AC_PROG_CC.
710AC_CHECK_HEADERS(stdarg.h sys/time.h sys/resource.h)
711
712# Check for fixed width types
713AC_TYPE_INT8_T
714AC_TYPE_INT16_T
715AC_TYPE_INT32_T
716AC_TYPE_INT64_T
717AC_TYPE_UINT8_T
718AC_TYPE_UINT16_T
719AC_TYPE_UINT32_T
720AC_TYPE_UINT64_T
721
722# Check for availability of C99 types
723AC_CHECK_TYPES([_Bool, float _Complex, double _Complex, long double _Complex])
724AC_CHECK_SIZEOF(void *,8)
725
726# Start of GPU libs check
727have_gpu="no"
728PAC_PUSH_FLAG([CPPFLAGS])
729PAC_PUSH_FLAG([LDFLAGS])
730PAC_PUSH_FLAG([LIBS])
731
732# Check CUDA availability
733PAC_CHECK_HEADER_LIB_OPTIONAL([cuda],[cuda_runtime_api.h],[cudart],[cudaStreamSynchronize])
734cuda_CPPFLAGS=""
735cuda_LDFLAGS=""
736cuda_LIBS=""
737if test "X${pac_have_cuda}" = "Xyes" ; then
738    AC_DEFINE([HAVE_CUDA],[1],[Define if CUDA is available])
739    have_gpu="yes"
740    if test -n "${with_cuda}" -a "$with_cuda" != "no" ; then
741        cuda_CPPFLAGS="-I${with_cuda}/include"
742        if test -d ${with_cuda}/lib64 ; then
743            cuda_LDFLAGS="-L${with_cuda}/lib64 -L${with_cuda}/lib"
744        else
745            cuda_LDFLAGS="-L${with_cuda}/lib"
746        fi
747    fi
748    cuda_LIBS="-lcudart"
749fi
750AM_CONDITIONAL([HAVE_CUDA],[test "X${pac_have_cuda}" = "Xyes"])
751AC_SUBST([cuda_CPPFLAGS])
752AC_SUBST([cuda_LDFLAGS])
753AC_SUBST([cuda_LIBS])
754
755if test "$have_gpu" = "no" ; then
756    # Check Level Zero availability when no other GPU library is available
757    PAC_CHECK_HEADER_LIB_OPTIONAL([ze],[level_zero/ze_api.h],[ze_loader],[zeInit])
758    ze_CPPFLAGS=""
759    ze_LDFLAGS=""
760    ze_LIBS=""
761    if test "X${pac_have_ze}" = "Xyes" ; then
762        AC_DEFINE([HAVE_ZE],[1],[Define if ZE is available])
763        have_gpu="yes"
764        if test -n "${with_ze}" -a "$with_ze" != "no" ; then
765            ze_CPPFLAGS="-I${with_ze}/include"
766            if test -d ${with_ze}/lib64 ; then
767                ze_LDFLAGS="-L${with_ze}/lib64 -L${with_ze}/lib"
768            else
769                ze_LDFLAGS="-L${with_ze}/lib"
770            fi
771        fi
772        ze_LIBS="-lze_loader"
773    fi
774    AC_SUBST([ze_CPPFLAGS])
775    AC_SUBST([ze_LDFLAGS])
776    AC_SUBST([ze_LIBS])
777fi
778AM_CONDITIONAL([HAVE_ZE],[test "X${pac_have_ze}" = "Xyes"])
779
780PAC_POP_FLAG([CPPFLAGS])
781PAC_POP_FLAG([LDFLAGS])
782PAC_POP_FLAG([LIBS])
783
784AM_CONDITIONAL([HAVE_GPU], [test $have_gpu = "yes"])
785# GPU only tests
786if test $have_gpu = "no" -a $enable_gpu_tests_only = "yes" ; then
787    AC_MSG_ERROR([GPU only test configuration requires GPU library (CUDA or LevelZero)])
788fi
789AM_CONDITIONAL([GPU_ONLY], [test $enable_gpu_tests_only = "yes"])
790# End of GPU libs Check
791
792# for tests that require large mem
793largetest="#"
794if test "$enable_large_tests" = "yes" -a $ac_cv_sizeof_void_p -ge 8; then
795    largetest=""
796fi
797AC_SUBST(largetest)
798
799# Enable device specific tests in impls/mpich
800ch3_tests="#"
801ch4_tests="#"
802case $with_device in
803    ch3*)
804        ch3_tests=""
805        ;;
806    ch4*)
807        ch4_tests=""
808        ;;
809esac
810ch4_ucx_tests="#"
811ch4_ofi_tests="#"
812case $with_device in
813    ch4:ucx*)
814        ch4_ucx_tests=""
815        ;;
816    ch4:ofi*)
817        ch4_ofi_tests=""
818        ;;
819esac
820AC_SUBST(ch3_tests)
821AC_SUBST(ch4_tests)
822AC_SUBST(ch4_ucx_tests)
823AC_SUBST(ch4_ofi_tests)
824
825# Only run the long double complex tests if that type is available
826if test "x$enable_long_double" = "xyes" && \
827   test "x$enable_long_double_complex" = "xyes" && \
828   test "x$ac_cv_type_long_double__Complex" = "xyes" ; then
829   AC_DEFINE(USE_LONG_DOUBLE_COMPLEX,1,[Define if tests with long double complex should be included])
830fi
831
832# extra libraries may be necessary on some platforms (solaris) for spawn/join
833if test "$spawndir" = "spawn" ; then
834    PAC_PUSH_FLAG(LIBS)
835    AC_SEARCH_LIBS(socket,socket,socklib=$LIBS)
836    PAC_POP_FLAG(LIBS)
837    PAC_PUSH_FLAG(LIBS)
838    AC_SEARCH_LIBS(gethostbyname,nsl,nslib=$LIBS)
839    PAC_POP_FLAG(LIBS)
840    AC_SUBST(socklib)
841    AC_SUBST(nslib)
842fi
843
844PAC_ARG_THREAD_PACKAGE
845
846THREAD_PACKAGE_NAME=THREAD_PACKAGE_INVALID
847threadlib=""
848case $with_thread_package in
849    yes|posix|pthreads|solaris|uti)
850        AC_CHECK_HEADERS(pthread.h)
851        AC_CHECK_LIB([pthread],[pthread_key_create],[threadlib="-lpthread"])
852        THREAD_PACKAGE_NAME=THREAD_PACKAGE_POSIX
853        ;;
854    win|windows)
855        with_thread_package=win
856        THREAD_PACKAGE_NAME=THREAD_PACKAGE_WIN
857        AC_MSG_ERROR([The 'win' thread package is not supported via autoconf builds at this time.])
858        ;;
859    abt|argobots)
860        with_thread_package=argobots
861        PAC_CHECK_HEADER_LIB_FATAL([argobots], [abt.h], [abt], [ABT_key_create])
862        threadlib="-labt"
863        THREAD_PACKAGE_NAME=THREAD_PACKAGE_ARGOBOTS
864        ;;
865    no|none)
866        with_thread_package=none
867        THREAD_PACKAGE_NAME=THREAD_PACKAGE_NONE
868        ;;
869    *)
870	AC_MSG_ERROR([The specified thread package, $with_thread_package, is not supported.])
871        ;;
872esac
873
874# Define and export the selected thread library so that other packages
875# know what's used
876AC_DEFINE_UNQUOTED([THREAD_PACKAGE_NAME],[$THREAD_PACKAGE_NAME],[set to the name of the thread package])
877AC_SUBST(threadlib)
878
879# Check for h_addr or h_addr_list.  This is needed for the singjoin test
880# in manual/singjoin.c
881AC_CACHE_CHECK([whether struct hostent contains h_addr_list],
882dnl Use Double quote LANG_PROGRAM
883dnl so [] in h_addr_list[0] won't be ignored by IFELSE.
884pac_cv_have_haddr_list,[
885AC_COMPILE_IFELSE([
886   AC_LANG_PROGRAM([#include <netdb.h>],[[
887      struct hostent hp;
888      hp.h_addr_list[0]=0;
889   ]])
890],[pac_cv_have_haddr_list=yes],[pac_cv_have_haddr_list=no])
891])
892if test "$pac_cv_have_haddr_list" = "yes" ; then
893    AC_DEFINE(HAVE_H_ADDR_LIST,1,[Define if struct hostent contains h_addr_list])
894fi
895
896AC_CHECK_FUNCS(getrusage)
897
898# Check for the MPI Version.  This test assumes at least MPI 2.0.  For
899# some tests, we need to know if we are MPI 2.1 or MPI 2.2,
900# particularly for new routines in Fortran
901if test "$FROM_MPICH" != "yes" ; then
902    AC_CACHE_CHECK([that MPI program can be compiled],pac_cv_mpi_compile_ok,[
903AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include "mpi.h"],[MPI_Init(0,0);MPI_Finalize();])],pac_cv_mpi_compile_ok=yes,pac_cv_mpi_compile_ok=no)])
904    if test "$pac_cv_mpi_compile_ok" != yes ; then
905        AC_MSG_ERROR([Unable to compile an MPI program containing mpi.h!])
906    fi
907    AC_CACHE_CHECK([for major version of MPI],pac_cv_mpi_major_version,[
908for pac_cv_mpi_major_version in 3 2 1 unknown ; do
909    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include "mpi.h"],[
910#if MPI_VERSION == $pac_cv_mpi_major_version
911    ''' force failure '''
912#endif])],,break)
913done
914])
915
916    AC_CACHE_CHECK([for minor version of MPI],pac_cv_mpi_minor_version,[
917for pac_cv_mpi_minor_version in 4 3 2 1 0 unknown ; do
918    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include "mpi.h"],[
919#if MPI_SUBVERSION == $pac_cv_mpi_minor_version
920    ''' force failure '''
921#endif])],,break)
922done
923])
924MPI_VERSION=$pac_cv_mpi_major_version
925MPI_SUBVERSION=$pac_cv_mpi_minor_version
926else
927    # We are within the MPICH build.  Extract the MPI versions from
928    # mpi.h.in
929    if test ! -f $mpich_top_srcdir/src/include/mpi.h.in ; then
930        AC_MSG_ERROR([Could not find the required mpi.h.in file!])
931    fi
932    MPI_VERSION=`grep MPI_VERSION $mpich_top_srcdir/src/include/mpi.h.in | \
933    		      sed -e 's/#define *MPI_VERSION *\([0-4]\).*/\1/g'`
934    MPI_SUBVERSION=`grep MPI_SUBVERSION $mpich_top_srcdir/src/include/mpi.h.in | \
935    		      sed -e 's/#define *MPI_SUBVERSION *\([0-9]\).*/\1/g'`
936fi
937
938AC_SUBST(MPI_VERSION)
939AC_SUBST(MPI_SUBVERSION)
940
941# Running Fortran 77 compiler tests
942AC_PROG_F77
943if test "$enable_f77" = yes ; then
944    # If there is no working F77, then set enable_f77 to no
945    if test -z "$F77" ; then
946        enable_f77=no
947    fi
948fi
949# Simple tests for which other languages we can handle.
950# Use these only when configuring separate from an MPICH build
951f77dir="#"
952AC_SUBST(f77dir)
953buildingF77=no
954if test "$FROM_MPICH" = yes ; then
955    if test "$enable_f77" = yes ; then
956       # Assume success
957        otherlangs="$otherlangs f77"
958        f77dir=f77
959        buildingF77=yes
960    fi
961elif test "$enable_f77" = yes ; then
962    AC_MSG_CHECKING([that we can build MPI programs with Fortran 77])
963    AC_LANG_PUSH([Fortran 77])
964    AC_LINK_IFELSE([
965        AC_LANG_SOURCE([
966            program main
967            include 'mpif.h'
968            integer ierr
969            call mpi_init(ierr)
970            call mpi_finalize(ierr)
971            end
972        ])
973    ],[
974        AC_MSG_RESULT(yes)
975        otherlangs="$otherlangs f77"
976        f77dir=f77
977        buildingF77=yes
978    ],[
979        AC_MSG_RESULT(no)
980    ])
981    AC_LANG_POP([Fortran 77])
982fi
983#
984# At least one test (C++ test of C and Fortran datatypes) needs to
985# know if Fortran is supported
986if test "$f77dir" = "f77" ; then
987    AC_DEFINE(HAVE_FORTRAN_BINDING,1,[Define if Fortran is supported])
988fi
989
990
991AC_ARG_VAR([MPI_SIZEOF_AINT],[if set, force MPI_Aint to a width of this many bytes])
992AC_ARG_VAR([MPI_SIZEOF_OFFSET],[if set, force MPI_Offset to a width of this many bytes])
993
994# Common tests for F77
995if test "$buildingF77" = "yes" ; then
996    # Match integer types to the MPI types for MPI_Aint and MPI_Offset
997
998    # FIXME: Add a test to see if the environment is importing the
999    # necessary information.
1000
1001    # Get the sizes of the MPI types.  We use the following:
1002    # MPI_SIZEOF_OFFSET and MPI_SIZEOF_AINT
1003    if test -z "$MPI_SIZEOF_AINT" ; then
1004        # Aint should be an address-sized integer, the same as void*
1005        # We use a test on the size of void * to avoid any complications
1006        # in dealing with running programs containing MPI headers (e.g.,
1007        # the IBM MPI changes the main entry point so that MPI
1008        # programs cannot be run on the host node)
1009        AC_CHECK_SIZEOF(void *)
1010        MPI_SIZEOF_AINT=$ac_cv_sizeof_void_p
1011    fi
1012    if test -z "$MPI_SIZEOF_OFFSET" ; then
1013        # We have to try and get the size of offset anyway, since
1014        # it is not the same as void * (it depends on the available
1015        # file systems).  Since we want to avoid using the MPI linker,
1016        # we could do the following:
1017        #    Use the mpi compiler to compile the file, using the mpi
1018        #    header but no MPI calls
1019        #    Use the regular C linker to link the program
1020        # However, we do this only if the environment variable BASECC
1021        # has been provided.  Else we can try the following:
1022        # use
1023        #    sed -n 's/typedef \(.*\) MPI_Offset *;/\1/p' mpi.h
1024        # to extract the type corresponding to MPI_Offset and then
1025        # just use that.
1026dnl         AC_CACHE_CHECK([the sizeof MPI_Offset],ac_cv_sizeof_MPI_Offset,[
1027dnl              ac_cv_sizeof_MPI_Offset=unknown
1028dnl              rm -f conftest*
1029dnl              cat >>conftest.c <<EOF
1030dnl #include "mpi.h"
1031dnl #include <stdio.h>
1032dnl int main( int argc, char **argv )
1033dnl {
1034dnl     MPI_Offset a;
1035dnl     FILE *f = fopen("conftestval", "w" );
1036dnl     if (! f) exit(1);
1037dnl     fprintf( f, "%ld\n", (long)sizeof(MPI_Offset) );
1038dnl     fclose(f);
1039dnl     return 0;
1040dnl }
1041dnl EOF
1042dnl             # FIXME.  Check for BASECC
1043dnl             # Note: This assumes that CC has been set to the C compiler for
1044dnl             # MPI Programs, and that either any necessary include paths are
1045dnl             # already set or they are in CPPFLAGS (prefered) or CFLAGS.
1046dnl             if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext ; then
1047dnl                 if ./conftest$ac_exeext ; then
1048dnl                     #success
1049dnl                     ac_cv_sizeof_MPI_Offset=`cat conftestval`
1050dnl                 else
1051dnl                     # failure
1052dnl                     AC_MSG_WARN([Unable to run the program to determine the size of MPI_Offset])
1053dnl                     echo "configure: failed program was:" >&AC_FD_CC
1054dnl                     cat conftest.c >&AC_FD_CC
1055dnl                 fi
1056dnl             else
1057dnl                 # failure
1058dnl                 AC_MSG_WARN([Unable to build the program to determine the size of MPI_Offset])
1059dnl                 echo "configure: failed program was:" >&AC_FD_CC
1060dnl                 cat conftest.c >&AC_FD_CC
1061dnl             fi
1062dnl             rm -f conftest*
1063dnl         ])
1064        AC_CHECK_SIZEOF([MPI_Offset],[],[#include "mpi.h"])
1065        if test "$ac_cv_sizeof_MPI_Offset" = "unknown" \
1066             -o "$ac_cv_sizeof_MPI_Offset" -eq 0 ; then
1067             AC_MSG_WARN([Using 8 for the size of MPI_Offset])
1068             MPI_SIZEOF_OFFSET=8
1069        else
1070             MPI_SIZEOF_OFFSET=$ac_cv_sizeof_MPI_Offset
1071        fi
1072    fi
1073
1074    AC_LANG_PUSH([Fortran 77])
1075    AC_CACHE_CHECK([whether integer*4 is supported],pac_cv_fort_integer4,[
1076    AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[      integer*4 i])],
1077        pac_cv_fort_integer4=yes,
1078        pac_cv_fort_integer4=no)])
1079    AC_CACHE_CHECK([whether integer*8 is supported],pac_cv_fort_integer8,[
1080    AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[      integer*8 i])],
1081        pac_cv_fort_integer8=yes,
1082        pac_cv_fort_integer8=no)])
1083    AC_CACHE_CHECK([whether integer*16 is supported],pac_cv_fort_integer16,[
1084    AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[      integer*16 i])],
1085        pac_cv_fort_integer16=yes,
1086        pac_cv_fort_integer16=no)])
1087    AC_LANG_POP([Fortran 77])
1088
1089    # Determine Aint and Offset
1090    for len in 4 8 16 ; do
1091        eval testval=\$"pac_cv_fort_integer$len"
1092        if test "$testval" = no ; then continue ; fi
1093        testval=$len
1094        if test $len = "$MPI_SIZEOF_AINT" ; then
1095            F77_MPI_ADDRESS="integer*$len"
1096        fi
1097        if test $len = "$MPI_SIZEOF_OFFSET" ; then
1098            F77_MPI_OFFSET="integer*$len"
1099        fi
1100    done
1101    # At this point, we could create a test program that would confirm that
1102    # the values in Fortran matched the values in C.
1103    # Note that we must make this an MPI program because the compiler for
1104    # MPI programs may require that the programs be run with mpiexec or
1105    # something similar (this is true for the IBM MPI, for example).
1106    rm -f f77/init/checksizes.c
1107    # If it is a VPATH build, f77/init may not be there.
1108    if test ! -d f77/init ; then
1109        mkdir f77
1110        mkdir f77/init
1111    fi
1112    cat > f77/init/checksizes.c <<EOF
1113#include "mpi.h"
1114#include <stdio.h>
1115int main( int argc, char **argv )
1116{
1117  int fsizeof_aint   = $MPI_SIZEOF_AINT;
1118  int fsizeof_offset = $MPI_SIZEOF_OFFSET;
1119  int err = 0, rc = 0;
1120
1121  MPI_Init( &argc, &argv );
1122  if (sizeof(MPI_Aint) != fsizeof_aint) {
1123     printf( "Sizeof MPI_Aint is %d but Fortran thinks it is %d\n",
1124             (int)sizeof(MPI_Aint), fsizeof_aint );
1125     err++;
1126  }
1127  if (sizeof(MPI_Offset) != fsizeof_offset) {
1128     printf( "Sizeof MPI_Offset is %d but Fortran thinks it is %d\n",
1129             (int)sizeof(MPI_Offset), fsizeof_offset );
1130     err++;
1131  }
1132  MPI_Finalize( );
1133  if (err > 0) rc = 1;
1134  return rc;
1135}
1136EOF
1137
1138    # Check for name mapping so that we can do the handle conversion tests
1139    # This test needs both the base c and fortran compilers
1140    AC_LANG_FORTRAN77
1141    PAC_PROG_F77_NAME_MANGLE
1142
1143    # Check that the Fortran compiler will allow us to pass arguments
1144    # of different types (e.g., for MPI_Send)
1145    # Any strict Fortran compiler will require that the arguments be
1146    # the same type - currently, the NAG Fortran compiler (nagfor) is known
1147    # to enforce this.
1148    # We could set the FFLAGS/FCFLAGS values with the option that disables
1149    # this check (if we found one), but because that may affect other tests,
1150    # instead we tell the user and exit.
1151    PAC_PROG_F77_MISMATCHED_ARGS(addarg,yes)
1152    if test "X$addarg" != "X" ; then
1153        # We could add the names of all of the MPI routines that
1154        # accept different types.  Instead, we fail cleanly.
1155        # Some Fortran compilers allow you to turn off checking for
1156        # mismatched arguments for *all* routines.  Adding an argument
1157	# that turns off checking for *everything* is not something that
1158	# configure should do - if the user wants this, they can follow
1159	# the instructions in the following error message.
1160	AC_MSG_ERROR([The Fortran compiler $F77 does not accept programs that call the same routine with arguments of different types without the option $addarg.  Rerun configure with FFLAGS=$addarg])
1161    fi
1162
1163    # Check whether we need -lU77 to get iargc and getarg, which
1164    # are used for a few of the tests in spawn (U77 was needed with
1165    # the native compilers on HPUX.  See the aclocal_f77(old).m4 file,
1166    # which has a much more complete set of tests.
1167    #
1168    # FIXME: if we can't figure out how to get iargc/getarg, then
1169    # we should really turn off those spawn tests
1170    # Even better is to limit this to the F200x version, where there is
1171    # an interface to the command line.
1172    F77SPAWNARGTEST=""
1173    AC_MSG_CHECKING([for Fortran libraries needed for getarg])
1174    AC_LANG_CONFTEST([
1175        AC_LANG_PROGRAM([],[
1176            character*64 s
1177            integer i
1178            i = iargc()
1179            call getarg(i,s)
1180        ])
1181    ])
1182    AC_LINK_IFELSE([],[
1183        pac_cv_getarg_needs_u77=no
1184    ],[
1185        pac_cv_getarg_needs_u77=unknown
1186    ])
1187    if test "$pac_cv_getarg_needs_u77" != "no" ; then
1188        # Try again with -lU77
1189        saveLIBS="$LIBS"
1190        LIBS="$LIBS -lU77"
1191        AC_LINK_IFELSE([],[
1192            pac_cv_getarg_needs_u77=yes
1193        ],[
1194            pac_cv_getarg_needs_u77=unavailable
1195        ])
1196        LIBS="$saveLIBS"
1197        if test "$pac_cv_getarg_needs_u77" = "yes" ; then
1198            F77_GETARG_LIBS=-lU77
1199        fi
1200    fi
1201    rm -f conftest$ac_exeext
1202    if test -n "$F77_GETARG_LIBS" ; then
1203        AC_MSG_RESULT($F77_GETARG_LIBS)
1204    else
1205        if test "$pac_cv_getarg_needs_u77" = "unavailable" ; then
1206            AC_MSG_RESULT([getarg and/or iargc are not available.  Some spawn tests will fail to link])
1207	    F77SPAWNARGTEST="#"
1208        else
1209            AC_MSG_RESULT([none needed])
1210        fi
1211    fi
1212    AC_SUBST(F77_GETARG_LIBS)
1213    # FIXME: Currently, we hope that FC accepts the same library
1214    FC_GETARG_LIBS="$F77_GETARG_LIBS"
1215    AC_SUBST(FC_GETARG_LIBS)
1216    # F77SPAWNARGTEST is set to "#" to comment out tests in
1217    # f77/spawn/testlist.in that require non-standard extensions to
1218    # access the commandline
1219    AC_SUBST(F77SPAWNARGTEST)
1220
1221    # ALLOCMEMF is set in f77/ext/testlist if we can try this
1222    # Fortran extension
1223    ALLOCMEMF=""
1224    PAC_PROG_F77_CRAY_POINTER([
1225        ALLOCMEMF="allocmemf 1"
1226        FFLAGS="$FFLAGS $CRAYPTR_FFLAGS"
1227    ])
1228    AC_SUBST(ALLOCMEMF)
1229    # See the f90 block of code for the Fortran 90 version of ALLOCMEMF,
1230    # i.e. ALLOCMEMFC.
1231
1232fi
1233# Set a default for the Fortran 77 version of MPI_Offset.
1234if test -z "$F77_MPI_OFFSET" ; then
1235    F77_MPI_OFFSET="integer*8"
1236    AC_MSG_WARN([Selecting integer*8 as the Fortran type for MPI_Offset])
1237fi
1238AC_SUBST(F77_MPI_OFFSET)
1239# FIXME: Find a way to get the correct value
1240if test -z "$F77_MPI_ADDRESS" ; then
1241    F77_MPI_ADDRESS="integer"
1242    AC_MSG_WARN([Selecting integer as the Fortran type for MPI_Aint])
1243fi
1244AC_SUBST(F77_MPI_ADDRESS)
1245
1246# Running Fortran 90+ compiler tests
1247AC_PROG_FC
1248if test "$enable_fc" = yes ; then
1249    # Work around feature in autoconf that adds -g -O2 to FCFLAGS
1250    saveFCFLAGS="$FCFLAGS"
1251    FCFLAGS="$saveFCFLAGS"
1252    # If there is no working FC, then set enable_fc to no
1253    if test -z "$FC" ; then
1254        enable_fc=no
1255    fi
1256fi
1257f90dir="#"
1258AC_SUBST(f90dir)
1259# First, see if we have an f90 compiler.  This uses code similar to that
1260# in the MPICH top-level configure
1261if test "$enable_fc" = yes -a "$enable_f77" = yes ; then
1262    PAC_PROG_FC_WORKS
1263    if test -z "$FC" -o "$pac_cv_prog_fc_works" != yes ; then
1264        enable_fc=no
1265    fi
1266fi
1267
1268dnl If enable_fc=yes up to this point then enable_f77=yes also
1269dnl PAC_PROG_FC and PAC_PROG_FC_WORKS return OK
1270if test "$enable_fc" = yes ; then
1271    # Make sure that the compilers are compatible.  This
1272    # will also make sure that the program named in FC is
1273    # a working Fortran 90 compiler
1274    # Only check if we're *not* building within MPICH
1275    # (MPICH will have made the test)
1276    # FIXME: Do we want to check only simple routine names
1277    # (those without an underscore?)
1278    if test "$FROM_MPICH" != yes ; then
1279        PAC_FC_AND_F77_COMPATIBLE(enable_fc=yes,enable_fc=no)
1280    fi
1281fi
1282
1283if test "$enable_fc" = yes ; then
1284    if test "$ac_fc_srcext" != "f90" ; then
1285        AC_LANG_PUSH([Fortran])
1286        AC_FC_SRCEXT([f90],[
1287            FCFLAGS="$FCFLAGS $FCFLAGS_f90"
1288        ],[
1289            AC_MSG_WARN([Fortran 90 test being disabled because the $FC compiler does not accept a .f90 extension])
1290            f90dir=#
1291            enable_fc=no
1292        ])
1293        AC_LANG_POP([Fortran])
1294    fi
1295
1296    # The Fortran90 tests rely on free-form input which needs to be tested
1297    # before any test that may modify FCFLAGS, e.g. the cray-pointer test.
1298    # The order of the tests is important in compiler like g95.
1299    # Recent experience showed that the IBM xlf compiler, at least on
1300    # some systems, requires -qfree=f90 instead of -qfree .  At this
1301    # writing (11/27/12), this Autoconf macro still uses -qfree and has
1302    # no mechanism for extension.  This test may fail in that case; if
1303    # you encounter a problem, document it and submit it to the autoconf
1304    # bug list, not the MPICH bug list.
1305    AC_FC_FREEFORM
1306
1307    # See if the compiler supports the Cray-style pointers
1308    ALLOCMEMFC=""
1309    PAC_PROG_FC_CRAY_POINTER([
1310        ALLOCMEMFC="allocmemf90 1"
1311        FCFLAGS="$FCFLAGS $CRAYPTR_FCFLAGS"
1312    ])
1313    AC_SUBST(ALLOCMEMFC)
1314
1315    # Check for the new command line routines used in one of the spawn tests
1316    AC_LANG_PUSH([Fortran])
1317    F03SPAWNARGTEST=""
1318    AC_MSG_CHECKING([whether $FC supports the Fortran 2003 routines to access the commandline])
1319    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[
1320            character*64 s
1321            integer i
1322            i = command_argument_count()
1323            call get_command_argument(i,s)
1324        ])],[pac_cv_fc_has_args=yes],[pac_cv_fc_has_args=no])
1325    AC_MSG_RESULT($pac_cv_fc_has_args)
1326    if test "$pac_cv_fc_has_args" != "yes" ; then
1327        F03SPAWNARGTEST="#"
1328    fi
1329    # F03SPAWNARGTEST is set to "#" to comment out tests in
1330    # f90/spawn/testlist.in that require Fortran 2003 features to
1331    # access the commandline
1332    AC_SUBST(F03SPAWNARGTEST)
1333    AC_LANG_POP([Fortran])
1334
1335    if test -f f77/init/checksizes.c ; then
1336        # If it is a VPATH build, f90/init may not be there.
1337        if test ! -d f90/init ; then
1338            mkdir f90
1339            mkdir f90/init
1340        fi
1341        cp f77/init/checksizes.c f90/init
1342    fi
1343    # At least one of the Fortran 90 tests makes use of a module; this
1344    # allows us to find it to delete the created object file
1345    PAC_FC_MODULE
1346fi
1347#
1348if test "$FROM_MPICH" = yes ; then
1349    if test "$enable_fc" = yes ; then
1350        otherlangs="$otherlangs f90"
1351        f90dir=f90
1352    fi
1353elif test "$enable_fc" = yes ; then
1354    AC_MSG_CHECKING([that we can build MPI programs with Fortran 90])
1355    AC_LANG_PUSH([Fortran])
1356    AC_LINK_IFELSE([
1357        AC_LANG_SOURCE([
1358            program main
1359            use mpi
1360            integer ierr
1361            call mpi_init(ierr)
1362            call mpi_finalize(ierr)
1363            end
1364        ])
1365    ],[
1366        AC_MSG_RESULT(yes)
1367        otherlangs="$otherlangs f90"
1368        f90dir=f90
1369    ],[
1370        AC_MSG_RESULT(no)
1371    ])
1372    AC_LANG_POP([Fortran])
1373fi
1374
1375if test "$enable_f08" = "yes" ; then
1376    PAC_FC_2008_SUPPORT([enable_f08=yes],[enable_f08=no])
1377fi
1378
1379f08dir="#"
1380AC_SUBST(f08dir)
1381# FIXME if $FROM_MPICH is no, we should test build an MPI F08 program
1382if test "$enable_f08" = "yes" -a "$FROM_MPICH" = "yes" ; then
1383   f08dir=f08
1384fi
1385
1386# Running C++ compiler tests
1387AC_PROG_CXX
1388if test "$enable_cxx" = yes ; then
1389    if test -z "$CXX" ; then
1390        enable_cxx=no
1391    fi
1392fi
1393# Simple tests for which other languages we can handle
1394cxxdir="#"
1395# The C++ interface added support for the Distgraph routines in MPI-2.2,
1396# but not all MPI implementations support that.  nocxxdistgraph allows
1397# us to detect that and to skip the test when it is not supported.
1398nocxxdistgraph="#"
1399AC_SUBST(cxxdir)
1400if test "$FROM_MPICH" = yes ; then
1401    if test "$enable_cxx" = yes ; then
1402        otherlangs="$otherlangs cxx"
1403        cxxdir=cxx
1404        # MPICH ABI removed support for MPI::Distgraphcomm, so
1405	# nocxxdistgraph is left as #, which comments out the test
1406	# in cxx/topol/testlist.in
1407    fi
1408elif test "$enable_cxx" = yes ; then
1409    AC_MSG_CHECKING([that we can build MPI programs with C++])
1410    AC_LANG_PUSH([C++])
1411    AC_LINK_IFELSE([
1412        AC_LANG_PROGRAM([
1413#include "mpi.h"
1414        ],[
1415    MPI::Init();
1416    MPI::Finalize();
1417        ])
1418    ],[
1419        AC_MSG_RESULT(yes)
1420        otherlangs="$otherlangs cxx"
1421        cxxdir=cxx
1422    ],[
1423        AC_MSG_RESULT(no)
1424    ])
1425    # Check for support of the Distgraphcomm, added in MPI 2.2.
1426    # Some MPI implementations may support MPI 2.2 or MPI 3.x, but not
1427    # support the Distgraphcomm C++ interface
1428    AC_MSG_CHECKING([whether MPI C++ includes Distgraphcomm])
1429    AC_COMPILE_IFELSE([
1430        AC_LANG_PROGRAM([
1431#include "mpi.h"
1432        ],[
1433    MPI::Distgraphcomm dcomm;
1434    MPI::Init();
1435    MPI::Finalize();
1436        ])
1437    ],[
1438        AC_MSG_RESULT(yes)
1439        nocxxdistgraph=""
1440    ],[
1441        AC_MSG_RESULT(no)
1442    ])
1443
1444    AC_LANG_POP([C++])
1445fi
1446AC_SUBST(nocxxdistgraph)
1447
1448if test "$enable_cxx" = yes ; then
1449    AC_CACHE_CHECK([whether <iostream> available],pac_cv_cxx_has_iostream,[
1450    AC_LANG_PUSH([C++])
1451    AC_COMPILE_IFELSE([
1452        AC_LANG_PROGRAM([#include <iostream>],[using namespace std;])
1453    ],[pac_cv_cxx_has_iostream=yes],[pac_cv_cxx_has_iostream=no])
1454    ])
1455
1456    if test "$pac_cv_cxx_has_iostream" = yes ; then
1457        AC_DEFINE(HAVE_IOSTREAM,1,[Define if iostream is available])
1458    else
1459        # Look for iostream.h (in C++ mode, we need the full name)
1460        AC_CHECK_HEADERS(iostream.h)
1461        if test "$ac_cv_header_iostream_h" != yes ; then
1462            AC_MSG_ERROR([C++ compiler $CXX $CXXFLAGS has neither iostream nor iostream.h.])
1463        fi
1464        # Warning: the autoconf macros will fall back onto /lib/cpp for
1465        # C and C++ preprocessing *without* checking that /lib/cpp even
1466        # exists.
1467        if test "$CXXCPP" = "/lib/cpp" ; then
1468            if test ! -x "/lib/cpp" ; then
1469                AC_MSG_WARN([Warning: Autoconf error, could not find a C++ Preprocessor.  Using false for the preprocessor so that tests will continue.])
1470                CXXCPP=false
1471            fi
1472        fi
1473    fi
1474
1475    AX_CXX_NAMESPACE_STD
1476
1477    if test "$ac_cv_cxx_namespaces" != yes ; then
1478        AC_MSG_WARN([The compiler $CXX does not support C++ namespaces.  This may cause problems for the tests])
1479    fi
1480    AC_LANG_POP([C++])
1481fi
1482
1483AC_LANG_C
1484
1485LT_INIT()
1486
1487# IO
1488iodir="#"
1489if test "$enable_romio" != no ; then
1490    iodir=io
1491    AC_DEFINE(HAVE_MPI_IO,1,[Define if MPI-IO (really ROMIO) is included])
1492    if test "$FROM_MPICH" = yes ; then
1493        # MPICH no longer uses and MPIO_Request
1494        pac_cv_have_mpio_request=no
1495    else
1496        AC_CACHE_CHECK([whether MPIO_Request is defined for MPI IO],
1497        pac_cv_have_mpio_request,[
1498            AC_COMPILE_IFELSE([
1499                AC_LANG_PROGRAM([#include "mpi.h"],[MPIO_Request r;])
1500            ],[pac_cv_have_mpio_request=yes],[pac_cv_have_mpio_request=no])
1501        ])
1502    fi
1503    if test "$pac_cv_have_mpio_request" = no ; then
1504        AC_DEFINE(MPIO_USES_MPI_REQUEST,,[Define if MPI IO uses MPI_Request])
1505    fi
1506fi
1507AC_SUBST(iodir)
1508
1509impldir="#"
1510#
1511# Check for implementation to enable implementation-specific options
1512if test $enable_strictmpi != "yes" ; then
1513   # Is this MPICH?
1514   if test "$FROM_MPICH" = yes ; then
1515      impldir="mpich"
1516   else
1517       AC_CACHE_CHECK([Is the MPI derived from MPICH],
1518       pac_cv_ismpich,[
1519           AC_COMPILE_IFELSE([
1520               AC_LANG_PROGRAM([#include "mpi.h"],[return 1 + MPICH;])
1521           ],[pac_cv_ismpich=yes],[pac_cv_ismpich=no])
1522       ])
1523       if test "$pac_cv_ismpich" = "yes" ; then
1524           impldir="mpich"
1525       fi
1526   fi
1527fi
1528AC_SUBST(impldir)
1529#
1530# MPI_INTEGER16 is mentioned in only one place in MPI 2.1, and some
1531# implementations may have missed it.  Check to see if it is available in
1532# C.
1533if test "$FROM_MPICH" = yes ; then
1534   # MPICH correctly includes this type.
1535   pac_cv_have_mpi_integer16=yes
1536else
1537    AC_CACHE_CHECK([whether MPI_INTEGER16 is available],
1538    pac_cv_have_mpi_integer16,[
1539        AC_COMPILE_IFELSE([
1540            AC_LANG_PROGRAM([#include "mpi.h"],[
1541                MPI_Datatype t = MPI_INTEGER16;
1542            ])
1543        ],[pac_cv_have_mpi_integer16=yes],[pac_cv_have_mpi_integer16=no])
1544    ])
1545fi
1546if test "$pac_cv_have_mpi_integer16" = yes ; then
1547    AC_DEFINE(HAVE_MPI_INTEGER16,1,[Define if MPI_INTEGER16 is available])
1548fi
1549
1550# MPI_Aint was intended as an address-sized int.  However, MPI didn't
1551# specify this - MPI_Aint must be large enough to hold an address-sized
1552# integer, but it can be larger.  To get clean compilation in some places,
1553# we need a pointer-sized integer.  The following code looks for one.
1554
1555# Make sure we are using the local C compiler (if the local
1556# machine is different that the system that MPICC is for, then
1557# set the cross-compilation feature)
1558AC_CHECK_SIZEOF(void *)
1559AC_CHECK_SIZEOF(int)
1560AC_CHECK_SIZEOF(long)
1561AC_CHECK_SIZEOF(long long)
1562AC_CHECK_SIZEOF(short)
1563POINTERINT=MPI_Aint
1564AC_MSG_CHECKING([for C integer type of address size])
1565for type in int long long_long short ; do
1566    eval len=\$ac_cv_sizeof_$type
1567    if test "$len" = "$ac_cv_sizeof_void_p" ; then
1568        POINTERINT=`echo $type | sed -e 's/_/ /'`
1569        break
1570    fi
1571done
1572AC_MSG_RESULT($POINTERINT)
1573AC_DEFINE_UNQUOTED(POINTERINT_t,$POINTERINT,[POINTERINT_t is a pointer-sized integer])
1574
1575# Find perl; used to create some of the tests from template and
1576# defintion files
1577AC_PATH_PROG(PERL,perl)
1578AC_SUBST(PERL)
1579AC_SUBST(otherlangs)
1580AC_SUBST(threadsdir)
1581AC_SUBST(MPIEXEC)
1582AC_SUBST(MAKE)
1583if test -z "$MPILIBNAME" ; then MPILIBNAME=mpich ; fi
1584AC_SUBST(MPILIBNAME)
1585dnl MPI_SOURCE may be set as an environment variable giving the location
1586dnl of the MPI implementation.  This is used only in runtests to include
1587dnl the location of the source of the MPI implementation into the XML
1588dnl summary file
1589AC_SUBST(MPI_SOURCE)
1590
1591if test "$FROM_MPICH" = yes ; then
1592    # Set compilers/flags to be substituted in output files, e.g. Makefiles.
1593    LDFLAGS="$saveLDFLAGS"
1594    # note that the default definition of bindir is
1595    #    '${exec_prefix}/bin'
1596    # so even if prefix is set, exec prefix is not until
1597    # the very last moment (i.e., not here).
1598    if test "X$exec_prefix" = "XNONE" ; then
1599        saveExec_prefix=$exec_prefix
1600        if test "X$prefix" = "XNONE" ; then
1601            # Use the default
1602            exec_prefix=$ac_default_prefix
1603        else
1604            exec_prefix=$prefix
1605        fi
1606        # Evaluate with the current setting of exec_prefix
1607        eval mpibindir=${bindir}
1608        exec_prefix=$saveExec_prefix
1609    else
1610        eval mpibindir=${bindir}
1611    fi
1612
1613    # we did our tests with the base compilers, now point the make system at the
1614    # installed compiler wrappers for actually building the tests
1615    CC=$mpibindir/$MPICC_NAME
1616    F77=$mpibindir/$MPIF77_NAME
1617    FC=$mpibindir/$MPIFORT_NAME
1618    CXX=$mpibindir/$MPICXX_NAME
1619    if test -z "$MPIEXEC" ; then
1620        MPIEXEC=$mpibindir/$MPIEXEC_NAME
1621    fi
1622
1623    # Zero out the flags, since they are already contained in the compiler
1624    # wrapper scripts.  Note that this will kill any flags that have been added
1625    # to the xFLAGS only in this script.
1626    #
1627    # The only real flags we seem to add in this script relate to cray
1628    # pointer support in Fortran, so we include that var here where
1629    # appropriate.
1630    #
1631    # The other case are the performance tests - for datatype performance,
1632    # compiling with optimization is important.
1633    CFLAGS=""
1634    CPPFLAGS=""
1635    LDFLAGS=""
1636    LIBS=""
1637    FFLAGS="$CRAYPTR_FFLAGS"
1638    FCFLAGS="$CRAYPTR_FCFLAGS"
1639    CXXFLAGS=""
1640else
1641    # We need either mpiexec or mpirun.  If we don't find them,
1642    # the user will need to determine how to run a program
1643    AC_PATH_PROG(MPIEXEC,$MPIEXEC_NAME)
1644fi
1645
1646# TODO: use variables such as has_f77 etc. instead of double use $f77dir etc.
1647AM_CONDITIONAL([HAS_F77], [test $f77dir = f77])
1648AM_CONDITIONAL([HAS_F90], [test $f90dir = f90])
1649AM_CONDITIONAL([HAS_F08], [test $f08dir = f08])
1650AM_CONDITIONAL([HAS_CXX], [test $cxxdir = cxx])
1651
1652AC_OUTPUT_COMMANDS([chmod a+x maint/testmerge])
1653AC_OUTPUT_COMMANDS([chmod a+x runtests checktests])
1654AC_OUTPUT_COMMANDS([chmod a+x manual/manyconnect])
1655AC_OUTPUT_COMMANDS([chmod a+x impls/hydra/proc_binding.sh])
1656dnl Note that this format for AC_OUTPUT can cause problems for autoconf
1657dnl run under cygwin
1658AC_OUTPUT(maint/testmerge \
1659          runtests \
1660          checktests \
1661          Makefile \
1662          basic/Makefile \
1663          attr/Makefile \
1664          attr/testlist \
1665          util/Makefile \
1666          coll/Makefile \
1667	  coll/testlist \
1668          comm/Makefile \
1669          comm/testlist \
1670          datatype/Makefile \
1671          datatype/testlist \
1672          errhan/Makefile \
1673          group/Makefile \
1674          info/Makefile \
1675          init/Makefile \
1676          pt2pt/Makefile \
1677          pt2pt/testlist \
1678          mpi_t/Makefile \
1679          rma/Makefile \
1680          rma/testlist \
1681          spawn/Makefile \
1682          spawn/testlist \
1683          topo/Makefile \
1684          io/Makefile \
1685          io/testlist \
1686          f77/Makefile \
1687          f77/attr/Makefile \
1688          f77/attr/attraints.h \
1689          f77/pt2pt/attr1aints.h \
1690          f77/ext/add1size.h \
1691          f77/datatype/Makefile \
1692          f77/datatype/typeaints.h \
1693          f77/coll/Makefile \
1694          f77/comm/Makefile \
1695          f77/topo/Makefile \
1696          f77/init/Makefile \
1697          f77/rma/addsize.h \
1698          f77/pt2pt/Makefile \
1699          f77/info/Makefile \
1700          f77/spawn/Makefile \
1701	  f77/spawn/testlist \
1702          f77/spawn/type1aint.h \
1703          f77/rma/Makefile \
1704          f77/ext/Makefile \
1705          f77/ext/testlist \
1706          f77/io/Makefile \
1707          f77/io/iooffset.h \
1708          f77/io/iodisp.h \
1709          f77/io/ioaint.h \
1710          f77/io/testlist \
1711	  f77/profile/Makefile \
1712          f90/Makefile \
1713          f90/attr/Makefile \
1714          f90/datatype/Makefile \
1715          f90/f90types/Makefile \
1716          f90/coll/Makefile \
1717          f90/comm/Makefile \
1718          f90/topo/Makefile \
1719          f90/init/Makefile \
1720          f90/pt2pt/Makefile \
1721          f90/rma/Makefile \
1722          f90/info/Makefile \
1723          f90/spawn/Makefile \
1724	  f90/spawn/testlist \
1725          f90/timer/Makefile \
1726          f90/ext/Makefile \
1727          f90/ext/testlist \
1728          f90/io/Makefile \
1729          f90/io/testlist \
1730          f90/misc/Makefile \
1731	      f90/profile/Makefile \
1732	  f08/Makefile \
1733	      f08/attr/Makefile \
1734	      f08/datatype/Makefile \
1735	      f08/coll/Makefile \
1736	      f08/comm/Makefile \
1737	      f08/pt2pt/Makefile \
1738	      f08/rma/Makefile \
1739	      f08/subarray/Makefile \
1740	      f08/topo/Makefile \
1741	      f08/io/Makefile \
1742	      f08/io/testlist \
1743          f08/init/Makefile \
1744          f08/info/Makefile \
1745          f08/spawn/Makefile \
1746          f08/spawn/testlist \
1747          f08/timer/Makefile \
1748          f08/ext/Makefile \
1749          f08/misc/Makefile \
1750          f08/profile/Makefile \
1751     cxx/Makefile \
1752          cxx/attr/Makefile \
1753          cxx/attr/testlist \
1754          cxx/pt2pt/Makefile \
1755          cxx/comm/Makefile \
1756          cxx/coll/Makefile \
1757	  cxx/errhan/Makefile \
1758          cxx/info/Makefile \
1759          cxx/datatype/Makefile \
1760          cxx/datatype/testlist \
1761          cxx/io/Makefile \
1762          cxx/init/Makefile \
1763          cxx/rma/Makefile \
1764          cxx/spawn/Makefile \
1765          cxx/spawn/testlist \
1766	  cxx/topo/Makefile \
1767          threads/Makefile \
1768          threads/pt2pt/Makefile \
1769          threads/comm/Makefile \
1770          threads/comm/testlist \
1771          threads/init/Makefile \
1772          threads/mpi_t/Makefile \
1773          threads/spawn/Makefile \
1774          threads/rma/Makefile \
1775          threads/coll/Makefile \
1776          threads/coll/testlist \
1777          threads/perf/Makefile \
1778          errors/Makefile \
1779          errors/attr/Makefile \
1780          errors/basic/Makefile \
1781          errors/coll/Makefile \
1782          errors/comm/Makefile \
1783          errors/datatype/Makefile \
1784          errors/faults/Makefile \
1785          errors/group/Makefile \
1786          errors/pt2pt/Makefile \
1787          errors/rma/Makefile \
1788          errors/spawn/Makefile \
1789          errors/spawn/testlist \
1790          errors/topo/Makefile \
1791          errors/io/Makefile \
1792          errors/cxx/Makefile \
1793          errors/cxx/errhan/Makefile \
1794          errors/cxx/io/Makefile \
1795          errors/f77/Makefile \
1796          errors/f77/io/Makefile \
1797          errors/f77/io/addsize.h \
1798          errors/f77/io/iooffset.h \
1799          errors/f90/Makefile \
1800	  errors/f90/io/Makefile \
1801          errors/f08/Makefile \
1802	  errors/f08/io/Makefile \
1803	  ckpoint/Makefile \
1804	  ft/Makefile \
1805          manual/Makefile \
1806          manual/manyconnect \
1807          manual/mpi_t/Makefile \
1808          perf/Makefile \
1809          testlist \
1810          cxx/testlist \
1811	  cxx/topo/testlist \
1812          f77/testlist \
1813          f90/testlist \
1814          f08/testlist \
1815          threads/testlist \
1816          errors/testlist \
1817          errors/cxx/testlist \
1818          errors/f77/testlist \
1819          errors/f90/testlist \
1820          impls/testlist \
1821          f77/rma/testlist \
1822          f90/rma/testlist \
1823          f08/rma/testlist \
1824          impls/Makefile \
1825          impls/hydra/Makefile \
1826          impls/hydra/proc_binding.sh \
1827          impls/mpich/Makefile \
1828          impls/mpich/testlist \
1829          impls/mpich/mpi_t/Makefile \
1830          impls/mpich/comm/Makefile \
1831          impls/mpich/comm/testlist \
1832          )
1833
1834