diff --git a/acinclude.m4 b/acinclude.m4 index 4d9f87d476..7c75c6e634 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -43,6 +43,8 @@ sinclude(config/f90_get_precision.m4) sinclude(config/f90_get_range.m4) sinclude(config/f90_get_sizeof.m4) +m4_sinclude(config/ompi_objc.m4) + sinclude(config/ompi_try_assemble.m4) sinclude(config/ompi_config_asm.m4) @@ -50,6 +52,9 @@ sinclude(config/ompi_case_sensitive_fs_setup.m4) sinclude(config/ompi_check_broken_qsort.m4) sinclude(config/ompi_check_optflags.m4) sinclude(config/ompi_check_icc.m4) +sinclude(config/ompi_check_bproc.m4) +sinclude(config/ompi_check_tm.m4) +sinclude(config/ompi_check_xgrid.m4) sinclude(config/ompi_config_subdir.m4) sinclude(config/ompi_config_subdir_args.m4) sinclude(config/ompi_configure_options.m4) @@ -73,5 +78,18 @@ sinclude(config/ompi_config_threads.m4) # The config/mca_no_configure_components.m4 file is generated by # autogen.sh # - sinclude(config/mca_no_configure_components.m4) + +# +# mca_m4_config_include.m4 is generated by autogen.sh. It includes +# the list of all component configure.m4 macros. +# +# Some explination... There doesn't seem to be a good way to have +# this include file live in config/, because autoheader does it's +# analysis without taking into account the directory in which the .m4 +# file calling sinclude is in, while autoconf does take the directory +# into account. So you end up with a situation where you need two +# directories listed in the single sinclude. If anyone knows a way +# to move mca_m4_config_include.m4 into config/, I'd appreciate it. +# +m4_sinclude(mca_m4_config_include.m4) diff --git a/autogen.sh b/autogen.sh index e1896ccfc1..ff14901ea7 100755 --- a/autogen.sh +++ b/autogen.sh @@ -55,8 +55,9 @@ ompi_automake="" mca_no_configure_components_file="config/mca_no_configure_components.m4" mca_no_config_list_file="mca_no_config_list" -mca_no_config_amc_file="mca_no_config_amc" mca_no_config_env_file="mca_no_config_env" +mca_m4_include_file="mca_m4_config_include.m4" +mca_m4_config_env_file="mca_m4_config_env" autogen_subdir_file="autogen.subdirs" # locations to look for mca modules @@ -427,7 +428,6 @@ run_no_configure_component() { # Write out to two files (they're merged at the end) noconf_list_file="$noconf_ompi_topdir/$mca_no_config_list_file" - noconf_amc_file="$noconf_ompi_topdir/$mca_no_config_amc_file" noconf_env_file="$noconf_ompi_topdir/$mca_no_config_env_file" cat >> "$noconf_list_file" <> "$noconf_amc_file" <> "$noconf_list_file" done - # Add this component directory to the list of - # subdirectories to traverse when building. - cat >> "$noconf_list_file" <> "$noconf_amc_file" < Adding to top-level configure no-configure subdirs: --> $noconf_dir @@ -480,6 +455,63 @@ EOF } +############################################################################## +# +# run_m4_configure_component +# Prepares the component with an .m4 file that should be used to +# configure the component. +# +# INPUT: +# +# OUTPUT: +# none +# +# SIDE EFFECTS: +# +############################################################################## +run_m4_configure_component() { + m4conf_dir="$1" + m4conf_ompi_topdir="$2" + m4conf_project="$3" + m4conf_framework="$4" + m4conf_component="$5" + + # Write out to two files (they're merged at the end) + m4conf_list_file="$m4conf_ompi_topdir/$mca_no_config_list_file" + m4conf_env_file="$m4conf_ompi_topdir/$mca_m4_config_env_file" + + cat >> "$m4conf_list_file" <> "$m4conf_list_file" + done + + # add the sinclude of the m4 file into the mca .m4 file directly. It shouldn't + # be in a macro, so this is fairly safe to do. By this point, there should + # already be a header and all that. + # sincludes are relative to the currently included file, so need the .. to get us + # from config/ to the topsrcdir again. + echo "sinclude(${m4conf_project}/mca/${m4conf_framework}/${m4conf_component}/configure.m4)" >> "$m4conf_ompi_topdir/$mca_m4_include_file" + + cat < Adding to top-level configure m4-configure subdirs: +--> $m4conf_dir +--> Adding to top-level configure AC_CONFIG_FILES list: +--> $PARAM_CONFIG_FILES +EOF + + echo "component_list=\"\$component_list $m4conf_component\"" >> "$m4conf_env_file" +} + + ############################################################################## # # process_dir - look at the files present in a given directory, and do @@ -581,6 +613,27 @@ EOF EOF ./autogen.sh + elif test -f configure.params -a -f configure.m4 ; then + cat < "$mca_m4_include_file" < "$mca_no_configure_components_file" <> "$mca_no_configure_components_file" + + # make list of components that are "m4 configure" + . "$mca_m4_config_env_file" + component_list_define="m4_define(mca_${framework}_m4_config_component_list, [" + component_list_define_first="1" + for component in $component_list ; do + if test "$component_list_define_first" = "1"; then + component_list_define="${component_list_define}${component}" + component_list_define_first="0" + else + component_list_define="${component_list_define}, ${component}" + fi + done + component_list_define="${component_list_define}])" + echo "$component_list_define" >> "$mca_no_configure_components_file" fi done @@ -860,23 +940,15 @@ EOF dnl List all the no-configure components that we found, and AC_DEFINE dnl their versions -AC_DEFUN([MCA_FIND_NO_CONFIGURE_COMPONENTS],[ +AC_DEFUN([MCA_NO_CONFIG_CONFIG_FILES],[ `cat $mca_no_config_list_file` ])dnl - -dnl Separately have the AM_CONDITIONALS as to whether we build the -dnl components static or shared. This must be done separately from the -dnl list because we have to do it late in the configure script, after -dnl all the test variable values have been set. - -AC_DEFUN([MCA_AMC_NO_CONFIGURE_COMPONENTS],[ -`cat $mca_no_config_amc_file` -])dnl EOF + # Remove temp files - rm -f $mca_no_config_list_file $mca_no_config_amc_file $mca_no_config_env_file + rm -f $mca_no_config_list_file $mca_no_config_env_file $mca_m4_config_env_file # Finally, after we found all the no-configure MCA components, run # the config in the top-level directory diff --git a/config/c_get_alignment.m4 b/config/c_get_alignment.m4 index 0859040b3d..08b75470dc 100644 --- a/config/c_get_alignment.m4 +++ b/config/c_get_alignment.m4 @@ -15,15 +15,17 @@ dnl dnl $HEADER$ dnl -AC_DEFUN([OMPI_C_GET_ALIGNMENT],[ +# OMPI_C_GET_ALIGN(type, config_var) +# ---------------------------------- # Determine datatype alignment. # First arg is type, 2nd arg is config var to define. -AC_MSG_CHECKING([alignment of $1]) -AC_TRY_RUN([ +AC_DEFUN([OMPI_C_GET_ALIGNMENT],[ + AC_CACHE_CHECK([alignment of $1], + [AS_TR_SH([ompi_cv_c_align_$1])], + [AC_TRY_RUN([ #include #include #include - struct foo { char c; $1 x; }; int main(int argc, char* argv[]) { @@ -34,30 +36,25 @@ int main(int argc, char* argv[]) diff = ((char *)&p->x) - ((char *)&p->c); fprintf(f, "%d\n", (diff >= 0) ? diff : -diff); return 0; -}],[ompi_ac_align=`cat conftestval`],[ompi_ac_align=-1],[ompi_ac_align=-2]) - -if test "$ompi_ac_align" = "-2" ; then - # cross compile - do a non-executable test. Trick taken from - # the AC CVS repository. If only they'd get around to actually - # releasing something post 2.59... - _AC_COMPUTE_INT([offsetof (struct { char x; $1 y; }, y)], - [ompi_ac_align], - [AC_INCLUDES_DEFAULT() +}], [AS_TR_SH([ompi_cv_c_align_$1])=`cat conftestval`], + [AC_MSG_WARN([*** Problem running configure test!]) + AC_MSG_WARN([*** See config.log for details.]) + AC_MSG_ERROR([*** Cannot continue.])], + [ # cross compile - do a non-executable test. Trick + # taken from the AC CVS repository. If only they'd + # get around to actually releasing something post 2.59... + _AC_COMPUTE_INT([offsetof (struct { char x; $1 y; }, y)], + [AS_TR_SH([ompi_cv_c_align_$1])], + [AC_INCLUDES_DEFAULT() #ifndef offsetof # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0) -#endif], - [ompi_ac_align=-1]) -fi +#endif +], + [AC_MSG_WARN([*** Problem running configure test!]) + AC_MSG_WARN([*** See config.log for details.]) + AC_MSG_ERROR([*** Cannot continue.])])])]) -if test "`expr $ompi_ac_align \<= 0`" = "1"; then - AC_MSG_WARN([*** Problem running configure test!]) - AC_MSG_WARN([*** See config.log for details.]) - AC_MSG_ERROR([*** Cannot continue.]) -fi +AC_DEFINE_UNQUOTED([$2], [$AS_TR_SH([ompi_cv_c_align_$1])], [Alignment of type $1]) +eval "$2=$AS_TR_SH([ompi_cv_c_align_$1])" -AC_MSG_RESULT([$ompi_ac_align]) -AC_DEFINE_UNQUOTED($2, $ompi_ac_align, [Alignment of type $1]) -eval "$2=$ompi_ac_align" -unset ompi_ac_align - -/bin/rm -f conftest*])dnl +/bin/rm -f conftest* ]) dnl diff --git a/config/c_weak_symbols.m4 b/config/c_weak_symbols.m4 index 0c9415eccc..be590cb88d 100644 --- a/config/c_weak_symbols.m4 +++ b/config/c_weak_symbols.m4 @@ -15,32 +15,22 @@ dnl dnl $HEADER$ dnl +# OMPI_C_WEAK_SYMBOLS() +# --------------------- +# sets OMPI_C_WEAK_SYMBOLS=1 if C compiler has support for weak symbols define([OMPI_C_WEAK_SYMBOLS],[ -# -# Arguments: None -# -# Depdencies: None -# -# Check to see if the C compiler can handle weak symbols -# -# Sets OMPI_C_WEAK_SYMBOLS=1 if the C compiler has support for weak -# symbols. -# - -AC_MSG_CHECKING([for weak symbols]) -AC_LINK_IFELSE(AC_LANG_SOURCE([[#pragma weak fake = real + AC_CACHE_CHECK([for weak symbols], + [ompi_cv_c_weak_symbols], + [AC_LINK_IFELSE([AC_LANG_SOURCE([[#pragma weak fake = real extern int fake(int i); int real(int i); int real(int i) { return i; } int main(int argc, char* argv[]) { return fake(3); -}]]), ompi_happy=1, ompi_happy=0) -if test "$ompi_happy" = "1"; then - AC_MSG_RESULT([yes]) - OMPI_C_HAVE_WEAK_SYMBOLS=1 -else - AC_MSG_RESULT([no]) - OMPI_C_HAVE_WEAK_SYMBOLS=0 -fi +}]])], + [ompi_cv_c_weak_symbols="yes"], + [ompi_cv_c_weak_symbols="no"])]) -unset ompi_happy])dnl + AS_IF([test "$ompi_cv_c_weak_symbols" = "yes"], + [OMPI_C_HAVE_WEAK_SYMBOLS=1], [OMPI_C_HAVE_WEAK_SYMBOLS=0]) +]) dnl diff --git a/config/ompi_check_bproc.m4 b/config/ompi_check_bproc.m4 new file mode 100644 index 0000000000..3f8d75e6f4 --- /dev/null +++ b/config/ompi_check_bproc.m4 @@ -0,0 +1,51 @@ +# -*- shell-script -*- +# +# Copyright (c) 2004-2005 The Trustees of Indiana University. +# All rights reserved. +# Copyright (c) 2004-2005 The Trustees of the University of Tennessee. +# All rights reserved. +# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +# University of Stuttgart. All rights reserved. +# Copyright (c) 2004-2005 The Regents of the University of California. +# All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# + + +# OMPI_CHECK_BPROC(prefix, [action-if-found], [action-if-not-found]) +# -------------------------------------------------------- +AC_DEFUN([OMPI_CHECK_BPROC],[ + AC_ARG_WITH([bproc], + [AC_HELP_STRING([--with-bproc], + [Directory where the bproc software is installed])]) + + ompi_check_bproc_save_CPPFLAGS="$CPPFLAGS" + ompi_check_bproc_save_LDFLAGS="$LDFLAGS" + ompi_check_bproc_save_LIBS="$LIBS" + + AS_IF([test ! -z "$with_bproc"], + [CPPFLAGS="$CPPFLAGS -I$with_bproc/include" + LDFLAGS="$LDFLAGS -L$with_bproc/lib"]) + AC_CHECK_HEADERS([sys/bproc.h], + [AC_CHECK_LIB([bproc], + [bproc_numnodes], + [ompi_check_bproc_happy="yes"], + [ompi_check_bproc_happy="no"])], + [ompi_check_bproc_happy="no"]) + + CPPFLAGS="$ompi_check_bproc_save_CPPFLAGS" + LDFLAGS="$ompi_check_bproc_save_LDFLAGS" + LIBS="$ompi_check_bproc_save_LIBS" + + AS_IF([test "$ompi_check_bproc_happy" = "yes"], + [AS_IF([test ! -z "$with_bproc"], + [$1_CPPFLAGS="$$1_CPPFLAGS -I$with_bproc/include" + $1_LDFLAGS="$$1_LDFLAGS -L$with_bproc/lib" + $1_LIBS="$$1_LIBS -lbproc"]) + $2], + [$3]) +]) diff --git a/config/ompi_check_tm.m4 b/config/ompi_check_tm.m4 new file mode 100644 index 0000000000..eafe494c22 --- /dev/null +++ b/config/ompi_check_tm.m4 @@ -0,0 +1,53 @@ +# -*- shell-script -*- +# +# Copyright (c) 2004-2005 The Trustees of Indiana University. +# All rights reserved. +# Copyright (c) 2004-2005 The Trustees of the University of Tennessee. +# All rights reserved. +# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +# University of Stuttgart. All rights reserved. +# Copyright (c) 2004-2005 The Regents of the University of California. +# All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# + + +# OMPI_CHECK_TM(prefix, [action-if-found], [action-if-not-found]) +# -------------------------------------------------------- +AC_DEFUN([OMPI_CHECK_TM],[ + AC_ARG_WITH([tm], + [AC_HELP_STRING([--with-tm], + [Directory where the tm software is installed])]) + + + ompi_check_tm_save_CPPFLAGS="$CPPFLAGS" + ompi_check_tm_save_LDFLAGS="$LDFLAGS" + ompi_check_tm_save_LIBS="$LIBS" + + AS_IF([test ! -z "$with_tm"], + [CPPFLAGS="$CPPFLAGS -I$with_tm/include" + LDFLAGS="$LDFLAGS -L$with_tm/lib"]) + AC_CHECK_HEADERS([tm.h], + [AC_CHECK_LIB([pbs], + [tm_init], + [ompi_check_tm_happy="yes"], + [ompi_check_tm_happy="no"])], + [ompi_check_tm_happy="no"]) + + CPPFLAGS="$ompi_check_tm_save_CPPFLAGS" + LDFLAGS="$ompi_check_tm_save_LDFLAGS" + LIBS="$ompi_check_tm_save_LIBS" + + + AS_IF([test "$ompi_check_tm_happy" = "yes"], + [AS_IF([test ! -z "$with_tm"], + [$1_CPPFLAGS="$$1_CPPFLAGS -I$with_tm/include" + $1_LDFLAGS="$$1_LDFLAGS -L$with_tm/lib" + $1_LIBS="$$1_LIBS -lpbs"]) + $2], + [$3]) +]) diff --git a/config/ompi_check_xgrid.m4 b/config/ompi_check_xgrid.m4 new file mode 100644 index 0000000000..a6102bac62 --- /dev/null +++ b/config/ompi_check_xgrid.m4 @@ -0,0 +1,60 @@ +# -*- shell-script -*- +# +# Copyright (c) 2004-2005 The Trustees of Indiana University. +# All rights reserved. +# Copyright (c) 2004-2005 The Trustees of the University of Tennessee. +# All rights reserved. +# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +# University of Stuttgart. All rights reserved. +# Copyright (c) 2004-2005 The Regents of the University of California. +# All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# + + +# OMPI_CHECK_XGRID(prefix, [action-if-found], [action-if-not-found]) +# -------------------------------------------------------- +AC_DEFUN([OMPI_CHECK_XGRID],[ + AC_REQUIRE([AC_PROG_OBJC]) + + AC_ARG_WITH([xgrid], + [AC_HELP_STRING([--with-xgrid], + [Build support for the Apple Xgrid batch system (default: yes)])]) + + AC_CACHE_CHECK([for XGridFoundation Framework], + [ompi_cv_check_xgrid_foundation], + [AS_IF([test "$with_xgrid" != "no"], + [_OMPI_CHECK_XGRID([ompi_cv_check_xgrid_foundation="yes"], + [ompi_cv_check_xgrid_foundation="no"])], + [ompi_cv_check_xgrid_foundation="no"])]) + + AS_IF([test "$ompi_cv_check_xgrid_foundation" = "yes"], + [$1_OBJCFLAGS="$$1_OBJCFLAGS -F XGridFoundation" + $1_LDFLAGS="$$1_LDFLAGS -framework XGridFoundation" + $2], [$3]) +]) + +# _OMPI_CHECK_XGRID([action-if-found], [action-if-not-found]) +# -------------------------------------------------------- +AC_DEFUN([_OMPI_CHECK_XGRID],[ + # ok, so in environments where this is going to work, the objc and + # c compilers are the same thing. Because our ompi_prog_objc is + # really lame, you can't push/pop languages into and out of + # objective-C (as soon as something post Autoconf 2.59 comes out, + # it will have Objective C support, and this will all be much + # simpler). We modify CFLAGS because AC_TRY_LINK is going to use + # the C compiler. Automake, however, is smart enough to know what + # Objective C is, so in the end, we put things in OBJCFLAGS and + # the right things will happen. *sigh* + + ompi_check_xgrid_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -framework XGridFoundation" + AC_TRY_LINK([],[;],[ompi_check_xgrid_happy="yes"],[ompi_check_xgrid_happy="no"]) + CFLAGS="$ompi_check_xgrid_save_CFLAGS" + + AS_IF([test "$ompi_check_xgrid_happy" = "no"], [$2], [$1]) +]) diff --git a/config/ompi_config_asm.m4 b/config/ompi_config_asm.m4 index 33d8816fbc..f714710818 100644 --- a/config/ompi_config_asm.m4 +++ b/config/ompi_config_asm.m4 @@ -79,12 +79,11 @@ dnl assembles and does not leave a label in the output of nm. Fall dnl back to L if nothing else seems to work :/ dnl dnl ################################################################# -AC_DEFUN([OMPI_CHECK_ASM_LSYM],[ - AC_REQUIRE([OMPI_CHECK_ASM_LABEL_SUFFIX]) - AC_REQUIRE([AC_PROG_NM]) - AC_MSG_CHECKING([prefix for lsym labels]) - ompi_cv_asm_lsym="L" +# _OMPI_CHECK_ASM_LSYM([variable-to-set]) +# --------------------------------------- +AC_DEFUN([_OMPI_CHECK_ASM_LSYM],[ + $1="L" for sym in L .L $ L$ ; do asm_result=0 @@ -96,12 +95,12 @@ ${sym}mytestlabel$ompi_cv_asm_label_suffix], if $NM conftest.$OBJEXT > conftest.out 2>&AC_FD_CC ; then if test "`grep mytestlabel conftest.out`" = "" ; then # there was no symbol... looks promising to me - ompi_cv_asm_lsym="$sym" + $1="$sym" asm_result=1 elif test ["`grep ' [Nt] .*mytestlabel' conftest.out`"] = "" ; then # see if we have a non-global-ish symbol # but we should see if we can do better. - ompi_cv_asm_lsym="$sym" + $1="$sym" fi else # not so much on the NM goodness :/ @@ -115,13 +114,22 @@ ${sym}mytestlabel$ompi_cv_asm_label_suffix], fi done rm -f conftest.out + unset asm_result sym +]) - AC_MSG_RESULT([$ompi_cv_asm_lsym]) +# OMPI_CHECK_ASM_LSYM() +# --------------------- +AC_DEFUN([OMPI_CHECK_ASM_LSYM],[ + AC_REQUIRE([OMPI_CHECK_ASM_LABEL_SUFFIX]) + AC_REQUIRE([AC_PROG_NM]) + + AC_CACHE_CHECK([prefix for lsym labels], + [ompi_cv_asm_lsym], + [_OMPI_CHECK_ASM_LSYM([ompi_cv_asm_lsym])]) AC_DEFINE_UNQUOTED([OMPI_ASM_LSYM], ["$ompi_cv_asm_lsym"], [Assembly prefix for lsym labels]) OMPI_ASM_LSYM="$ompi_cv_asm_lsym" AC_SUBST(OMPI_ASM_LSYM) - unset asm_result sym ])dnl diff --git a/config/ompi_config_subdir.m4 b/config/ompi_config_subdir.m4 index 2a7af3e063..b0428d2ba7 100644 --- a/config/ompi_config_subdir.m4 +++ b/config/ompi_config_subdir.m4 @@ -105,16 +105,19 @@ if test "$subdir_dir" != ":" -a -d $srcdir/$subdir_dir; then # Construct the --cache-file argument # - case $cache_file in - [[\\/]* | ?:[\\/]*] ) - # Absolute path - subdir_cache_file="$cache_file" - ;; - *) - # Relative path - subdir_cache_file="$subdir_dots$cache_file" - ;; - esac +dnl case $cache_file in +dnl [[\\/]* | ?:[\\/]*] ) +dnl # Absolute path +dnl subdir_cache_file="$cache_file" +dnl ;; +dnl *) +dnl # Relative path +dnl subdir_cache_file="$subdir_dots$cache_file" +dnl ;; +dnl esac + # BWB - subdir caching is a pain since we change CFLAGS and all that. + # Just disable it for now + subdir_cache_file="/dev/null" # # Invoke the configure script in the subdirectory diff --git a/config/ompi_functions.m4 b/config/ompi_functions.m4 index 4888e1afb2..b56807e5e7 100644 --- a/config/ompi_functions.m4 +++ b/config/ompi_functions.m4 @@ -37,6 +37,22 @@ ompi_show_subtitle() { *** ${1} EOF } + + +ompi_show_subsubtitle() { + cat <cr, - # crompi->cr). - # JMS Fix this + # print some nice messages about what we're about to do... + AC_MSG_CHECKING([for no configure components in framework $2]) + AC_MSG_RESULT([mca_$2_no_config_component_list]) + AC_MSG_CHECKING([for m4 configure components in framework $2]) + AC_MSG_RESULT([mca_$2_m4_config_component_list]) - case "$type" in - crmpi) - generic_type="cr" - ;; - crompi) - generic_type="cr" - ;; - *) - generic_type="$type" - ;; - esac + # configure components that don't have any component-specific + # configuration. See comment in CONFIGURE_PROJECT about the + # m4_ifval + # if there isn't a component list, abort + m4_ifdef([mca_$2_no_config_component_list], [], + [m4_fatal([Could not find mca_$2_no_config_component_list - rerun autogen.sh without -l])]) + m4_foreach(mca_component, [mca_$2_no_config_component_list], + [m4_ifval(mca_component, + [MCA_CONFIGURE_NO_CONFIG_COMPONENT($1, $2, mca_component, + [all_components], + [static_components], + [dso_components], + [static_ltlibs])])]) - # set the direct / no direct flag - str="DIRECT_COMPONENT=\$DIRECT_${type}" - eval $str - if test ! -z "$DIRECT_COMPONENT" ; then - str="MCA_${type}_DIRECT_CALL_COMPONENT=$DIRECT_COMPONENT" - eval $str - str="MCA_${type}_DIRECT_CALL=1" - eval $str - else - str="MCA_${type}_DIRECT_CALL_COMPONENT=" - eval $str - str="MCA_${type}_DIRECT_CALL=0" - eval $str - fi + # configure components that use built-in configuration scripts + # see comment in CONFIGURE_PROJECT about the m4_ifval + # if there isn't a component list, abort + m4_ifdef([mca_$2_m4_config_component_list], [], + [m4_fatal([Could not find mca_$2_m4_config_component_list - rerun autogen.sh without -l])]) + m4_foreach(mca_component, [mca_$2_m4_config_component_list], + [m4_ifval(mca_component, + [MCA_CONFIGURE_M4_CONFIG_COMPONENT($1, $2, mca_component, + [all_components], + [static_components], + [dso_components], + [static_ltlibs])])]) - # Iterate through the list of no-configure components - foo="found_components=\$MCA_${type}_NO_CONFIGURE_SUBDIRS" - eval $foo + # configure components that provide their own configure script + MCA_CONFIGURE_ALL_CONFIG_COMPONENTS($1, $2, [all_components], + [static_components], [dso_components], + [static_ltlibs]) - for component in $found_components; do - m=`basename "$component"` + # reminder - the dollar sign 2 substitutions are at autogen time, so + # this will actually work in a rational way... + MCA_$2_ALL_SUBDIRS="$all_components" + MCA_$2_STATIC_SUBDIRS="$static_components" + MCA_$2_DSO_SUBDIRS="$dso_components" + MCA_$2_STATIC_LTLIBS="$static_ltlibs" - # build if: - # - the component type is direct and we are that component - # - there is no ompi_ignore file - # - there is an ompi_ignore, but there is an empty ompi_unignore - # - there is an ompi_ignore, but username is in ompi_unignore - if test -d $srcdir/$component ; then - # decide if we want the component to be built or not. This - # is spread out because some of the logic is a little complex - # and test's syntax isn't exactly the greatest. We want to - # build the component by default. - want_component=1 - if test -f $srcdir/$component/.ompi_ignore ; then - # If there is an ompi_ignore file, don't build - # the component. Note that this decision can be - # overriden by the unignore logic below. - want_component=0 - fi - if test -f $srcdir/$component/.ompi_unignore ; then - # if there is an empty ompi_unignore, that is - # equivalent to having your userid in the unignore file. - # If userid is in the file, unignore the ignore file. - if test ! -s $srcdir/$component/.ompi_unignore ; then - want_component=1 - elif test ! -z "`grep $USER $srcdir/$component/.ompi_unignore`" ; then - want_component=1 - fi - fi - # if this component type is direct and we are not it, we don't want - # to be built. Otherwise, we do want to be built. - if test ! -z "$DIRECT_COMPONENT" ; then - if test "$DIRECT_COMPONENT" = "$m" ; then - want_component=1 - else - want_component=0 - fi - fi - if test "$want_component" = "1" ; then - ompi_show_subtitle "MCA component $type:$m (no configure script)" + AC_SUBST(MCA_$2_ALL_SUBDIRS) + AC_SUBST(MCA_$2_STATIC_SUBDIRS) + AC_SUBST(MCA_$2_DSO_SUBDIRS) + AC_SUBST(MCA_$2_STATIC_LTLIBS) - # Remove any possible sym link in the mca-dynamic tree - - rm -f $project/dynamic-mca/$type/$m + # add all the makefiles for the framework to the CONFIG_FILES. + # Don't add common/base, since it doesn't exist + m4_if([$2], [common], + [AC_CONFIG_FILES([$1/mca/$2/Makefile $1/dynamic-mca/$2/Makefile])], + [AC_CONFIG_FILES([$1/mca/$2/Makefile $1/dynamic-mca/$2/Makefile $1/mca/$2/base/Makefile])]) - # Now process the component - - MCA_PROCESS_COMPONENT(1, 1, $project, $type, $m) - - # Note that the AM_CONDITIONAL for this component is set in - # config/mca_no_configure_components.m4 -- which is generated by - # autogen.sh because we cannot have a variable - # AM_CONDITIONAL name (which we need here). Since - # autogen.sh knows the name that is necessary, it just - # generated the AM_CONDITIONAL directly. Here, we fill in - # the variable that is used in that AM_CONDITIONAL. - - if test "$compile_mode" = "dso"; then - value=1 - else - value=0 - fi - foo="BUILD_${type}_${m}_DSO=$value" - eval $foo - - # double check that we can build direct if that was requested - # DIRECT_CALL_HEADER *must* be defined by the component - # (in its post configure) if it - # can be direct built, so we use that as a keyword to tell us - # whether the component was successfully setup or not - if test "$DIRECT_COMPONENT" = "$m" -a \ - -z "$MCA_${type}_DIRECT_CALL_HEADER" ; then -AC_MSG_ERROR([${type} component ${m} was requested to be directly linked -into libmpi, but does not support such a configuration. Please choose -another ${type} component for direct compilation or allow all components -of type ${type} to be loaded at runtime.]) - fi - fi - fi - done - - # Find all configureable components, run their configure scripts, - # etc. - - for component in $srcdir/$project/mca/$type/*; do - FOUND=0 - HAPPY=0 - m="`basename $component`" - # build if: - # - the component type is direct and we are that component - # - there is no ompi_ignore file - # - there is an ompi_ignore, but there is an empty ompi_unignore - # - there is an ompi_ignore, but username is in ompi_unignore - if test -d $component -a -x $component/configure ; then - want_component=1 - if test -f $srcdir/$component/.ompi_ignore ; then - want_component=0 - fi - if test -f $srcdir/$component/.ompi_unignore ; then - if test ! -s $srcdir/$component/.ompi_unignore ; then - want_component=1 - elif test ! -z "`grep $USER $srcdir/$component/.ompi_unignore`" ; then - want_component=1 - fi - fi - # if this component type is direct and we are not it, we don't want - # to be built. Otherwise, we do want to be built. - if test ! -z "$DIRECT_COMPONENT" ; then - if test "$DIRECT_COMPONENT" = "$m" ; then - # BWB - need some check in here to make sure component - # can be built direct! - want_component=1 - else - want_component=0 - fi - fi - if test "$want_component" = "1" ; then - ompi_show_subtitle "MCA component $type:$m (need to configure)" - - # We found one! - - FOUND=1 - - # Remove any possible sym link in the mca-dynamic tree - - rm -f $project/dyanmic-mca/$type/$m - - # Configure the component subdirectory - - OMPI_CONFIG_SUBDIR([$project/mca/$type/$m], - [$ompi_subdir_args], - [HAPPY=1], [HAPPY=0]) - fi - fi - - # Process this component - - MCA_PROCESS_COMPONENT($FOUND, $HAPPY, $project, $type, $m) - # double check that we can build direct if that was requested - if test "$DIRECT_COMPONENT" = "$m" -a \ - -z "$MCA_${type}_DIRECT_CALL_HEADER" ; then -AC_MSG_ERROR([${type} component ${m} was requested to be directly linked -into libmpi, but does not support such a configuration. Please choose -another ${type} component for direct compilation or allow all components -of type ${type} to be loaded at runtime.]) - fi - - done - - # m4 weirdness: must also do the echo after the sort, or we get a - # string with newlines in it - - all_components="`sort $outfile.all`" - all_components="`echo $all_components`" - static_components="`sort $outfile.static`" - static_components="`echo $static_components`" - dso_components="`sort $outfile.dso`" - dso_components="`echo $dso_components`" - rm -f $outfile $outfile.all $outfile.static $outfile.dso # Create the final .h file that will be included in the type's # top-level glue. This lists all the static components. We don't # need to do this for "common". - - if test "$type" != "common"; then + if test "$2" != "common"; then cat > $outfile < /dev/null 2>&1 if test "$?" != "0"; then mv $outfile $outfile_real @@ -460,255 +353,251 @@ EOF fi rm -f $outfile.struct $outfile.extern - # Save the results for the Makefile.am's. Note the whacky shell - # script escaping that is necessary because $components may be - # multiple words, but we also need to substitute on ${type}... + unset all_components static_components dso_components outfile outfile_real +]) - foo="MCA_${type}_ALL_SUBDIRS"'="$all_components"' - eval "$foo" - foo="MCA_${type}_STATIC_SUBDIRS"'="$static_components"' - eval "$foo" - foo="MCA_${type}_DSO_SUBDIRS"'="$dso_components"' - eval "$foo" - foo="MCA_${type}_STATIC_LTLIBS"'="$static_ltlibs"' - eval "$foo" -done -unset foo type m components structs outfile outdir total_dir file \ - all_components static_components dso_components static_ltlibs -# Grumble. It seems that AC_SUBST and AC_DEFINE don't let you -# substitue on a variable name that contains a variable (e.g., -# OMPI_MCA_$type_SUBDIRS). So we have to do this manually. :-( +###################################################################### +# +# MCA_CONFIGURE_NO_CONFIG_COMPONENT +# +# Configure the given framework and all components inside the framework. +# Assumes that the framework is located in [project_name]/mca/[framework], +# and that all components are available under the framework directory. +# Will configure all builtin components, then search for components with +# configure scripts. Assumes that no component is marked as builtin +# AND has a configure script. +# +# USAGE: +# MCA_CONFIGURE_PROJECT(project_name, framework_name, component_name +# all_components_variable, +# static_components_variable, +# dso_components_variable, +# static_ltlibs_variable) +# +###################################################################### +AC_DEFUN([MCA_CONFIGURE_NO_CONFIG_COMPONENT],[ + ompi_show_subsubsubtitle "MCA component $2:$3 (no configuration)" -# Common types + # remove any possible symlink in the mca-dynamic tree + rm -f $1/dynamic-mca/$2/$3 -AC_SUBST(MCA_common_ALL_SUBDIRS) -AC_SUBST(MCA_common_STATIC_SUBDIRS) -AC_SUBST(MCA_common_DSO_SUBDIRS) -AC_SUBST(MCA_common_STATIC_LTLIBS) + MCA_COMPONENT_BUILD_CHECK($1, $2, $3, [should_build=1], [should_build=2]) + MCA_COMPONENT_COMPILE_MODE($1, $2, $3, compile_mode) -# ORTE types + if test "$should_build" = "1" ; then + MCA_PROCESS_COMPONENT($1, $2, $3, $4, $5, $6, $7, $compile_mode) + else + MCA_PROCESS_DEAD_COMPONENT($1, $2, $3) + fi -AC_SUBST(MCA_oob_ALL_SUBDIRS) -AC_SUBST(MCA_oob_STATIC_SUBDIRS) -AC_SUBST(MCA_oob_DSO_SUBDIRS) -AC_SUBST(MCA_oob_STATIC_LTLIBS) + # set the AM_CONDITIONAL on how we should build + if test "$compile_mode" = "dso" ; then + BUILD_$2_$3_DSO=1 + else + BUILD_$2_$3_DSO=0 + fi + AM_CONDITIONAL(OMPI_BUILD_$2_$3_DSO, test "$BUILD_$2_$3_DSO" = "1") -AC_SUBST(MCA_dps_ALL_SUBDIRS) -AC_SUBST(MCA_dps_STATIC_SUBDIRS) -AC_SUBST(MCA_dps_DSO_SUBDIRS) -AC_SUBST(MCA_dps_STATIC_LTLIBS) + unset compile_mode +]) -AC_SUBST(MCA_errmgr_ALL_SUBDIRS) -AC_SUBST(MCA_errmgr_STATIC_SUBDIRS) -AC_SUBST(MCA_errmgr_DSO_SUBDIRS) -AC_SUBST(MCA_errmgr_STATIC_LTLIBS) -AC_SUBST(MCA_gpr_ALL_SUBDIRS) -AC_SUBST(MCA_gpr_STATIC_SUBDIRS) -AC_SUBST(MCA_gpr_DSO_SUBDIRS) -AC_SUBST(MCA_gpr_STATIC_LTLIBS) +###################################################################### +# +# MCA_CONFIGURE_M4_CONFIG_COMPONENT +# +# +# USAGE: +# MCA_CONFIGURE_PROJECT(project_name, framework_name, component_name +# all_components_variable, +# static_components_variable, +# dso_components_variable, +# static_ltlibs_variable) +# +###################################################################### +AC_DEFUN([MCA_CONFIGURE_M4_CONFIG_COMPONENT],[ + ompi_show_subsubsubtitle "MCA component $2:$3 (m4 configuration macro)" -AC_SUBST(MCA_ns_ALL_SUBDIRS) -AC_SUBST(MCA_ns_STATIC_SUBDIRS) -AC_SUBST(MCA_ns_DSO_SUBDIRS) -AC_SUBST(MCA_ns_STATIC_LTLIBS) + # remove any possible symlink in the mca-dynamic tree + rm -f $1/dynamic-mca/$2/$3 -AC_SUBST(MCA_ras_ALL_SUBDIRS) -AC_SUBST(MCA_ras_STATIC_SUBDIRS) -AC_SUBST(MCA_ras_DSO_SUBDIRS) -AC_SUBST(MCA_ras_STATIC_LTLIBS) + MCA_COMPONENT_BUILD_CHECK($1, $2, $3, [should_build=1], [should_build=0]) + MCA_COMPONENT_COMPILE_MODE($1, $2, $3, compile_mode) -AC_SUBST(MCA_rds_ALL_SUBDIRS) -AC_SUBST(MCA_rds_STATIC_SUBDIRS) -AC_SUBST(MCA_rds_DSO_SUBDIRS) -AC_SUBST(MCA_rds_STATIC_LTLIBS) + if test "$should_build" = "1" ; then + MCA_$2_$3_CONFIG([should_build=1], [should_build=0]) + fi -AC_SUBST(MCA_rmaps_ALL_SUBDIRS) -AC_SUBST(MCA_rmaps_STATIC_SUBDIRS) -AC_SUBST(MCA_rmaps_DSO_SUBDIRS) -AC_SUBST(MCA_rmaps_STATIC_LTLIBS) + if test "$should_build" = "1" ; then + MCA_PROCESS_COMPONENT($1, $2, $3, $4, $5, $6, $7, $compile_mode) + else + MCA_PROCESS_DEAD_COMPONENT($1, $2, $3) + fi -AC_SUBST(MCA_rmgr_ALL_SUBDIRS) -AC_SUBST(MCA_rmgr_STATIC_SUBDIRS) -AC_SUBST(MCA_rmgr_DSO_SUBDIRS) -AC_SUBST(MCA_rmgr_STATIC_LTLIBS) + # set the AM_CONDITIONAL on how we should build + if test "$compile_mode" = "dso" ; then + BUILD_$2_$3_DSO=1 + else + BUILD_$2_$3_DSO=0 + fi + AM_CONDITIONAL(OMPI_BUILD_$2_$3_DSO, test "$BUILD_$2_$3_DSO" = "1") -AC_SUBST(MCA_pls_ALL_SUBDIRS) -AC_SUBST(MCA_pls_STATIC_SUBDIRS) -AC_SUBST(MCA_pls_DSO_SUBDIRS) -AC_SUBST(MCA_pls_STATIC_LTLIBS) + unset compile_mode +]) -AC_SUBST(MCA_rml_ALL_SUBDIRS) -AC_SUBST(MCA_rml_STATIC_SUBDIRS) -AC_SUBST(MCA_rml_DSO_SUBDIRS) -AC_SUBST(MCA_rml_STATIC_LTLIBS) -AC_SUBST(MCA_schema_ALL_SUBDIRS) -AC_SUBST(MCA_schema_STATIC_SUBDIRS) -AC_SUBST(MCA_schema_DSO_SUBDIRS) -AC_SUBST(MCA_schema_STATIC_LTLIBS) +###################################################################### +# +# MCA_CONFIGURE_ALL_CONFIG_COMPONENTS +# +# configure all components in the given framework that have configure +# scripts and should be configured according to the usual rules... +# +# USAGE: +# MCA_CONFIGURE_ALL_CONFIG_COMPONENTS(project_name, +# framework_name, +# all_components_variable, +# static_components_variable, +# dso_components_variable, +# static_ltlibs_variable) +# +###################################################################### +AC_DEFUN([MCA_CONFIGURE_ALL_CONFIG_COMPONENTS],[ + for component_path in $srcdir/$1/mca/$2/* ; do + component="`basename $component_path`" + if test -d $component_path -a -x $component_path/configure ; then + ompi_show_subsubsubtitle "MCA component $2:$component (need to configure)" -AC_SUBST(MCA_soh_ALL_SUBDIRS) -AC_SUBST(MCA_soh_STATIC_SUBDIRS) -AC_SUBST(MCA_soh_DSO_SUBDIRS) -AC_SUBST(MCA_soh_STATIC_LTLIBS) + MCA_COMPONENT_BUILD_CHECK($1, $2, $component, + [should_build=1], [should_build=0]) + MCA_COMPONENT_COMPILE_MODE($1, $2, $component, compile_mode) -AC_SUBST(MCA_svc_ALL_SUBDIRS) -AC_SUBST(MCA_svc_STATIC_SUBDIRS) -AC_SUBST(MCA_svc_DSO_SUBDIRS) -AC_SUBST(MCA_svc_STATIC_LTLIBS) + if test "$should_build" = "1" ; then + OMPI_CONFIG_SUBDIR([$1/mca/$2/$component], + [$ompi_subdir_args], + [should_build=1], [should_build=2]) + fi -# MPI types + if test "$should_build" = "1" ; then + MCA_PROCESS_COMPONENT($1, $2, $component, $3, $4, $5, $6, $compile_mode) + else + MCA_PROCESS_DEAD_COMPONENT($1, $2, $component) + fi + fi + done +]) -AC_SUBST(MCA_allocator_ALL_SUBDIRS) -AC_SUBST(MCA_allocator_STATIC_SUBDIRS) -AC_SUBST(MCA_allocator_DSO_SUBDIRS) -AC_SUBST(MCA_allocator_STATIC_LTLIBS) -AC_SUBST(MCA_coll_ALL_SUBDIRS) -AC_SUBST(MCA_coll_STATIC_SUBDIRS) -AC_SUBST(MCA_coll_DSO_SUBDIRS) -AC_SUBST(MCA_coll_STATIC_LTLIBS) +###################################################################### +# +# MCA_COMPONENT_COMPILE_MODE +# +# set compile_mode_variable to the compile mode for the given component +# +# USAGE: +# MCA_COMPONENT_COMPILE_MODE(project_name, +# framework_name, component_name +# compile_mode_variable) +# +# NOTE: component_name may not be determined until runtime.... +# +###################################################################### +AC_DEFUN([MCA_COMPONENT_COMPILE_MODE],[ + project=$1 + framework=$2 + component=$3 -AC_SUBST(MCA_io_ALL_SUBDIRS) -AC_SUBST(MCA_io_STATIC_SUBDIRS) -AC_SUBST(MCA_io_DSO_SUBDIRS) -AC_SUBST(MCA_io_STATIC_LTLIBS) - -AC_SUBST(MCA_iof_ALL_SUBDIRS) -AC_SUBST(MCA_iof_STATIC_SUBDIRS) -AC_SUBST(MCA_iof_DSO_SUBDIRS) -AC_SUBST(MCA_iof_STATIC_LTLIBS) - -AC_SUBST(MCA_mpool_ALL_SUBDIRS) -AC_SUBST(MCA_mpool_STATIC_SUBDIRS) -AC_SUBST(MCA_mpool_DSO_SUBDIRS) -AC_SUBST(MCA_mpool_STATIC_LTLIBS) - -AC_SUBST(MCA_btl_ALL_SUBDIRS) -AC_SUBST(MCA_btl_STATIC_SUBDIRS) -AC_SUBST(MCA_btl_DSO_SUBDIRS) -AC_SUBST(MCA_btl_STATIC_LTLIBS) - -AC_SUBST(MCA_pml_ALL_SUBDIRS) -AC_SUBST(MCA_pml_STATIC_SUBDIRS) -AC_SUBST(MCA_pml_DSO_SUBDIRS) -AC_SUBST(MCA_pml_STATIC_LTLIBS) -OMPI_SETUP_DIRECT_CALL(pml, ompi) - -AC_SUBST(MCA_ptl_ALL_SUBDIRS) -AC_SUBST(MCA_ptl_STATIC_SUBDIRS) -AC_SUBST(MCA_ptl_DSO_SUBDIRS) -AC_SUBST(MCA_ptl_STATIC_LTLIBS) - -AC_SUBST(MCA_schema_ALL_SUBDIRS) -AC_SUBST(MCA_schema_STATIC_SUBDIRS) -AC_SUBST(MCA_schema_DSO_SUBDIRS) -AC_SUBST(MCA_schema_STATIC_LTLIBS) - -AC_SUBST(MCA_topo_ALL_SUBDIRS) -AC_SUBST(MCA_topo_STATIC_SUBDIRS) -AC_SUBST(MCA_topo_DSO_SUBDIRS) -AC_SUBST(MCA_topo_STATIC_LTLIBS) - -# Finally, now that we've filled in all the test variables, get all -# the AM_CONDITIONALs that indicate whether to build components as shared -# or static. - -# config/mca_no_configure_components.m4 -MCA_AMC_NO_CONFIGURE_COMPONENTS]) - -dnl ----------------------------------------------------------------------- -dnl ----------------------------------------------------------------------- -dnl ----------------------------------------------------------------------- - -AC_DEFUN([MCA_PROCESS_COMPONENT],[ -FOUND=$1 -HAPPY=$2 -project=$3 -type=$4 -m=$5 - -# See if it dropped an output file for us to pick up some -# shell variables in. - -infile="$project/mca/$type/$m/post_configure.sh" - -# Did we find a valid component, and did its configure run -# successfully? - -if test "$HAPPY" = "1"; then - - # Add this subdir to the mast list of all MCA component subdirs - - echo $m >> $outfile.all - - # Is this component going to built staic or shared? - - str="SHARED_TYPE=\$DSO_$type" + # Is this component going to built staic or shared? component + # might not be known until configure time, so have to use eval + # tricks - can't set variable names at autogen time. + str="SHARED_FRAMEWORK=\$DSO_$framework" eval $str - str="SHARED_GENERIC_TYPE=\$DSO_$generic_type" - eval $str - str="SHARED_COMPONENT=\$DSO_${type}_$m" + str="SHARED_COMPONENT=\$DSO_${framework}_$component" eval $str - - str="STATIC_TYPE=\$STATIC_$type" + str="STATIC_FRAMEWORK=\$STATIC_$framework" eval $str - str="STATIC_GENERIC_TYPE=\$STATIC_$generic_type" - eval $str - str="STATIC_COMPONENT=\$STATIC_${type}_$m" + str="STATIC_COMPONENT=\$STATIC_${framework}_$component" eval $str shared_mode_override=static # Setup for either shared or static - if test "$STATIC_TYPE" = "1" -o \ - "$STATIC_GENERIC_TYPE" = "1" -o \ + if test "$STATIC_FRAMEWORK" = "1" -o \ "$STATIC_COMPONENT" = "1" -o \ "$STATIC_all" = "1" ; then - compile_mode="static" + $4="static" elif test "$shared_mode_override" = "dso" -o \ - "$SHARED_TYPE" = "1" -o \ - "$SHARED_GENERIC_TYPE" = "1" -o \ + "$SHARED_FRAMEWORK" = "1" -o \ "$SHARED_COMPONENT" = "1" -o \ "$DSO_all" = "1"; then - compile_mode="dso" + $4="dso" else - compile_mode="static" + $4="static" fi - if test "$compile_mode" = "dso" ; then - echo $m >> $outfile.dso - rm -f "$project/dynamic-mca/$type/$m" - $LN_S "$OMPI_TOP_BUILDDIR/$project/mca/$type/$m" \ - "$project/dynamic-mca/$type/$m" + AC_MSG_CHECKING([for MCA component $framework:$component compile mode]) + if test "$DIRECT_$2" = "$component" ; then + AC_MSG_RESULT([$$4 - direct]) else - static_ltlibs="mca/$type/$m/libmca_${type}_${m}.la $static_ltlibs" - echo "extern const mca_base_component_t mca_${type}_${m}_component;" >> $outfile.extern - echo " &mca_${type}_${m}_component, " >> $outfile.struct - echo $m >> $outfile.static + AC_MSG_RESULT([$$4]) + fi +]) + + +###################################################################### +# +# MCA_PROCESS_COMPONENT +# +# does all setup work for given component. It should be known before +# calling that this component can build properly (and exists) +# +# USAGE: +# MCA_CONFIGURE_ALL_CONFIG_COMPONENTS(project_name, +# framework_name, component_name +# all_components_variable (4), +# static_components_variable (5), +# dso_components_variable (6), +# static_ltlibs_variable (7), +# compile_mode_variable (8)) +# +# NOTE: component_name may not be determined until runtime.... +# +###################################################################### +AC_DEFUN([MCA_PROCESS_COMPONENT],[ + project=$1 + framework=$2 + component=$3 + + # See if it dropped an output file for us to pick up some + # shell variables in. + infile="$project/mca/$framework/$component/post_configure.sh" + + # Add this subdir to the mast list of all MCA component subdirs + $4="$$4 $component" + + if test "$8" = "dso" ; then + $6="$$6 $component" + rm -f "$project/dynamic-mca/$framework/$component" + $LN_S "$OMPI_TOP_BUILDDIR/$project/mca/$framework/$component" \ + "$project/dynamic-mca/$framework/$component" + else + $7="mca/$framework/$component/libmca_${framework}_${component}.la $$7" + echo "extern const mca_base_component_t mca_${framework}_${component}_component;" >> $outfile.extern + echo " &mca_${framework}_${component}_component, " >> $outfile.struct + $5="$$5 $component" fi # Output pretty results - - AC_MSG_CHECKING([if MCA component $type:$m can compile]) + AC_MSG_CHECKING([if MCA component $framework:$component can compile]) AC_MSG_RESULT([yes]) - AC_MSG_CHECKING([for MCA component $type:$m compile mode]) - if test "$DIRECT_COMPONENT" = "$m" ; then - AC_MSG_RESULT([$compile_mode - direct]) - else - AC_MSG_RESULT([$compile_mode]) - fi # If there's an output file, add the values to # scope_EXTRA_flags. - if test -f $infile; then # First check for the ABORT tag - line="`grep ABORT= $infile | cut -d= -f2-`" if test -n "$line" -a "$line" != "no"; then AC_MSG_WARN([MCA component configure script told me to abort]) @@ -718,7 +607,6 @@ if test "$HAPPY" = "1"; then # If we're not compiling statically, then only take the # "ALWAYS" tags (a uniq will be performed at the end -- no # need to worry about duplicate flags here) - for flags in LDFLAGS LIBS; do var_in="LIBMPI_ALWAYS_EXTRA_${flags}" var_out="LIBMPI_EXTRA_${flags}" @@ -744,8 +632,7 @@ if test "$HAPPY" = "1"; then # Check for flags passed up from the component. If we're # compiling statically, then take all flags passed up from the # component. - - if test "$compile_mode" = "static"; then + if test "$8" = "static"; then for flags in LDFLAGS LIBS; do var="LIBMPI_EXTRA_${flags}" line="`grep $var= $infile | cut -d= -f2-`" @@ -766,15 +653,16 @@ if test "$HAPPY" = "1"; then fi done fi + dnl check for direct call header to include. This will be dnl AC_SUBSTed later. - if test "$DIRECT_COMPONENT" = "$m" ; then + if test "$DIRECT_$2" = "$component" ; then if test "`grep DIRECT_CALL_HEADER $infile`" != "" ; then line="`grep DIRECT_CALL_HEADER $infile | cut -d= -f2-`" - str="MCA_${type}_DIRECT_CALL_HEADER=\\\"$line\\\"" + str="MCA_${framework}_DIRECT_CALL_HEADER=\\\"$line\\\"" eval $str else -AC_MSG_ERROR([*** ${type} component ${m} was supposed to be direct-called, but +AC_MSG_ERROR([*** ${framework} component ${component} was supposed to be direct-called, but *** does not appear to support direct calling. *** Aborting]) fi @@ -782,44 +670,196 @@ AC_MSG_ERROR([*** ${type} component ${m} was supposed to be direct-called, but else # were we supposed to have found something in the # post_configure.sh, but the file didn't exist? - if test "$DIRECT_COMPONENT" = "$m" ; then -AC_MSG_ERROR([*** ${type} component ${m} was supposed to be direct-called, but + if test "$DIRECT_$2" = "$component" ; then +AC_MSG_ERROR([*** ${framework} component ${component} was supposed to be direct-called, but *** does not appear to support direct calling. *** Aborting]) fi fi -elif test "$FOUND" = "1"; then - AC_MSG_CHECKING([if MCA component $type:$m can compile]) + + # + # now add the flags that were set in the environment variables + # framework_component_FOO (for example, the flags set by + # m4_configure components) + # + + # If we're not compiling statically, then only take the + # "ALWAYS" tags (a uniq will be performed at the end -- no + # need to worry about duplicate flags here) + for flags in LDFLAGS LIBS; do + str="line=\$${framework}_${component}_LIBMPI_ALWAYS_EXTRA_${flags}" + eval "$str" + var_out="LIBMPI_EXTRA_${flags}" + if test -n "$line"; then + str="$var_out="'"$'"$var_out $var_in $line"'"' + eval $str + fi + done + + for flags in CFLAGS CXXFLAGS FFLAGS FCFLAGS LDFLAGS LIBS; do + str="line=\$${framework}_${component}_WRAPPER_ALWAYS_EXTRA_${flags}" + eval "$str" + var_out="WRAPPER_EXTRA_${flags}" + if test -n "$line"; then + str="$var_out="'"$'"$var_out $var_in $line"'"' + eval $str + fi + done + + # Check for flags passed up from the component. If we're + # compiling statically, then take all flags passed up from the + # component. + if test "$8" = "static"; then + for flags in LDFLAGS LIBS; do + str="line=\$${framework}_${component}_LIBMPI_EXTRA_${flags}" + eval "$str" + var_out="LIBMPI_EXTRA_${flags}" + if test -n "$line"; then + str="$var_out="'"$'"$var_out $var_in $line"'"' + eval $str + fi + done + + for flags in CFLAGS CXXFLAGS FFLAGS FCFLAGS LDFLAGS LIBS; do + str="line=\$${framework}_${component}_WRAPPER_EXTRA_${flags}" + eval "$str" + var_out="WRAPPER_EXTRA_${flags}" + if test -n "$line"; then + str="$var_out="'"$'"$var_out $var_in $line"'"' + eval $str + fi + done + fi +]) + + +###################################################################### +# +# MCA_PROCESS_DEAD_COMPONENT +# +# process a component that can not be built. Do the last minute checks +# to make sure the user isn't doing something stupid. +# +# USAGE: +# MCA_PROCESS_DEAD_COMPONENT(project_name, +# framework_name, component_name) +# +# NOTE: component_name may not be determined until runtime.... +# +###################################################################### +AC_DEFUN([MCA_PROCESS_DEAD_COMPONENT],[ + AC_MSG_CHECKING([if MCA component $2:$3 can compile]) AC_MSG_RESULT([no]) # If this component was requested as the default for this # type, then abort. - - str="foo="'"$'"with_$type"'"' - eval $str - str="bar="'"$'"with_$generic_type"'"' - eval $str - if test "$foo" = "$m" -o "$bar" = "$m"; then - AC_MSG_WARN([MCA component "$m" failed to configure properly]) + if test "$with_$2" = "$3" ; then + AC_MSG_WARN([MCA component "$3" failed to configure properly]) AC_MSG_WARN([This component was selected as the default]) AC_MSG_ERROR([Cannot continue]) exit 1 fi -fi + + if test ! -z "$DIRECT_$2" ; then + if test "$DIRECT_$2" = "$3" ; then + AC_MSG_WARN([MCA component "$3" failed to configure properly]) + AC_MSG_WARN([This component was selected as the default (direct call)]) + AC_MSG_ERROR([Cannot continue]) + exit 1 + fi + fi ]) -AC_DEFUN([OMPI_SETUP_DIRECT_CALL],[ - AC_SUBST(MCA_$1_DIRECT_CALL_HEADER) - AC_DEFINE_UNQUOTED([MCA_$1_DIRECT_CALL], [$MCA_$1_DIRECT_CALL], + +###################################################################### +# +# MCA_COMPONENT_BUILD_CHECK +# +# checks the standard rules of component building to see if the +# given component should be built. +# +# USAGE: +# MCA_COMPONENT_BUILD_CHECK(project, framework, component, +# action-if-build, action-if-not-build) +# +###################################################################### +AC_DEFUN([MCA_COMPONENT_BUILD_CHECK],[ + project=$1 + framework=$2 + component=$3 + component_path="$srcdir/$project/mca/$framework/$component" + + # build if: + # - the component type is direct and we are that component + # - there is no ompi_ignore file + # - there is an ompi_ignore, but there is an empty ompi_unignore + # - there is an ompi_ignore, but username is in ompi_unignore + if test -d $component_path ; then + # decide if we want the component to be built or not. This + # is spread out because some of the logic is a little complex + # and test's syntax isn't exactly the greatest. We want to + # build the component by default. + want_component=1 + if test -f $component_path/.ompi_ignore ; then + # If there is an ompi_ignore file, don't build + # the component. Note that this decision can be + # overriden by the unignore logic below. + want_component=0 + fi + if test -f $component_path/.ompi_unignore ; then + # if there is an empty ompi_unignore, that is + # equivalent to having your userid in the unignore file. + # If userid is in the file, unignore the ignore file. + if test ! -s $component_path/.ompi_unignore ; then + want_component=1 + elif test ! -z "`grep $USER $component_path/.ompi_unignore`" ; then + want_component=1 + fi + fi + # if this component type is direct and we are not it, we don't want + # to be built. Otherwise, we do want to be built. + if test ! -z "$DIRECT_$2" ; then + if test "$DIRECT_$2" = "$component" ; then + want_component=1 + else + want_component=0 + fi + fi + + AS_IF([test "$want_component" = "1"], [$4], [$5]) + fi +]) + + +###################################################################### +# +# MCA_SETUP_DIRECT_CALL +# +# Do all the things necessary to setup the given framework for direct +# call building +# +# USAGE: +# MCA_SETUP_DIRECT_CALL(framework, project) +# +###################################################################### +AC_DEFUN([MCA_SETUP_DIRECT_CALL],[ + if test ! -z "$DIRECT_$1" ; then + MCA_$1_DIRECT_CALL_COMPONENT=$DIRECT_$1 + MCA_$1_DIRECT_CALL=1 + else + MCA_$1_DIRECT_CALL_COMPONENT= + MCA_$1_DIRECT_CALL=0 + fi + + AC_SUBST(MCA_$1_DIRECT_CALL_HEADER) + AC_DEFINE_UNQUOTED([MCA_$1_DIRECT_CALL], [$MCA_$1_DIRECT_CALL], [Defined to 1 if $1 should use direct calls instead of components]) - AC_DEFINE_UNQUOTED([MCA_$1_DIRECT_CALL_COMPONENT], [$MCA_$1_DIRECT_CALL_COMPONENT], + AC_DEFINE_UNQUOTED([MCA_$1_DIRECT_CALL_COMPONENT], [$MCA_$1_DIRECT_CALL_COMPONENT], [name of component to use for direct calls, if MCA_$1_DIRECT_CALL is 1]) - OMPI_WRITE_DIRECT_CALL_HEADER($1, $2) + MCA_WRITE_DIRECT_CALL_HEADER($1, $2) ]) - - -AC_DEFUN([OMPI_WRITE_DIRECT_CALL_HEADER],[ +AC_DEFUN([MCA_WRITE_DIRECT_CALL_HEADER],[ AC_CONFIG_FILES($2/mca/$1/$1_direct_call.h.template) AC_CONFIG_COMMANDS($1-direct, [if test -f "$2/mca/$1/$1_direct_call"; then diff --git a/orte/mca/pls/xgrid/ompi_objc.m4 b/config/ompi_objc.m4 similarity index 100% rename from orte/mca/pls/xgrid/ompi_objc.m4 rename to config/ompi_objc.m4 diff --git a/configure.ac b/configure.ac index fc549d645f..8d9c75a881 100644 --- a/configure.ac +++ b/configure.ac @@ -991,6 +991,9 @@ AC_DEFINE_UNQUOTED(OMPI_RANGE_F90_COMPLEX16, $OMPI_RANGE_F90_COMPLEX16, AC_DEFINE_UNQUOTED(OMPI_RANGE_F90_COMPLEX32, $OMPI_RANGE_F90_COMPLEX32, [range of fortran complex*32]) +# checkpoint results +AC_CACHE_SAVE + ################################## # Header files ################################## @@ -1064,6 +1067,9 @@ AC_DEFINE_UNQUOTED(OMPI_USE_STDBOOL_H, $OMPI_USE_STDBOOL_H, [Whether to use or not]) AC_MSG_RESULT([$MSG]) +# checkpoint results +AC_CACHE_SAVE + ################################## # Libraries @@ -1131,6 +1137,9 @@ AC_MSG_RESULT([$MSG]) AC_CHECK_LIB([m], [ceil]) +# checkpoint results +AC_CACHE_SAVE + ################################## # System-specific tests @@ -1273,6 +1282,9 @@ OMPI_CASE_SENSITIVE_FS_SETUP # AIX: FIONBIO in sys/ioctl.h # glibc: memcpy +# checkpoint results +AC_CACHE_SAVE + ################################## # MCA @@ -1286,6 +1298,9 @@ AC_MSG_RESULT([$ompi_subdir_args]) OMPI_MCA +# checkpoint results +AC_CACHE_SAVE + ############################################################################ # Final top-level OMPI configuration @@ -1553,53 +1568,6 @@ AC_CONFIG_FILES([ orte/mca/Makefile orte/dynamic-mca/Makefile - orte/mca/errmgr/Makefile - orte/mca/errmgr/base/Makefile - orte/mca/iof/Makefile - orte/mca/iof/base/Makefile - orte/mca/gpr/Makefile - orte/mca/gpr/base/Makefile - orte/mca/gpr/base/data_type_support/Makefile - orte/mca/gpr/base/pack_api_cmd/Makefile - orte/mca/gpr/base/unpack_api_response/Makefile - orte/mca/ns/Makefile - orte/mca/ns/base/Makefile - orte/mca/ns/base/data_type_support/Makefile - orte/mca/oob/Makefile - orte/mca/oob/base/Makefile - orte/mca/pls/Makefile - orte/mca/pls/base/Makefile - orte/mca/ras/Makefile - orte/mca/ras/base/Makefile - orte/mca/rds/Makefile - orte/mca/rds/base/Makefile - orte/mca/rmaps/Makefile - orte/mca/rmaps/base/Makefile - orte/mca/rmgr/Makefile - orte/mca/rmgr/base/Makefile - orte/mca/rmgr/base/data_type_support/Makefile - orte/mca/rml/Makefile - orte/mca/rml/base/Makefile - orte/mca/schema/Makefile - orte/mca/schema/base/Makefile - orte/mca/soh/Makefile - orte/mca/soh/base/Makefile - orte/mca/soh/base/data_type_support/Makefile - - orte/dynamic-mca/errmgr/Makefile - orte/dynamic-mca/iof/Makefile - orte/dynamic-mca/gpr/Makefile - orte/dynamic-mca/ns/Makefile - orte/dynamic-mca/oob/Makefile - orte/dynamic-mca/pls/Makefile - orte/dynamic-mca/ras/Makefile - orte/dynamic-mca/rds/Makefile - orte/dynamic-mca/rmaps/Makefile - orte/dynamic-mca/rmgr/Makefile - orte/dynamic-mca/rml/Makefile - orte/dynamic-mca/schema/Makefile - orte/dynamic-mca/soh/Makefile - ompi/Makefile ompi/include/Makefile ompi/class/Makefile @@ -1633,37 +1601,7 @@ AC_CONFIG_FILES([ ompi/tools/wrappers/Makefile ompi/mca/Makefile - ompi/mca/common/Makefile - - ompi/mca/allocator/Makefile - ompi/mca/allocator/base/Makefile - ompi/mca/btl/Makefile - ompi/mca/btl/base/Makefile - ompi/mca/coll/Makefile - ompi/mca/coll/base/Makefile - ompi/mca/io/Makefile - ompi/mca/io/base/Makefile - ompi/mca/mpool/Makefile - ompi/mca/mpool/base/Makefile - ompi/mca/pml/Makefile - ompi/mca/pml/base/Makefile - ompi/mca/ptl/Makefile - ompi/mca/ptl/base/Makefile - ompi/mca/topo/Makefile - ompi/mca/topo/base/Makefile - ompi/dynamic-mca/Makefile - ompi/dynamic-mca/common/Makefile - - - ompi/dynamic-mca/allocator/Makefile - ompi/dynamic-mca/btl/Makefile - ompi/dynamic-mca/coll/Makefile - ompi/dynamic-mca/io/Makefile - ompi/dynamic-mca/mpool/Makefile - ompi/dynamic-mca/pml/Makefile - ompi/dynamic-mca/ptl/Makefile - ompi/dynamic-mca/topo/Makefile test/Makefile test/asm/Makefile diff --git a/ompi/mca/btl/portals/Makefile.am b/ompi/mca/btl/portals/Makefile.am index a11e3f0ceb..68b26a8486 100644 --- a/ompi/mca/btl/portals/Makefile.am +++ b/ompi/mca/btl/portals/Makefile.am @@ -52,14 +52,15 @@ portals_SOURCES = \ src/btl_portals_endpoint.c \ src/btl_portals_compat_utcp.c +AM_CPPFLAGS = $(btl_portals_CPPFLAGS) mcacomponentdir = $(libdir)/openmpi mcacomponent_LTLIBRARIES = $(component_install) mca_btl_portals_la_SOURCES = $(portals_SOURCES) -mca_btl_portals_la_LIBADD = -mca_btl_portals_la_LDFLAGS = -module -avoid-version +mca_btl_portals_la_LIBADD = $(btl_portals_LIBS) +mca_btl_portals_la_LDFLAGS = -module -avoid-version $(btl_portals_LDFLAGS) noinst_LTLIBRARIES = $(component_noinst) libmca_btl_portals_la_SOURCES = $(portals_SOURCES) -libmca_btl_portals_la_LIBADD = -libmca_btl_portals_la_LDFLAGS = -module -avoid-version +libmca_btl_portals_la_LIBADD = $(btl_portals_LIBS) +libmca_btl_portals_la_LDFLAGS = -module -avoid-version $(btl_portals_LDFLAGS) diff --git a/ompi/mca/btl/portals/configure.m4 b/ompi/mca/btl/portals/configure.m4 new file mode 100644 index 0000000000..ece2de8fc8 --- /dev/null +++ b/ompi/mca/btl/portals/configure.m4 @@ -0,0 +1,192 @@ +# -*- shell-script -*- +# +# Copyright (c) 2004-2005 The Trustees of Indiana University. +# All rights reserved. +# Copyright (c) 2004-2005 The Trustees of the University of Tennessee. +# All rights reserved. +# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +# University of Stuttgart. All rights reserved. +# Copyright (c) 2004-2005 The Regents of the University of California. +# All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# + +# +# quicky function to set #defines based on argument values +# +# ARGUMENTS: +# 1 configure name (first argument to ARG_WITH, minus the btl-portals-) +# 2 define name +# 3 default value +# 4 description (used for both ARG_WITH and DEFINE) +AC_DEFUN([MCA_BTL_PORTALS_CONFIG_VAL], +[ + AC_ARG_WITH([btl-portals-$1], AC_HELP_STRING([--with-btl-portals-$1], + [$4 (default: $3)])) + AC_MSG_CHECKING([for $1 value]) + case "[$with_]m4_bpatsubst([btl-portals-$1], -, _)" in + "") + $2=$3 + AC_MSG_RESULT([[$]$2 (default)]) + ;; + "no") + AC_MSG_RESULT([error]) + AC_MSG_ERROR([--without-btl-portals-$1 is invalid argument]) + ;; + *) + $2="$with_m4_bpatsubst([btl-portals-$1], -, _)" + AC_MSG_RESULT([[$]$2]) + ;; + esac + AC_DEFINE_UNQUOTED([$2], [[$]$2], [$4]) +])dnl + + +AC_DEFUN([MCA_btl_portals_CONFIG],[ + + btl_portals_save_CPPFLAGS="$CPPFLAGS" + btl_portals_save_LDFLAGS="$LDFLAGS" + btl_portals_save_LIBS="$LIBS" + + # allow user a way to say where the Portals installation is + AC_ARG_WITH(btl-portals, + AC_HELP_STRING([--with-btl-portals=DIR], + [Specify the installation directory of PORTALS])) + + AS_IF([test -n "$with_btl_portals"], + [AS_IF([test -d "$with_btl_portals/include"], + [btl_portals_CPPFLAGS="-I$with_btl_portals/include" + CPPFLAGS="$CPPFLAGS $btl_portals_CPPFLAGS"], []) + AS_IF([test -d "$with_btl_portals/lib"], + [btl_portals_LDFLAGS="-L$with_btl_portals/lib" + LDFLAGS="$LDFLAGS $btl_portals_LDFLAGS"], [])]) + + # Configure Portals for our local environment + BTL_PORTALS_UTCP=0 + BTL_PORTALS_REDSTORM=0 + BTL_PORTALS_COMPAT="" + BTL_PORTALS_HAVE_EVENT_UNLINK=0 + AC_ARG_WITH([btl-portals-config], + AC_HELP_STRING([--with-btl-portals-config], + [configuration to use for Portals support. + One of "utcp", "redstorm". (default: utcp)])) + AC_MSG_CHECKING([for Portals configuration]) + if test "$with_btl_portals_config" = "" ; then + with_btl_portals_config="utcp" + fi + case "$with_btl_portals_config" in + "utcp") + BTL_PORTALS_UTCP=1 + BTL_PORTALS_HAVE_EVENT_UNLINK=1 + btl_portals_LIBS="-lutcpapi -lutcplib -lp3api -lp3lib -lp3rt" + AC_MSG_RESULT([utcp]) + ;; + "redstorm") + BTL_PORTALS_REDSTORM=1 + BTL_PORTALS_HAVE_EVENT_UNLINK=0 + btl_portals_LIBS="-lp3api -lp3lib -lp3rt" + AC_MSG_RESULT([red storm]) + ;; + *) + # ok to call ERROR here - the user specified something invalid. + # that should be brought to his attention + AC_MSG_ERROR([unknown Portals configuration. Can not continue]) + ;; + esac + + # Try to find all the portals libraries (this is not fun!) + AC_ARG_WITH(btl-portals-libs, + AC_HELP_STRING([--with-btl-portals-libs=LIBS], + [Libraries to link with for portals])) + if test -n "$with_btl_portals_libs" ; then + btl_portals_LIBS="" + for lib in $with_btl_portals_libs ; do + btl_portals_LIBS="$btl_portals_LIBS -l$lib" + done + fi + + AC_DEFINE_UNQUOTED([BTL_PORTALS_HAVE_EVENT_UNLINK], + [$BTL_PORTALS_HAVE_EVENT_UNLINK], + [Does Portals send a BTL_EVENT_UNLINK event]) + + AC_DEFINE_UNQUOTED([BTL_PORTALS_UTCP], [$BTL_PORTALS_UTCP], + [Use the UTCP reference implementation or Portals]) + AM_CONDITIONAL([BTL_PORTALS_UTCP], [test "$BTL_PORTALS_UTCP" = "1"]) + + AC_DEFINE_UNQUOTED([BTL_PORTALS_REDSTORM], [$BTL_PORTALS_REDSTORM], + [Use the Red Storm implementation or Portals]) + AM_CONDITIONAL([BTL_PORTALS_REDSTORM], [test "$BTL_PORTALS_REDSTORM" = "1"]) + + LIBS="$LIBS $btl_portals_LIBS" + AC_CHECK_HEADERS([portals3.h], + [AC_MSG_CHECKING([if possible to link Portals application]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], + [int i; PtlInit(&i);])], + [AC_MSG_RESULT([yes]) + # User configuration options + MCA_BTL_PORTALS_CONFIG_VAL([send-table-id], + [BTL_PORTALS_SEND_TABLE_ID], [3], + [Portals table id to use for send/recv ]) + + MCA_BTL_PORTALS_CONFIG_VAL([rdma-table-id], + [BTL_PORTALS_RDMA_TABLE_ID], [4], + [Portals table id to use for RDMA request]) + + MCA_BTL_PORTALS_CONFIG_VAL([debug-level], + [BTL_PORTALS_DEFAULT_DEBUG_LEVEL], [100], + [debugging level for portals btl]) + + MCA_BTL_PORTALS_CONFIG_VAL([eager-limit], + [BTL_PORTALS_DEFAULT_EAGER_LIMIT], [16384], + [max size for eager sends]) + + MCA_BTL_PORTALS_CONFIG_VAL([min-send-size], + [BTL_PORTALS_DEFAULT_MIN_SEND_SIZE], [0], + [min size for send fragments]) + MCA_BTL_PORTALS_CONFIG_VAL([max-send-size], + [BTL_PORTALS_DEFAULT_MAX_SEND_SIZE], [32768], + [max size for send fragments]) + + MCA_BTL_PORTALS_CONFIG_VAL([min-rdma-size], + [BTL_PORTALS_DEFAULT_MIN_RDMA_SIZE], [0], + [min size for rdma fragments]) + MCA_BTL_PORTALS_CONFIG_VAL([max-rdma-size], + [BTL_PORTALS_DEFAULT_MAX_RDMA_SIZE], [2147483647], + [max size for rdma fragments]) + + MCA_BTL_PORTALS_CONFIG_VAL([max-sends-pending], + [BTL_PORTALS_MAX_SENDS_PENDING], [128], + [max number of sends pending at any time]) + MCA_BTL_PORTALS_CONFIG_VAL([recv-queue-size], + [BTL_PORTALS_DEFAULT_RECV_QUEUE_SIZE], [512], + [size of event queue for receiving frags]) + + MCA_BTL_PORTALS_CONFIG_VAL([free-list-init-num], + [BTL_PORTALS_DEFAULT_FREE_LIST_INIT_NUM], [8], + [starting size of free lists]) + MCA_BTL_PORTALS_CONFIG_VAL([free-list-max-num], + [BTL_PORTALS_DEFAULT_FREE_LIST_MAX_NUM], [1024], + [maximum size of free lists]) + MCA_BTL_PORTALS_CONFIG_VAL([free-list-inc-num], + [BTL_PORTALS_DEFAULT_FREE_LIST_INC_NUM], [32], + [grow size for freelists]) + + btl_portals_WRAPPER_EXTRA_LDFLAGS="$btl_portals_LDFLAGS" + btl_portals_WRAPPER_EXTRA_LIBS="$btl_portals_LIBS" + $1], + [AC_MSG_RESULT([no]) + $2])], + [$2]) + + AC_SUBST([btl_portals_CPPFLAGS]) + AC_SUBST([btl_portals_LDFLAGS]) + AC_SUBST([btl_portals_LIBS]) + + CPPFLAGS="$btl_portals_save_CPPFLAGS" + LDFLAGS="$btl_portals_save_LDFLAGS" + LIBS="$btl_portals_save_LIBS" +])dnl diff --git a/ompi/mca/btl/portals/configure.stub b/ompi/mca/btl/portals/configure.stub deleted file mode 100644 index 00b5222bbf..0000000000 --- a/ompi/mca/btl/portals/configure.stub +++ /dev/null @@ -1,211 +0,0 @@ -# -*- shell-script -*- -# -# Copyright (c) 2004-2005 The Trustees of Indiana University. -# All rights reserved. -# Copyright (c) 2004-2005 The Trustees of the University of Tennessee. -# All rights reserved. -# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, -# University of Stuttgart. All rights reserved. -# Copyright (c) 2004-2005 The Regents of the University of California. -# All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -# -# quicky function to set #defines based on argument values -# -# ARGUMENTS: -# 1 configure name (first argument to ARG_WITH, minus the btl-portals-) -# 2 define name -# 3 default value -# 4 description (used for both ARG_WITH and DEFINE) -AC_DEFUN([MCA_BTL_PORTALS_CONFIG_VAL], -[ - AC_ARG_WITH([btl-portals-$1], AC_HELP_STRING([--with-btl-portals-$1], - [$4 (default: $3)])) - AC_MSG_CHECKING([for $1 value]) - case "[$with_]m4_bpatsubst([btl-portals-$1], -, _)" in - "") - $2=$3 - AC_MSG_RESULT([[$]$2 (default)]) - ;; - "no") - AC_MSG_RESULT([error]) - AC_MSG_ERROR([--without-btl-portals-$1 is invalid argument]) - ;; - *) - $2="$with_m4_bpatsubst([btl-portals-$1], -, _)" - AC_MSG_RESULT([[$]$2]) - ;; - esac - AC_DEFINE_UNQUOTED([$2], [[$]$2], [$4]) -])dnl - - -# -# Main function. This will be invoked in the middle of the templated -# configure script. -# -AC_DEFUN([MCA_CONFIGURE_STUB],[ - - # Additional --with flags that can be specified - - AC_ARG_WITH(btl-portals, - AC_HELP_STRING([--with-btl-portals=DIR], - [Specify the installation directory of PORTALS])) - - # Add to CPPFLAGS if necessary - EXTRA_CPPFLAGS= - if test -n "$with_btl_portals"; then - if test -d "$with_btl_portals/include"; then - EXTRA_CPPFLAGS="-I$with_btl_portals/include" - else - AC_MSG_WARN([*** Warning: cannot find $with_btl_portals/include]) - AC_MSG_WARN([*** Will still try to configure portals btl anyway...]) - fi - fi - - # See if we can find portals.h - CPPFLAGS="$CPPFLAGS $EXTRA_CPPFLAGS" - AC_CHECK_HEADERS(portals3.h,, - AC_MSG_ERROR([*** Cannot find working portals3.h.])) - - # Add to LDFLAGS if necessary - EXTRA_LDFLAGS= - if test -n "$with_btl_portals"; then - if test -d "$with_btl_portals/lib"; then - EXTRA_LDFLAGS="-L$with_btl_portals/lib" - else - AC_MSG_WARN([*** Warning: cannot find $with_btl_portals/lib]) - AC_MSG_WARN([*** Will still try to configure portals btl anyway...]) - fi - fi - - - # - # Configure Portals for our local environment - # - BTL_PORTALS_UTCP=0 - BTL_PORTALS_REDSTORM=0 - BTL_PORTALS_COMPAT="" - BTL_PORTALS_HAVE_EVENT_UNLINK=0 - - AC_ARG_WITH([btl-portals-config], - AC_HELP_STRING([--with-btl-portals-config], - [configuration to use for Portals support. - One of "utcp", "redstorm". (default: utcp)])) - AC_MSG_CHECKING([for Portals configuration]) - if test "$with_btl_portals_config" = "" ; then - with_btl_portals_config="utcp" - fi - case "$with_btl_portals_config" in - "utcp") - BTL_PORTALS_UTCP=1 - PORTALS_LIBS="-lutcpapi -lutcplib -lp3api -lp3lib -lp3rt" - BTL_PORTALS_HAVE_EVENT_UNLINK=1 - AC_MSG_RESULT([utcp]) - ;; - "redstorm") - BTL_PORTALS_REDSTORM=1 - PORTALS_LIBS="-lp3api -lp3lib -lp3rt" - BTL_PORTALS_HAVE_EVENT_UNLINK=0 - AC_MSG_RESULT([red storm]) - ;; - *) - AC_MSG_ERROR([unknown Portals configuration. Can not continue]) - ;; - esac - - # Try to find all the portals libraries (this is not fun!) - AC_ARG_WITH(btl-portals-libs, - AC_HELP_STRING([--with-btl-portals-libs=LIBS], - [Libraries to link with for portals])) - if test -n "$with_btl_portals_libs" ; then - PORTALS_LIBS="" - for lib in $with_btl_portals_libs ; do - PORTALS_LIBS="$PORTALS_LIBS -l$lib" - done - fi - - AC_MSG_CHECKING([if possible to link Portals application]) - LIBS="$LIBS $PORTALS_LIBS" - LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS" - AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], [int i; PtlInit(&i);])], - [AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no]) - AC_MSG_ERROR([Can not link with Portals libraries])]) - - AC_DEFINE_UNQUOTED([BTL_PORTALS_HAVE_EVENT_UNLINK], - [$BTL_PORTALS_HAVE_EVENT_UNLINK], - [Does Portals send a BTL_EVENT_UNLINK event]) - - AC_DEFINE_UNQUOTED([BTL_PORTALS_UTCP], [$BTL_PORTALS_UTCP], - [Use the UTCP reference implementation or Portals]) - AM_CONDITIONAL([BTL_PORTALS_UTCP], [test "$BTL_PORTALS_UTCP" = "1"]) - - AC_DEFINE_UNQUOTED([BTL_PORTALS_REDSTORM], [$BTL_PORTALS_REDSTORM], - [Use the Red Storm implementation or Portals]) - AM_CONDITIONAL([BTL_PORTALS_REDSTORM], [test "$BTL_PORTALS_REDSTORM" = "1"]) - - # - # User configuration options - # - MCA_BTL_PORTALS_CONFIG_VAL([send-table-id], - [BTL_PORTALS_SEND_TABLE_ID], [3], - [Portals table id to use for send/recv ]) - - MCA_BTL_PORTALS_CONFIG_VAL([rdma-table-id], - [BTL_PORTALS_RDMA_TABLE_ID], [4], - [Portals table id to use for RDMA request]) - - MCA_BTL_PORTALS_CONFIG_VAL([debug-level], - [BTL_PORTALS_DEFAULT_DEBUG_LEVEL], [100], - [debugging level for portals btl]) - - MCA_BTL_PORTALS_CONFIG_VAL([eager-limit], - [BTL_PORTALS_DEFAULT_EAGER_LIMIT], [16384], - [max size for eager sends]) - - MCA_BTL_PORTALS_CONFIG_VAL([min-send-size], - [BTL_PORTALS_DEFAULT_MIN_SEND_SIZE], [0], - [min size for send fragments]) - MCA_BTL_PORTALS_CONFIG_VAL([max-send-size], - [BTL_PORTALS_DEFAULT_MAX_SEND_SIZE], [32768], - [max size for send fragments]) - - MCA_BTL_PORTALS_CONFIG_VAL([min-rdma-size], - [BTL_PORTALS_DEFAULT_MIN_RDMA_SIZE], [0], - [min size for rdma fragments]) - MCA_BTL_PORTALS_CONFIG_VAL([max-rdma-size], - [BTL_PORTALS_DEFAULT_MAX_RDMA_SIZE], [2147483647], - [max size for rdma fragments]) - - MCA_BTL_PORTALS_CONFIG_VAL([max-sends-pending], - [BTL_PORTALS_MAX_SENDS_PENDING], [128], - [max number of sends pending at any time]) - MCA_BTL_PORTALS_CONFIG_VAL([recv-queue-size], - [BTL_PORTALS_DEFAULT_RECV_QUEUE_SIZE], [512], - [size of event queue for receiving frags]) - - MCA_BTL_PORTALS_CONFIG_VAL([free-list-init-num], - [BTL_PORTALS_DEFAULT_FREE_LIST_INIT_NUM], [8], - [starting size of free lists]) - MCA_BTL_PORTALS_CONFIG_VAL([free-list-max-num], - [BTL_PORTALS_DEFAULT_FREE_LIST_MAX_NUM], [1024], - [maximum size of free lists]) - MCA_BTL_PORTALS_CONFIG_VAL([free-list-inc-num], - [BTL_PORTALS_DEFAULT_FREE_LIST_INC_NUM], [32], - [grow size for freelists]) - - # - # Save extra compiler/linker flags so that they can be added in - # the wrapper compilers, if necessary - # - - WRAPPER_EXTRA_LDFLAGS="$EXTRA_LDFLAGS" - WRAPPER_EXTRA_LIBS="$PORTALS_LIBS" -])dnl diff --git a/ompi/mca/btl/portals/src/btl_portals.c b/ompi/mca/btl/portals/src/btl_portals.c index 5973dca396..498360cdc2 100644 --- a/ompi/mca/btl/portals/src/btl_portals.c +++ b/ompi/mca/btl/portals/src/btl_portals.c @@ -15,7 +15,6 @@ */ #include "ompi_config.h" -#include "portals_config.h" #include #include diff --git a/ompi/mca/btl/portals/src/btl_portals_compat_redstorm.c b/ompi/mca/btl/portals/src/btl_portals_compat_redstorm.c index 4ea40b7293..e7fa7d294f 100644 --- a/ompi/mca/btl/portals/src/btl_portals_compat_redstorm.c +++ b/ompi/mca/btl/portals/src/btl_portals_compat_redstorm.c @@ -15,7 +15,6 @@ */ #include "ompi_config.h" -#include "portals_config.h" #include "include/constants.h" #include "opal/util/output.h" diff --git a/ompi/mca/btl/portals/src/btl_portals_compat_utcp.c b/ompi/mca/btl/portals/src/btl_portals_compat_utcp.c index b150fc706d..e6b84e51d6 100644 --- a/ompi/mca/btl/portals/src/btl_portals_compat_utcp.c +++ b/ompi/mca/btl/portals/src/btl_portals_compat_utcp.c @@ -16,7 +16,6 @@ #include "ompi_config.h" -#include "portals_config.h" #include #include diff --git a/ompi/mca/btl/portals/src/btl_portals_component.c b/ompi/mca/btl/portals/src/btl_portals_component.c index 6cccfb6805..4f9fdcfab3 100644 --- a/ompi/mca/btl/portals/src/btl_portals_component.c +++ b/ompi/mca/btl/portals/src/btl_portals_component.c @@ -15,7 +15,6 @@ */ #include "ompi_config.h" -#include "portals_config.h" #include #include diff --git a/ompi/mca/btl/portals/src/btl_portals_endpoint.c b/ompi/mca/btl/portals/src/btl_portals_endpoint.c index d2a0a3d781..18f165ef14 100644 --- a/ompi/mca/btl/portals/src/btl_portals_endpoint.c +++ b/ompi/mca/btl/portals/src/btl_portals_endpoint.c @@ -16,7 +16,6 @@ #include "ompi_config.h" -#include "portals_config.h" #include "btl_portals.h" #include "btl_portals_endpoint.h" diff --git a/ompi/mca/btl/portals/src/btl_portals_frag.c b/ompi/mca/btl/portals/src/btl_portals_frag.c index ebe97fdef0..c5d5d79957 100644 --- a/ompi/mca/btl/portals/src/btl_portals_frag.c +++ b/ompi/mca/btl/portals/src/btl_portals_frag.c @@ -15,7 +15,6 @@ */ #include "ompi_config.h" -#include "portals_config.h" #include "btl_portals.h" #include "btl_portals_frag.h" diff --git a/ompi/mca/btl/portals/src/btl_portals_rdma.c b/ompi/mca/btl/portals/src/btl_portals_rdma.c index 040ea6a7e9..2c5ea86fc6 100644 --- a/ompi/mca/btl/portals/src/btl_portals_rdma.c +++ b/ompi/mca/btl/portals/src/btl_portals_rdma.c @@ -16,7 +16,6 @@ #include "ompi_config.h" -#include "portals_config.h" #include "include/constants.h" diff --git a/ompi/mca/btl/portals/src/btl_portals_recv.c b/ompi/mca/btl/portals/src/btl_portals_recv.c index a8fabde6c5..87a8f1129a 100644 --- a/ompi/mca/btl/portals/src/btl_portals_recv.c +++ b/ompi/mca/btl/portals/src/btl_portals_recv.c @@ -16,7 +16,6 @@ #include "ompi_config.h" -#include "portals_config.h" #include "include/constants.h" diff --git a/ompi/mca/btl/portals/src/btl_portals_send.c b/ompi/mca/btl/portals/src/btl_portals_send.c index 843168a443..319a4480ab 100644 --- a/ompi/mca/btl/portals/src/btl_portals_send.c +++ b/ompi/mca/btl/portals/src/btl_portals_send.c @@ -16,7 +16,6 @@ #include "ompi_config.h" -#include "portals_config.h" #include "include/constants.h" diff --git a/ompi/mca/btl/portals/src/btl_portals_stubs.c b/ompi/mca/btl/portals/src/btl_portals_stubs.c index 4f3820fc08..e95fe5108f 100644 --- a/ompi/mca/btl/portals/src/btl_portals_stubs.c +++ b/ompi/mca/btl/portals/src/btl_portals_stubs.c @@ -16,7 +16,6 @@ #include "ompi_config.h" -#include "portals_config.h" #include "btl_portals.h" diff --git a/ompi/mca/io/romio/configure.m4 b/ompi/mca/io/romio/configure.m4 new file mode 100644 index 0000000000..a709c13fde --- /dev/null +++ b/ompi/mca/io/romio/configure.m4 @@ -0,0 +1,59 @@ +# -*- shell-script -*- +# +# Copyright (c) 2004-2005 The Trustees of Indiana University. +# All rights reserved. +# Copyright (c) 2004-2005 The Trustees of the University of Tennessee. +# All rights reserved. +# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +# University of Stuttgart. All rights reserved. +# Copyright (c) 2004-2005 The Regents of the University of California. +# All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# + +AC_DEFUN([MCA_io_romio_CONFIG],[ + io_romio_LIBS="$LIBS" + + AC_ARG_WITH([io-romio-flags], + [AC_HELP_STRING([--with-io-romio-flags=FLAGS], + [Pass FLAGS to the ROMIO distribution configuration script])]) + + AC_MSG_CHECKING([if MPI profiling is enabled]) + AS_IF([test "$enable_mpi_profile" = "no"], + [AC_MSG_RESULT([no]) + AC_MSG_WARN([*** The ROMIO io component requires the MPI profiling layer]) + $2], + [AC_MSG_RESULT([yes]) + + AS_IF([test -n "$with_io_romio_flags" -a "$with_io_romio_flags" != "no"], + [io_romio_flags="$with_io_romio_flags $io_romio_flags"], + [io_romio_flags=]) + AS_IF([test "$compile_mode" = "dso"], + [io_romio_shared=enable + io_romio_static=disable], + [io_romio_shared=disable + io_romio_static=enable]) + AS_IF([test -n "$prefix" -a "$prefix" != "NONE"], + [io_romio_prefix_arg="--prefix=$prefix"], + [io_romio_prefix_arg=]) + io_romio_flags="CFLAGS="'"'"$CFLAGS"'"'" CPPFLAGS="'"'"$CPPFLAGS"'"'" FFLAGS="'"'"$FFLAGS"'"'" LDFLAGS="'"'"$LSFLAGS"'"'" --$io_romio_shared-shared --$io_romio_static-static $io_romio_flags $io_romio_prefix_arg" + + AC_CHECK_LIB(aio, main) + + ompi_show_subtitle "Configuring ROMIO distribution" + OMPI_CONFIG_SUBDIR([ompi/mca/io/romio/romio-dist], + [$io_romio_flags], + [io_romio_happy=1], [io_romio_happy=0]) + + AS_IF([test "$io_romio_happy" = "1"], + [echo "ROMIO distribution configured successfully" + $1], + [LIBS="$io_romio_LIBS" + AC_MSG_WARN([ROMIO distribution did not configure successfully]) + AS_IF([test "$OMPI_WANT_DIST" != "no"], [AC_MSG_ERROR([can not continue])]) + $2])]) +]) diff --git a/ompi/mca/io/romio/configure.stub b/ompi/mca/io/romio/configure.stub deleted file mode 100644 index 44d9b5b346..0000000000 --- a/ompi/mca/io/romio/configure.stub +++ /dev/null @@ -1,105 +0,0 @@ -# -*- shell-script -*- -# -# Copyright (c) 2004-2005 The Trustees of Indiana University. -# All rights reserved. -# Copyright (c) 2004-2005 The Trustees of the University of Tennessee. -# All rights reserved. -# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, -# University of Stuttgart. All rights reserved. -# Copyright (c) 2004-2005 The Regents of the University of California. -# All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -# Because of the following statements, this component is essentially -# "core" and cannot be configured / compiled outside of the Open MPI -# tree. - -sinclude(../../../../config/ompi_config_subdir.m4) - - -# -# Main function. This will be invoked in the middle of the templated -# configure script. -# -AC_DEFUN([MCA_CONFIGURE_STUB],[ - AC_ARG_ENABLE([mpi-profile], - AC_HELP_STRING([--disable-mpi-profile], - [Disable MPI profiling, and therefore the ROMIO io component])) - - AC_MSG_CHECKING([if MPI profiling is enabled]) - if test "$enable_mpi_profile" = "no"; then - AC_MSG_RESULT([no]) - AC_MSG_WARN([*** The ROMIO io component requires the MPI profiling layer]) - AC_MSG_ERROR([Cannot continue]) - fi - AC_MSG_RESULT([yes]) - - AC_ARG_WITH([io-romio-flags], - AC_HELP_STRING([--with-io-romio-flags=FLAGS], - [Pass FLAGS to the ROMIO distribution configuration script])) - - AC_MSG_CHECKING([for ROMIO distribution configure flags]) - io_romio_flags= - if test -n "$with_io_romio_flags" -a "$with_io_romio_flags" != "no"; then - io_romio_flags="$with_io_romio_flags $io_romio_flags" - fi - - shared=enable - if test -n "$enable_shared"; then - if test "$enable_shared" != "no"; then - shared=enable - else - shared=disable - fi - fi - - static=enable - if test -n "$enable_static"; then - if test "$enable_static" != "no"; then - static=enable - else - static=disable - fi - fi - - prefix_arg= - if test -n "$prefix" -a "$prefix" != "NONE"; then - prefix_arg="--prefix=$prefix" - fi - - io_romio_flags="CFLAGS="'"'"$CFLAGS"'"'" CPPFLAGS="'"'"$CPPFLAGS"'"'" FFLAGS="'"'"$FFLAGS"'"'" LDFLAGS="'"'"$LSFLAGS"'"'" --$shared-shared --$static-static $io_romio_flags $prefix_arg" - AC_MSG_RESULT([$io_romio_flags]) - - AC_CHECK_LIB(aio, main) - - ompi_show_subtitle "Configuring ROMIO distribution" - OMPI_CONFIG_SUBDIR([romio-dist], [$io_romio_flags], - [HAPPY=1], [HAPPY=0]) - if test "$HAPPY" = "1"; then - echo "ROMIO distribution configured successfully" - else - AC_MSG_WARN([ROMIO distribution did not configure successfully]) - AC_MSG_ERROR([Cannot continue]) - fi -]) - -# -# For dist -# -AC_DEFUN([MCA_CONFIGURE_DIST_STUB],[ - ompi_show_subtitle "Configuring ROMIO distribution (dist only)" - OMPI_CONFIG_SUBDIR([romio-dist], [], - [HAPPY=1], [HAPPY=0]) - if test "$HAPPY" = "1"; then - echo "ROMIO distribution configured successfully (dist only)" - else - AC_MSG_WARN([ROMIO distribution did not configure successfully]) - AC_MSG_WARN([Nothing I can do about that -- sorry!]) - AC_MSG_ERROR([Cannot continue]) - fi -]) diff --git a/ompi/mca/io/romio/src/Makefile.extra b/ompi/mca/io/romio/src/Makefile.extra index 9088a19a00..08d2941640 100644 --- a/ompi/mca/io/romio/src/Makefile.extra +++ b/ompi/mca/io/romio/src/Makefile.extra @@ -29,8 +29,8 @@ AM_CPPFLAGS = \ -I$(top_ompi_builddir)/ompi/include \ -I$(top_ompi_srcdir)/ompi \ -I$(top_ompi_srcdir)/ompi/include \ - -I$(top_srcdir) \ - -I$(top_srcdir)/romio-dist/include \ + -I$(top_ompi_srcdir)/ompi/mca/io/romio \ + -I$(top_ompi_srcdir)/ompi/mca/io/romio/romio-dist/include \ -I$(top_builddir) sources += \ diff --git a/orte/Makefile.am b/orte/Makefile.am index 723b93f0fe..bbdcea9093 100644 --- a/orte/Makefile.am +++ b/orte/Makefile.am @@ -35,24 +35,18 @@ liborte_la_LIBADD = \ class/libclass.la \ dps/libdps.la \ mca/errmgr/base/libmca_errmgr_base.la \ - mca/gpr/base/data_type_support/libmca_gpr_base_data_type.la \ - mca/gpr/base/pack_api_cmd/libmca_gpr_base_pack.la \ - mca/gpr/base/unpack_api_response/libmca_gpr_base_unpack.la \ mca/gpr/base/libmca_gpr_base.la $(MCA_gpr_STATIC_LTLIBS) \ mca/iof/base/libmca_iof_base.la $(MCA_iof_STATIC_LTLIBS) \ mca/ns/base/libmca_ns_base.la $(MCA_ns_STATIC_LTLIBS) \ - mca/ns/base/data_type_support/libmca_ns_base_data_type.la \ mca/oob/base/libmca_oob_base.la $(MCA_oob_STATIC_LTLIBS) \ mca/pls/base/libmca_pls_base.la $(MCA_pls_STATIC_LTLIBS) \ mca/ras/base/libmca_ras_base.la $(MCA_ras_STATIC_LTLIBS) \ mca/rds/base/libmca_rds_base.la $(MCA_rds_STATIC_LTLIBS) \ mca/rmaps/base/libmca_rmaps_base.la $(MCA_rmaps_STATIC_LTLIBS) \ mca/rmgr/base/libmca_orte_rmgr_base.la $(MCA_rmgr_STATIC_LTLIBS) \ - mca/rmgr/base/data_type_support/libmca_rmgr_base_data_type.la \ mca/rml/base/libmca_rml_base.la $(MCA_rml_STATIC_LTLIBS) \ mca/schema/base/libmca_schema_base.la $(MCA_schema_STATIC_LTLIBS) \ mca/soh/base/libmca_soh_base.la $(MCA_soh_STATIC_LTLIBS) \ - mca/soh/base/data_type_support/libmca_soh_base_data_type.la \ runtime/libruntime.la \ util/liborteutil.la liborte_la_DEPENDENCIES = $(liborte_la_LIBADD) diff --git a/orte/mca/gpr/base/Makefile.am b/orte/mca/gpr/base/Makefile.am index 457e03ff18..e02b848871 100644 --- a/orte/mca/gpr/base/Makefile.am +++ b/orte/mca/gpr/base/Makefile.am @@ -16,8 +16,6 @@ include $(top_srcdir)/config/Makefile.options -SUBDIRS = pack_api_cmd unpack_api_response data_type_support - noinst_LTLIBRARIES = libmca_gpr_base.la # For VPATH builds, have to specify where static-modules.h will be found @@ -34,7 +32,22 @@ libmca_gpr_base_la_SOURCES = \ gpr_base_open.c \ gpr_base_close.c \ gpr_base_select.c \ - gpr_base_xfer_payload.c + gpr_base_xfer_payload.c \ + data_type_support/gpr_data_type_packing_fns.c \ + data_type_support/gpr_data_type_unpacking_fns.c \ + unpack_api_response/gpr_base_unpack_cleanup.c \ + unpack_api_response/gpr_base_unpack_del_index.c \ + unpack_api_response/gpr_base_print_dump.c \ + unpack_api_response/gpr_base_dump_notify.c \ + unpack_api_response/gpr_base_unpack_arithmetic_ops.c \ + unpack_api_response/gpr_base_unpack_put_get.c \ + unpack_api_response/gpr_base_unpack_subscribe.c \ + pack_api_cmd/gpr_base_pack_cleanup.c \ + pack_api_cmd/gpr_base_pack_del_index.c \ + pack_api_cmd/gpr_base_pack_dump.c \ + pack_api_cmd/gpr_base_pack_arithmetic_ops.c \ + pack_api_cmd/gpr_base_pack_put_get.c \ + pack_api_cmd/gpr_base_pack_subscribe.c # Conditionally install the header files diff --git a/orte/mca/gpr/base/data_type_support/Makefile.am b/orte/mca/gpr/base/data_type_support/Makefile.am deleted file mode 100644 index 937f054369..0000000000 --- a/orte/mca/gpr/base/data_type_support/Makefile.am +++ /dev/null @@ -1,38 +0,0 @@ -# -# Copyright (c) 2004-2005 The Trustees of Indiana University. -# All rights reserved. -# Copyright (c) 2004-2005 The Trustees of the University of Tennessee. -# All rights reserved. -# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, -# University of Stuttgart. All rights reserved. -# Copyright (c) 2004-2005 The Regents of the University of California. -# All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -include $(top_srcdir)/config/Makefile.options - -noinst_LTLIBRARIES = libmca_gpr_base_data_type.la - -# Source code files - -headers = - -libmca_gpr_base_data_type_la_SOURCES = \ - $(headers) \ - gpr_data_type_packing_fns.c \ - gpr_data_type_unpacking_fns.c - -# Conditionally install the header files - -if WANT_INSTALL_HEADERS -ortedir = $(includedir)/openmpi/orte/mca/gpr/base/data_type_support -orte_HEADERS = $(headers) -else -ortedir = $(includedir) -endif - diff --git a/orte/mca/gpr/base/pack_api_cmd/Makefile.am b/orte/mca/gpr/base/pack_api_cmd/Makefile.am deleted file mode 100644 index 091b0b57b8..0000000000 --- a/orte/mca/gpr/base/pack_api_cmd/Makefile.am +++ /dev/null @@ -1,42 +0,0 @@ -# -# Copyright (c) 2004-2005 The Trustees of Indiana University. -# All rights reserved. -# Copyright (c) 2004-2005 The Trustees of the University of Tennessee. -# All rights reserved. -# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, -# University of Stuttgart. All rights reserved. -# Copyright (c) 2004-2005 The Regents of the University of California. -# All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -include $(top_srcdir)/config/Makefile.options - -noinst_LTLIBRARIES = libmca_gpr_base_pack.la - -# Source code files - -headers = - -libmca_gpr_base_pack_la_SOURCES = \ - $(headers) \ - gpr_base_pack_cleanup.c \ - gpr_base_pack_del_index.c \ - gpr_base_pack_dump.c \ - gpr_base_pack_arithmetic_ops.c \ - gpr_base_pack_put_get.c \ - gpr_base_pack_subscribe.c - -# Conditionally install the header files - -if WANT_INSTALL_HEADERS -ortedir = $(includedir)/openmpi/orte/mca/gpr/base/pack_api_cmd -orte_HEADERS = $(headers) -else -ortedir = $(includedir) -endif - diff --git a/orte/mca/gpr/base/unpack_api_response/Makefile.am b/orte/mca/gpr/base/unpack_api_response/Makefile.am deleted file mode 100644 index 1dfc9e2cf4..0000000000 --- a/orte/mca/gpr/base/unpack_api_response/Makefile.am +++ /dev/null @@ -1,43 +0,0 @@ -# -# Copyright (c) 2004-2005 The Trustees of Indiana University. -# All rights reserved. -# Copyright (c) 2004-2005 The Trustees of the University of Tennessee. -# All rights reserved. -# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, -# University of Stuttgart. All rights reserved. -# Copyright (c) 2004-2005 The Regents of the University of California. -# All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -include $(top_srcdir)/config/Makefile.options - -noinst_LTLIBRARIES = libmca_gpr_base_unpack.la - -# Source code files - -headers = - -libmca_gpr_base_unpack_la_SOURCES = \ - $(headers) \ - gpr_base_unpack_cleanup.c \ - gpr_base_unpack_del_index.c \ - gpr_base_print_dump.c \ - gpr_base_dump_notify.c \ - gpr_base_unpack_arithmetic_ops.c \ - gpr_base_unpack_put_get.c \ - gpr_base_unpack_subscribe.c - -# Conditionally install the header files - -if WANT_INSTALL_HEADERS -ortedir = $(includedir)/openmpi/orte/mca/gpr/base/unpack_api_response -orte_HEADERS = $(headers) -else -ortedir = $(includedir) -endif - diff --git a/orte/mca/iof/null/configure.m4 b/orte/mca/iof/null/configure.m4 new file mode 100644 index 0000000000..6b7dc0441d --- /dev/null +++ b/orte/mca/iof/null/configure.m4 @@ -0,0 +1,34 @@ +# -*- shell-script -*- +# +# Copyright (c) 2004-2005 The Trustees of Indiana University. +# All rights reserved. +# Copyright (c) 2004-2005 The Trustees of the University of Tennessee. +# All rights reserved. +# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +# University of Stuttgart. All rights reserved. +# Copyright (c) 2004-2005 The Regents of the University of California. +# All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# + +AC_DEFUN([MCA_iof_null_CONFIG],[ + + # README README README README README README README README README + # + # The NULL iof component is here for debugging some things when + # using TM. It should not be used anywhere else, as you won't + # get I/O. So check for tm and follow the tm pls lead. + # + # README README README README README README README README README + + OMPI_CHECK_TM([iof_null], [iof_null_good=1], [iof_null_good=0]) + + # don't need to set any flags - there's no XGrid-using code in this + # component + AS_IF([test "$iof_null_good" = "0" -a "$OMPI_WANT_DIST" = "no"], [$2], + [$1]) +])dnl diff --git a/orte/mca/iof/null/configure.stub b/orte/mca/iof/null/configure.stub deleted file mode 100644 index b9e156bbe6..0000000000 --- a/orte/mca/iof/null/configure.stub +++ /dev/null @@ -1,52 +0,0 @@ -# -*- shell-script -*- -# -# Copyright (c) 2004-2005 The Trustees of Indiana University. -# All rights reserved. -# Copyright (c) 2004-2005 The Trustees of the University of Tennessee. -# All rights reserved. -# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, -# University of Stuttgart. All rights reserved. -# Copyright (c) 2004-2005 The Regents of the University of California. -# All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -AC_DEFUN([MCA_CONFIGURE_STUB],[ - - -# README README README README README README README README README -# -# The NULL iof component is here for debugging some things when -# using TM. It should not be used anywhere else, as you won't -# get I/O. So check for tm and follow the tm pls lead. -# -# README README README README README README README README README - - -# -# boot tm configure.stub -# - -AC_ARG_WITH(pls-tm, - AC_HELP_STRING([--with-pls-tm=DIR], - [directory where the tm software was installed])) - -# -# Need to find tm.h - note that we don't care about CPPFLAGS being reset -# if this doesn't work, that's all she wrote :) -# -if test ! -z "$with_pls_tm"; then - CPPFLAGS="$CPPFLAGS -I$with_pls_tm/include" -fi - -AC_CHECK_HEADERS(tm.h,, - AC_MSG_ERROR([*** Cannot find working tm.h.])) - -# -# done with tm configure.stub -# -])dnl diff --git a/orte/mca/ns/base/Makefile.am b/orte/mca/ns/base/Makefile.am index 968b8c62b7..4ffc8836e9 100644 --- a/orte/mca/ns/base/Makefile.am +++ b/orte/mca/ns/base/Makefile.am @@ -16,8 +16,6 @@ include $(top_srcdir)/config/Makefile.options -SUBDIRS = data_type_support - noinst_LTLIBRARIES = libmca_ns_base.la # For VPATH builds, have to specify where static-modules.h will be found @@ -41,7 +39,9 @@ libmca_ns_base_la_SOURCES = \ ns_base_nds_bproc.c \ ns_base_nds_env.c \ ns_base_nds_pipe.c \ - ns_base_local_fns.c + ns_base_local_fns.c \ + data_type_support/ns_data_type_packing_fns.c \ + data_type_support/ns_data_type_unpacking_fns.c # Conditionally install the header files diff --git a/orte/mca/ns/base/data_type_support/Makefile.am b/orte/mca/ns/base/data_type_support/Makefile.am deleted file mode 100644 index b265a26fc5..0000000000 --- a/orte/mca/ns/base/data_type_support/Makefile.am +++ /dev/null @@ -1,38 +0,0 @@ -# -# Copyright (c) 2004-2005 The Trustees of Indiana University. -# All rights reserved. -# Copyright (c) 2004-2005 The Trustees of the University of Tennessee. -# All rights reserved. -# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, -# University of Stuttgart. All rights reserved. -# Copyright (c) 2004-2005 The Regents of the University of California. -# All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -include $(top_srcdir)/config/Makefile.options - -noinst_LTLIBRARIES = libmca_ns_base_data_type.la - -# Source code files - -headers = - -libmca_ns_base_data_type_la_SOURCES = \ - $(headers) \ - ns_data_type_packing_fns.c \ - ns_data_type_unpacking_fns.c - -# Conditionally install the header files - -if WANT_INSTALL_HEADERS -ortedir = $(includedir)/openmpi/orte/mca/ns/base/data_type_support -orte_HEADERS = $(headers) -else -ortedir = $(includedir) -endif - diff --git a/orte/mca/pls/bproc_seed/Makefile.am b/orte/mca/pls/bproc_seed/Makefile.am index b6470a4e67..bc106327b6 100644 --- a/orte/mca/pls/bproc_seed/Makefile.am +++ b/orte/mca/pls/bproc_seed/Makefile.am @@ -16,10 +16,32 @@ include $(top_ompi_srcdir)/config/Makefile.options -AM_CPPFLAGS = -I$(top_ompi_builddir)/src/include +AM_CPPFLAGS = -I$(top_ompi_builddir)/src/include $(pls_bproc_seed_CPPFLAGS) -noinst_LTLIBRARIES = libmca_pls_bproc_seed.la -libmca_pls_bproc_seed_la_SOURCES = \ +# Make the output library in this directory, and name it either +# mca__.la (for DSO builds) or libmca__.la +# (for static builds). + +if OMPI_BUILD_pls_bproc_seed_DSO +component_noinst = +component_install = mca_pls_bproc_seed.la +else +component_noinst = libmca_pls_bproc_seed.la +component_install = +endif + +sources = \ pls_bproc_seed.h \ pls_bproc_seed.c \ pls_bproc_seed_component.c + +mcacomponentdir = $(libdir)/openmpi +mcacomponent_LTLIBRARIES = $(component_install) +mca_pls_bproc_seed_la_SOURCES = $(sources) +mca_pls_bproc_seed_la_LIBADD = $(pls_bproc_seed_LIBS) +mca_pls_bproc_seed_la_LDFLAGS = -module -avoid-version $(pls_bproc_seed_LDFLAGS) + +noinst_LTLIBRARIES = $(component_noinst) +libmca_pls_bproc_seed_la_SOURCES = $(sources) +libmca_pls_bproc_seed_la_LIBADD = $(pls_bproc_seed_LIBS) +libmca_pls_bproc_seed_la_LDFLAGS = -module -avoid-version $(pls_bproc_seed_LDFLAGS) diff --git a/orte/mca/pls/bproc_seed/configure.m4 b/orte/mca/pls/bproc_seed/configure.m4 new file mode 100644 index 0000000000..2675ecae79 --- /dev/null +++ b/orte/mca/pls/bproc_seed/configure.m4 @@ -0,0 +1,33 @@ +# -*- shell-script -*- +# +# Copyright (c) 2004-2005 The Trustees of Indiana University. +# All rights reserved. +# Copyright (c) 2004-2005 The Trustees of the University of Tennessee. +# All rights reserved. +# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +# University of Stuttgart. All rights reserved. +# Copyright (c) 2004-2005 The Regents of the University of California. +# All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# + +AC_DEFUN([MCA_pls_bproc_seed_CONFIG],[ + OMPI_CHECK_BPROC([pls_bproc_seed], [pls_bproc_seed_good=1], + [pls_bproc_seed_good=0]) + + # For very dumb reasons involving linking, it's near impossible + # to build the XGrid components as static libraries. Disable if that's + # the case. + AS_IF([test "$pls_bproc_seed_good" = "0" -a "$OMPI_WANT_DIST" = "no"], [$2], + [pls_bproc_seed_WRAPPER_EXTRA_LDFLAGS="$pls_bproc_seed_LDFLAGS" + pls_bproc_seed_WRAPPER_EXTRA_LIBS="$pls_bproc_seed_LIBS" + $1]) + + AC_SUBST([pls_bproc_seed_OBJCFLAGS]) + AC_SUBST([pls_bproc_seed_LDFLAGS]) + AC_SUBST([pls_bproc_seed_LIBS]) +])dnl diff --git a/orte/mca/pls/bproc_seed/configure.stub b/orte/mca/pls/bproc_seed/configure.stub deleted file mode 100644 index 10f93d30a7..0000000000 --- a/orte/mca/pls/bproc_seed/configure.stub +++ /dev/null @@ -1,116 +0,0 @@ -# -*- shell-script -*- -# -# Copyright (c) 2004-2005 The Trustees of Indiana University. -# All rights reserved. -# Copyright (c) 2004-2005 The Trustees of the University of Tennessee. -# All rights reserved. -# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, -# University of Stuttgart. All rights reserved. -# Copyright (c) 2004-2005 The Regents of the University of California. -# All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -# -# Main function. This will be invoked in the middle of the templated -# configure script. -# -AC_DEFUN([MCA_CONFIGURE_STUB],[ -# -# Make a best effort to see if we are on a BPROC system. Also allow -# user to specify location to the bproc prefix, which will work just as -# well :). -# - -OMPI_HAVE_BPROC=0 -BPROC_LDFLAGS="" - -# -AC_ARG_WITH(bproc, - AC_HELP_STRING([--with-bproc=DIR], - [directory where the bproc software was installed])) - - -# -# Case 1: --without-bproc specified - overrides autodetect -# -if test "$with_bproc" = "no"; then - OMPI_HAVE_BPROC=0 - -# -# Case 2: --with-bproc specified - look in generic places for bproc libs -# -elif test "$with_bproc" = "yes"; then - # See if we can find the bproc libraries... - LIBS_save="$LIBS" - AC_CHECK_LIB(bproc, bproc_numnodes, - OMPI_HAVE_BPROC=1, - AC_MSG_ERROR([*** Connot find working libbproc.])) - LIBS="$LIBS_save" - -# -# Case 3: nothing specified - if it is there, go with it. If not, don't :) -# -elif test -z "$with_bproc"; then - LIBS_save="$LIBS" - AC_CHECK_LIB(bproc, bproc_numnodes, OMPI_HAVE_BPROC=1) - LIBS="$LIBS_save" - -# -# Case 4: --with-bproc= specified - try where they said to find it -# -else - BPROC_DIR=$with_bproc - - if test -n "$BPROC_DIR"; then - # Make the tests work... - OLDLDFLAGS="$LDFLAGS" - OLDCPPFLAGS="$CPPFLAGS" - BPROC_LDFLAGS="-L$BPROC_DIR/lib" - LDFLAGS="$LDFLAGS $BPROC_LDFLAGS" - CPPFLAGS="$CPPFLAGS -I$BPROC_DIR/include" - LIBS_save="$LIBS" - - AC_CHECK_LIB(bproc, bproc_numnodes, OMPI_HAVE_BPROC=1, - AC_MSG_ERROR([*** Cannot find working libbproc.])) - - # Since we are going to add the -L and -l to LIBOMPI_EXTRA_LIBS, - # we reset this to the start ... - LDFLAGS="$OLDLDFLAGS" - CPPFLAGS="$OLDCPPFLAGS" - LIBS="$LIBS_save" - - else - AC_CHECK_LIB(bproc, bproc_numnodes, OMPI_HAVE_BPROC=1, - AC_MSG_ERROR([*** Cannot find working libbproc.])) - fi -fi - -AC_MSG_CHECKING([if want BPROC support]) - -if test "$OMPI_HAVE_BPROC" = "1"; then - - AC_MSG_RESULT([yes]) -# -# Ok, we have bproc support. Add proper things to the various -# compiler flags.. -# - WRAPPER_EXTRAN_LDFLAGS="$BPROC_LDFLAGS" - WRAPPER_EXTRA_LIBS="-lbproc" - LIBS="-lbproc" -else - AC_MSG_RESULT([no]) - AC_MSG_ERROR([*** Connot find working libbproc.]) - LAM_HAVE_BPROC3_API=0 -fi - -AC_DEFINE_UNQUOTED(OMPI_HAVE_BPROC, $OMPI_HAVE_BPROC, - [Whether we have bproc support or not]) - -# Clean up -unset BPROC_LDFLAGS -])dnl diff --git a/orte/mca/pls/tm/Makefile.am b/orte/mca/pls/tm/Makefile.am index 446156e7f9..aa86fd735c 100644 --- a/orte/mca/pls/tm/Makefile.am +++ b/orte/mca/pls/tm/Makefile.am @@ -40,8 +40,10 @@ endif mcacomponentdir = $(libdir)/openmpi mcacomponent_LTLIBRARIES = $(component) mca_pls_tm_la_SOURCES = $(component_sources) -mca_pls_tm_la_LDFLAGS = -module -avoid-version +mca_pls_tm_la_LDFLAGS = -module -avoid-version $(pls_tm_LDFLAGS) +mca_pls_tm_la_LIBADD = $(pls_tm_LIBS) noinst_LTLIBRARIES = $(lib) libmca_pls_tm_la_SOURCES = $(lib_sources) -libmca_pls_tm_la_LDFLAGS = -module -avoid-version +libmca_pls_tm_la_LDFLAGS = -module -avoid-version $(pls_tm_LDFLAGS) +libmca_pls_tm_la_LIBADD = $(pls_tm_LIBS) diff --git a/orte/mca/ras/xgrid/configure.stub b/orte/mca/pls/tm/configure.m4 similarity index 60% rename from orte/mca/ras/xgrid/configure.stub rename to orte/mca/pls/tm/configure.m4 index 1343031fea..f58e6ffd4f 100644 --- a/orte/mca/ras/xgrid/configure.stub +++ b/orte/mca/pls/tm/configure.m4 @@ -15,17 +15,15 @@ # $HEADER$ # -AC_DEFUN([MCA_CONFIGURE_STUB],[ - -AC_MSG_CHECKING([For XGridFoundation framework]) -save_CFLAGS="$CFLAGS" -CFLAGS="$CFLAGS -framework XGridFoundation" -AC_TRY_LINK([],[;],[HAPPY="yes"],[HAPPY="no"]) -CFLAGS="$save_CFLAGS" -AC_MSG_RESULT([$HAPPY]) - -if test "$HAPPY" = "no" ; then - AC_MSG_ERROR([*** Can not build xgrid ras]) -fi +AC_DEFUN([MCA_pls_tm_CONFIG],[ + OMPI_CHECK_TM([pls_tm], [pls_tm_good=1], [pls_tm_good=0]) + + AS_IF([test "$pls_tm_good" = "0" -a "$OMPI_WANT_DIST" = "no"], [$2], + [pls_tm_WRAPPER_EXTRA_LDFLAGS="$pls_tm_LDFLAGS" + pls_tm_WRAPPER_EXTRA_LIBS="$pls_tm_LIBS" + $1]) + AC_SUBST([pls_tm_CPPFLAGS]) + AC_SUBST([pls_tm_LDFLAGS]) + AC_SUBST([pls_tm_LIBS]) ])dnl diff --git a/orte/mca/pls/tm/configure.stub b/orte/mca/pls/tm/configure.stub deleted file mode 100644 index 7099e891ea..0000000000 --- a/orte/mca/pls/tm/configure.stub +++ /dev/null @@ -1,60 +0,0 @@ -# -*- shell-script -*- -# -# Copyright (c) 2004-2005 The Trustees of Indiana University. -# All rights reserved. -# Copyright (c) 2004-2005 The Trustees of the University of Tennessee. -# All rights reserved. -# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, -# University of Stuttgart. All rights reserved. -# Copyright (c) 2004-2005 The Regents of the University of California. -# All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -AC_DEFUN([MCA_CONFIGURE_STUB],[ - -# -# boot tm configure.stub -# - -AC_ARG_WITH(pls-tm, - AC_HELP_STRING([--with-pls-tm=DIR], - [directory where the tm software was installed])) - -# -# Need to find tm.h - note that we don't care about CPPFLAGS being reset -# if this doesn't work, that's all she wrote :) -# -if test ! -z "$with_pls_tm"; then - CPPFLAGS="$CPPFLAGS -I$with_pls_tm/include" -fi - -AC_CHECK_HEADERS(tm.h,, - AC_MSG_ERROR([*** Cannot find working tm.h.])) - - -# -# Some OS's need -lsocket -lnsl -# - -AC_CHECK_LIB(socket, main, ,) -AC_CHECK_LIB(nsl, main, ,) - -# -# need to find libpbs -# -if test ! -z "$with_pls_tm"; then - LDFLAGS="$LDFLAGS -L$with_pls_tm/lib" -fi - -AC_CHECK_LIB(pbs, tm_init, [], - AC_MSG_ERROR([*** Cannot find working libpbs.]) ) - -# -# done with tm configure.stub -# -])dnl diff --git a/orte/mca/pls/tm/src/Makefile.extra b/orte/mca/pls/tm/src/Makefile.extra index a55d168949..6c5ba62707 100644 --- a/orte/mca/pls/tm/src/Makefile.extra +++ b/orte/mca/pls/tm/src/Makefile.extra @@ -16,7 +16,8 @@ # AM_CPPFLAGS = -I$(top_ompi_builddir)/src/include \ - -I$(top_ompi_srcdir)/src -I$(top_ompi_srcdir)/src/include + -I$(top_ompi_srcdir)/src -I$(top_ompi_srcdir)/src/include \ + $(pls_tm_CPPFLAGS) sources += \ src/pls_tm.h \ diff --git a/orte/mca/pls/tm/src/pls_tm_component.c b/orte/mca/pls/tm/src/pls_tm_component.c index 474c1de8d4..b9c8d073f7 100644 --- a/orte/mca/pls/tm/src/pls_tm_component.c +++ b/orte/mca/pls/tm/src/pls_tm_component.c @@ -26,7 +26,6 @@ #include "mca/pls/pls.h" #include "mca/pls/base/base.h" #include "pls_tm.h" -#include "mca/pls/tm/pls-tm-version.h" #include "mca/base/mca_base_param.h" diff --git a/orte/mca/pls/xgrid/Makefile.am b/orte/mca/pls/xgrid/Makefile.am index 9d5169239e..830bd362e0 100644 --- a/orte/mca/pls/xgrid/Makefile.am +++ b/orte/mca/pls/xgrid/Makefile.am @@ -18,7 +18,8 @@ include $(top_ompi_srcdir)/config/Makefile.options -AM_CPPFLAGS = -I$(top_ompi_builddir)/include +AM_CPPFLAGS = -I$(top_ompi_builddir)/include +AM_OBJCFLAGS = $(pls_xgrid_OBJCFLAGS) xgrid_sources = \ src/pls_xgrid.h \ @@ -43,9 +44,9 @@ mcacomponentdir = $(libdir)/openmpi mcacomponent_LTLIBRARIES = $(component_install) mca_pls_xgrid_la_SOURCES = $(xgrid_sources) mca_pls_xgrid_la_LIBADD = -mca_pls_xgrid_la_LDFLAGS = -module -avoid-version +mca_pls_xgrid_la_LDFLAGS = -module -avoid-version $(pls_xgrid_LDFLAGS) noinst_LTLIBRARIES = $(component_noinst) libmca_pls_xgrid_la_SOURCES = $(xgrid_sources) libmca_pls_xgrid_la_LIBADD = -libmca_pls_xgrid_la_LDFLAGS = -module -avoid-version +libmca_pls_xgrid_la_LDFLAGS = -module -avoid-version $(pls_xgrid_LDFLAGS) diff --git a/orte/mca/pls/xgrid/configure.m4 b/orte/mca/pls/xgrid/configure.m4 new file mode 100644 index 0000000000..971474f6ef --- /dev/null +++ b/orte/mca/pls/xgrid/configure.m4 @@ -0,0 +1,34 @@ +# -*- shell-script -*- +# +# Copyright (c) 2004-2005 The Trustees of Indiana University. +# All rights reserved. +# Copyright (c) 2004-2005 The Trustees of the University of Tennessee. +# All rights reserved. +# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +# University of Stuttgart. All rights reserved. +# Copyright (c) 2004-2005 The Regents of the University of California. +# All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# + +AC_DEFUN([MCA_pls_xgrid_CONFIG],[ + OMPI_CHECK_XGRID([pls_xgrid], [pls_xgrid_good=1], [pls_xgrid_good=0]) + + # For very dumb reasons involving linking, it's near impossible + # to build the XGrid components as static libraries. Disable if that's + # the case. + AS_IF([test "$pls_xgrid_good" = "0" -a "$OMPI_WANT_DIST" = "no"], [$2], + [AS_IF([test "$compile_mode" = "dso"], + [ # pls_xgrid_LDFLAGS will be set by OMPI_CHECK_XGRID + pls_xgrid_WRAPPER_EXTRA_LDFLAGS="$pls_xgrid_LDFLAGS" + $1], + [AC_MSG_WARN([XGrid components must be built as DSOs. Disabling]) + $2])]) + + AC_SUBST([pls_xgrid_OBJCFLAGS]) + AC_SUBST([pls_xgrid_LDFLAGS]) +])dnl diff --git a/orte/mca/pls/xgrid/src/pls_xgrid_client.m b/orte/mca/pls/xgrid/src/pls_xgrid_client.m index 634fd65688..f828d0d99f 100644 --- a/orte/mca/pls/xgrid/src/pls_xgrid_client.m +++ b/orte/mca/pls/xgrid/src/pls_xgrid_client.m @@ -21,7 +21,6 @@ */ #import "ompi_config.h" -#import "pls_xgrid_config.h" #import diff --git a/orte/mca/ras/bjs/Makefile.am b/orte/mca/ras/bjs/Makefile.am index 5edd14b5c4..e0e30690ca 100644 --- a/orte/mca/ras/bjs/Makefile.am +++ b/orte/mca/ras/bjs/Makefile.am @@ -30,6 +30,8 @@ component_noinst = libmca_ras_bjs.la component_install = endif +AM_CPPFLAGS= $(ras_bjs_CPPFLAGS) + proxy_SOURCES = \ ras_bjs.c \ ras_bjs.h \ @@ -38,10 +40,10 @@ proxy_SOURCES = \ mcacomponentdir = $(libdir)/openmpi mcacomponent_LTLIBRARIES = $(component_install) mca_ras_bjs_la_SOURCES = $(proxy_SOURCES) -mca_ras_bjs_la_LIBADD = -mca_ras_bjs_la_LDFLAGS = -module -avoid-version +mca_ras_bjs_la_LIBADD = $(ras_bjs_LIBS) +mca_ras_bjs_la_LDFLAGS = -module -avoid-version $(ras_bjs_LDFLAGS) noinst_LTLIBRARIES = $(component_noinst) libmca_ras_bjs_la_SOURCES = $(proxy_SOURCES) -libmca_ras_bjs_la_LIBADD = -libmca_ras_bjs_la_LDFLAGS = -module -avoid-version +libmca_ras_bjs_la_LIBADD = $(ras_bjs_LIBS) +libmca_ras_bjs_la_LDFLAGS = -module -avoid-version $(ras_bjs_LDFLAGS) diff --git a/orte/mca/ras/bjs/configure.m4 b/orte/mca/ras/bjs/configure.m4 new file mode 100644 index 0000000000..e64632c3ca --- /dev/null +++ b/orte/mca/ras/bjs/configure.m4 @@ -0,0 +1,32 @@ +# -*- shell-script -*- +# +# Copyright (c) 2004-2005 The Trustees of Indiana University. +# All rights reserved. +# Copyright (c) 2004-2005 The Trustees of the University of Tennessee. +# All rights reserved. +# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +# University of Stuttgart. All rights reserved. +# Copyright (c) 2004-2005 The Regents of the University of California. +# All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# + +AC_DEFUN([MCA_ras_bjs_CONFIG],[ + OMPI_CHECK_BPROC([ras_bjs], [ras_bjs_good=1], [ras_bjs_good=0]) + + # For very dumb reasons involving linking, it's near impossible + # to build the XGrid components as static libraries. Disable if that's + # the case. + AS_IF([test "$ras_bjs_good" = "0" -a "$OMPI_WANT_DIST" = "no"], [$2], + [ras_bjs_WRAPPER_EXTRA_LDFLAGS="$ras_bjs_LDFLAGS" + ras_bjs_WRAPPER_EXTRA_LIBS="$ras_bjs_LIBS" + $1]) + + AC_SUBST([ras_bjs_OBJCFLAGS]) + AC_SUBST([ras_bjs_LDFLAGS]) + AC_SUBST([ras_bjs_LIBS]) +])dnl diff --git a/orte/mca/ras/bjs/configure.stub b/orte/mca/ras/bjs/configure.stub deleted file mode 100644 index 10f93d30a7..0000000000 --- a/orte/mca/ras/bjs/configure.stub +++ /dev/null @@ -1,116 +0,0 @@ -# -*- shell-script -*- -# -# Copyright (c) 2004-2005 The Trustees of Indiana University. -# All rights reserved. -# Copyright (c) 2004-2005 The Trustees of the University of Tennessee. -# All rights reserved. -# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, -# University of Stuttgart. All rights reserved. -# Copyright (c) 2004-2005 The Regents of the University of California. -# All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -# -# Main function. This will be invoked in the middle of the templated -# configure script. -# -AC_DEFUN([MCA_CONFIGURE_STUB],[ -# -# Make a best effort to see if we are on a BPROC system. Also allow -# user to specify location to the bproc prefix, which will work just as -# well :). -# - -OMPI_HAVE_BPROC=0 -BPROC_LDFLAGS="" - -# -AC_ARG_WITH(bproc, - AC_HELP_STRING([--with-bproc=DIR], - [directory where the bproc software was installed])) - - -# -# Case 1: --without-bproc specified - overrides autodetect -# -if test "$with_bproc" = "no"; then - OMPI_HAVE_BPROC=0 - -# -# Case 2: --with-bproc specified - look in generic places for bproc libs -# -elif test "$with_bproc" = "yes"; then - # See if we can find the bproc libraries... - LIBS_save="$LIBS" - AC_CHECK_LIB(bproc, bproc_numnodes, - OMPI_HAVE_BPROC=1, - AC_MSG_ERROR([*** Connot find working libbproc.])) - LIBS="$LIBS_save" - -# -# Case 3: nothing specified - if it is there, go with it. If not, don't :) -# -elif test -z "$with_bproc"; then - LIBS_save="$LIBS" - AC_CHECK_LIB(bproc, bproc_numnodes, OMPI_HAVE_BPROC=1) - LIBS="$LIBS_save" - -# -# Case 4: --with-bproc= specified - try where they said to find it -# -else - BPROC_DIR=$with_bproc - - if test -n "$BPROC_DIR"; then - # Make the tests work... - OLDLDFLAGS="$LDFLAGS" - OLDCPPFLAGS="$CPPFLAGS" - BPROC_LDFLAGS="-L$BPROC_DIR/lib" - LDFLAGS="$LDFLAGS $BPROC_LDFLAGS" - CPPFLAGS="$CPPFLAGS -I$BPROC_DIR/include" - LIBS_save="$LIBS" - - AC_CHECK_LIB(bproc, bproc_numnodes, OMPI_HAVE_BPROC=1, - AC_MSG_ERROR([*** Cannot find working libbproc.])) - - # Since we are going to add the -L and -l to LIBOMPI_EXTRA_LIBS, - # we reset this to the start ... - LDFLAGS="$OLDLDFLAGS" - CPPFLAGS="$OLDCPPFLAGS" - LIBS="$LIBS_save" - - else - AC_CHECK_LIB(bproc, bproc_numnodes, OMPI_HAVE_BPROC=1, - AC_MSG_ERROR([*** Cannot find working libbproc.])) - fi -fi - -AC_MSG_CHECKING([if want BPROC support]) - -if test "$OMPI_HAVE_BPROC" = "1"; then - - AC_MSG_RESULT([yes]) -# -# Ok, we have bproc support. Add proper things to the various -# compiler flags.. -# - WRAPPER_EXTRAN_LDFLAGS="$BPROC_LDFLAGS" - WRAPPER_EXTRA_LIBS="-lbproc" - LIBS="-lbproc" -else - AC_MSG_RESULT([no]) - AC_MSG_ERROR([*** Connot find working libbproc.]) - LAM_HAVE_BPROC3_API=0 -fi - -AC_DEFINE_UNQUOTED(OMPI_HAVE_BPROC, $OMPI_HAVE_BPROC, - [Whether we have bproc support or not]) - -# Clean up -unset BPROC_LDFLAGS -])dnl diff --git a/orte/mca/ras/lsf_bproc/Makefile.am b/orte/mca/ras/lsf_bproc/Makefile.am index c0eba3128e..709ab5f6ab 100644 --- a/orte/mca/ras/lsf_bproc/Makefile.am +++ b/orte/mca/ras/lsf_bproc/Makefile.am @@ -30,6 +30,8 @@ component_noinst = libmca_ras_lsf_bproc.la component_install = endif +AM_CPPFLAGS= $(ras_lsf_bproc_CPPFLAGS) + proxy_SOURCES = \ ras_lsf_bproc.c \ ras_lsf_bproc.h \ @@ -38,10 +40,10 @@ proxy_SOURCES = \ mcacomponentdir = $(libdir)/openmpi mcacomponent_LTLIBRARIES = $(component_install) mca_ras_lsf_bproc_la_SOURCES = $(proxy_SOURCES) -mca_ras_lsf_bproc_la_LIBADD = -mca_ras_lsf_bproc_la_LDFLAGS = -module -avoid-version +mca_ras_lsf_bproc_la_LIBADD = $(ras_lsf_bproc_LIBS) +mca_ras_lsf_bproc_la_LDFLAGS = -module -avoid-version $(ras_lsf_bproc_LDFLAGS) noinst_LTLIBRARIES = $(component_noinst) libmca_ras_lsf_bproc_la_SOURCES = $(proxy_SOURCES) -libmca_ras_lsf_bproc_la_LIBADD = -libmca_ras_lsf_bproc_la_LDFLAGS = -module -avoid-version +libmca_ras_lsf_bproc_la_LIBADD = $(ras_lsf_bproc_LIBS) +libmca_ras_lsf_bproc_la_LDFLAGS = -module -avoid-version $(ras_lsf_bproc_LDFLAGS) diff --git a/orte/mca/ras/lsf_bproc/configure.m4 b/orte/mca/ras/lsf_bproc/configure.m4 new file mode 100644 index 0000000000..25b0ab3515 --- /dev/null +++ b/orte/mca/ras/lsf_bproc/configure.m4 @@ -0,0 +1,32 @@ +# -*- shell-script -*- +# +# Copyright (c) 2004-2005 The Trustees of Indiana University. +# All rights reserved. +# Copyright (c) 2004-2005 The Trustees of the University of Tennessee. +# All rights reserved. +# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +# University of Stuttgart. All rights reserved. +# Copyright (c) 2004-2005 The Regents of the University of California. +# All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# + +AC_DEFUN([MCA_ras_lsf_bproc_CONFIG],[ + OMPI_CHECK_BPROC([ras_lsf_bproc], [ras_lsf_bproc_good=1], [ras_lsf_bproc_good=0]) + + # For very dumb reasons involving linking, it's near impossible + # to build the XGrid components as static libraries. Disable if that's + # the case. + AS_IF([test "$ras_lsf_bproc_good" = "0" -a "$OMPI_WANT_DIST" = "no"], [$2], + [ras_lsf_bproc_WRAPPER_EXTRA_LDFLAGS="$ras_lsf_bproc_LDFLAGS" + ras_lsf_bproc_WRAPPER_EXTRA_LIBS="$ras_lsf_bproc_LIBS" + $1]) + + AC_SUBST([ras_lsf_bproc_OBJCFLAGS]) + AC_SUBST([ras_lsf_bproc_LDFLAGS]) + AC_SUBST([ras_lsf_bproc_LIBS]) +])dnl diff --git a/orte/mca/ras/lsf_bproc/configure.stub b/orte/mca/ras/lsf_bproc/configure.stub deleted file mode 100644 index 10f93d30a7..0000000000 --- a/orte/mca/ras/lsf_bproc/configure.stub +++ /dev/null @@ -1,116 +0,0 @@ -# -*- shell-script -*- -# -# Copyright (c) 2004-2005 The Trustees of Indiana University. -# All rights reserved. -# Copyright (c) 2004-2005 The Trustees of the University of Tennessee. -# All rights reserved. -# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, -# University of Stuttgart. All rights reserved. -# Copyright (c) 2004-2005 The Regents of the University of California. -# All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -# -# Main function. This will be invoked in the middle of the templated -# configure script. -# -AC_DEFUN([MCA_CONFIGURE_STUB],[ -# -# Make a best effort to see if we are on a BPROC system. Also allow -# user to specify location to the bproc prefix, which will work just as -# well :). -# - -OMPI_HAVE_BPROC=0 -BPROC_LDFLAGS="" - -# -AC_ARG_WITH(bproc, - AC_HELP_STRING([--with-bproc=DIR], - [directory where the bproc software was installed])) - - -# -# Case 1: --without-bproc specified - overrides autodetect -# -if test "$with_bproc" = "no"; then - OMPI_HAVE_BPROC=0 - -# -# Case 2: --with-bproc specified - look in generic places for bproc libs -# -elif test "$with_bproc" = "yes"; then - # See if we can find the bproc libraries... - LIBS_save="$LIBS" - AC_CHECK_LIB(bproc, bproc_numnodes, - OMPI_HAVE_BPROC=1, - AC_MSG_ERROR([*** Connot find working libbproc.])) - LIBS="$LIBS_save" - -# -# Case 3: nothing specified - if it is there, go with it. If not, don't :) -# -elif test -z "$with_bproc"; then - LIBS_save="$LIBS" - AC_CHECK_LIB(bproc, bproc_numnodes, OMPI_HAVE_BPROC=1) - LIBS="$LIBS_save" - -# -# Case 4: --with-bproc= specified - try where they said to find it -# -else - BPROC_DIR=$with_bproc - - if test -n "$BPROC_DIR"; then - # Make the tests work... - OLDLDFLAGS="$LDFLAGS" - OLDCPPFLAGS="$CPPFLAGS" - BPROC_LDFLAGS="-L$BPROC_DIR/lib" - LDFLAGS="$LDFLAGS $BPROC_LDFLAGS" - CPPFLAGS="$CPPFLAGS -I$BPROC_DIR/include" - LIBS_save="$LIBS" - - AC_CHECK_LIB(bproc, bproc_numnodes, OMPI_HAVE_BPROC=1, - AC_MSG_ERROR([*** Cannot find working libbproc.])) - - # Since we are going to add the -L and -l to LIBOMPI_EXTRA_LIBS, - # we reset this to the start ... - LDFLAGS="$OLDLDFLAGS" - CPPFLAGS="$OLDCPPFLAGS" - LIBS="$LIBS_save" - - else - AC_CHECK_LIB(bproc, bproc_numnodes, OMPI_HAVE_BPROC=1, - AC_MSG_ERROR([*** Cannot find working libbproc.])) - fi -fi - -AC_MSG_CHECKING([if want BPROC support]) - -if test "$OMPI_HAVE_BPROC" = "1"; then - - AC_MSG_RESULT([yes]) -# -# Ok, we have bproc support. Add proper things to the various -# compiler flags.. -# - WRAPPER_EXTRAN_LDFLAGS="$BPROC_LDFLAGS" - WRAPPER_EXTRA_LIBS="-lbproc" - LIBS="-lbproc" -else - AC_MSG_RESULT([no]) - AC_MSG_ERROR([*** Connot find working libbproc.]) - LAM_HAVE_BPROC3_API=0 -fi - -AC_DEFINE_UNQUOTED(OMPI_HAVE_BPROC, $OMPI_HAVE_BPROC, - [Whether we have bproc support or not]) - -# Clean up -unset BPROC_LDFLAGS -])dnl diff --git a/orte/mca/ras/tm/Makefile.am b/orte/mca/ras/tm/Makefile.am index 390996269f..a9527cf475 100644 --- a/orte/mca/ras/tm/Makefile.am +++ b/orte/mca/ras/tm/Makefile.am @@ -40,8 +40,10 @@ endif mcacomponentdir = $(libdir)/openmpi mcacomponent_LTLIBRARIES = $(component) mca_ras_tm_la_SOURCES = $(component_sources) -mca_ras_tm_la_LDFLAGS = -module -avoid-version +mca_ras_tm_la_LDFLAGS = -module -avoid-version $(ras_tm_LDFLAGS) +mca_ras_tm_la_LIBADD = $(ras_tm_LIBS) noinst_LTLIBRARIES = $(lib) libmca_ras_tm_la_SOURCES = $(lib_sources) -libmca_ras_tm_la_LDFLAGS = -module -avoid-version +libmca_ras_tm_la_LDFLAGS = -module -avoid-version $(ras_tm_LDFLAGS) +libmca_ras_tm_la_LIBADD = $(ras_tm_LIBS) diff --git a/orte/mca/pls/xgrid/configure.stub b/orte/mca/ras/tm/configure.m4 similarity index 56% rename from orte/mca/pls/xgrid/configure.stub rename to orte/mca/ras/tm/configure.m4 index ab1cd525cb..dd1b780806 100644 --- a/orte/mca/pls/xgrid/configure.stub +++ b/orte/mca/ras/tm/configure.m4 @@ -15,24 +15,15 @@ # $HEADER$ # -sinclude(ompi_objc.m4) - -AC_DEFUN([MCA_CONFIGURE_STUB],[ - -AC_PROG_OBJC - -AC_MSG_CHECKING([For XGridFoundation framework]) -save_CFLAGS="$CFLAGS" -CFLAGS="$CFLAGS -framework XGridFoundation" -AC_TRY_LINK([],[;],[HAPPY="yes"],[HAPPY="no"]) -CFLAGS="$save_CFLAGS" -AC_MSG_RESULT([$HAPPY]) - -if test "$HAPPY" = "no" ; then - AC_MSG_ERROR([*** Can not build xgrid pls]) -fi - -OBJCFLAGS="-F XGridFoundation" -LDFLAGS="-framework XGridFoundation -framework Foundation" +AC_DEFUN([MCA_ras_tm_CONFIG],[ + OMPI_CHECK_TM([ras_tm], [ras_tm_good=1], [ras_tm_good=0]) + + AS_IF([test "$ras_tm_good" = "0" -a "$OMPI_WANT_DIST" = "no"], [$2], + [ras_tm_WRAPPER_EXTRA_LDFLAGS="$ras_tm_LDFLAGS" + ras_tm_WRAPPER_EXTRA_LIBS="$ras_tm_LIBS" + $1]) + AC_SUBST([ras_tm_CPPFLAGS]) + AC_SUBST([ras_tm_LDFLAGS]) + AC_SUBST([ras_tm_LIBS]) ])dnl diff --git a/orte/mca/ras/tm/configure.stub b/orte/mca/ras/tm/configure.stub deleted file mode 100644 index 727351b829..0000000000 --- a/orte/mca/ras/tm/configure.stub +++ /dev/null @@ -1,64 +0,0 @@ -# -*- shell-script -*- -# -# Copyright (c) 2004-2005 The Trustees of Indiana University. -# All rights reserved. -# Copyright (c) 2004-2005 The Trustees of the University of Tennessee. -# All rights reserved. -# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, -# University of Stuttgart. All rights reserved. -# Copyright (c) 2004-2005 The Regents of the University of California. -# All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -AC_DEFUN([MCA_CONFIGURE_STUB],[ - -# -# ras tm configure.stub -# -# NOTE: Use --with-pls-tm so that the user only has to specify the -# location of the TM support files once -- for the pls (the launcher, -# which is what most users will associate with the back-end RTE) -# - -AC_ARG_WITH(pls-tm, - AC_HELP_STRING([--with-pls-tm=DIR], - [directory where the tm software was installed])) - -# -# Need to find tm.h - note that we don't care about CPPFLAGS being reset -# if this doesn't work, that's all she wrote :) -# -if test ! -z "$with_pls_tm"; then - CPPFLAGS="$CPPFLAGS -I$with_pls_tm/include" -fi - -AC_CHECK_HEADERS(tm.h,, - AC_MSG_ERROR([*** Cannot find working tm.h.])) - - -# -# Some OS's need -lsocket -lnsl -# - -AC_CHECK_LIB(socket, main, ,) -AC_CHECK_LIB(nsl, main, ,) - -# -# need to find libpbs -# -if test ! -z "$with_pls_tm"; then - LDFLAGS="$LDFLAGS -L$with_pls_tm/lib" -fi - -AC_CHECK_LIB(pbs, tm_init, [], - AC_MSG_ERROR([*** Cannot find working libpbs.]) ) - -# -# done with tm configure.stub -# -])dnl diff --git a/orte/mca/ras/tm/src/Makefile.extra b/orte/mca/ras/tm/src/Makefile.extra index a2828dd852..14380f3519 100644 --- a/orte/mca/ras/tm/src/Makefile.extra +++ b/orte/mca/ras/tm/src/Makefile.extra @@ -16,7 +16,9 @@ # AM_CPPFLAGS = -I$(top_ompi_builddir)/src/include \ - -I$(top_ompi_srcdir)/src -I$(top_ompi_srcdir)/src/include + -I$(top_ompi_srcdir)/src -I$(top_ompi_srcdir)/src/include \ + $(pls_tm_CPPFLAGS) + sources += \ src/ras_tm.h \ diff --git a/orte/mca/ras/tm/src/ras_tm_module.c b/orte/mca/ras/tm/src/ras_tm_module.c index f416405ee2..37c9f35d73 100644 --- a/orte/mca/ras/tm/src/ras_tm_module.c +++ b/orte/mca/ras/tm/src/ras_tm_module.c @@ -82,7 +82,7 @@ static int allocate(orte_jobid_t jobid) tm_finalize(); return ret; } - ret = orte_ras_base_allocate_nodes(jobid, &nodes); + ret = orte_ras_base_allocate_nodes_by_slot(jobid, &nodes); while (NULL != (item = opal_list_remove_first(&nodes))) { OBJ_RELEASE(item); diff --git a/orte/mca/ras/xgrid/configure.m4 b/orte/mca/ras/xgrid/configure.m4 new file mode 100644 index 0000000000..fbe8628f22 --- /dev/null +++ b/orte/mca/ras/xgrid/configure.m4 @@ -0,0 +1,29 @@ +# -*- shell-script -*- +# +# Copyright (c) 2004-2005 The Trustees of Indiana University. +# All rights reserved. +# Copyright (c) 2004-2005 The Trustees of the University of Tennessee. +# All rights reserved. +# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +# University of Stuttgart. All rights reserved. +# Copyright (c) 2004-2005 The Regents of the University of California. +# All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# + +AC_DEFUN([MCA_ras_xgrid_CONFIG],[ + OMPI_CHECK_XGRID([ras_xgrid], [ras_xgrid_good=1], [ras_xgrid_good=0]) + + # don't need to set any flags - there's no XGrid-using code in this + # component. For very dumb reasons involving linking, it's near impossible + # to build the XGrid components as static libraries. Disable if that's + # the case. + AS_IF([test "$ras_xgrid_good" = "0" -a "$OMPI_WANT_DIST" = "no"], [$2], + [AS_IF([test "$compile_mode" = "dso"], [$1], + [AC_MSG_WARN([XGrid components must be built as DSOs. Disabling]) + $2])]) +])dnl diff --git a/orte/mca/rmgr/base/Makefile.am b/orte/mca/rmgr/base/Makefile.am index 289b7fa6f1..24d99a5fae 100644 --- a/orte/mca/rmgr/base/Makefile.am +++ b/orte/mca/rmgr/base/Makefile.am @@ -16,8 +16,6 @@ include $(top_srcdir)/config/Makefile.options -SUBDIRS = data_type_support - noinst_LTLIBRARIES = libmca_orte_rmgr_base.la # For VPATH builds, have to specify where static-modules.h will be found @@ -40,7 +38,9 @@ libmca_orte_rmgr_base_la_SOURCES = \ rmgr_base_unpack.c \ rmgr_base_select.c \ rmgr_base_stage_gate.c \ - rmgr_base_stubs.c + rmgr_base_stubs.c \ + data_type_support/rmgr_data_type_packing_fns.c \ + data_type_support/rmgr_data_type_unpacking_fns.c # Conditionally install the header files diff --git a/orte/mca/rmgr/base/data_type_support/Makefile.am b/orte/mca/rmgr/base/data_type_support/Makefile.am deleted file mode 100644 index 8ec4552cea..0000000000 --- a/orte/mca/rmgr/base/data_type_support/Makefile.am +++ /dev/null @@ -1,38 +0,0 @@ -# -# Copyright (c) 2004-2005 The Trustees of Indiana University. -# All rights reserved. -# Copyright (c) 2004-2005 The Trustees of the University of Tennessee. -# All rights reserved. -# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, -# University of Stuttgart. All rights reserved. -# Copyright (c) 2004-2005 The Regents of the University of California. -# All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -include $(top_srcdir)/config/Makefile.options - -noinst_LTLIBRARIES = libmca_rmgr_base_data_type.la - -# Source code files - -headers = - -libmca_rmgr_base_data_type_la_SOURCES = \ - $(headers) \ - rmgr_data_type_packing_fns.c \ - rmgr_data_type_unpacking_fns.c - -# Conditionally install the header files - -if WANT_INSTALL_HEADERS -ortedir = $(includedir)/openmpi/orte/mca/rmgr/base/data_type_support -orte_HEADERS = $(headers) -else -ortedir = $(includedir) -endif - diff --git a/orte/mca/soh/base/Makefile.am b/orte/mca/soh/base/Makefile.am index 7f82441356..2bb267727b 100644 --- a/orte/mca/soh/base/Makefile.am +++ b/orte/mca/soh/base/Makefile.am @@ -16,8 +16,6 @@ include $(top_srcdir)/config/Makefile.options -SUBDIRS = data_type_support - noinst_LTLIBRARIES = libmca_soh_base.la # For VPATH builds, have to specify where static-modules.h will be found @@ -38,7 +36,9 @@ libmca_soh_base_la_SOURCES = \ soh_base_local_functions.c \ soh_base_get_proc_soh.c \ soh_base_set_proc_soh.c \ - soh_base_open.c + soh_base_open.c \ + data_type_support/soh_data_type_packing_fns.c \ + data_type_support/soh_data_type_unpacking_fns.c # Conditionally install the header files diff --git a/orte/mca/soh/base/data_type_support/Makefile.am b/orte/mca/soh/base/data_type_support/Makefile.am deleted file mode 100644 index 69cecd18c4..0000000000 --- a/orte/mca/soh/base/data_type_support/Makefile.am +++ /dev/null @@ -1,38 +0,0 @@ -# -# Copyright (c) 2004-2005 The Trustees of Indiana University. -# All rights reserved. -# Copyright (c) 2004-2005 The Trustees of the University of Tennessee. -# All rights reserved. -# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, -# University of Stuttgart. All rights reserved. -# Copyright (c) 2004-2005 The Regents of the University of California. -# All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -include $(top_srcdir)/config/Makefile.options - -noinst_LTLIBRARIES = libmca_soh_base_data_type.la - -# Source code files - -headers = - -libmca_soh_base_data_type_la_SOURCES = \ - $(headers) \ - soh_data_type_packing_fns.c \ - soh_data_type_unpacking_fns.c - -# Conditionally install the header files - -if WANT_INSTALL_HEADERS -ortedir = $(includedir)/openmpi/orte/mca/soh/base/data_type_support -orte_HEADERS = $(headers) -else -ortedir = $(includedir) -endif -