* Merge of wrapper compiler updates from the bwb-wrapper-fix branch (r8690 -
r8698), with changes below: - Split wrapper flags into those required for each of the three projects, and cleaned up some cruft (including the LIBMPI_EXTRA_*FLAGS) through- out the build system - Added opal_init_util and opal_finalize_util to allow init / cleanup of all the opal code that doesn't require the MCA system - Create standalone key=value file parser, based on the one that used to be in the mca param parser, so that it can be shared in multiple places - Add wrapper datafiles for opal, orte, and ompi wrappers, and add wrapper compiler with support for all the old features This commit was SVN r8699. The following SVN revisions from the original message are invalid or inconsistent and therefore were not cross-referenced: r8690 r8698
Этот коммит содержится в:
родитель
d4699037f7
Коммит
c96f870674
@ -37,8 +37,7 @@ AC_DEFUN([OMPI_CHECK_FUNC_LIB],[
|
|||||||
[AS_VAR_SET(ompi_var, "not found")])
|
[AS_VAR_SET(ompi_var, "not found")])
|
||||||
LIBS="$LIBS_save"])])
|
LIBS="$LIBS_save"])])
|
||||||
AS_IF([test "AS_VAR_GET(ompi_var)" = "yes"],
|
AS_IF([test "AS_VAR_GET(ompi_var)" = "yes"],
|
||||||
[LIBS="$LIBS -l$2"
|
[LIBS="$LIBS -l$2"])
|
||||||
WRAPPER_EXTRA_LIBS="$WRAPPER_EXTRA_LIBS -l$2"])
|
|
||||||
|
|
||||||
# see if we actually have $1. Use AC_CHECK_FUNCS so that it
|
# see if we actually have $1. Use AC_CHECK_FUNCS so that it
|
||||||
# does the glibc "not implemented" check. Will use the current LIBS,
|
# does the glibc "not implemented" check. Will use the current LIBS,
|
||||||
|
@ -698,54 +698,17 @@ AC_DEFUN([MCA_PROCESS_COMPONENT],[
|
|||||||
AC_MSG_ERROR([cannot continue])
|
AC_MSG_ERROR([cannot continue])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# 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}"
|
|
||||||
line="`grep $var_in= $infile | cut -d= -f2-`"
|
|
||||||
eval "line=$line"
|
|
||||||
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
|
|
||||||
var_in="WRAPPER_ALWAYS_EXTRA_${flags}"
|
|
||||||
var_out="WRAPPER_EXTRA_${flags}"
|
|
||||||
line="`grep $var_in= $infile | cut -d= -f2-`"
|
|
||||||
eval "line=$line"
|
|
||||||
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
|
# Check for flags passed up from the component. If we're
|
||||||
# compiling statically, then take all flags passed up from the
|
# compiling statically, then take all flags passed up from the
|
||||||
# component.
|
# component.
|
||||||
if test "$8" = "static"; then
|
if test "$8" = "static"; then
|
||||||
for flags in LDFLAGS LIBS; do
|
m4_foreach(flags, [LDFLAGS, LIBS],
|
||||||
var="LIBMPI_EXTRA_${flags}"
|
[[line="`grep WRAPPER_EXTRA_]flags[= $infile | cut -d= -f2-`"]
|
||||||
line="`grep $var= $infile | cut -d= -f2-`"
|
|
||||||
eval "line=$line"
|
eval "line=$line"
|
||||||
if test -n "$line"; then
|
if test -n "$line"; then
|
||||||
str="$var="'"$'"$var $line"'"'
|
$1[_WRAPPER_EXTRA_]flags[="$]$1[_WRAPPER_EXTRA_]flags[ $line"]
|
||||||
eval $str
|
|
||||||
fi
|
fi
|
||||||
done
|
])dnl
|
||||||
|
|
||||||
for flags in CFLAGS CXXFLAGS FFLAGS FCFLAGS LDFLAGS LIBS; do
|
|
||||||
var="WRAPPER_EXTRA_${flags}"
|
|
||||||
line="`grep $var= $infile | cut -d= -f2-`"
|
|
||||||
eval "line=$line"
|
|
||||||
if test -n "$line"; then
|
|
||||||
str="$var="'"$'"$var $line"'"'
|
|
||||||
eval $str
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl check for direct call header to include. This will be
|
dnl check for direct call header to include. This will be
|
||||||
@ -771,58 +734,21 @@ AC_MSG_ERROR([*** ${framework} component ${component} was supposed to be direct-
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
|
||||||
# now add the flags that were set in the environment variables
|
# now add the flags that were set in the environment variables
|
||||||
# framework_component_FOO (for example, the flags set by
|
# framework_component_FOO (for example, the flags set by
|
||||||
# m4_configure components)
|
# 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 $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 $line"'"'
|
|
||||||
eval $str
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Check for flags passed up from the component. If we're
|
# Check for flags passed up from the component. If we're
|
||||||
# compiling statically, then take all flags passed up from the
|
# compiling statically, then take all flags passed up from the
|
||||||
# component.
|
# component.
|
||||||
if test "$8" = "static"; then
|
if test "$8" = "static"; then
|
||||||
for flags in LDFLAGS LIBS; do
|
m4_foreach(flags, [LDFLAGS, LIBS],
|
||||||
str="line=\$${framework}_${component}_LIBMPI_EXTRA_${flags}"
|
[[str="line=\$${framework}_${component}_WRAPPER_EXTRA_]flags["]
|
||||||
eval "$str"
|
eval "$str"
|
||||||
var_out="LIBMPI_EXTRA_${flags}"
|
if test -n "$line" ; then
|
||||||
if test -n "$line"; then
|
$1[_WRAPPER_EXTRA_]flags[="$]$1[_WRAPPER_EXTRA_]flags[ $line"]
|
||||||
str="$var_out="'"$'"$var_out $line"'"'
|
fi
|
||||||
eval $str
|
])dnl
|
||||||
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 $line"'"'
|
|
||||||
eval $str
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
|
|
||||||
|
@ -27,6 +27,7 @@ dnl
|
|||||||
# don't want them to go through OMPI_UNIQ because that has resulted in
|
# don't want them to go through OMPI_UNIQ because that has resulted in
|
||||||
# unexpected behavior for the user in the past.
|
# unexpected behavior for the user in the past.
|
||||||
AC_DEFUN([OMPI_SETUP_WRAPPER_INIT],[
|
AC_DEFUN([OMPI_SETUP_WRAPPER_INIT],[
|
||||||
|
WRAPPER_EXTRA_CPPFLAGS=
|
||||||
WRAPPER_EXTRA_CFLAGS=
|
WRAPPER_EXTRA_CFLAGS=
|
||||||
WRAPPER_EXTRA_CXXFLAGS=
|
WRAPPER_EXTRA_CXXFLAGS=
|
||||||
WRAPPER_EXTRA_FFLAGS=
|
WRAPPER_EXTRA_FFLAGS=
|
||||||
@ -98,70 +99,197 @@ AC_DEFUN([OMPI_SETUP_WRAPPER_INIT],[
|
|||||||
|
|
||||||
|
|
||||||
AC_DEFUN([OMPI_SETUP_WRAPPER_FINAL],[
|
AC_DEFUN([OMPI_SETUP_WRAPPER_FINAL],[
|
||||||
|
OMPI_UNIQ([WRAPPER_EXTRA_CPPFLAGS])
|
||||||
|
OMPI_UNIQ([WRAPPER_EXTRA_CFLAGS])
|
||||||
|
OMPI_UNIQ([WRAPPER_EXTRA_CXXFLAGS])
|
||||||
|
OMPI_UNIQ([WRAPPER_EXTRA_FFLAGS])
|
||||||
|
OMPI_UNIQ([WRAPPER_EXTRA_FCFLAGS])
|
||||||
|
OMPI_UNIQ([WRAPPER_EXTRA_LDFLAGS])
|
||||||
|
|
||||||
#
|
#
|
||||||
# Adding WRAPPER_* flags so that extra flags needed for wrappper compilers
|
# OPAL
|
||||||
#
|
#
|
||||||
# WRAPPER_EXTRA_CFLAGS
|
OMPI_UNIQ([opal_WRAPPER_EXTRA_LDFLAGS])
|
||||||
|
OMPI_UNIQ([opal_WRAPPER_EXTRA_LIBS])
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([for OPAL CPPFLAGS])
|
||||||
|
OPAL_WRAPPER_EXTRA_CPPFLAGS="$WRAPPER_EXTRA_CPPFLAGS $USER_WRAPPER_EXTRA_CPPFLAGS"
|
||||||
|
AC_SUBST([OPAL_WRAPPER_EXTRA_CPPFLAGS])
|
||||||
|
AC_MSG_RESULT([$OPAL_WRAPPER_EXTRA_CPPFLAGS])
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([for OPAL CFLAGS])
|
||||||
|
OPAL_WRAPPER_EXTRA_CFLAGS="$WRAPPER_EXTRA_CFLAGS $USER_WRAPPER_EXTRA_CFLAGS"
|
||||||
|
AC_SUBST([OPAL_WRAPPER_EXTRA_CFLAGS])
|
||||||
|
AC_MSG_RESULT([$OPAL_WRAPPER_EXTRA_CFLAGS])
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([for OPAL CXXFLAGS])
|
||||||
|
OPAL_WRAPPER_EXTRA_CXXFLAGS="$WRAPPER_EXTRA_CXXFLAGS $USER_WRAPPER_EXTRA_CXXFLAGS"
|
||||||
|
AC_SUBST([OPAL_WRAPPER_EXTRA_CXXFLAGS])
|
||||||
|
AC_MSG_RESULT([$OPAL_WRAPPER_EXTRA_CXXFLAGS])
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([for OPAL LDFLAGS])
|
||||||
|
OPAL_WRAPPER_EXTRA_LDFLAGS="$opal_WRAPPER_EXTRA_LDFLAGS $WRAPPER_EXTRA_LDFLAGS $USER_WRAPPER_EXTRA_LDFLAGS"
|
||||||
|
AC_SUBST([OPAL_WRAPPER_EXTRA_LDFLAGS])
|
||||||
|
AC_MSG_RESULT([$OPAL_WRAPPER_EXTRA_LDFLAGS])
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([for OPAL LIBS])
|
||||||
|
OPAL_WRAPPER_EXTRA_LIBS="$opal_WRAPPER_EXTRA_LIBS $WRAPPER_EXTRA_LIBS $USER_WRAPPER_EXTRA_LIBS"
|
||||||
|
AC_SUBST([OPAL_WRAPPER_EXTRA_LIBS])
|
||||||
|
AC_MSG_RESULT([$OPAL_WRAPPER_EXTRA_LIBS])
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([for OPAL extra include dirs])
|
||||||
|
if test "$WANT_INSTALL_HEADERS" = "1" ; then
|
||||||
|
OPAL_WRAPPER_EXTRA_INCLUDES="openmpi openmpi/opal"
|
||||||
|
else
|
||||||
|
OPAL_WRAPPER_EXTRA_INCLUDES=
|
||||||
|
fi
|
||||||
|
AC_SUBST([OPAL_WRAPPER_EXTRA_INCLUDES])
|
||||||
|
AC_MSG_RESULT([$OPAL_WRAPPER_EXTRA_INCLUDES])
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
AC_MSG_CHECKING([for mpicc CFLAGS])
|
# ORTE
|
||||||
OMPI_UNIQ(WRAPPER_EXTRA_CFLAGS)
|
#
|
||||||
WRAPPER_EXTRA_CFLAGS="$WRAPPER_EXTRA_CFLAGS $USER_WRAPPER_EXTRA_CFLAGS"
|
OMPI_UNIQ([orte_WRAPPER_EXTRA_LDFLAGS])
|
||||||
|
OMPI_UNIQ([orte_WRAPPER_EXTRA_LIBS])
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([for ORTE CPPFLAGS])
|
||||||
|
ORTE_WRAPPER_EXTRA_CPPFLAGS="$OPAL_WRAPPER_EXTRA_CPPFLAGS"
|
||||||
|
AC_SUBST([ORTE_WRAPPER_EXTRA_CPPFLAGS])
|
||||||
|
AC_MSG_RESULT([$ORTE_WRAPPER_EXTRA_CPPFLAGS])
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([for ORTE CFLAGS])
|
||||||
|
ORTE_WRAPPER_EXTRA_CFLAGS="$OPAL_WRAPPER_EXTRA_CFLAGS"
|
||||||
|
AC_SUBST([ORTE_WRAPPER_EXTRA_CFLAGS])
|
||||||
|
AC_MSG_RESULT([$ORTE_WRAPPER_EXTRA_CFLAGS])
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([for ORTE CXXFLAGS])
|
||||||
|
ORTE_WRAPPER_EXTRA_CXXFLAGS="$OPAL_WRAPPER_EXTRA_CXXFLAGS"
|
||||||
|
AC_SUBST([ORTE_WRAPPER_EXTRA_CXXFLAGS])
|
||||||
|
AC_MSG_RESULT([$ORTE_WRAPPER_EXTRA_CXXFLAGS])
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([for ORTE LDFLAGS])
|
||||||
|
ORTE_WRAPPER_EXTRA_LDFLAGS="$orte_WRAPPER_EXTRA_LDFLAGS $OPAL_WRAPPER_EXTRA_LDFLAGS"
|
||||||
|
AC_SUBST([ORTE_WRAPPER_EXTRA_LDFLAGS])
|
||||||
|
AC_MSG_RESULT([$ORTE_WRAPPER_EXTRA_LDFLAGS])
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([for ORTE LIBS])
|
||||||
|
ORTE_WRAPPER_EXTRA_LIBS="$orte_WRAPPER_EXTRA_LIBS $OPAL_WRAPPER_EXTRA_LIBS"
|
||||||
|
AC_SUBST([ORTE_WRAPPER_EXTRA_LIBS])
|
||||||
|
AC_MSG_RESULT([$ORTE_WRAPPER_EXTRA_LIBS])
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([for ORTE extra include dirs])
|
||||||
|
if test "$WANT_INSTALL_HEADERS" = "1" ; then
|
||||||
|
ORTE_WRAPPER_EXTRA_INCLUDES="$OPAL_WRAPPER_EXTRA_INCLUDES openmpi openmpi/opal openmpi/orte"
|
||||||
|
else
|
||||||
|
ORTE_WRAPPER_EXTRA_INCLUDES="$OPAL_WRAPPER_EXTRA_INCLUDES"
|
||||||
|
fi
|
||||||
|
AC_SUBST([ORTE_WRAPPER_EXTRA_INCLUDES])
|
||||||
|
AC_MSG_RESULT([$ORTE_WRAPPER_EXTRA_INCLUDES])
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# OMPI
|
||||||
|
#
|
||||||
|
OMPI_UNIQ([ompi_WRAPPER_EXTRA_LDFLAGS])
|
||||||
|
OMPI_UNIQ([ompi_WRAPPER_EXTRA_LIBS])
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([for OMPI CPPFLAGS])
|
||||||
|
OMPI_WRAPPER_EXTRA_CPPFLAGS="$ORTE_WRAPPER_EXTRA_CPPFLAGS"
|
||||||
|
AC_SUBST([OMPI_WRAPPER_EXTRA_CPPFLAGS])
|
||||||
|
AC_MSG_RESULT([$OMPI_WRAPPER_EXTRA_CPPFLAGS])
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([for OMPI CFLAGS])
|
||||||
|
OMPI_WRAPPER_EXTRA_CFLAGS="$ORTE_WRAPPER_EXTRA_CFLAGS"
|
||||||
|
AC_SUBST([OMPI_WRAPPER_EXTRA_CFLAGS])
|
||||||
|
AC_MSG_RESULT([$OMPI_WRAPPER_EXTRA_CFLAGS])
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([for OMPI CXXFLAGS])
|
||||||
|
OMPI_WRAPPER_EXTRA_CXXFLAGS="$ORTE_WRAPPER_EXTRA_CXXFLAGS"
|
||||||
|
AC_SUBST([OMPI_WRAPPER_EXTRA_CXXFLAGS])
|
||||||
|
AC_MSG_RESULT([$OMPI_WRAPPER_EXTRA_CXXFLAGS])
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([for OMPI FFLAGS])
|
||||||
|
OMPI_WRAPPER_EXTRA_FFLAGS="$WRAPPER_EXTRA_FFLAGS $USER_WRAPPER_EXTRA_FFLAGS"
|
||||||
|
AC_SUBST([OMPI_WRAPPER_EXTRA_FFLAGS])
|
||||||
|
AC_MSG_RESULT([$OMPI_WRAPPER_EXTRA_FFLAGS])
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([for OMPI FCFLAGS])
|
||||||
|
OMPI_WRAPPER_EXTRA_FCFLAGS="$WRAPPER_EXTRA_FCFLAGS $USER_WRAPPER_EXTRA_FCFLAGS"
|
||||||
|
AC_SUBST([OMPI_WRAPPER_EXTRA_FCFLAGS])
|
||||||
|
AC_MSG_RESULT([$OMPI_WRAPPER_EXTRA_FCFLAGS])
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([for OMPI LDFLAGS])
|
||||||
|
OMPI_WRAPPER_EXTRA_LDFLAGS="$ompi_WRAPPER_EXTRA_LDFLAGS $ORTE_WRAPPER_EXTRA_LDFLAGS"
|
||||||
|
AC_SUBST([OMPI_WRAPPER_EXTRA_LDFLAGS])
|
||||||
|
AC_MSG_RESULT([$OMPI_WRAPPER_EXTRA_LDFLAGS])
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([for OMPI LIBS])
|
||||||
|
OMPI_WRAPPER_EXTRA_LIBS="$ompi_WRAPPER_EXTRA_LIBS $ORTE_WRAPPER_EXTRA_LIBS"
|
||||||
|
AC_SUBST([OMPI_WRAPPER_EXTRA_LIBS])
|
||||||
|
AC_MSG_RESULT([$OMPI_WRAPPER_EXTRA_LIBS])
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([for OMPI extra include dirs])
|
||||||
|
if test "$WANT_INSTALL_HEADERS" = "1" ; then
|
||||||
|
OMPI_WRAPPER_EXTRA_INCLUDES="$ORTE_WRAPPER_EXTRA_INCLUDES openmpi openmpi/opal openmpi/orte openmpi/ompi"
|
||||||
|
else
|
||||||
|
OMPI_WRAPPER_EXTRA_INCLUDES="$ORTE_WRAPPER_EXTRA_INCLUDES openmpi/ompi"
|
||||||
|
fi
|
||||||
|
AC_SUBST([OMPI_WRAPPER_EXTRA_INCLUDES])
|
||||||
|
AC_MSG_RESULT([$OMPI_WRAPPER_EXTRA_INCLUDES])
|
||||||
|
|
||||||
|
# language binding support. C++ is a bit different, as the
|
||||||
|
# compiler should work even if there is no language support.
|
||||||
|
if test "$WANT_MPI_CXX_SUPPORT" = "1" ; then
|
||||||
|
OMPI_WRAPPER_CXX_LIB="-lmpi_cxx"
|
||||||
|
OMPI_WRAPPER_CXX_REQUIRED_FILE="libmpi_cxx.la"
|
||||||
|
else
|
||||||
|
OMPI_WRAPPER_CXX_LIB=""
|
||||||
|
OMPI_WRAPPER_CXX_REQUIRED_FILE=""
|
||||||
|
fi
|
||||||
|
AC_SUBST([OMPI_WRAPPER_CXX_LIB])
|
||||||
|
AC_SUBST([OMPI_WRAPPER_CXX_REQUIRED_FILE])
|
||||||
|
|
||||||
|
if test "$OMPI_WANT_F77_BINDINGS" = "1" ; then
|
||||||
|
OMPI_WRAPPER_F77_REQUIRED_FILE=""
|
||||||
|
else
|
||||||
|
OMPI_WRAPPER_F77_REQUIRED_FILE="not supported"
|
||||||
|
fi
|
||||||
|
AC_SUBST([OMPI_WRAPPER_F77_REQUIRED_FILE])
|
||||||
|
|
||||||
|
if test "$OMPI_WANT_F90_BINDINGS" = "1" ; then
|
||||||
|
OMPI_WRAPPER_F90_REQUIRED_FILE="libmpi_f90.la"
|
||||||
|
else
|
||||||
|
OMPI_WRAPPER_F90_REQUIRED_FILE="not supported"
|
||||||
|
fi
|
||||||
|
AC_SUBST([OMPI_WRAPPER_F90_REQUIRED_FILE])
|
||||||
|
|
||||||
|
|
||||||
|
# compatibility defines that will eventually go away
|
||||||
|
WRAPPER_EXTRA_CFLAGS="$OMPI_WRAPPER_EXTRA_CFLAGS"
|
||||||
|
WRAPPER_EXTRA_CXXFLAGS="$OMPI_WRAPPER_EXTRA_CXXFLAGS"
|
||||||
|
WRAPPER_EXTRA_FFLAGS="$OMPI_WRAPPER_EXTRA_FFLAGS"
|
||||||
|
WRAPPER_EXTRA_FCFLAGS="$OMPI_WRAPPER_EXTRA_FCFLAGS"
|
||||||
|
WRAPPER_EXTRA_LDFLAGS="$OMPI_WRAPPER_EXTRA_LDFLAGS"
|
||||||
|
WRAPPER_EXTRA_LIBS="$OMPI_WRAPPER_EXTRA_LIBS"
|
||||||
|
|
||||||
AC_SUBST(WRAPPER_EXTRA_CFLAGS)
|
AC_SUBST(WRAPPER_EXTRA_CFLAGS)
|
||||||
|
AC_SUBST(WRAPPER_EXTRA_CXXFLAGS)
|
||||||
|
AC_SUBST(WRAPPER_EXTRA_FFLAGS)
|
||||||
|
AC_SUBST(WRAPPER_EXTRA_FCFLAGS)
|
||||||
|
AC_SUBST(WRAPPER_EXTRA_LDFLAGS)
|
||||||
|
AC_SUBST(WRAPPER_EXTRA_LIBS)
|
||||||
|
|
||||||
AC_DEFINE_UNQUOTED(WRAPPER_EXTRA_CFLAGS, "$WRAPPER_EXTRA_CFLAGS",
|
AC_DEFINE_UNQUOTED(WRAPPER_EXTRA_CFLAGS, "$WRAPPER_EXTRA_CFLAGS",
|
||||||
[Additional CFLAGS to pass through the wrapper compilers])
|
[Additional CFLAGS to pass through the wrapper compilers])
|
||||||
AC_MSG_RESULT([$WRAPPER_EXTRA_CFLAGS])
|
|
||||||
|
|
||||||
#
|
|
||||||
# WRAPPER_EXTRA_CXXFLAGS
|
|
||||||
#
|
|
||||||
AC_MSG_CHECKING([for mpiCC CXXFLAGS])
|
|
||||||
OMPI_UNIQ(WRAPPER_EXTRA_CXXFLAGS)
|
|
||||||
WRAPPER_EXTRA_CXXFLAGS="$WRAPPER_EXTRA_CXXFLAGS $USER_WRAPPER_EXTRA_CXXFLAGS"
|
|
||||||
AC_SUBST(WRAPPER_EXTRA_CXXFLAGS)
|
|
||||||
AC_DEFINE_UNQUOTED(WRAPPER_EXTRA_CXXFLAGS, "$WRAPPER_EXTRA_CXXFLAGS",
|
AC_DEFINE_UNQUOTED(WRAPPER_EXTRA_CXXFLAGS, "$WRAPPER_EXTRA_CXXFLAGS",
|
||||||
[Additional CXXFLAGS to pass through the wrapper compilers])
|
[Additional CXXFLAGS to pass through the wrapper compilers])
|
||||||
AC_MSG_RESULT([$WRAPPER_EXTRA_CXXFLAGS])
|
|
||||||
|
|
||||||
#
|
|
||||||
# WRAPPER_EXTRA_FFLAGS
|
|
||||||
#
|
|
||||||
AC_MSG_CHECKING([for mpif77/mpif90 FFLAGS])
|
|
||||||
OMPI_UNIQ(WRAPPER_EXTRA_FFLAGS)
|
|
||||||
WRAPPER_EXTRA_FFLAGS="$WRAPPER_EXTRA_FFLAGS $USER_WRAPPER_EXTRA_FFLAGS"
|
|
||||||
AC_SUBST(WRAPPER_EXTRA_FFLAGS)
|
|
||||||
AC_DEFINE_UNQUOTED(WRAPPER_EXTRA_FFLAGS, "$WRAPPER_EXTRA_FFLAGS",
|
AC_DEFINE_UNQUOTED(WRAPPER_EXTRA_FFLAGS, "$WRAPPER_EXTRA_FFLAGS",
|
||||||
[Additional FFLAGS to pass through the wrapper compilers])
|
[Additional FFLAGS to pass through the wrapper compilers])
|
||||||
AC_MSG_RESULT([$WRAPPER_EXTRA_FFLAGS])
|
|
||||||
|
|
||||||
#
|
|
||||||
# WRAPPER_EXTRA_FCFLAGS
|
|
||||||
#
|
|
||||||
AC_MSG_CHECKING([for mpif77/mpif90 FCFLAGS])
|
|
||||||
OMPI_UNIQ(WRAPPER_EXTRA_FCFLAGS)
|
|
||||||
WRAPPER_EXTRA_FCFLAGS="$WRAPPER_EXTRA_FCFLAGS $USER_WRAPPER_EXTRA_FCFLAGS"
|
|
||||||
AC_SUBST(WRAPPER_EXTRA_FCFLAGS)
|
|
||||||
AC_DEFINE_UNQUOTED(WRAPPER_EXTRA_FCFLAGS, "$WRAPPER_EXTRA_FCFLAGS",
|
AC_DEFINE_UNQUOTED(WRAPPER_EXTRA_FCFLAGS, "$WRAPPER_EXTRA_FCFLAGS",
|
||||||
[Additional FCFLAGS to pass through the wrapper compilers])
|
[Additional FCFLAGS to pass through the wrapper compilers])
|
||||||
AC_MSG_RESULT([$WRAPPER_EXTRA_FCFLAGS])
|
|
||||||
|
|
||||||
#
|
|
||||||
# WRAPPER_EXTRA_LDFLAGS
|
|
||||||
#
|
|
||||||
AC_MSG_CHECKING([for wrapper compiler LDFLAGS])
|
|
||||||
OMPI_UNIQ(WRAPPER_EXTRA_LDFLAGS)
|
|
||||||
WRAPPER_EXTRA_LDFLAGS="$WRAPPER_EXTRA_LDFLAGS $USER_WRAPPER_EXTRA_LDFLAGS"
|
|
||||||
AC_SUBST(WRAPPER_EXTRA_LDFLAGS)
|
|
||||||
AC_DEFINE_UNQUOTED(WRAPPER_EXTRA_LDFLAGS, "$WRAPPER_EXTRA_LDFLAGS",
|
AC_DEFINE_UNQUOTED(WRAPPER_EXTRA_LDFLAGS, "$WRAPPER_EXTRA_LDFLAGS",
|
||||||
[Additional LDFLAGS to pass through the wrapper compilers])
|
[Additional LDFLAGS to pass through the wrapper compilers])
|
||||||
AC_MSG_RESULT([$WRAPPER_EXTRA_LDFLAGS])
|
|
||||||
|
|
||||||
#
|
|
||||||
# WRAPPER_EXTRA_LIBS
|
|
||||||
#
|
|
||||||
AC_MSG_CHECKING([for wrapper compiler LIBS])
|
|
||||||
WRAPPER_EXTRA_LIBS="$WRAPPER_EXTRA_LIBS $USER_WRAPPER_EXTRA_LIBS"
|
|
||||||
AC_SUBST(WRAPPER_EXTRA_LIBS)
|
|
||||||
AC_DEFINE_UNQUOTED(WRAPPER_EXTRA_LIBS, "$WRAPPER_EXTRA_LIBS",
|
AC_DEFINE_UNQUOTED(WRAPPER_EXTRA_LIBS, "$WRAPPER_EXTRA_LIBS",
|
||||||
[Additional LIBS to pass through the wrapper compilers])
|
[Additional LIBS to pass through the wrapper compilers])
|
||||||
AC_MSG_RESULT([$WRAPPER_EXTRA_LIBS])
|
|
||||||
])
|
])
|
||||||
|
92
configure.ac
92
configure.ac
@ -1155,17 +1155,23 @@ AC_CACHE_SAVE
|
|||||||
|
|
||||||
ompi_show_title "Library and Function tests"
|
ompi_show_title "Library and Function tests"
|
||||||
|
|
||||||
AC_CHECK_LIB([util], [openpty],
|
AC_CHECK_LIB([util], [openpty])
|
||||||
[WRAPPER_EXTRA_LIBS="$WRAPPER_EXTRA_LIBS -lutil"
|
|
||||||
LIBS="$LIBS -lutil"])
|
|
||||||
|
|
||||||
AC_CHECK_LIB([nsl], [gethostbyname],
|
AC_CHECK_LIB([nsl], [gethostbyname])
|
||||||
[WRAPPER_EXTRA_LIBS="$WRAPPER_EXTRA_LIBS -lnsl"
|
|
||||||
LIBS="$LIBS -lnsl"])
|
|
||||||
|
|
||||||
AC_CHECK_LIB([socket], [socket],
|
AC_CHECK_LIB([socket], [socket])
|
||||||
[WRAPPER_EXTRA_LIBS="$WRAPPER_EXTRA_LIBS -lsocket"
|
|
||||||
LIBS="$LIBS -lsocket"])
|
# Solaris has sched_yeild in -lrt, usually in libc
|
||||||
|
OMPI_CHECK_FUNC_LIB([sched_yield], [rt])
|
||||||
|
|
||||||
|
# FreeBSD has backtrace in -lexecinfo, usually in libc
|
||||||
|
OMPI_CHECK_FUNC_LIB([backtrace], [execinfo])
|
||||||
|
|
||||||
|
# IRIX has dirname in -lgen, usually in libc
|
||||||
|
OMPI_CHECK_FUNC_LIB([dirname], [gen])
|
||||||
|
|
||||||
|
# Darwin doesn't need -lm, as it's a symlink to libSystem.dylib
|
||||||
|
OMPI_CHECK_FUNC_LIB([ceil], [m])
|
||||||
|
|
||||||
AC_CHECK_FUNCS([asprintf snprintf vasprintf vsnprintf openpty isatty htonl ntohl htons ntohs getpwuid fork waitpid execve pipe setsid mmap])
|
AC_CHECK_FUNCS([asprintf snprintf vasprintf vsnprintf openpty isatty htonl ntohl htons ntohs getpwuid fork waitpid execve pipe setsid mmap])
|
||||||
|
|
||||||
@ -1185,19 +1191,6 @@ AC_DEFINE_UNQUOTED(OMPI_HAVE_UNDERSCORE_VA_COPY, $OMPI_HAVE_UNDERSCORE_VA_COPY,
|
|||||||
|
|
||||||
AC_CHECK_DECLS(__func__)
|
AC_CHECK_DECLS(__func__)
|
||||||
|
|
||||||
|
|
||||||
# Solaris has sched_yeild in -lrt, usually in libc
|
|
||||||
OMPI_CHECK_FUNC_LIB([sched_yield], [rt])
|
|
||||||
|
|
||||||
# FreeBSD has backtrace in -lexecinfo, usually in libc
|
|
||||||
OMPI_CHECK_FUNC_LIB([backtrace], [execinfo])
|
|
||||||
|
|
||||||
# IRIX has dirname in -lgen, usually in libc
|
|
||||||
OMPI_CHECK_FUNC_LIB([dirname], [gen])
|
|
||||||
|
|
||||||
# Darwin doesn't need -lm, as it's a symlink to libSystem.dylib
|
|
||||||
OMPI_CHECK_FUNC_LIB([ceil], [m])
|
|
||||||
|
|
||||||
# checkpoint results
|
# checkpoint results
|
||||||
AC_CACHE_SAVE
|
AC_CACHE_SAVE
|
||||||
|
|
||||||
@ -1285,12 +1278,14 @@ CXXCPPFLAGS="$CXXCPPFLAGS $THREAD_CXXCPPFLAGS"
|
|||||||
LDFLAGS="$LDFLAGS $THREAD_LDFLAGS"
|
LDFLAGS="$LDFLAGS $THREAD_LDFLAGS"
|
||||||
LIBS="$LIBS $THREAD_LIBS"
|
LIBS="$LIBS $THREAD_LIBS"
|
||||||
|
|
||||||
|
|
||||||
|
WRAPPER_EXTRA_CPPFLAGS="$WRAPPER_EXTRA_CPPFLAGS $THREAD_CPPFLAGS"
|
||||||
WRAPPER_EXTRA_CFLAGS="$WRAPPER_EXTRA_CFLAGS $THREAD_CFLAGS"
|
WRAPPER_EXTRA_CFLAGS="$WRAPPER_EXTRA_CFLAGS $THREAD_CFLAGS"
|
||||||
WRAPPER_EXTRA_CXXFLAGS="$WRAPPER_EXTRA_CXXFLAGS $THREAD_CXXFLAGS"
|
WRAPPER_EXTRA_CXXFLAGS="$WRAPPER_EXTRA_CXXFLAGS $THREAD_CXXFLAGS"
|
||||||
WRAPPER_EXTRA_FFLAGS="$WRAPPER_EXTRA_FFLAGS $THREAD_FFLAGS"
|
WRAPPER_EXTRA_FFLAGS="$WRAPPER_EXTRA_FFLAGS $THREAD_FFLAGS"
|
||||||
WRAPPER_EXTRA_FCFLAGS="$WRAPPER_EXTRA_FCFLAGS $THREAD_FFLAGS"
|
WRAPPER_EXTRA_FCFLAGS="$WRAPPER_EXTRA_FCFLAGS $THREAD_FFLAGS"
|
||||||
WRAPPER_EXTRA_LDFLAGS="$WRAPPER_EXTRA_LDFLAGS $THREAD_LDFLAGS"
|
WRAPPER_EXTRA_LDFLAGS="$WRAPPER_EXTRA_LDFLAGS $THREAD_LDFLAGS"
|
||||||
WRAPPER_EXTRA_LIBS="$WRAPPER_EXTRA_LIBS $THREAD_LIBS"
|
# no need to update WRAPPER_EXTRA_LIBS - we'll get it from LT later
|
||||||
|
|
||||||
#
|
#
|
||||||
# What is the local equivalent of "ln -s"
|
# What is the local equivalent of "ln -s"
|
||||||
@ -1448,28 +1443,35 @@ opal/libltdl/config.log. You can also disable GNU libltdl (which will disable
|
|||||||
dynamic shared object loading) by configuring with --disable-dlopen.])
|
dynamic shared object loading) by configuring with --disable-dlopen.])
|
||||||
fi
|
fi
|
||||||
CFLAGS="$CFLAGS_save"
|
CFLAGS="$CFLAGS_save"
|
||||||
|
OPAL_LTDL_CPPFLAGS='-I$(top_srcdir)/opal/libltdl'
|
||||||
else
|
else
|
||||||
AC_MSG_WARN([libltdl support disabled (by --disable-dlopen)])
|
AC_MSG_WARN([libltdl support disabled (by --disable-dlopen)])
|
||||||
|
|
||||||
LIBLTDL_SUBDIR=
|
LIBLTDL_SUBDIR=
|
||||||
LIBLTDL_LTLIB=
|
LIBLTDL_LTLIB=
|
||||||
WANT_LIBLTDL=0
|
WANT_LIBLTDL=0
|
||||||
|
OPAL_LTDL_CPPFLAGS=
|
||||||
|
|
||||||
|
# append instead of prepend, since LIBS are going to be system
|
||||||
|
# type things needed by everyone. Normally, libltdl will push
|
||||||
|
# these into LIBS, but since we've disabled libltdl, we need
|
||||||
|
# to do it here.
|
||||||
|
WRAPPER_EXTRA_LIBS="$WRAPPER_EXTRA_LIBS $LIBS"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_SUBST(LIBLTDL_SUBDIR)
|
AC_SUBST(LIBLTDL_SUBDIR)
|
||||||
AC_SUBST(LIBLTDL_LTLIB)
|
AC_SUBST(LIBLTDL_LTLIB)
|
||||||
AM_CONDITIONAL(WANT_LIBLTDL, test "$WANT_LIBLTDL" = "1")
|
|
||||||
AC_DEFINE_UNQUOTED(OMPI_WANT_LIBLTDL, $WANT_LIBLTDL,
|
|
||||||
[Whether to include support for libltdl or not])
|
|
||||||
|
|
||||||
# Have a variable that can be used to indicate where ltdl.h lives. Do
|
# Have a variable that can be used to indicate where ltdl.h lives. Do
|
||||||
# this specifically so that we get the included ltdl.h (which we know
|
# this specifically so that we get the included ltdl.h (which we know
|
||||||
# will work properly with the compiled code, including libltdl), not
|
# will work properly with the compiled code, including libltdl), not
|
||||||
# the system one (which is likely to be far too old and buggy).
|
# the system one (which is likely to be far too old and buggy).
|
||||||
|
|
||||||
OPAL_LTDL_CPPFLAGS='-I$(top_srcdir)/opal/libltdl'
|
|
||||||
AC_SUBST(OPAL_LTDL_CPPFLAGS)
|
AC_SUBST(OPAL_LTDL_CPPFLAGS)
|
||||||
|
|
||||||
|
AM_CONDITIONAL(WANT_LIBLTDL, test "$WANT_LIBLTDL" = "1")
|
||||||
|
AC_DEFINE_UNQUOTED(OMPI_WANT_LIBLTDL, $WANT_LIBLTDL,
|
||||||
|
[Whether to include support for libltdl or not])
|
||||||
|
|
||||||
|
|
||||||
############################################################################
|
############################################################################
|
||||||
# final compiler config
|
# final compiler config
|
||||||
############################################################################
|
############################################################################
|
||||||
@ -1512,27 +1514,6 @@ AC_MSG_RESULT([$TOTALVIEW_DEBUG_FLAGS])
|
|||||||
AC_SUBST(CFLAGS_WITHOUT_OPTFLAGS)
|
AC_SUBST(CFLAGS_WITHOUT_OPTFLAGS)
|
||||||
AC_SUBST(TOTALVIEW_DEBUG_FLAGS)
|
AC_SUBST(TOTALVIEW_DEBUG_FLAGS)
|
||||||
|
|
||||||
#
|
|
||||||
# Adding LIBMPI_* flags from the components that are necessary to
|
|
||||||
# compile with libmpi
|
|
||||||
#
|
|
||||||
# LIBMPI_EXTRA_LDFLAGS
|
|
||||||
#
|
|
||||||
AC_MSG_CHECKING([for libmpi additional LDFLAGS])
|
|
||||||
OMPI_UNIQ(LIBMPI_EXTRA_LDFLAGS)
|
|
||||||
AC_SUBST(LIBMPI_EXTRA_LDFLAGS)
|
|
||||||
AC_DEFINE_UNQUOTED(LIBMPI_EXTRA_LDFLAGS, "$LIBMPI_EXTRA_LDFLAGS",
|
|
||||||
[Additional LDFLAGS to compile against libmpi])
|
|
||||||
AC_MSG_RESULT([$LIBMPI_EXTRA_LDFLAGS])
|
|
||||||
|
|
||||||
#
|
|
||||||
# LIBMPI_EXTRA_LIBS
|
|
||||||
#
|
|
||||||
AC_MSG_CHECKING([for libmpi additional LIBS])
|
|
||||||
AC_SUBST(LIBMPI_EXTRA_LIBS)
|
|
||||||
AC_DEFINE_UNQUOTED(LIBMPI_EXTRA_LIBS, "$LIBMPI_EXTRA_LIBS",
|
|
||||||
[Additional LIBS to compile against libmpi])
|
|
||||||
AC_MSG_RESULT([$LIBMPI_EXTRA_LIBS])
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Delayed the substitution of CFLAGS and CXXFLAGS until now because
|
# Delayed the substitution of CFLAGS and CXXFLAGS until now because
|
||||||
@ -1577,7 +1558,11 @@ AC_CONFIG_FILES([
|
|||||||
opal/event/compat/Makefile
|
opal/event/compat/Makefile
|
||||||
opal/event/compat/sys/Makefile
|
opal/event/compat/sys/Makefile
|
||||||
opal/util/Makefile
|
opal/util/Makefile
|
||||||
|
opal/util/keyval/Makefile
|
||||||
opal/mca/base/Makefile
|
opal/mca/base/Makefile
|
||||||
|
opal/tools/wrappers/Makefile
|
||||||
|
opal/tools/wrappers/opalcc-wrapper-data.txt
|
||||||
|
opal/tools/wrappers/opalc++-wrapper-data.txt
|
||||||
|
|
||||||
orte/Makefile
|
orte/Makefile
|
||||||
|
|
||||||
@ -1586,6 +1571,9 @@ AC_CONFIG_FILES([
|
|||||||
orte/tools/orteprobe/Makefile
|
orte/tools/orteprobe/Makefile
|
||||||
orte/tools/orterun/Makefile
|
orte/tools/orterun/Makefile
|
||||||
orte/tools/openmpi/Makefile
|
orte/tools/openmpi/Makefile
|
||||||
|
orte/tools/wrappers/Makefile
|
||||||
|
orte/tools/wrappers/ortecc-wrapper-data.txt
|
||||||
|
orte/tools/wrappers/ortec++-wrapper-data.txt
|
||||||
|
|
||||||
ompi/Makefile
|
ompi/Makefile
|
||||||
|
|
||||||
@ -1604,6 +1592,10 @@ AC_CONFIG_FILES([
|
|||||||
|
|
||||||
ompi/tools/ompi_info/Makefile
|
ompi/tools/ompi_info/Makefile
|
||||||
ompi/tools/wrappers/Makefile
|
ompi/tools/wrappers/Makefile
|
||||||
|
ompi/tools/wrappers/ompicc-wrapper-data.txt
|
||||||
|
ompi/tools/wrappers/ompic++-wrapper-data.txt
|
||||||
|
ompi/tools/wrappers/ompif77-wrapper-data.txt
|
||||||
|
ompi/tools/wrappers/ompif90-wrapper-data.txt
|
||||||
|
|
||||||
test/Makefile
|
test/Makefile
|
||||||
test/asm/Makefile
|
test/asm/Makefile
|
||||||
|
@ -63,8 +63,8 @@ ompi_info_SOURCES = \
|
|||||||
output.cc \
|
output.cc \
|
||||||
param.cc \
|
param.cc \
|
||||||
version.cc
|
version.cc
|
||||||
ompi_info_LDADD = $(libs) $(LIBMPI_EXTRA_LIBS)
|
ompi_info_LDADD = $(libs)
|
||||||
ompi_info_LDFLAGS = $(LIBMPI_EXTRA_LDFLAGS)
|
ompi_info_LDFLAGS =
|
||||||
ompi_info_DEPENDENCIES = $(libs)
|
ompi_info_DEPENDENCIES = $(libs)
|
||||||
|
|
||||||
clean-local:
|
clean-local:
|
||||||
|
@ -16,7 +16,11 @@
|
|||||||
# $HEADER$
|
# $HEADER$
|
||||||
#
|
#
|
||||||
|
|
||||||
dist_pkgdata_DATA = help-wrapper.txt
|
dist_pkgdata_DATA = help-wrapper.txt \
|
||||||
|
ompicc-wrapper-data.txt \
|
||||||
|
ompic++-wrapper-data.txt \
|
||||||
|
ompif77-wrapper-data.txt \
|
||||||
|
ompif90-wrapper-data.txt
|
||||||
|
|
||||||
# This is ugly, but we need it so that people can change things at
|
# This is ugly, but we need it so that people can change things at
|
||||||
# "make" time (e.g., "make sysconfdir=/foo/bar all") as documented in
|
# "make" time (e.g., "make sysconfdir=/foo/bar all") as documented in
|
||||||
@ -44,23 +48,23 @@ libs = \
|
|||||||
wrap_sources = wrap.cc wrap_engine.cc ompi_wrap.h
|
wrap_sources = wrap.cc wrap_engine.cc ompi_wrap.h
|
||||||
|
|
||||||
mpicc_SOURCES = mpicc.cc ompi_wrap.h $(wrap_sources)
|
mpicc_SOURCES = mpicc.cc ompi_wrap.h $(wrap_sources)
|
||||||
mpicc_LDADD = $(libs) $(LIBMPI_EXTRA_LIBS)
|
mpicc_LDADD = $(libs)
|
||||||
mpicc_LDFLAGS = $(LIBMPI_EXTRA_LDFLAGS)
|
mpicc_LDFLAGS =
|
||||||
mpicc_DEPENDENCIES = $(libs)
|
mpicc_DEPENDENCIES = $(libs)
|
||||||
|
|
||||||
mpic___SOURCES = mpicxx.cc ompi_wrap.h $(wrap_sources)
|
mpic___SOURCES = mpicxx.cc ompi_wrap.h $(wrap_sources)
|
||||||
mpic___LDADD = $(libs) $(LIBMPI_EXTRA_LIBS)
|
mpic___LDADD = $(libs)
|
||||||
mpic___LDFLAGS = $(LIBMPI_EXTRA_LDFLAGS)
|
mpic___LDFLAGS =
|
||||||
mpic___DEPENDENCIES = $(libs)
|
mpic___DEPENDENCIES = $(libs)
|
||||||
|
|
||||||
mpif77_SOURCES = mpif77.cc ompi_wrap.h $(wrap_sources)
|
mpif77_SOURCES = mpif77.cc ompi_wrap.h $(wrap_sources)
|
||||||
mpif77_LDADD = $(libs) $(LIBMPI_EXTRA_LIBS)
|
mpif77_LDADD = $(libs)
|
||||||
mpif77_LDFLAGS = $(LIBMPI_EXTRA_LDFLAGS)
|
mpif77_LDFLAGS =
|
||||||
mpif77_DEPENDENCIES = $(libs)
|
mpif77_DEPENDENCIES = $(libs)
|
||||||
|
|
||||||
mpif90_SOURCES = mpif90.cc ompi_wrap.h $(wrap_sources)
|
mpif90_SOURCES = mpif90.cc ompi_wrap.h $(wrap_sources)
|
||||||
mpif90_LDADD = $(libs) $(LIBMPI_EXTRA_LIBS)
|
mpif90_LDADD = $(libs)
|
||||||
mpif90_LDFLAGS = $(LIBMPI_EXTRA_LDFLAGS)
|
mpif90_LDFLAGS =
|
||||||
mpif90_DEPENDENCIES = $(libs)
|
mpif90_DEPENDENCIES = $(libs)
|
||||||
|
|
||||||
# Since this is C++ and we use templates (the STL), also ditch the
|
# Since this is C++ and we use templates (the STL), also ditch the
|
||||||
@ -114,17 +118,50 @@ if CASE_SENSITIVE_FS
|
|||||||
install-exec-hook:
|
install-exec-hook:
|
||||||
(cd $(DESTDIR)$(bindir); rm -f mpiCC$(EXEEXT); $(LN_S) mpic++ mpiCC)
|
(cd $(DESTDIR)$(bindir); rm -f mpiCC$(EXEEXT); $(LN_S) mpic++ mpiCC)
|
||||||
(cd $(DESTDIR)$(bindir); rm -f mpicxx$(EXEEXT); $(LN_S) mpic++ mpicxx)
|
(cd $(DESTDIR)$(bindir); rm -f mpicxx$(EXEEXT); $(LN_S) mpic++ mpicxx)
|
||||||
|
|
||||||
|
(cd $(DESTDIR)$(bindir); rm -f ompicc$(EXEEXT); $(LN_S) opal_wrapper ompicc)
|
||||||
|
(cd $(DESTDIR)$(bindir); rm -f ompic++$(EXEEXT); $(LN_S) opal_wrapper ompic++)
|
||||||
|
(cd $(DESTDIR)$(bindir); rm -f ompiCC$(EXEEXT); $(LN_S) opal_wrapper ompiCC)
|
||||||
|
(cd $(DESTDIR)$(bindir); rm -f ompicxx$(EXEEXT); $(LN_S) opal_wrapper ompicxx)
|
||||||
|
(cd $(DESTDIR)$(bindir); rm -f ompif77$(EXEEXT); $(LN_S) opal_wrapper ompif77)
|
||||||
|
(cd $(DESTDIR)$(bindir); rm -f ompif90$(EXEEXT); $(LN_S) opal_wrapper ompif90)
|
||||||
|
|
||||||
|
(cd $(DESTDIR)$(pkgdatadir); rm -f ompiCC-wrapper-data.txt; $(LN_S) ompic++-wrapper-data.txt ompiCC-wrapper-data.txt)
|
||||||
|
(cd $(DESTDIR)$(pkgdatadir); rm -f ompicxx-wrapper-data.txt; $(LN_S) ompic++-wrapper-data.txt ompicxx-wrapper-data.txt)
|
||||||
else
|
else
|
||||||
install-exec-hook:
|
install-exec-hook:
|
||||||
(cd $(DESTDIR)$(bindir); rm -f mpicxx$(EXEEXT); $(LN_S) mpic++ mpicxx)
|
(cd $(DESTDIR)$(bindir); rm -f mpicxx$(EXEEXT); $(LN_S) mpic++ mpicxx)
|
||||||
|
|
||||||
|
(cd $(DESTDIR)$(bindir); rm -f ompicc$(EXEEXT); $(LN_S) opal_wrapper ompicc)
|
||||||
|
(cd $(DESTDIR)$(bindir); rm -f ompic++$(EXEEXT); $(LN_S) opal_wrapper ompic++)
|
||||||
|
(cd $(DESTDIR)$(bindir); rm -f ompicxx$(EXEEXT); $(LN_S) opal_wrapper ompicxx)
|
||||||
|
(cd $(DESTDIR)$(bindir); rm -f ompif77$(EXEEXT); $(LN_S) opal_wrapper ompif77)
|
||||||
|
(cd $(DESTDIR)$(bindir); rm -f ompif90$(EXEEXT); $(LN_S) opal_wrapper ompif90)
|
||||||
|
|
||||||
|
(cd $(DESTDIR)$(pkgdatadir); rm -f ompicxx-wrapper-data.txt; $(LN_S) ompic++-wrapper-data.txt ompicxx-wrapper-data.txt)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if CASE_SENSITIVE_FS
|
if CASE_SENSITIVE_FS
|
||||||
uninstall-local:
|
uninstall-local:
|
||||||
rm -f $(DESTDIR)$(bindir)/mpiCC$(EXEEXT) \
|
rm -f $(DESTDIR)$(bindir)/mpiCC$(EXEEXT) \
|
||||||
$(DESTDIR)$(bindir)/mpicxx$(EXEEXT)
|
$(DESTDIR)$(bindir)/mpicxx$(EXEEXT) \
|
||||||
|
$(DESTDIR)$(bindir)/ompicc$(EXEEXT) \
|
||||||
|
$(DESTDIR)$(bindir)/ompic++$(EXEEXT) \
|
||||||
|
$(DESTDIR)$(bindir)/ompiCC$(EXEEXT) \
|
||||||
|
$(DESTDIR)$(bindir)/ompicxx$(EXEEXT) \
|
||||||
|
$(DESTDIR)$(bindir)/ompif77$(EXEEXT) \
|
||||||
|
$(DESTDIR)$(bindir)/ompif90$(EXEEXT) \
|
||||||
|
$(DESTDIR)$(pkgdatadir)/ompiCC-wrapper-data.txt \
|
||||||
|
$(DESTDIR)$(pkgdatadir)/ompicxx-wrapper-data.txt
|
||||||
|
|
||||||
else
|
else
|
||||||
uninstall-local:
|
uninstall-local:
|
||||||
rm -f $(DESTDIR)$(bindir)/mpicxx$(EXEEXT)
|
rm -f $(DESTDIR)$(bindir)/mpicxx$(EXEEXT) \
|
||||||
|
$(DESTDIR)$(bindir)/ompicc$(EXEEXT) \
|
||||||
|
$(DESTDIR)$(bindir)/ompic++$(EXEEXT) \
|
||||||
|
$(DESTDIR)$(bindir)/ompicxx$(EXEEXT) \
|
||||||
|
$(DESTDIR)$(bindir)/ompif77$(EXEEXT) \
|
||||||
|
$(DESTDIR)$(bindir)/ompif90$(EXEEXT) \
|
||||||
|
$(DESTDIR)$(pkgdatadir)/ompicxx-wrapper-data.txt
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
13
ompi/tools/wrappers/ompic++-wrapper-data.txt.in
Обычный файл
13
ompi/tools/wrappers/ompic++-wrapper-data.txt.in
Обычный файл
@ -0,0 +1,13 @@
|
|||||||
|
project=Open MPI
|
||||||
|
project_short=OMPI
|
||||||
|
version=@OMPI_VERSION@
|
||||||
|
language=C++
|
||||||
|
compiler_env=CXX
|
||||||
|
compiler_flags_env=CXXFLAGS
|
||||||
|
compiler=@CXX@
|
||||||
|
extra_includes=@OMPI_WRAPPER_EXTRA_INCLUDES@
|
||||||
|
preprocessor_flags=@OMPI_WRAPPER_EXTRA_CPPFLAGS@
|
||||||
|
compiler_flags=@OMPI_WRAPPER_EXTRA_CXXFLAGS@
|
||||||
|
linker_flags=@OMPI_WRAPPER_EXTRA_LDFLAGS@
|
||||||
|
libs=@OMPI_WRAPPER_CXX_LIB@ -lmpi -lorte -lopal @OMPI_WRAPPER_EXTRA_LIBS@
|
||||||
|
required_file=@OMPI_WRAPPER_CXX_REQUIRED_FILE@
|
13
ompi/tools/wrappers/ompicc-wrapper-data.txt.in
Обычный файл
13
ompi/tools/wrappers/ompicc-wrapper-data.txt.in
Обычный файл
@ -0,0 +1,13 @@
|
|||||||
|
project=Open MPI
|
||||||
|
project_short=OMPI
|
||||||
|
version=@OMPI_VERSION@
|
||||||
|
language=C
|
||||||
|
compiler_env=CC
|
||||||
|
compiler_flags_env=CFLAGS
|
||||||
|
compiler=@CC@
|
||||||
|
extra_includes=@OMPI_WRAPPER_EXTRA_INCLUDES@
|
||||||
|
preprocessor_flags=@OMPI_WRAPPER_EXTRA_CPPFLAGS@
|
||||||
|
compiler_flags=@OMPI_WRAPPER_EXTRA_CFLAGS@
|
||||||
|
linker_flags=@OMPI_WRAPPER_EXTRA_LDFLAGS@
|
||||||
|
libs=-lmpi -lorte -lopal @OMPI_WRAPPER_EXTRA_LIBS@
|
||||||
|
required_file=
|
13
ompi/tools/wrappers/ompif77-wrapper-data.txt.in
Обычный файл
13
ompi/tools/wrappers/ompif77-wrapper-data.txt.in
Обычный файл
@ -0,0 +1,13 @@
|
|||||||
|
project=Open MPI
|
||||||
|
project_short=OMPI
|
||||||
|
version=@OMPI_VERSION@
|
||||||
|
language=Fortran 77
|
||||||
|
compiler_env=F77
|
||||||
|
compiler_flags_env=FFLAGS
|
||||||
|
compiler=@F77@
|
||||||
|
extra_includes=
|
||||||
|
preprocessor_flags=
|
||||||
|
compiler_flags=@OMPI_WRAPPER_EXTRA_FFLAGS@
|
||||||
|
linker_flags=@OMPI_WRAPPER_EXTRA_LDFLAGS@
|
||||||
|
libs=-lmpi -lorte -lopal @OMPI_WRAPPER_EXTRA_LIBS@
|
||||||
|
required_file=@OMPI_WRAPPER_F77_REQUIRED_FILE@
|
13
ompi/tools/wrappers/ompif90-wrapper-data.txt.in
Обычный файл
13
ompi/tools/wrappers/ompif90-wrapper-data.txt.in
Обычный файл
@ -0,0 +1,13 @@
|
|||||||
|
project=Open MPI
|
||||||
|
project_short=OMPI
|
||||||
|
version=@OMPI_VERSION@
|
||||||
|
language=Fortran 90
|
||||||
|
compiler_env=FC
|
||||||
|
compiler_flags_env=FCFLAGS
|
||||||
|
compiler=@FC@
|
||||||
|
extra_includes=
|
||||||
|
preprocessor_flags=
|
||||||
|
compiler_flags=@OMPI_WRAPPER_EXTRA_FFLAGS@
|
||||||
|
linker_flags=@OMPI_WRAPPER_EXTRA_LDFLAGS@
|
||||||
|
libs=-lmpi_f90 -lmpi -lorte -lopal @OMPI_WRAPPER_EXTRA_LIBS@
|
||||||
|
required_file=@OMPI_WRAPPER_F90_REQUIRED_FILE@
|
@ -80,4 +80,4 @@ include runtime/Makefile.am
|
|||||||
include threads/Makefile.am
|
include threads/Makefile.am
|
||||||
include mca/Makefile.am
|
include mca/Makefile.am
|
||||||
include win32/Makefile.am
|
include win32/Makefile.am
|
||||||
|
include tools/Makefile.am
|
||||||
|
@ -23,8 +23,6 @@ AM_CPPFLAGS = \
|
|||||||
$(OPAL_LTDL_CPPFLAGS) \
|
$(OPAL_LTDL_CPPFLAGS) \
|
||||||
-DOMPI_PKGLIBDIR=\"$(pkglibdir)\" \
|
-DOMPI_PKGLIBDIR=\"$(pkglibdir)\" \
|
||||||
-DOMPI_SYSCONFDIR=\"$(sysconfdir)\"
|
-DOMPI_SYSCONFDIR=\"$(sysconfdir)\"
|
||||||
AM_LFLAGS = -Pmca_base_yy
|
|
||||||
LEX_OUTPUT_ROOT = lex.mca_base_yy
|
|
||||||
|
|
||||||
noinst_LTLIBRARIES = libmca_base.la
|
noinst_LTLIBRARIES = libmca_base.la
|
||||||
|
|
||||||
@ -38,8 +36,7 @@ headers = \
|
|||||||
mca_base_msgbuf.h \
|
mca_base_msgbuf.h \
|
||||||
mca_base_msgbuf_internal.h \
|
mca_base_msgbuf_internal.h \
|
||||||
mca_base_param.h \
|
mca_base_param.h \
|
||||||
mca_base_param_internal.h \
|
mca_base_param_internal.h
|
||||||
mca_base_parse_paramfile_lex.h
|
|
||||||
|
|
||||||
# Library
|
# Library
|
||||||
|
|
||||||
@ -56,8 +53,7 @@ libmca_base_la_SOURCES = \
|
|||||||
mca_base_msgbuf.c \
|
mca_base_msgbuf.c \
|
||||||
mca_base_open.c \
|
mca_base_open.c \
|
||||||
mca_base_param.c \
|
mca_base_param.c \
|
||||||
mca_base_parse_paramfile.c \
|
mca_base_parse_paramfile.c
|
||||||
mca_base_parse_paramfile_lex.l
|
|
||||||
|
|
||||||
# Conditionally install the header files
|
# Conditionally install the header files
|
||||||
|
|
||||||
|
@ -31,9 +31,6 @@ int mca_base_close(void)
|
|||||||
{
|
{
|
||||||
extern bool mca_base_opened;
|
extern bool mca_base_opened;
|
||||||
if (mca_base_opened) {
|
if (mca_base_opened) {
|
||||||
/* Clear out all the registered MCA params */
|
|
||||||
|
|
||||||
mca_base_param_finalize();
|
|
||||||
|
|
||||||
/* Close down the component repository */
|
/* Close down the component repository */
|
||||||
|
|
||||||
|
@ -63,10 +63,6 @@ int mca_base_open(void)
|
|||||||
return OMPI_SUCCESS;
|
return OMPI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Setup the parameter system */
|
|
||||||
|
|
||||||
mca_base_param_init();
|
|
||||||
|
|
||||||
/* Register some params */
|
/* Register some params */
|
||||||
|
|
||||||
#ifdef __WINDOWS__
|
#ifdef __WINDOWS__
|
||||||
|
@ -26,112 +26,17 @@
|
|||||||
#include "opal/mca/mca.h"
|
#include "opal/mca/mca.h"
|
||||||
#include "opal/mca/base/base.h"
|
#include "opal/mca/base/base.h"
|
||||||
#include "opal/mca/base/mca_base_param_internal.h"
|
#include "opal/mca/base/mca_base_param_internal.h"
|
||||||
#include "opal/mca/base/mca_base_parse_paramfile_lex.h"
|
|
||||||
#include "ompi/include/constants.h"
|
#include "ompi/include/constants.h"
|
||||||
|
#include "opal/util/keyval_parse.h"
|
||||||
|
|
||||||
|
static void save_value(const char *name, const char *value);
|
||||||
static const char *filename;
|
|
||||||
|
|
||||||
|
|
||||||
static int parse_line(void);
|
|
||||||
static void save_value(char *name, char *value);
|
|
||||||
static void parse_error(int num);
|
|
||||||
|
|
||||||
|
|
||||||
int mca_base_parse_paramfile(const char *paramfile)
|
int mca_base_parse_paramfile(const char *paramfile)
|
||||||
{
|
{
|
||||||
int val;
|
return opal_util_keyval_parse(paramfile, save_value);
|
||||||
|
|
||||||
/* Open the parameter file */
|
|
||||||
|
|
||||||
mca_base_yyin = fopen(paramfile, "r");
|
|
||||||
if (NULL == mca_base_yyin) {
|
|
||||||
return OMPI_ERR_NOT_FOUND;
|
|
||||||
}
|
|
||||||
|
|
||||||
filename = paramfile;
|
|
||||||
mca_base_parse_done = false;
|
|
||||||
mca_base_yynewlines = 1;
|
|
||||||
mca_base_param_init_buffer(mca_base_yyin);
|
|
||||||
while (!mca_base_parse_done) {
|
|
||||||
val = mca_base_yylex();
|
|
||||||
switch (val) {
|
|
||||||
case MCA_BASE_PARSE_DONE:
|
|
||||||
/* This will also set mca_base_parse_done to true, so just
|
|
||||||
break here */
|
|
||||||
break;
|
|
||||||
|
|
||||||
case MCA_BASE_PARSE_NEWLINE:
|
|
||||||
/* blank line! ignore it */
|
|
||||||
break;
|
|
||||||
|
|
||||||
case MCA_BASE_PARSE_SINGLE_WORD:
|
|
||||||
parse_line();
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
/* anything else is an error */
|
|
||||||
parse_error(1);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
fclose(mca_base_yyin);
|
|
||||||
|
|
||||||
return OMPI_SUCCESS;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void save_value(const char *name, const char *value)
|
||||||
static int parse_line(void)
|
|
||||||
{
|
|
||||||
int val;
|
|
||||||
char *name;
|
|
||||||
|
|
||||||
/* Save the parameter name */
|
|
||||||
|
|
||||||
name = strdup(mca_base_yytext);
|
|
||||||
|
|
||||||
/* The first thing we have to see is an "=" */
|
|
||||||
|
|
||||||
val = mca_base_yylex();
|
|
||||||
if (mca_base_parse_done || MCA_BASE_PARSE_EQUAL != val) {
|
|
||||||
parse_error(2);
|
|
||||||
free(name);
|
|
||||||
return OMPI_ERROR;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Next we get the value */
|
|
||||||
|
|
||||||
val = mca_base_yylex();
|
|
||||||
if (MCA_BASE_PARSE_SINGLE_WORD == val ||
|
|
||||||
MCA_BASE_PARSE_VALUE == val) {
|
|
||||||
save_value(name, mca_base_yytext);
|
|
||||||
|
|
||||||
/* Now we need to see the newline */
|
|
||||||
|
|
||||||
val = mca_base_yylex();
|
|
||||||
if (MCA_BASE_PARSE_NEWLINE == val ||
|
|
||||||
MCA_BASE_PARSE_DONE == val) {
|
|
||||||
return OMPI_SUCCESS;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Did we get an EOL or EOF? */
|
|
||||||
|
|
||||||
else if (MCA_BASE_PARSE_DONE == val ||
|
|
||||||
MCA_BASE_PARSE_NEWLINE == val) {
|
|
||||||
save_value(name, NULL);
|
|
||||||
return OMPI_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Nope -- we got something unexpected. Bonk! */
|
|
||||||
|
|
||||||
parse_error(3);
|
|
||||||
free(name);
|
|
||||||
return OMPI_ERROR;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void save_value(char *name, char *value)
|
|
||||||
{
|
{
|
||||||
opal_list_item_t *item;
|
opal_list_item_t *item;
|
||||||
mca_base_param_file_value_t *fv;
|
mca_base_param_file_value_t *fv;
|
||||||
@ -145,7 +50,6 @@ static void save_value(char *name, char *value)
|
|||||||
item = opal_list_get_next(item)) {
|
item = opal_list_get_next(item)) {
|
||||||
fv = (mca_base_param_file_value_t *) item;
|
fv = (mca_base_param_file_value_t *) item;
|
||||||
if (0 == strcmp(name, fv->mbpfv_param)) {
|
if (0 == strcmp(name, fv->mbpfv_param)) {
|
||||||
free(name);
|
|
||||||
free(fv->mbpfv_value);
|
free(fv->mbpfv_value);
|
||||||
fv->mbpfv_value = strdup(value);
|
fv->mbpfv_value = strdup(value);
|
||||||
return;
|
return;
|
||||||
@ -156,7 +60,7 @@ static void save_value(char *name, char *value)
|
|||||||
|
|
||||||
fv = OBJ_NEW(mca_base_param_file_value_t);
|
fv = OBJ_NEW(mca_base_param_file_value_t);
|
||||||
if (NULL != fv) {
|
if (NULL != fv) {
|
||||||
fv->mbpfv_param = name;
|
fv->mbpfv_param = strdup(name);
|
||||||
if (NULL != value) {
|
if (NULL != value) {
|
||||||
fv->mbpfv_value = strdup(value);
|
fv->mbpfv_value = strdup(value);
|
||||||
} else {
|
} else {
|
||||||
@ -165,11 +69,3 @@ static void save_value(char *name, char *value)
|
|||||||
opal_list_append(&mca_base_param_file_values, (opal_list_item_t*) fv);
|
opal_list_append(&mca_base_param_file_values, (opal_list_item_t*) fv);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void parse_error(int num)
|
|
||||||
{
|
|
||||||
/* JMS need better error/warning message here */
|
|
||||||
opal_output(0, "paramfile: error %d reading file %s at line %d:\n %s\n",
|
|
||||||
num, filename, mca_base_yynewlines, mca_base_yytext);
|
|
||||||
}
|
|
||||||
|
@ -26,26 +26,53 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize the OPAL utilities
|
* Initialize the OPAL layer, including the MCA system.
|
||||||
*
|
*
|
||||||
* @retval ORTE_SUCCESS Upon success.
|
* @retval ORTE_SUCCESS Upon success.
|
||||||
* @retval ORTE_ERROR Upon failure.
|
* @retval ORTE_ERROR Upon failure.
|
||||||
*
|
*
|
||||||
* This function performs
|
* \note If this function is called, opal_init_util() should *not* be
|
||||||
|
* called.
|
||||||
*/
|
*/
|
||||||
int opal_init(void);
|
OMPI_DECLSPEC int opal_init(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Finalize the OPAL utilities
|
* Finalize the OPAL layer, including the MCA system.
|
||||||
*
|
*
|
||||||
* @retval ORTE_SUCCESS Upon success.
|
* @retval ORTE_SUCCESS Upon success.
|
||||||
* @retval ORTE_ERROR Upon failure.
|
* @retval ORTE_ERROR Upon failure.
|
||||||
*
|
*
|
||||||
* This function performs
|
* \note If this function is called, opal_finalize_util() should *not*
|
||||||
|
* be called.
|
||||||
*/
|
*/
|
||||||
int opal_finalize(void);
|
OMPI_DECLSPEC int opal_finalize(void);
|
||||||
|
|
||||||
int opal_register_params(void);
|
/**
|
||||||
|
* Initialize the OPAL layer, excluding the MCA system.
|
||||||
|
*
|
||||||
|
* @retval ORTE_SUCCESS Upon success.
|
||||||
|
* @retval ORTE_ERROR Upon failure.
|
||||||
|
*
|
||||||
|
* \note If this function is called, opal_init() should *not*
|
||||||
|
* be called.
|
||||||
|
*/
|
||||||
|
OMPI_DECLSPEC int opal_init_util(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Finalize the OPAL layer, excluding the MCA system.
|
||||||
|
*
|
||||||
|
* @retval ORTE_SUCCESS Upon success.
|
||||||
|
* @retval ORTE_ERROR Upon failure.
|
||||||
|
*
|
||||||
|
* \note If this function is called, opal_finalize() should *not*
|
||||||
|
* be called.
|
||||||
|
*/
|
||||||
|
OMPI_DECLSPEC int opal_finalize_util(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Internal function. Do not call.
|
||||||
|
*/
|
||||||
|
OMPI_DECLSPEC int opal_register_params(void);
|
||||||
|
|
||||||
#if defined(c_plusplus) || defined(__cplusplus)
|
#if defined(c_plusplus) || defined(__cplusplus)
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include "opal/util/output.h"
|
#include "opal/util/output.h"
|
||||||
#include "opal/util/malloc.h"
|
#include "opal/util/malloc.h"
|
||||||
#include "opal/util/if.h"
|
#include "opal/util/if.h"
|
||||||
|
#include "opal/util/keyval_parse.h"
|
||||||
#include "opal/memoryhooks/memory.h"
|
#include "opal/memoryhooks/memory.h"
|
||||||
#include "opal/mca/base/base.h"
|
#include "opal/mca/base/base.h"
|
||||||
#include "opal/runtime/opal.h"
|
#include "opal/runtime/opal.h"
|
||||||
@ -32,39 +33,20 @@
|
|||||||
#include "opal/mca/memory/base/base.h"
|
#include "opal/mca/memory/base/base.h"
|
||||||
#include "opal/mca/timer/base/base.h"
|
#include "opal/mca/timer/base/base.h"
|
||||||
#include "opal/mca/paffinity/base/base.h"
|
#include "opal/mca/paffinity/base/base.h"
|
||||||
|
#include "opal/include/constants.h"
|
||||||
|
|
||||||
/**
|
int
|
||||||
* Finalize the OPAL utilities
|
opal_finalize_util(void)
|
||||||
*
|
|
||||||
* @retval ORTE_SUCCESS Upon success.
|
|
||||||
* @retval ORTE_ERROR Upon failure.
|
|
||||||
*
|
|
||||||
* This function performs
|
|
||||||
*/
|
|
||||||
int opal_finalize(void)
|
|
||||||
{
|
{
|
||||||
|
/* Clear out all the registered MCA params */
|
||||||
|
mca_base_param_finalize();
|
||||||
|
|
||||||
/* close interfaces code. This is lazy opened, but protected from
|
/* close interfaces code. This is lazy opened, but protected from
|
||||||
close when not opened internally */
|
close when not opened internally */
|
||||||
opal_iffinalize();
|
opal_iffinalize();
|
||||||
|
|
||||||
/* close high resolution timers */
|
/* keyval lex-based parser */
|
||||||
opal_timer_base_close();
|
opal_util_keyval_parse_finalize();
|
||||||
|
|
||||||
/* close the processor affinity base */
|
|
||||||
opal_paffinity_base_close();
|
|
||||||
|
|
||||||
/* close the memory manager components. Registered hooks can
|
|
||||||
still be fired any time between now and the call to
|
|
||||||
opal_mem_free_finalize(), and callbacks from the memory manager
|
|
||||||
hooks to the bowels of the mem_free code can still occur any
|
|
||||||
time between now and end of application (even post main()!) */
|
|
||||||
opal_memory_base_close();
|
|
||||||
|
|
||||||
/* finalize the mca */
|
|
||||||
mca_base_close();
|
|
||||||
|
|
||||||
/* finalize the memory manager / tracker */
|
|
||||||
opal_mem_hooks_finalize();
|
|
||||||
|
|
||||||
/* finalize the memory allocator */
|
/* finalize the memory allocator */
|
||||||
opal_malloc_finalize();
|
opal_malloc_finalize();
|
||||||
@ -81,5 +63,35 @@ int opal_finalize(void)
|
|||||||
/* finalize the class/object system */
|
/* finalize the class/object system */
|
||||||
opal_class_finalize();
|
opal_class_finalize();
|
||||||
|
|
||||||
|
return OPAL_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
opal_finalize(void)
|
||||||
|
{
|
||||||
|
|
||||||
|
/* close high resolution timers */
|
||||||
|
opal_timer_base_close();
|
||||||
|
|
||||||
|
/* close the memory manager components. Registered hooks can
|
||||||
|
still be fired any time between now and the call to
|
||||||
|
opal_mem_free_finalize(), and callbacks from the memory manager
|
||||||
|
hooks to the bowels of the mem_free code can still occur any
|
||||||
|
time between now and end of application (even post main()!) */
|
||||||
|
opal_memory_base_close();
|
||||||
|
|
||||||
|
/* finalize the memory manager / tracker */
|
||||||
|
opal_mem_hooks_finalize();
|
||||||
|
|
||||||
|
/* close the processor affinity base */
|
||||||
|
opal_paffinity_base_close();
|
||||||
|
|
||||||
|
/* finalize the mca */
|
||||||
|
mca_base_close();
|
||||||
|
|
||||||
|
/* finalize util code */
|
||||||
|
opal_finalize_util();
|
||||||
|
|
||||||
return ORTE_SUCCESS;
|
return ORTE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
#include "opal/include/constants.h"
|
#include "opal/include/constants.h"
|
||||||
#include "opal/util/error.h"
|
#include "opal/util/error.h"
|
||||||
#include "opal/util/stacktrace.h"
|
#include "opal/util/stacktrace.h"
|
||||||
|
#include "opal/util/keyval_parse.h"
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
opal_err2str(int errnum)
|
opal_err2str(int errnum)
|
||||||
@ -114,15 +115,8 @@ opal_err2str(int errnum)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
int
|
||||||
* Initialize the OPAL utilities
|
opal_init_util(void)
|
||||||
*
|
|
||||||
* @retval OPAL_SUCCESS Upon success.
|
|
||||||
* @retval OPAL_ERROR Upon failure.
|
|
||||||
*
|
|
||||||
* This function performs
|
|
||||||
*/
|
|
||||||
int opal_init(void)
|
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
char *error = NULL;
|
char *error = NULL;
|
||||||
@ -143,9 +137,15 @@ int opal_init(void)
|
|||||||
goto return_error;
|
goto return_error;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* initialize the mca */
|
/* keyval lex-based parser */
|
||||||
if (OMPI_SUCCESS != (ret = mca_base_open())) {
|
if (OPAL_SUCCESS != (ret = opal_util_keyval_parse_init())) {
|
||||||
error = "mca_base_open";
|
error = "opal_util_keyval_parse_init";
|
||||||
|
goto return_error;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Setup the parameter system */
|
||||||
|
if (OPAL_SUCCESS != (ret = mca_base_param_init())) {
|
||||||
|
error = "mca_base_param_init";
|
||||||
goto return_error;
|
goto return_error;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -155,6 +155,39 @@ int opal_init(void)
|
|||||||
goto return_error;
|
goto return_error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* pretty-print stack handlers */
|
||||||
|
if (OPAL_SUCCESS != (ret = opal_util_register_stackhandlers ())) {
|
||||||
|
error = "util_register_stackhandlers() failed";
|
||||||
|
goto return_error;
|
||||||
|
}
|
||||||
|
|
||||||
|
return OPAL_SUCCESS;
|
||||||
|
|
||||||
|
return_error:
|
||||||
|
opal_show_help( "help-opal-runtime",
|
||||||
|
"opal_init:startup:internal-failure", true,
|
||||||
|
error, ret );
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
opal_init(void)
|
||||||
|
{
|
||||||
|
int ret;
|
||||||
|
char *error = NULL;
|
||||||
|
|
||||||
|
/* initialize util code */
|
||||||
|
if (OPAL_SUCCESS != (ret = opal_init_util())) {
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* initialize the mca */
|
||||||
|
if (OPAL_SUCCESS != (ret = mca_base_open())) {
|
||||||
|
error = "mca_base_open";
|
||||||
|
goto return_error;
|
||||||
|
}
|
||||||
|
|
||||||
/* open the processor affinity base */
|
/* open the processor affinity base */
|
||||||
opal_paffinity_base_open();
|
opal_paffinity_base_open();
|
||||||
opal_paffinity_base_select();
|
opal_paffinity_base_select();
|
||||||
@ -179,12 +212,6 @@ int opal_init(void)
|
|||||||
goto return_error;
|
goto return_error;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* pretty-print stack handlers */
|
|
||||||
if (OMPI_SUCCESS != (ret = opal_util_register_stackhandlers ())) {
|
|
||||||
error = "util_register_stackhandlers() failed";
|
|
||||||
goto return_error;
|
|
||||||
}
|
|
||||||
|
|
||||||
return OPAL_SUCCESS;
|
return OPAL_SUCCESS;
|
||||||
|
|
||||||
return_error:
|
return_error:
|
||||||
|
27
opal/tools/Makefile.am
Обычный файл
27
opal/tools/Makefile.am
Обычный файл
@ -0,0 +1,27 @@
|
|||||||
|
# -*- makefile -*-
|
||||||
|
#
|
||||||
|
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||||
|
# University Research and Technology
|
||||||
|
# Corporation. All rights reserved.
|
||||||
|
# Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||||
|
# of Tennessee Research Foundation. 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$
|
||||||
|
#
|
||||||
|
|
||||||
|
# This makefile.am does not stand on its own - it is included from
|
||||||
|
# opal/Makefile.am
|
||||||
|
|
||||||
|
SUBDIRS += \
|
||||||
|
tools/wrappers
|
||||||
|
|
||||||
|
DIST_SUBDIRS += \
|
||||||
|
tools/wrappers
|
61
opal/tools/wrappers/Makefile.am
Обычный файл
61
opal/tools/wrappers/Makefile.am
Обычный файл
@ -0,0 +1,61 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||||
|
# University Research and Technology
|
||||||
|
# Corporation. All rights reserved.
|
||||||
|
# Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||||
|
# of Tennessee Research Foundation. 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$
|
||||||
|
#
|
||||||
|
|
||||||
|
nodist_pkgdata_DATA = \
|
||||||
|
help-opal-wrapper.txt \
|
||||||
|
opalcc-wrapper-data.txt \
|
||||||
|
opalc++-wrapper-data.txt
|
||||||
|
|
||||||
|
AM_CPPFLAGS = \
|
||||||
|
-DOPAL_LIBDIR="\"$(libdir)\"" \
|
||||||
|
-DOPAL_INCDIR="\"$(includedir)\"" \
|
||||||
|
-DOPAL_PKGDATADIR="\"$(pkgdatadir)\""
|
||||||
|
|
||||||
|
bin_PROGRAMS = opal_wrapper
|
||||||
|
|
||||||
|
opal_wrapper_SOURCES = \
|
||||||
|
opal_wrapper.h \
|
||||||
|
opal_wrapper.c
|
||||||
|
|
||||||
|
opal_wrapper_LDADD = $(top_builddir)/opal/libopal.la
|
||||||
|
opal_wrapper_DEPENDENCIES = $(top_builddir)/opal/libopal.la
|
||||||
|
|
||||||
|
if CASE_SENSITIVE_FS
|
||||||
|
install-exec-hook:
|
||||||
|
(cd $(DESTDIR)$(bindir); rm -f opalcc$(EXEEXT); $(LN_S) opal_wrapper opalcc)
|
||||||
|
(cd $(DESTDIR)$(bindir); rm -f opalc++$(EXEEXT); $(LN_S) opal_wrapper opalc++)
|
||||||
|
(cd $(DESTDIR)$(bindir); rm -f opalCC$(EXEEXT); $(LN_S) opal_wrapper opalCC)
|
||||||
|
|
||||||
|
(cd $(DESTDIR)$(pkgdatadir); rm -f opalCC-wrapper-data.txt; $(LN_S) opalc++-wrapper-data.txt opalCC-wrapper-data.txt)
|
||||||
|
|
||||||
|
uninstall-local:
|
||||||
|
rm -f $(DESTDIR)$(bindir)/opalcc$(EXEEXT) \
|
||||||
|
$(DESTDIR)$(bindir)/opalc++$(EXEEXT) \
|
||||||
|
$(DESTDIR)$(bindir)/opalCC$(EXEEXT) \
|
||||||
|
$(DESTDIR)$(pkgdatadir)/opalCC-wrapper-data.txt
|
||||||
|
|
||||||
|
else
|
||||||
|
install-exec-hook:
|
||||||
|
(cd $(DESTDIR)$(bindir); rm -f opalcc$(EXEEXT); $(LN_S) opal_wrapper opalcc)
|
||||||
|
(cd $(DESTDIR)$(bindir); rm -f opalc++$(EXEEXT); $(LN_S) opal_wrapper opalc++)
|
||||||
|
|
||||||
|
uninstall-local:
|
||||||
|
rm -f $(DESTDIR)$(bindir)/opalcc$(EXEEXT) \
|
||||||
|
$(DESTDIR)$(bindir)/opalc++$(EXEEXT)
|
||||||
|
|
||||||
|
endif
|
51
opal/tools/wrappers/help-opal-wrapper.txt
Обычный файл
51
opal/tools/wrappers/help-opal-wrapper.txt
Обычный файл
@ -0,0 +1,51 @@
|
|||||||
|
# -*- text -*-
|
||||||
|
#
|
||||||
|
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||||
|
# University Research and Technology
|
||||||
|
# Corporation. All rights reserved.
|
||||||
|
# Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||||
|
# of Tennessee Research Foundation. 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$
|
||||||
|
#
|
||||||
|
# This is the US/English help file for Open MPI wrapper compiler error
|
||||||
|
# messages.
|
||||||
|
#
|
||||||
|
[no-language-support]
|
||||||
|
Unfortunately, this installation of Open MPI was not compiled with
|
||||||
|
%s support. As such, the %s compiler is non-functional.
|
||||||
|
[no-profiling-support]
|
||||||
|
warning: "-lpmpi" was included on the command line indicating use of MPI
|
||||||
|
warning: profiling layer. However, Open MPI was not compiled with support
|
||||||
|
warning: for the MPI profiling layer; this flag has been ignored.
|
||||||
|
[no-compiler-found]
|
||||||
|
The Open MPI wrapper compiler was unable to find the specified compiler
|
||||||
|
%s in your PATH.
|
||||||
|
|
||||||
|
Note that this compiler was either specified at configure time or in
|
||||||
|
one of several possible environment variables.
|
||||||
|
[version]
|
||||||
|
%s: %s %s (Language: %s)
|
||||||
|
[usage]
|
||||||
|
%s [-showme[:<command,compile,link,incdirs,
|
||||||
|
libdirs,libs,version>]] args
|
||||||
|
|
||||||
|
-showme:command Show command used to invoke real compiler
|
||||||
|
-showme:compile Show flags added when compiling
|
||||||
|
-showme:link Show flags added when linking
|
||||||
|
-showme:incdirs Show list of include dirs added when compiling
|
||||||
|
-showme:libdirs Show list of library dirs added when linking
|
||||||
|
-showme:libs Show list of libraries added when linking
|
||||||
|
-showme:version Show version of %s
|
||||||
|
|
||||||
|
[file-not-found]
|
||||||
|
%s could not find the file %s, needed for %s support.
|
||||||
|
This may indicate an incomplete install and linking will likely fail.
|
548
opal/tools/wrappers/opal_wrapper.c
Обычный файл
548
opal/tools/wrappers/opal_wrapper.c
Обычный файл
@ -0,0 +1,548 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||||
|
* University Research and Technology
|
||||||
|
* Corporation. All rights reserved.
|
||||||
|
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||||
|
* of Tennessee Research Foundation. 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 "ompi_config.h"
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#ifdef HAVE_SYS_STAT_H
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_LIBGEN_H
|
||||||
|
#include <libgen.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "opal/runtime/opal.h"
|
||||||
|
#include "opal/include/constants.h"
|
||||||
|
#include "opal/util/argv.h"
|
||||||
|
#include "opal/util/keyval_parse.h"
|
||||||
|
#include "opal/util/show_help.h"
|
||||||
|
#include "opal/util/path.h"
|
||||||
|
#include "opal/util/few.h"
|
||||||
|
|
||||||
|
extern char **environ;
|
||||||
|
|
||||||
|
struct {
|
||||||
|
char *language;
|
||||||
|
char *project;
|
||||||
|
char *project_short;
|
||||||
|
char *version;
|
||||||
|
char *compiler_env;
|
||||||
|
char *compiler_flags_env;
|
||||||
|
char *compiler;
|
||||||
|
char **preproc_flags;
|
||||||
|
char **comp_flags;
|
||||||
|
char **link_flags;
|
||||||
|
char **libs;
|
||||||
|
char *req_file;
|
||||||
|
} data;
|
||||||
|
|
||||||
|
#define COMP_DRY_RUN 0x001
|
||||||
|
#define COMP_SHOW_ERROR 0x002
|
||||||
|
#define COMP_WANT_COMMAND 0x004
|
||||||
|
#define COMP_WANT_PREPROC 0x008
|
||||||
|
#define COMP_WANT_COMPILE 0x010
|
||||||
|
#define COMP_WANT_LINK 0x020
|
||||||
|
#define COMP_WANT_PMPI 0x040
|
||||||
|
|
||||||
|
static void
|
||||||
|
data_callback(const char *key, const char *value)
|
||||||
|
{
|
||||||
|
if (0 == strcmp(key, "language")) {
|
||||||
|
if (NULL != value) data.language = strdup(value);
|
||||||
|
} else if (0 == strcmp(key, "compiler")) {
|
||||||
|
if (NULL != value) data.compiler = strdup(value);
|
||||||
|
} else if (0 == strcmp(key, "project")) {
|
||||||
|
if (NULL != value) data.project = strdup(value);
|
||||||
|
} else if (0 == strcmp(key, "version")) {
|
||||||
|
if (NULL != value) data.version = strdup(value);
|
||||||
|
} else if (0 == strcmp(key, "extra_includes")) {
|
||||||
|
/* this is the hard one - need to put it together... */
|
||||||
|
int i;
|
||||||
|
char **values = opal_argv_split(value, ' ');
|
||||||
|
|
||||||
|
for (i = 0 ; i < opal_argv_count(values) ; ++i) {
|
||||||
|
char *line;
|
||||||
|
asprintf(&line, "-I%s%s%s", OPAL_INCDIR, OMPI_PATH_SEP, values[i]);
|
||||||
|
opal_argv_append_nosize(&data.preproc_flags, line);
|
||||||
|
free(line);
|
||||||
|
}
|
||||||
|
} else if (0 == strcmp(key, "preprocessor_flags")) {
|
||||||
|
char **values = opal_argv_split(value, ' ');
|
||||||
|
opal_argv_insert(&data.preproc_flags,
|
||||||
|
opal_argv_count(data.preproc_flags),
|
||||||
|
values);
|
||||||
|
opal_argv_free(values);
|
||||||
|
} else if (0 == strcmp(key, "compiler_flags")) {
|
||||||
|
char **values = opal_argv_split(value, ' ');
|
||||||
|
opal_argv_insert(&data.comp_flags,
|
||||||
|
opal_argv_count(data.comp_flags),
|
||||||
|
values);
|
||||||
|
opal_argv_free(values);
|
||||||
|
} else if (0 == strcmp(key, "linker_flags")) {
|
||||||
|
char **values = opal_argv_split(value, ' ');
|
||||||
|
opal_argv_insert(&data.link_flags,
|
||||||
|
opal_argv_count(data.link_flags),
|
||||||
|
values);
|
||||||
|
opal_argv_free(values);
|
||||||
|
} else if (0 == strcmp(key, "libs")) {
|
||||||
|
char **values = opal_argv_split(value, ' ');
|
||||||
|
opal_argv_insert(&data.libs,
|
||||||
|
opal_argv_count(data.libs),
|
||||||
|
values);
|
||||||
|
opal_argv_free(values);
|
||||||
|
} else if (0 == strcmp(key, "required_file")) {
|
||||||
|
if (NULL != value) data.req_file = strdup(value);
|
||||||
|
} else if (0 == strcmp(key, "project_short")) {
|
||||||
|
if (NULL != value) data.project_short = strdup(value);
|
||||||
|
} else if (0 == strcmp(key, "compiler_env")) {
|
||||||
|
if (NULL != value) data.compiler_env = strdup(value);
|
||||||
|
} else if (0 == strcmp(key, "compiler_flags_env")) {
|
||||||
|
if (NULL != value) data.compiler_flags_env = strdup(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
data_init(const char *appname)
|
||||||
|
{
|
||||||
|
int ret;
|
||||||
|
char *datafile;
|
||||||
|
|
||||||
|
data.language = NULL;
|
||||||
|
data.compiler = NULL;
|
||||||
|
data.project = NULL;
|
||||||
|
data.project_short = NULL;
|
||||||
|
data.version = NULL;
|
||||||
|
data.compiler_env = NULL;
|
||||||
|
data.compiler_flags_env = NULL;
|
||||||
|
data.preproc_flags = malloc(sizeof(char*));
|
||||||
|
data.preproc_flags[0] = NULL;
|
||||||
|
data.comp_flags = malloc(sizeof(char*));
|
||||||
|
data.comp_flags[0] = NULL;
|
||||||
|
data.link_flags = malloc(sizeof(char*));
|
||||||
|
data.link_flags[0] = NULL;
|
||||||
|
data.libs = malloc(sizeof(char*));
|
||||||
|
data.libs[0] = NULL;
|
||||||
|
data.req_file = NULL;
|
||||||
|
|
||||||
|
/* load the default -I<incdir> and -L<libdir> */
|
||||||
|
if (0 != strcmp(OPAL_INCDIR, "/usr/include")) {
|
||||||
|
char *line;
|
||||||
|
asprintf(&line, "-I%s", OPAL_INCDIR);
|
||||||
|
opal_argv_append_nosize(&data.preproc_flags, line);
|
||||||
|
free(line);
|
||||||
|
}
|
||||||
|
if (0 != strcmp(OPAL_LIBDIR, "/usr/lib")) {
|
||||||
|
char *line;
|
||||||
|
asprintf(&line, "-L%s", OPAL_LIBDIR);
|
||||||
|
opal_argv_append_nosize(&data.link_flags, line);
|
||||||
|
free(line);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* now load the data */
|
||||||
|
asprintf(&datafile, "%s%s%s-wrapper-data.txt",
|
||||||
|
OPAL_PKGDATADIR, OMPI_PATH_SEP, appname);
|
||||||
|
if (NULL == datafile) return OPAL_ERR_TEMP_OUT_OF_RESOURCE;
|
||||||
|
|
||||||
|
ret = opal_util_keyval_parse(datafile, data_callback);
|
||||||
|
|
||||||
|
free(datafile);
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static int
|
||||||
|
data_finalize(void)
|
||||||
|
{
|
||||||
|
if (NULL != data.language) free(data.language);
|
||||||
|
if (NULL != data.compiler) free(data.compiler);
|
||||||
|
if (NULL != data.project) free(data.project);
|
||||||
|
if (NULL != data.project_short) free(data.project_short);
|
||||||
|
if (NULL != data.version) free(data.version);
|
||||||
|
if (NULL != data.compiler_env) free(data.compiler_env);
|
||||||
|
if (NULL != data.compiler_flags_env) free(data.compiler_flags_env);
|
||||||
|
opal_argv_free(data.preproc_flags);
|
||||||
|
opal_argv_free(data.comp_flags);
|
||||||
|
opal_argv_free(data.link_flags);
|
||||||
|
opal_argv_free(data.libs);
|
||||||
|
if (NULL != data.req_file) free(data.req_file);
|
||||||
|
|
||||||
|
return OPAL_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
print_flags(char **args, char *pattern)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
bool found = false;
|
||||||
|
|
||||||
|
for (i = 0 ; args[i] != NULL ; ++i) {
|
||||||
|
if (0 == strncmp(args[i], pattern, strlen(pattern))) {
|
||||||
|
if (found) printf(" ");
|
||||||
|
printf("%s", args[i] + strlen(pattern));
|
||||||
|
found = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (found) printf("\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
load_env_data(const char *project, const char *flag, char **data)
|
||||||
|
{
|
||||||
|
char *envname;
|
||||||
|
char *envvalue;
|
||||||
|
|
||||||
|
if (NULL == project || NULL == flag) return;
|
||||||
|
|
||||||
|
asprintf(&envname, "%s_MPI%s", project, flag);
|
||||||
|
if (NULL == (envvalue = getenv(envname))) {
|
||||||
|
free(envname);
|
||||||
|
asprintf(&envname, "%s_%s", project, flag);
|
||||||
|
if (NULL == (envvalue = getenv(envname))) {
|
||||||
|
free(envname);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
free(envname);
|
||||||
|
|
||||||
|
if (NULL != *data) free(*data);
|
||||||
|
*data = strdup(envvalue);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
load_env_data_argv(const char *project, const char *flag, char ***data)
|
||||||
|
{
|
||||||
|
char *envname;
|
||||||
|
char *envvalue;
|
||||||
|
|
||||||
|
if (NULL == project || NULL == flag) return;
|
||||||
|
|
||||||
|
asprintf(&envname, "%s_MPI%s", project, flag);
|
||||||
|
if (NULL == (envvalue = getenv(envname))) {
|
||||||
|
free(envname);
|
||||||
|
asprintf(&envname, "%s_%s", project, flag);
|
||||||
|
if (NULL == (envvalue = getenv(envname))) {
|
||||||
|
free(envname);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
free(envname);
|
||||||
|
|
||||||
|
if (NULL != *data) opal_argv_free(*data);
|
||||||
|
|
||||||
|
*data = opal_argv_split(envvalue, ' ');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
int exit_status = 0, ret, flags = 0, i;
|
||||||
|
int exec_argc = 0, user_argc = 0;
|
||||||
|
char **exec_argv = NULL, **user_argv = NULL;
|
||||||
|
char *exec_command, *base_argv0;
|
||||||
|
bool disable_flags = true;
|
||||||
|
bool real_flag = false;
|
||||||
|
|
||||||
|
if (OPAL_SUCCESS != (ret = opal_init_util())) {
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/****************************************************
|
||||||
|
*
|
||||||
|
* Setup compiler information
|
||||||
|
*
|
||||||
|
****************************************************/
|
||||||
|
|
||||||
|
base_argv0 = basename(argv[0]);
|
||||||
|
if (OPAL_SUCCESS != (ret = data_init(base_argv0))) {
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* compiler */
|
||||||
|
load_env_data(data.project_short, data.compiler_env, &data.compiler);
|
||||||
|
|
||||||
|
/* preprocessor flags */
|
||||||
|
load_env_data_argv(data.project_short, "CPPFLAGS", &data.preproc_flags);
|
||||||
|
|
||||||
|
/* compiler flags */
|
||||||
|
load_env_data_argv(data.project_short, data.compiler_flags_env,
|
||||||
|
&data.comp_flags);
|
||||||
|
|
||||||
|
/* linker flags */
|
||||||
|
load_env_data_argv(data.project_short, "LDFLAGS", &data.link_flags);
|
||||||
|
|
||||||
|
/* libs */
|
||||||
|
load_env_data_argv(data.project_short, "LIBS", &data.libs);
|
||||||
|
|
||||||
|
|
||||||
|
/****************************************************
|
||||||
|
*
|
||||||
|
* Sanity Checks
|
||||||
|
*
|
||||||
|
****************************************************/
|
||||||
|
|
||||||
|
if (NULL != data.req_file) {
|
||||||
|
/* make sure the language is supported */
|
||||||
|
if (0 == strcmp(data.req_file, "not supported")) {
|
||||||
|
opal_show_help("help-opal-wrapper.txt", "no-language-support", true,
|
||||||
|
data.language, base_argv0, NULL);
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (data.req_file[0] != '\0') {
|
||||||
|
char *filename;
|
||||||
|
struct stat buf;
|
||||||
|
asprintf(&filename, "%s%s%s", OPAL_LIBDIR, OMPI_PATH_SEP, data.req_file);
|
||||||
|
if (0 != stat(filename, &buf)) {
|
||||||
|
opal_show_help("help-opal-wrapper.txt", "file-not-found", true,
|
||||||
|
base_argv0, data.req_file, data.language, NULL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************
|
||||||
|
*
|
||||||
|
* Parse user flags
|
||||||
|
*
|
||||||
|
****************************************************/
|
||||||
|
flags = COMP_WANT_COMMAND|COMP_WANT_PREPROC|
|
||||||
|
COMP_WANT_COMPILE|COMP_WANT_LINK;
|
||||||
|
|
||||||
|
user_argv = opal_argv_copy(argv + 1);
|
||||||
|
user_argc = opal_argv_count(user_argv);
|
||||||
|
|
||||||
|
for (i = 0 ; i < user_argc ; ++i) {
|
||||||
|
if (0 == strncmp(user_argv[i], "-showme", strlen("-showme")) ||
|
||||||
|
0 == strncmp(user_argv[i], "--showme", strlen("--showme")) ||
|
||||||
|
0 == strncmp(user_argv[i], "-show", strlen("-show")) ||
|
||||||
|
0 == strncmp(user_argv[i], "--show", strlen("--show"))) {
|
||||||
|
bool done_now = false;
|
||||||
|
|
||||||
|
/* check for specific things we want to see. First three
|
||||||
|
still invoke all the building routines. Last set want
|
||||||
|
to parse out certain flags, so we don't go through the
|
||||||
|
normal build routine - skip to cleanup. */
|
||||||
|
if (0 == strncmp(user_argv[i], "-showme:command", strlen("-showme:command")) ||
|
||||||
|
0 == strncmp(user_argv[i], "--showme:command", strlen("--showme:command"))) {
|
||||||
|
flags = COMP_WANT_COMMAND;
|
||||||
|
/* we know what we want, so don't process any more args */
|
||||||
|
done_now = true;
|
||||||
|
} else if (0 == strncmp(user_argv[i], "-showme:compile", strlen("-showme:compile")) ||
|
||||||
|
0 == strncmp(user_argv[i], "--showme:compile", strlen("--showme:compile"))) {
|
||||||
|
flags = COMP_WANT_PREPROC|COMP_WANT_COMPILE;
|
||||||
|
/* we know what we want, so don't process any more args */
|
||||||
|
done_now = true;
|
||||||
|
} else if (0 == strncmp(user_argv[i], "-showme:link", strlen("-showme:link")) ||
|
||||||
|
0 == strncmp(user_argv[i], "--showme:link", strlen("--showme:link"))) {
|
||||||
|
flags = COMP_WANT_COMPILE|COMP_WANT_LINK;
|
||||||
|
/* we know what we want, so don't process any more args */
|
||||||
|
done_now = true;
|
||||||
|
} else if (0 == strncmp(user_argv[i], "-showme:incdirs", strlen("-showme:incdirs")) ||
|
||||||
|
0 == strncmp(user_argv[i], "--showme:incdirs", strlen("--showme:incdirs"))) {
|
||||||
|
print_flags(data.preproc_flags, "-I");
|
||||||
|
goto cleanup;
|
||||||
|
} else if (0 == strncmp(user_argv[i], "-showme:libdirs", strlen("-showme:libdirs")) ||
|
||||||
|
0 == strncmp(user_argv[i], "--showme:libdirs", strlen("--showme:libdirs"))) {
|
||||||
|
print_flags(data.link_flags, "-L");
|
||||||
|
goto cleanup;
|
||||||
|
} else if (0 == strncmp(user_argv[i], "-showme:libs", strlen("-showme:libs")) ||
|
||||||
|
0 == strncmp(user_argv[i], "--showme:libs", strlen("--showme:libs"))) {
|
||||||
|
print_flags(data.libs, "-l");
|
||||||
|
goto cleanup;
|
||||||
|
} else if (0 == strncmp(user_argv[i], "-showme:version", strlen("-showme:version")) ||
|
||||||
|
0 == strncmp(user_argv[i], "--showme:version", strlen("--showme:version"))) {
|
||||||
|
opal_show_help("help-opal-wrapper.txt", "version", false,
|
||||||
|
argv[0], data.project, data.version, data.language, NULL);
|
||||||
|
goto cleanup;
|
||||||
|
} else if (0 == strncmp(user_argv[i], "-showme:", strlen("-showme:")) ||
|
||||||
|
0 == strncmp(user_argv[i], "--showme:", strlen("--showme:"))) {
|
||||||
|
opal_show_help("help-opal-wrapper.txt", "usage", true,
|
||||||
|
argv[0], data.project, NULL);
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
|
flags |= (COMP_DRY_RUN|COMP_SHOW_ERROR);
|
||||||
|
/* remove element from user_argv */
|
||||||
|
opal_argv_delete(&user_argc, &user_argv, i, 1);
|
||||||
|
--i;
|
||||||
|
|
||||||
|
if (done_now) {
|
||||||
|
disable_flags = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
} else if (0 == strcmp(user_argv[i], "-c")) {
|
||||||
|
flags &= ~COMP_WANT_LINK;
|
||||||
|
real_flag = true;
|
||||||
|
} else if (0 == strcmp(user_argv[i], "-E") ||
|
||||||
|
0 == strcmp(user_argv[i], "-M")) {
|
||||||
|
flags &= ~(COMP_WANT_COMPILE | COMP_WANT_LINK);
|
||||||
|
real_flag = true;
|
||||||
|
} else if (0 == strcmp(user_argv[i], "-S")) {
|
||||||
|
flags &= ~COMP_WANT_LINK;
|
||||||
|
real_flag = true;
|
||||||
|
} else if (0 == strcmp(user_argv[i], "-lpmpi")) {
|
||||||
|
flags |= COMP_WANT_PMPI;
|
||||||
|
|
||||||
|
/* remove element from user_argv */
|
||||||
|
opal_argv_delete(&user_argc, &user_argv, i, 1);
|
||||||
|
--i;
|
||||||
|
} else if ('-' != user_argv[i][0]) {
|
||||||
|
disable_flags = false;
|
||||||
|
flags |= COMP_SHOW_ERROR;
|
||||||
|
real_flag = true;
|
||||||
|
} else {
|
||||||
|
real_flag = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* clear out the want_flags if we got no arguments not starting
|
||||||
|
with a - (dash) and -showme wasn't given OR -showme was given
|
||||||
|
and we had at least one more non-showme argument that started
|
||||||
|
with a - (dash) and no other non-dash arguments. Some examples:
|
||||||
|
|
||||||
|
opal_wrapper : clear our flags
|
||||||
|
opal_wrapper -v : clear our flags
|
||||||
|
opal_wrapper -E a.c : don't clear our flags
|
||||||
|
opal_wrapper a.c : don't clear our flags
|
||||||
|
opal_wrapper -showme : don't clear our flags
|
||||||
|
opal_wrapper -showme -v : clear our flags
|
||||||
|
opal_wrapper -showme -E a.c : don't clear our flags
|
||||||
|
opal_wrapper -showme a.c : don't clear our flags
|
||||||
|
*/
|
||||||
|
if (disable_flags && !((flags & COMP_DRY_RUN) && !real_flag)) {
|
||||||
|
flags &= ~(COMP_WANT_PREPROC|COMP_WANT_COMPILE|COMP_WANT_LINK);
|
||||||
|
}
|
||||||
|
|
||||||
|
#if !OMPI_ENABLE_MPI_PROFILING
|
||||||
|
/* sanity check */
|
||||||
|
if (flags & COMP_WANT_PMPI) {
|
||||||
|
opal_show_help("help-opal-wrapper.txt", "no-profiling-support", true,
|
||||||
|
argv[0], NULL);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/****************************************************
|
||||||
|
*
|
||||||
|
* Assemble the command line
|
||||||
|
*
|
||||||
|
****************************************************/
|
||||||
|
|
||||||
|
/* compiler (may be multiple arguments, so split) */
|
||||||
|
if (flags & COMP_WANT_COMMAND) {
|
||||||
|
exec_argv = opal_argv_split(data.compiler, ' ');
|
||||||
|
exec_argc = opal_argv_count(exec_argv);
|
||||||
|
} else {
|
||||||
|
exec_argv = malloc(sizeof(char*));
|
||||||
|
exec_argv[0] = NULL;
|
||||||
|
exec_argc = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* preproc flags */
|
||||||
|
if (flags & COMP_WANT_PREPROC) {
|
||||||
|
opal_argv_insert(&exec_argv, exec_argc, data.preproc_flags);
|
||||||
|
exec_argc = opal_argv_count(exec_argv);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* compiler flags */
|
||||||
|
if (flags & COMP_WANT_COMPILE) {
|
||||||
|
opal_argv_insert(&exec_argv, exec_argc, data.comp_flags);
|
||||||
|
exec_argc = opal_argv_count(exec_argv);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* add all the user arguments */
|
||||||
|
opal_argv_insert(&exec_argv, exec_argc, user_argv);
|
||||||
|
exec_argc = opal_argv_count(exec_argv);
|
||||||
|
|
||||||
|
/* link flags and libs */
|
||||||
|
if (flags & COMP_WANT_LINK) {
|
||||||
|
opal_argv_insert(&exec_argv, exec_argc, data.link_flags);
|
||||||
|
exec_argc = opal_argv_count(exec_argv);
|
||||||
|
|
||||||
|
opal_argv_insert(&exec_argv, exec_argc, data.libs);
|
||||||
|
exec_argc = opal_argv_count(exec_argv);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/****************************************************
|
||||||
|
*
|
||||||
|
* Execute the command
|
||||||
|
*
|
||||||
|
****************************************************/
|
||||||
|
|
||||||
|
if (flags & COMP_DRY_RUN) {
|
||||||
|
exec_command = opal_argv_join(exec_argv, ' ');
|
||||||
|
printf("%s\n", exec_command);
|
||||||
|
} else {
|
||||||
|
char *tmp;
|
||||||
|
|
||||||
|
#if 1
|
||||||
|
exec_command = opal_argv_join(exec_argv, ' ');
|
||||||
|
printf("command: %s\n", exec_command);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
tmp = opal_path_findv(exec_argv[0], 0, environ, NULL);
|
||||||
|
if (NULL == tmp) {
|
||||||
|
opal_show_help("help-opal-wrapper.txt", "no-compiler-found", true,
|
||||||
|
exec_argv[0], NULL);
|
||||||
|
errno = 0;
|
||||||
|
exit_status = 1;
|
||||||
|
} else {
|
||||||
|
int status;
|
||||||
|
|
||||||
|
free(tmp);
|
||||||
|
ret = opal_few(exec_argv, &status);
|
||||||
|
exit_status = WIFEXITED(status) ? WEXITSTATUS(status) :
|
||||||
|
(WIFSIGNALED(status) ? WTERMSIG(status) :
|
||||||
|
(WIFSTOPPED(status) ? WSTOPSIG(status) : 255));
|
||||||
|
|
||||||
|
if (0 != ret && 0 != errno && (flags & COMP_SHOW_ERROR)) {
|
||||||
|
perror(base_argv0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************
|
||||||
|
*
|
||||||
|
* Cleanup
|
||||||
|
*
|
||||||
|
****************************************************/
|
||||||
|
cleanup:
|
||||||
|
|
||||||
|
opal_argv_free(exec_argv);
|
||||||
|
opal_argv_free(user_argv);
|
||||||
|
if (NULL != base_argv0) free(base_argv0);
|
||||||
|
|
||||||
|
if (OPAL_SUCCESS != (ret = data_finalize())) {
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (OPAL_SUCCESS != (ret = opal_finalize_util())) {
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
return exit_status;
|
||||||
|
}
|
13
opal/tools/wrappers/opalc++-wrapper-data.txt.in
Обычный файл
13
opal/tools/wrappers/opalc++-wrapper-data.txt.in
Обычный файл
@ -0,0 +1,13 @@
|
|||||||
|
project=Open Portable Access Layer (OPAL)
|
||||||
|
project_short=OPAL
|
||||||
|
version=@OPAL_VERSION@
|
||||||
|
language=C++
|
||||||
|
compiler_env=CXX
|
||||||
|
compiler_flags_env=CXXFLAGS
|
||||||
|
compiler=@CXX@
|
||||||
|
extra_includes=@OPAL_WRAPPER_EXTRA_INCLUDES@
|
||||||
|
preprocessor_flags=@OPAL_WRAPPER_EXTRA_CPPFLAGS@
|
||||||
|
compiler_flags=@OPAL_WRAPPER_EXTRA_CXXFLAGS@
|
||||||
|
linker_flags=@OPAL_WRAPPER_EXTRA_LDFLAGS@
|
||||||
|
libs=-lopal @OPAL_WRAPPER_EXTRA_LIBS@
|
||||||
|
required_file=
|
13
opal/tools/wrappers/opalcc-wrapper-data.txt.in
Обычный файл
13
opal/tools/wrappers/opalcc-wrapper-data.txt.in
Обычный файл
@ -0,0 +1,13 @@
|
|||||||
|
project=Open Portable Access Layer (OPAL)
|
||||||
|
project_short=OPAL
|
||||||
|
version=@OPAL_VERSION@
|
||||||
|
language=C
|
||||||
|
compiler_env=CC
|
||||||
|
compiler_flags_env=CFLAGS
|
||||||
|
compiler=@CC@
|
||||||
|
extra_includes=@OPAL_WRAPPER_EXTRA_INCLUDES@
|
||||||
|
preprocessor_flags=@OPAL_WRAPPER_EXTRA_CPPFLAGS@
|
||||||
|
compiler_flags=@OPAL_WRAPPER_EXTRA_CFLAGS@
|
||||||
|
linker_flags=@OPAL_WRAPPER_EXTRA_LDFLAGS@
|
||||||
|
libs=-lopal @OPAL_WRAPPER_EXTRA_LIBS@
|
||||||
|
required_file=
|
@ -37,6 +37,7 @@ headers = \
|
|||||||
error.h \
|
error.h \
|
||||||
few.h \
|
few.h \
|
||||||
if.h \
|
if.h \
|
||||||
|
keyval_parse.h \
|
||||||
malloc.h \
|
malloc.h \
|
||||||
numtostr.h \
|
numtostr.h \
|
||||||
opal_environ.h \
|
opal_environ.h \
|
||||||
@ -64,6 +65,7 @@ libopalutil_la_SOURCES = \
|
|||||||
error.c \
|
error.c \
|
||||||
few.c \
|
few.c \
|
||||||
if.c \
|
if.c \
|
||||||
|
keyval_parse.c \
|
||||||
malloc.c \
|
malloc.c \
|
||||||
numtostr.c \
|
numtostr.c \
|
||||||
opal_environ.c \
|
opal_environ.c \
|
||||||
@ -79,6 +81,10 @@ libopalutil_la_SOURCES = \
|
|||||||
stacktrace.c \
|
stacktrace.c \
|
||||||
strncpy.c \
|
strncpy.c \
|
||||||
trace.c
|
trace.c
|
||||||
|
libopalutil_la_LIBADD = \
|
||||||
|
keyval/libopalutilkeyval.la
|
||||||
|
libopalutil_la_DEPENDENCIES = \
|
||||||
|
keyval/libopalutilkeyval.la
|
||||||
|
|
||||||
# Conditionally install the header files
|
# Conditionally install the header files
|
||||||
|
|
||||||
|
29
opal/util/keyval/Makefile.am
Обычный файл
29
opal/util/keyval/Makefile.am
Обычный файл
@ -0,0 +1,29 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||||
|
# University Research and Technology
|
||||||
|
# Corporation. All rights reserved.
|
||||||
|
# Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||||
|
# of Tennessee Research Foundation. 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$
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
AM_LFLAGS = -Popal_util_keyval_yy
|
||||||
|
LEX_OUTPUT_ROOT = lex.opal_util_keyval_yy
|
||||||
|
|
||||||
|
noinst_LTLIBRARIES = libopalutilkeyval.la
|
||||||
|
|
||||||
|
# Source code files
|
||||||
|
|
||||||
|
libopalutilkeyval_la_SOURCES = \
|
||||||
|
keyval_lex.h \
|
||||||
|
keyval_lex.l
|
@ -17,8 +17,8 @@
|
|||||||
* $HEADER$
|
* $HEADER$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MCA_BASE_PARSE_PARAMFILE_LEX_H_
|
#ifndef OPAL_UTIL_KEYVAL_LEX_H_
|
||||||
#define MCA_BASE_PARSE_PARAMFILE_LEX_H_
|
#define OPAL_UTIL_KEYVAL_LEX_H_
|
||||||
|
|
||||||
#include "ompi_config.h"
|
#include "ompi_config.h"
|
||||||
|
|
||||||
@ -34,13 +34,13 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
int mca_base_yylex(void);
|
int opal_util_keyval_yylex(void);
|
||||||
int mca_base_param_init_buffer(FILE *file);
|
int opal_util_keyval_init_buffer(FILE *file);
|
||||||
|
|
||||||
extern FILE *mca_base_yyin;
|
extern FILE *opal_util_keyval_yyin;
|
||||||
extern bool mca_base_parse_done;
|
extern bool opal_util_keyval_parse_done;
|
||||||
extern char *mca_base_yytext;
|
extern char *opal_util_keyval_yytext;
|
||||||
extern int mca_base_yynewlines;
|
extern int opal_util_keyval_yynewlines;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Make lex-generated files not issue compiler warnings
|
* Make lex-generated files not issue compiler warnings
|
||||||
@ -52,15 +52,15 @@ extern int mca_base_yynewlines;
|
|||||||
#define YY_NO_UNPUT 1
|
#define YY_NO_UNPUT 1
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
MCA_BASE_PARSE_DONE,
|
OPAL_UTIL_KEYVAL_PARSE_DONE,
|
||||||
MCA_BASE_PARSE_ERROR,
|
OPAL_UTIL_KEYVAL_PARSE_ERROR,
|
||||||
|
|
||||||
MCA_BASE_PARSE_NEWLINE,
|
OPAL_UTIL_KEYVAL_PARSE_NEWLINE,
|
||||||
MCA_BASE_PARSE_EQUAL,
|
OPAL_UTIL_KEYVAL_PARSE_EQUAL,
|
||||||
MCA_BASE_PARSE_SINGLE_WORD,
|
OPAL_UTIL_KEYVAL_PARSE_SINGLE_WORD,
|
||||||
MCA_BASE_PARSE_VALUE,
|
OPAL_UTIL_KEYVAL_PARSE_VALUE,
|
||||||
|
|
||||||
MCA_BASE_PARSE_MAX
|
OPAL_UTIL_KEYVAL_PARSE_MAX
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
@ -24,20 +24,20 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "mca/base/mca_base_parse_paramfile_lex.h"
|
#include "opal/util/keyval/keyval_lex.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* local functions
|
* local functions
|
||||||
*/
|
*/
|
||||||
static int finish_parsing(void) ;
|
static int finish_parsing(void) ;
|
||||||
static int mca_base_yywrap(void);
|
static int opal_util_keyval_yywrap(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* global variables
|
* global variables
|
||||||
*/
|
*/
|
||||||
int mca_base_yynewlines = 1;
|
int opal_util_keyval_yynewlines = 1;
|
||||||
bool mca_base_parse_done = false;
|
bool opal_util_keyval_parse_done = false;
|
||||||
char *mca_base_string = NULL;
|
char *opal_util_keyval_string = NULL;
|
||||||
|
|
||||||
#define yyterminate() \
|
#define yyterminate() \
|
||||||
return finish_parsing()
|
return finish_parsing()
|
||||||
@ -52,27 +52,27 @@ CHAR [A-Za-z0-9_\-\.]
|
|||||||
|
|
||||||
%%
|
%%
|
||||||
|
|
||||||
{WHITE}*\n { mca_base_yynewlines++; return MCA_BASE_PARSE_NEWLINE; }
|
{WHITE}*\n { opal_util_keyval_yynewlines++; return OPAL_UTIL_KEYVAL_PARSE_NEWLINE; }
|
||||||
#.*\n { mca_base_yynewlines++; return MCA_BASE_PARSE_NEWLINE; }
|
#.*\n { opal_util_keyval_yynewlines++; return OPAL_UTIL_KEYVAL_PARSE_NEWLINE; }
|
||||||
"//".*\n { mca_base_yynewlines++; return MCA_BASE_PARSE_NEWLINE; }
|
"//".*\n { opal_util_keyval_yynewlines++; return OPAL_UTIL_KEYVAL_PARSE_NEWLINE; }
|
||||||
|
|
||||||
"/*" { BEGIN(comment);
|
"/*" { BEGIN(comment);
|
||||||
return MCA_BASE_PARSE_NEWLINE; }
|
return OPAL_UTIL_KEYVAL_PARSE_NEWLINE; }
|
||||||
<comment>[^*\n]* ; /* Eat up non '*'s */
|
<comment>[^*\n]* ; /* Eat up non '*'s */
|
||||||
<comment>"*"+[^*/\n]* ; /* Eat '*'s not followed by a '/' */
|
<comment>"*"+[^*/\n]* ; /* Eat '*'s not followed by a '/' */
|
||||||
<comment>\n { mca_base_yynewlines++;
|
<comment>\n { opal_util_keyval_yynewlines++;
|
||||||
return MCA_BASE_PARSE_NEWLINE; }
|
return OPAL_UTIL_KEYVAL_PARSE_NEWLINE; }
|
||||||
<comment>"*"+"/" { BEGIN(INITIAL); /* Done with Block Comment */
|
<comment>"*"+"/" { BEGIN(INITIAL); /* Done with Block Comment */
|
||||||
return MCA_BASE_PARSE_NEWLINE; }
|
return OPAL_UTIL_KEYVAL_PARSE_NEWLINE; }
|
||||||
|
|
||||||
{WHITE}*"="{WHITE}* { BEGIN(VALUE); return MCA_BASE_PARSE_EQUAL; }
|
{WHITE}*"="{WHITE}* { BEGIN(VALUE); return OPAL_UTIL_KEYVAL_PARSE_EQUAL; }
|
||||||
{WHITE}+ ; /* whitespace */
|
{WHITE}+ ; /* whitespace */
|
||||||
{CHAR}+ { return MCA_BASE_PARSE_SINGLE_WORD; }
|
{CHAR}+ { return OPAL_UTIL_KEYVAL_PARSE_SINGLE_WORD; }
|
||||||
|
|
||||||
<VALUE>{WHITE}*\n { BEGIN(INITIAL); return MCA_BASE_PARSE_NEWLINE; }
|
<VALUE>{WHITE}*\n { BEGIN(INITIAL); return OPAL_UTIL_KEYVAL_PARSE_NEWLINE; }
|
||||||
<VALUE>[^\n]*[^\t \n]/[\t ]* { return MCA_BASE_PARSE_VALUE; }
|
<VALUE>[^\n]*[^\t \n]/[\t ]* { return OPAL_UTIL_KEYVAL_PARSE_VALUE; }
|
||||||
|
|
||||||
. { return MCA_BASE_PARSE_ERROR; }
|
. { return OPAL_UTIL_KEYVAL_PARSE_ERROR; }
|
||||||
|
|
||||||
%%
|
%%
|
||||||
|
|
||||||
@ -95,9 +95,9 @@ static int finish_parsing(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int mca_base_yywrap(void)
|
static int opal_util_keyval_yywrap(void)
|
||||||
{
|
{
|
||||||
mca_base_parse_done = true;
|
opal_util_keyval_parse_done = true;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -111,7 +111,7 @@ static int mca_base_yywrap(void)
|
|||||||
* have a valid buffer. Hence, here we ensure to give it a valid
|
* have a valid buffer. Hence, here we ensure to give it a valid
|
||||||
* buffer.
|
* buffer.
|
||||||
*/
|
*/
|
||||||
int mca_base_param_init_buffer(FILE *file)
|
int opal_util_keyval_init_buffer(FILE *file)
|
||||||
{
|
{
|
||||||
YY_BUFFER_STATE buf = yy_create_buffer(file, YY_BUF_SIZE);
|
YY_BUFFER_STATE buf = yy_create_buffer(file, YY_BUF_SIZE);
|
||||||
yy_switch_to_buffer(buf);
|
yy_switch_to_buffer(buf);
|
155
opal/util/keyval_parse.c
Обычный файл
155
opal/util/keyval_parse.c
Обычный файл
@ -0,0 +1,155 @@
|
|||||||
|
|
||||||
|
#include "ompi_config.h"
|
||||||
|
|
||||||
|
#include "opal/include/constants.h"
|
||||||
|
#include "opal/util/keyval_parse.h"
|
||||||
|
#include "opal/util/keyval/keyval_lex.h"
|
||||||
|
#include "opal/util/output.h"
|
||||||
|
#include "opal/threads/mutex.h"
|
||||||
|
|
||||||
|
|
||||||
|
static const char *keyval_filename;
|
||||||
|
static opal_keyval_parse_fn_t keyval_callback;
|
||||||
|
static char *key_buffer = NULL;
|
||||||
|
static size_t key_buffer_len = 0;
|
||||||
|
static opal_mutex_t keyval_mutex;
|
||||||
|
|
||||||
|
static int parse_line(void);
|
||||||
|
static void parse_error(int num);
|
||||||
|
|
||||||
|
int opal_util_keyval_parse_init(void)
|
||||||
|
{
|
||||||
|
OBJ_CONSTRUCT(&keyval_mutex, opal_mutex_t);
|
||||||
|
|
||||||
|
return OPAL_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
opal_util_keyval_parse_finalize(void)
|
||||||
|
{
|
||||||
|
if (NULL != key_buffer) free(key_buffer);
|
||||||
|
|
||||||
|
OBJ_DESTRUCT(&keyval_mutex);
|
||||||
|
|
||||||
|
return OPAL_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
opal_util_keyval_parse(const char *filename,
|
||||||
|
opal_keyval_parse_fn_t callback)
|
||||||
|
{
|
||||||
|
int val;
|
||||||
|
int ret = OPAL_SUCCESS;;
|
||||||
|
|
||||||
|
OPAL_THREAD_LOCK(&mutex);
|
||||||
|
|
||||||
|
keyval_filename = filename;
|
||||||
|
keyval_callback = callback;
|
||||||
|
|
||||||
|
/* Open the opal */
|
||||||
|
opal_util_keyval_yyin = fopen(keyval_filename, "r");
|
||||||
|
if (NULL == opal_util_keyval_yyin) {
|
||||||
|
ret = OPAL_ERR_NOT_FOUND;
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
|
opal_util_keyval_parse_done = false;
|
||||||
|
opal_util_keyval_yynewlines = 1;
|
||||||
|
opal_util_keyval_init_buffer(opal_util_keyval_yyin);
|
||||||
|
while (!opal_util_keyval_parse_done) {
|
||||||
|
val = opal_util_keyval_yylex();
|
||||||
|
switch (val) {
|
||||||
|
case OPAL_UTIL_KEYVAL_PARSE_DONE:
|
||||||
|
/* This will also set opal_util_keyval_parse_done to true, so just
|
||||||
|
break here */
|
||||||
|
break;
|
||||||
|
|
||||||
|
case OPAL_UTIL_KEYVAL_PARSE_NEWLINE:
|
||||||
|
/* blank line! ignore it */
|
||||||
|
break;
|
||||||
|
|
||||||
|
case OPAL_UTIL_KEYVAL_PARSE_SINGLE_WORD:
|
||||||
|
parse_line();
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
/* anything else is an error */
|
||||||
|
parse_error(1);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fclose(opal_util_keyval_yyin);
|
||||||
|
|
||||||
|
cleanup:
|
||||||
|
OPAL_THREAD_UNLOCK(&mutex);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static int parse_line(void)
|
||||||
|
{
|
||||||
|
int val;
|
||||||
|
|
||||||
|
/* Save the name name */
|
||||||
|
if (key_buffer_len < strlen(opal_util_keyval_yytext) + 1) {
|
||||||
|
char *tmp;
|
||||||
|
key_buffer_len = strlen(opal_util_keyval_yytext) + 1;
|
||||||
|
tmp = realloc(key_buffer, key_buffer_len);
|
||||||
|
if (NULL == tmp) {
|
||||||
|
free(key_buffer);
|
||||||
|
key_buffer_len = 0;
|
||||||
|
key_buffer = NULL;
|
||||||
|
return OPAL_ERR_TEMP_OUT_OF_RESOURCE;
|
||||||
|
}
|
||||||
|
key_buffer = tmp;
|
||||||
|
}
|
||||||
|
|
||||||
|
strncpy(key_buffer, opal_util_keyval_yytext, key_buffer_len);
|
||||||
|
|
||||||
|
/* The first thing we have to see is an "=" */
|
||||||
|
|
||||||
|
val = opal_util_keyval_yylex();
|
||||||
|
if (opal_util_keyval_parse_done || OPAL_UTIL_KEYVAL_PARSE_EQUAL != val) {
|
||||||
|
parse_error(2);
|
||||||
|
return OPAL_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Next we get the value */
|
||||||
|
|
||||||
|
val = opal_util_keyval_yylex();
|
||||||
|
if (OPAL_UTIL_KEYVAL_PARSE_SINGLE_WORD == val ||
|
||||||
|
OPAL_UTIL_KEYVAL_PARSE_VALUE == val) {
|
||||||
|
keyval_callback(key_buffer, opal_util_keyval_yytext);
|
||||||
|
|
||||||
|
/* Now we need to see the newline */
|
||||||
|
|
||||||
|
val = opal_util_keyval_yylex();
|
||||||
|
if (OPAL_UTIL_KEYVAL_PARSE_NEWLINE == val ||
|
||||||
|
OPAL_UTIL_KEYVAL_PARSE_DONE == val) {
|
||||||
|
return OPAL_SUCCESS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Did we get an EOL or EOF? */
|
||||||
|
|
||||||
|
else if (OPAL_UTIL_KEYVAL_PARSE_DONE == val ||
|
||||||
|
OPAL_UTIL_KEYVAL_PARSE_NEWLINE == val) {
|
||||||
|
keyval_callback(key_buffer, NULL);
|
||||||
|
return OPAL_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Nope -- we got something unexpected. Bonk! */
|
||||||
|
parse_error(3);
|
||||||
|
return OPAL_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void parse_error(int num)
|
||||||
|
{
|
||||||
|
/* JMS need better error/warning message here */
|
||||||
|
opal_output(0, "keyval parser: error %d reading file %s at line %d:\n %s\n",
|
||||||
|
num, keyval_filename, opal_util_keyval_yynewlines, opal_util_keyval_yytext);
|
||||||
|
}
|
57
opal/util/keyval_parse.h
Обычный файл
57
opal/util/keyval_parse.h
Обычный файл
@ -0,0 +1,57 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||||
|
* University Research and Technology
|
||||||
|
* Corporation. All rights reserved.
|
||||||
|
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||||
|
* of Tennessee Research Foundation. 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$
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @file */
|
||||||
|
|
||||||
|
#ifndef OPAL_UTIL_KEYVAL_PARSE_H
|
||||||
|
#define OPAL_UTIL_KEYVAL_PARSE_H
|
||||||
|
|
||||||
|
#if defined(c_plusplus) || defined(__cplusplus)
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Callback triggered for each key = value pair
|
||||||
|
*
|
||||||
|
* Callback triggered from opal_util_keyval_parse for each key = value
|
||||||
|
* pair. Both key and value will be pointers into static buffers.
|
||||||
|
* The buffers must not be free()ed and contents may be overwritten
|
||||||
|
* immediately after the callback returns.
|
||||||
|
*/
|
||||||
|
typedef void (*opal_keyval_parse_fn_t)(const char *key, const char *value);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parse \c filename, made up of key = value pairs.
|
||||||
|
*
|
||||||
|
* Parse \c filename, made up of key = value pairs. For each line
|
||||||
|
* that appears to contain a key = value pair, \c callback will be
|
||||||
|
* called exactly once. In a multithreaded context, calls to
|
||||||
|
* opal_util_keyval_parse() will serialize multiple calls.
|
||||||
|
*/
|
||||||
|
OMPI_DECLSPEC int opal_util_keyval_parse(const char *filename,
|
||||||
|
opal_keyval_parse_fn_t callback);
|
||||||
|
|
||||||
|
OMPI_DECLSPEC int opal_util_keyval_parse_init(void);
|
||||||
|
|
||||||
|
OMPI_DECLSPEC int opal_util_keyval_parse_finalize(void);
|
||||||
|
|
||||||
|
#if defined(c_plusplus) || defined(__cplusplus)
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
@ -24,11 +24,13 @@ SUBDIRS += \
|
|||||||
tools/openmpi \
|
tools/openmpi \
|
||||||
tools/orted \
|
tools/orted \
|
||||||
tools/orteprobe \
|
tools/orteprobe \
|
||||||
tools/orterun
|
tools/orterun \
|
||||||
|
tools/wrappers
|
||||||
|
|
||||||
DIST_SUBDIRS += \
|
DIST_SUBDIRS += \
|
||||||
tools/console \
|
tools/console \
|
||||||
tools/openmpi \
|
tools/openmpi \
|
||||||
tools/orted \
|
tools/orted \
|
||||||
tools/orteprobe \
|
tools/orteprobe \
|
||||||
tools/orterun
|
tools/orterun \
|
||||||
|
tools/wrappers
|
||||||
|
@ -37,8 +37,8 @@ libs = \
|
|||||||
bin_PROGRAMS = openmpi
|
bin_PROGRAMS = openmpi
|
||||||
|
|
||||||
openmpi_SOURCES = openmpi.h openmpi.c
|
openmpi_SOURCES = openmpi.h openmpi.c
|
||||||
openmpi_LDADD = $(LIBMPI_EXTRA_LIBS) $(libs)
|
openmpi_LDADD = $(libs)
|
||||||
openmpi_DFLAGS = $(LIBMPI_EXTRA_LDFLAGS)
|
openmpi_DFLAGS =
|
||||||
openmpi_DEPENDENCIES = $(libs)
|
openmpi_DEPENDENCIES = $(libs)
|
||||||
|
|
||||||
clean-local:
|
clean-local:
|
||||||
|
@ -48,8 +48,8 @@ orted_SOURCES = \
|
|||||||
$(headers) \
|
$(headers) \
|
||||||
orted.c
|
orted.c
|
||||||
|
|
||||||
orted_LDADD = $(libs) $(LIBMPI_EXTRA_LIBS)
|
orted_LDADD = $(libs)
|
||||||
orted_LDFLAGS = $(LIBMPI_EXTRA_LDFLAGS)
|
orted_LDFLAGS =
|
||||||
orted_DEPENDENCIES = $(libs)
|
orted_DEPENDENCIES = $(libs)
|
||||||
|
|
||||||
|
|
||||||
|
@ -46,8 +46,8 @@ orteprobe_SOURCES = \
|
|||||||
orteprobe.h \
|
orteprobe.h \
|
||||||
orteprobe.c
|
orteprobe.c
|
||||||
|
|
||||||
orteprobe_LDADD = $(libs) $(LIBMPI_EXTRA_LIBS)
|
orteprobe_LDADD = $(libs)
|
||||||
orteprobe_LDFLAGS = $(LIBMPI_EXTRA_LDFLAGS)
|
orteprobe_LDFLAGS =
|
||||||
orteprobe_DEPENDENCIES = $(libs)
|
orteprobe_DEPENDENCIES = $(libs)
|
||||||
|
|
||||||
clean-local:
|
clean-local:
|
||||||
|
46
orte/tools/wrappers/Makefile.am
Обычный файл
46
orte/tools/wrappers/Makefile.am
Обычный файл
@ -0,0 +1,46 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||||
|
# University Research and Technology
|
||||||
|
# Corporation. All rights reserved.
|
||||||
|
# Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||||
|
# of Tennessee Research Foundation. 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$
|
||||||
|
#
|
||||||
|
|
||||||
|
nodist_pkgdata_DATA = \
|
||||||
|
ortecc-wrapper-data.txt \
|
||||||
|
ortec++-wrapper-data.txt
|
||||||
|
|
||||||
|
if CASE_SENSITIVE_FS
|
||||||
|
install-exec-hook:
|
||||||
|
(cd $(DESTDIR)$(bindir); rm -f ortecc$(EXEEXT); $(LN_S) opal_wrapper ortecc)
|
||||||
|
(cd $(DESTDIR)$(bindir); rm -f ortec++$(EXEEXT); $(LN_S) opal_wrapper ortec++)
|
||||||
|
(cd $(DESTDIR)$(bindir); rm -f orteCC$(EXEEXT); $(LN_S) opal_wrapper orteCC)
|
||||||
|
|
||||||
|
(cd $(DESTDIR)$(pkgdatadir); rm -f orteCC-wrapper-data.txt; $(LN_S) ortec++-wrapper-data.txt orteCC-wrapper-data.txt)
|
||||||
|
|
||||||
|
uninstall-local:
|
||||||
|
rm -f $(DESTDIR)$(bindir)/ortecc$(EXEEXT) \
|
||||||
|
$(DESTDIR)$(bindir)/ortec++$(EXEEXT) \
|
||||||
|
$(DESTDIR)$(bindir)/orteCC$(EXEEXT) \
|
||||||
|
$(DESTDIR)$(pkgdatadir)/orteCC-wrapper-data.txt
|
||||||
|
|
||||||
|
else
|
||||||
|
install-exec-hook:
|
||||||
|
(cd $(DESTDIR)$(bindir); rm -f ortecc$(EXEEXT); $(LN_S) opal_wrapper ortecc)
|
||||||
|
(cd $(DESTDIR)$(bindir); rm -f ortec++$(EXEEXT); $(LN_S) opal_wrapper ortec++)
|
||||||
|
|
||||||
|
uninstall-local:
|
||||||
|
rm -f $(DESTDIR)$(bindir)/ortecc$(EXEEXT) \
|
||||||
|
$(DESTDIR)$(bindir)/ortec++$(EXEEXT)
|
||||||
|
|
||||||
|
endif
|
13
orte/tools/wrappers/ortec++-wrapper-data.txt.in
Обычный файл
13
orte/tools/wrappers/ortec++-wrapper-data.txt.in
Обычный файл
@ -0,0 +1,13 @@
|
|||||||
|
project=Open Run-Time Environment (ORTE)
|
||||||
|
project_short=ORTE
|
||||||
|
version=@ORTE_VERSION@
|
||||||
|
language=C++
|
||||||
|
compiler_env=CXX
|
||||||
|
compiler_flags_env=CXXFLAGS
|
||||||
|
compiler=@CXX@
|
||||||
|
extra_includes=@ORTE_WRAPPER_EXTRA_INCLUDES@
|
||||||
|
preprocessor_flags=@ORTE_WRAPPER_EXTRA_CPPFLAGS@
|
||||||
|
compiler_flags=@ORTE_WRAPPER_EXTRA_CXXFLAGS@
|
||||||
|
linker_flags=@ORTE_WRAPPER_EXTRA_LDFLAGS@
|
||||||
|
libs=-lorte -lopal @ORTE_WRAPPER_EXTRA_LIBS@
|
||||||
|
required_file=
|
13
orte/tools/wrappers/ortecc-wrapper-data.txt.in
Обычный файл
13
orte/tools/wrappers/ortecc-wrapper-data.txt.in
Обычный файл
@ -0,0 +1,13 @@
|
|||||||
|
project=Open Run-Time Environment (ORTE)
|
||||||
|
project_short=ORTE
|
||||||
|
version=@ORTE_VERSION@
|
||||||
|
language=C
|
||||||
|
compiler_env=CC
|
||||||
|
compiler_flags_env=CFLAGS
|
||||||
|
compiler=@CC@
|
||||||
|
extra_includes=@ORTE_WRAPPER_EXTRA_INCLUDES@
|
||||||
|
preprocessor_flags=@ORTE_WRAPPER_EXTRA_CPPFLAGS@
|
||||||
|
compiler_flags=@ORTE_WRAPPER_EXTRA_CFLAGS@
|
||||||
|
linker_flags=@ORTE_WRAPPER_EXTRA_LDFLAGS@
|
||||||
|
libs=-lorte -lopal @ORTE_WRAPPER_EXTRA_LIBS@
|
||||||
|
required_file=
|
Загрузка…
Ссылка в новой задаче
Block a user