Upgrade macos
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
1
macx64/mpi/mpich/bin/mpic++
Symbolic link
1
macx64/mpi/mpich/bin/mpic++
Symbolic link
@@ -0,0 +1 @@
|
||||
mpicxx
|
||||
@@ -1,9 +1,9 @@
|
||||
#! /bin/bash
|
||||
#
|
||||
# (C) 2006 by Argonne National Laboratory.
|
||||
# See COPYRIGHT in top-level directory.
|
||||
#
|
||||
# mpicc
|
||||
##
|
||||
## Copyright (C) by Argonne National Laboratory
|
||||
## See COPYRIGHT in top-level directory
|
||||
##
|
||||
|
||||
# Simple script to compile and/or link MPI programs.
|
||||
# This script knows the default flags and libraries, and can handle
|
||||
# alternative C compilers and the associated flags and libraries.
|
||||
@@ -27,19 +27,18 @@
|
||||
#
|
||||
# Directory locations: Fixed for any MPI implementation.
|
||||
# Set from the directory arguments to configure (e.g., --prefix=/usr/local)
|
||||
prefix=/Users/brgirgis/Documents/code/idiscovery/cpp-thirdparty-src/mpi/mpich/install/3.3.1
|
||||
exec_prefix=/Users/brgirgis/Documents/code/idiscovery/cpp-thirdparty-src/mpi/mpich/install/3.3.1
|
||||
sysconfdir=/Users/brgirgis/Documents/code/idiscovery/cpp-thirdparty-src/mpi/mpich/install/3.3.1/etc
|
||||
includedir=/Users/brgirgis/Documents/code/idiscovery/cpp-thirdparty-src/mpi/mpich/install/3.3.1/include
|
||||
libdir=/Users/brgirgis/Documents/code/idiscovery/cpp-thirdparty-src/mpi/mpich/install/3.3.1/lib
|
||||
prefix=/Users/girgis/Documents/code/cpp-thirdparty-src/mpi/mpich/install/4.3.0
|
||||
exec_prefix=/Users/girgis/Documents/code/cpp-thirdparty-src/mpi/mpich/install/4.3.0
|
||||
sysconfdir=/Users/girgis/Documents/code/cpp-thirdparty-src/mpi/mpich/install/4.3.0/etc
|
||||
includedir=/Users/girgis/Documents/code/cpp-thirdparty-src/mpi/mpich/install/4.3.0/include
|
||||
libdir=/Users/girgis/Documents/code/cpp-thirdparty-src/mpi/mpich/install/4.3.0/lib
|
||||
|
||||
# Default settings for compiler, flags, and libraries.
|
||||
# Determined by a combination of environment variables and tests within
|
||||
# configure (e.g., determining whehter -lsocket is needee)
|
||||
# configure (e.g., determining whether -lsocket is needed)
|
||||
CC="gcc"
|
||||
MPICH_VERSION="3.3.1"
|
||||
MPICH_VERSION="4.3.0"
|
||||
|
||||
enable_wrapper_rpath="yes"
|
||||
|
||||
# How to pass a linker flag through the compiler.
|
||||
wl="-Wl,"
|
||||
@@ -60,6 +59,10 @@ library_names_spec="\$libname\$shrext"
|
||||
# This must work even if $libdir does not exist.
|
||||
hardcode_libdir_flag_spec=""
|
||||
|
||||
# Flag to add dtags to allow using runpath instead of rpath
|
||||
enable_dtags_flag=""
|
||||
disable_dtags_flag=""
|
||||
|
||||
# Whether we need a single -rpath flag with a separated argument.
|
||||
hardcode_libdir_separator=""
|
||||
|
||||
@@ -72,6 +75,18 @@ hardcode_direct="no"
|
||||
hardcode_minus_L="no"
|
||||
|
||||
|
||||
# Attempt to construct dynamic loading info, based on the user
|
||||
# preference of rpath, runpath or none and on the detected libdir
|
||||
# flags.
|
||||
with_wrapper_dl_type=runpath
|
||||
if test "X${with_wrapper_dl_type}" = "Xrunpath" ; then
|
||||
eval wrapper_dl_type_flags=\"${hardcode_libdir_flag_spec} ${enable_dtags_flag}\"
|
||||
elif test "X${with_wrapper_dl_type}" = "Xrpath" ; then
|
||||
eval wrapper_dl_type_flags=\"${hardcode_libdir_flag_spec} ${disable_dtags_flag}\"
|
||||
else
|
||||
wrapper_dl_type_flags=""
|
||||
fi
|
||||
|
||||
# Internal variables
|
||||
# Show is set to echo to cause the compilation command to be echoed instead
|
||||
# of executed.
|
||||
@@ -79,6 +94,7 @@ Show=
|
||||
#
|
||||
# End of initialization of variables
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
# Environment Variables.
|
||||
# The environment variables MPICH_CC may be used to override the
|
||||
# default choices.
|
||||
@@ -87,8 +103,8 @@ Show=
|
||||
# (e.g., "cc -64" becomes "cc--64", that file is sources, allowing other
|
||||
# changes to the compilation environment. See the variables used by the
|
||||
# script (defined above)
|
||||
# Added MPICH_CC_OLD, MPICH_CC can be used to prefix CC with external utility,
|
||||
# e.g. setenv MPICH_CC 'eval linkcache $MPICH_CC_OLD'
|
||||
# Added MPICH_CC_OLD, MPICH_CC can be used to prefix CC
|
||||
# with external utility, e.g. setenv MPICH_CC 'eval linkcache $MPICH_CC_OLD'
|
||||
if [ -n "$MPICH_CC" ] ; then
|
||||
MPICH_CC_OLD="$CC"
|
||||
CC="$MPICH_CC"
|
||||
@@ -106,7 +122,7 @@ fi
|
||||
# Argument processing.
|
||||
# This is somewhat awkward because of the handling of arguments within
|
||||
# the shell. We want to handle arguments that include spaces without
|
||||
# loosing the spacing (an alternative would be to use a more powerful
|
||||
# losing the spacing (an alternative would be to use a more powerful
|
||||
# scripting language that would allow us to retain the array of values,
|
||||
# which the basic (rather than enhanced) Bourne shell does not.
|
||||
#
|
||||
@@ -118,6 +134,9 @@ allargs=("$@")
|
||||
argno=0
|
||||
interlib_deps=yes
|
||||
static_mpi=no
|
||||
showinfo=""
|
||||
delay_libs=
|
||||
mpi_abi=no
|
||||
for arg in "$@" ; do
|
||||
# Set addarg to no if this arg should be ignored by the C compiler
|
||||
addarg=yes
|
||||
@@ -151,6 +170,16 @@ for arg in "$@" ; do
|
||||
addarg=no
|
||||
Show=echo
|
||||
;;
|
||||
-show-compile-info)
|
||||
addarg=no
|
||||
Show=echo
|
||||
show_info=compile
|
||||
;;
|
||||
-show-link-info)
|
||||
addarg=no
|
||||
Show=echo
|
||||
show_info=link
|
||||
;;
|
||||
-config=*)
|
||||
addarg=no
|
||||
CCname=`echo A$arg | sed -e 's/A-config=//g'`
|
||||
@@ -191,6 +220,14 @@ for arg in "$@" ; do
|
||||
nativelinking=yes
|
||||
addarg=no
|
||||
;;
|
||||
-lcuda|-lcudart|-lze_loader)
|
||||
delay_libs="$delay_libs $arg"
|
||||
addarg=no
|
||||
;;
|
||||
-mpi-abi|-mpi_abi)
|
||||
mpi_abi=yes
|
||||
addarg=no
|
||||
;;
|
||||
-help)
|
||||
NC=`echo "$CC" | sed 's%\/% %g' | awk '{print $NF}' -`
|
||||
if [ -f "$sysconfdir/mpixxx_opts.conf" ] ; then
|
||||
@@ -221,6 +258,16 @@ if [ $# -eq 0 ] ; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check recursive situations
|
||||
# User mistakes, e.g. setting MPICH_CC=mpicc, may end up recursively running
|
||||
# this script. A simple check to bail if that's the case.
|
||||
if [ -n "$MPICH_RECURSION_CHECK" ] ; then
|
||||
echo "This script ($0) is being called recursively, check that MPICH_CC does not refer to mpicc."
|
||||
exit 1
|
||||
fi
|
||||
MPICH_RECURSION_CHECK=1
|
||||
export MPICH_RECURSION_CHECK
|
||||
|
||||
# -----------------------------------------------------------------------
|
||||
# Derived variables. These are assembled from variables set from the
|
||||
# default, environment, configuration file (if any) and command-line
|
||||
@@ -246,17 +293,29 @@ fi
|
||||
|
||||
final_cflags=" "
|
||||
final_cppflags=" "
|
||||
final_ldflags=" -Wl,-flat_namespace"
|
||||
final_ldflags=" "
|
||||
final_libs=""
|
||||
if test "yes" = "no" -o "${interlib_deps}" = "no" ; then
|
||||
final_ldflags="${final_ldflags} -Wl,-flat_namespace"
|
||||
final_libs="${final_libs} -lm -lpthread "
|
||||
final_ldflags="${final_ldflags} -framework Foundation -framework IOKit"
|
||||
final_libs="${final_libs} -lm -lpthread -ldl"
|
||||
fi
|
||||
|
||||
if [ "${0%_abi}" != "$0" ] ; then
|
||||
mpi_abi=yes
|
||||
fi
|
||||
if [ "$mpi_abi" = no ] ; then
|
||||
mpi_libs_shared="-lmpi -lpmpi"
|
||||
mpi_libs_static="$libdir/libmpi.a -lpmpi"
|
||||
else
|
||||
final_cppflags="-DMPI_ABI ${final_cppflags}"
|
||||
mpi_libs_shared="-lmpi_abi -lpmpi_abi"
|
||||
mpi_libs_static="$libdir/libmpi_abi.a -lpmpi_abi"
|
||||
fi
|
||||
|
||||
# -----------------------------------------------------------------------
|
||||
#
|
||||
# A temporary statement to invoke the compiler
|
||||
# Place the -L before any args incase there are any mpi libraries in there.
|
||||
# Place the -L before any args in case there are any mpi libraries in there.
|
||||
# Eventually, we'll want to move this after any non-MPI implementation
|
||||
# libraries.
|
||||
# We use a single invocation of the compiler. This will be adequate until
|
||||
@@ -265,35 +324,27 @@ fi
|
||||
# accept any argument; we don't need to know if we've seen a source
|
||||
# file or an object file. Instead, we just check for an option that
|
||||
# suppressing linking, such as -c or -M.
|
||||
if [ "$linking" = yes ] ; then
|
||||
# Attempt to encode rpath info into the executable if the user has not
|
||||
# disabled rpath usage and some flavor of rpath makes sense on this
|
||||
# platform.
|
||||
# TODO configure and config.rpath are computing more sophisticated rpath
|
||||
# schemes than this simple one. Consider updating this logic accordingly.
|
||||
if test "X$enable_wrapper_rpath" = "Xyes" ; then
|
||||
eval rpath_flags=\"${hardcode_libdir_flag_spec}\"
|
||||
if [ "$show_info" = compile ] ; then
|
||||
echo ${final_cppflags} $PROFILE_INCPATHS ${final_cflags} -I$includedir
|
||||
elif [ "$show_info" = link ] ; then
|
||||
if [ "$nativelinking" = yes ] ; then
|
||||
echo ${final_ldflags}
|
||||
else
|
||||
rpath_flags=""
|
||||
if [ "$static_mpi" = no ] ; then
|
||||
echo ${final_ldflags} -L$libdir $PROFILE_PRELIB $PROFILE_FOO ${wrapper_dl_type_flags} ${mpi_libs_shared} $PROFILE_POSTLIB ${delay_libs} ${final_libs}
|
||||
else
|
||||
echo ${final_ldflags} -L$libdir $PROFILE_PRELIB $PROFILE_FOO ${wrapper_dl_type_flags} ${mpi_libs_static} $PROFILE_POSTLIB ${delay_libs} ${final_libs}
|
||||
fi
|
||||
fi
|
||||
|
||||
elif [ "$linking" = yes ] ; then
|
||||
if [ "$nativelinking" = yes ] ; then
|
||||
$Show $CC ${final_cppflags} $PROFILE_INCPATHS ${final_cflags} ${final_ldflags} "${allargs[@]}" -I$includedir
|
||||
rc=$?
|
||||
else
|
||||
if [ "$static_mpi" = no ] ; then
|
||||
$Show $CC ${final_cppflags} $PROFILE_INCPATHS ${final_cflags} ${final_ldflags} "${allargs[@]}" -I$includedir -L$libdir $PROFILE_PRELIB $PROFILE_FOO $rpath_flags -lmpi -lpmpi $PROFILE_POSTLIB ${final_libs}
|
||||
$Show $CC ${final_cppflags} $PROFILE_INCPATHS ${final_cflags} ${final_ldflags} "${allargs[@]}" -I$includedir -L$libdir $PROFILE_PRELIB $PROFILE_FOO ${wrapper_dl_type_flags} ${mpi_libs_shared} $PROFILE_POSTLIB ${delay_libs} ${final_libs}
|
||||
else
|
||||
fabric_dep=""
|
||||
if [ "" = yes ] ; then
|
||||
fabric_dep=`pkg-config --static --libs $libdir/pkgconfig/libfabric.pc`
|
||||
fabric_dep=`echo $fabric_dep | sed 's/-lfabric//'`
|
||||
elif [ -f /lib/pkgconfig/libfabric.pc ] ; then
|
||||
fabric_dep=`pkg-config --static --libs /lib/pkgconfig/libfabric.pc`
|
||||
else
|
||||
fabric_dep=`pkg-config --static --libs libfabric`
|
||||
fi
|
||||
$Show $CC ${final_cppflags} $PROFILE_INCPATHS ${final_cflags} ${final_ldflags} "${allargs[@]}" -I$includedir -L$libdir $PROFILE_PRELIB $PROFILE_FOO $rpath_flags $libdir/libmpi.a -lpmpi $PROFILE_POSTLIB ${final_libs} ${fabric_dep}
|
||||
$Show $CC ${final_cppflags} $PROFILE_INCPATHS ${final_cflags} ${final_ldflags} "${allargs[@]}" -I$includedir -L$libdir $PROFILE_PRELIB $PROFILE_FOO ${wrapper_dl_type_flags} ${mpi_libs_static} $PROFILE_POSTLIB ${delay_libs} ${final_libs}
|
||||
fi
|
||||
rc=$?
|
||||
fi
|
||||
|
||||
Binary file not shown.
373
macx64/mpi/mpich/bin/mpicxx
Executable file
373
macx64/mpi/mpich/bin/mpicxx
Executable file
@@ -0,0 +1,373 @@
|
||||
#! /bin/bash
|
||||
##
|
||||
## Copyright (C) by Argonne National Laboratory
|
||||
## See COPYRIGHT in top-level directory
|
||||
##
|
||||
|
||||
# Simple script to compile and/or link MPI programs.
|
||||
# This script knows the default flags and libraries, and can handle
|
||||
# alternative C++ compilers and the associated flags and libraries.
|
||||
# The important terms are:
|
||||
# includedir, libdir - Directories containing an *installed* mpich
|
||||
# prefix, execprefix - Often used to define includedir and libdir
|
||||
# CXX - C compiler
|
||||
# WRAPPER_CXXFLAGS - Any special flags needed to compile
|
||||
# WRAPPER_LDFLAGS - Any special flags needed to link
|
||||
# WRAPPER_LIBS - Any special libraries needed in order to link
|
||||
#
|
||||
# We assume that (a) the C++ compiler can both compile and link programs
|
||||
#
|
||||
# Handling of command-line options:
|
||||
# This is a little tricky because some options may contain blanks.
|
||||
#
|
||||
# Special issues with shared libraries - todo
|
||||
#
|
||||
# --------------------------------------------------------------------------
|
||||
# Set the default values of all variables.
|
||||
#
|
||||
# Directory locations: Fixed for any MPI implementation.
|
||||
# Set from the directory arguments to configure (e.g., --prefix=/usr/local)
|
||||
prefix=/Users/girgis/Documents/code/cpp-thirdparty-src/mpi/mpich/install/4.3.0
|
||||
exec_prefix=/Users/girgis/Documents/code/cpp-thirdparty-src/mpi/mpich/install/4.3.0
|
||||
sysconfdir=/Users/girgis/Documents/code/cpp-thirdparty-src/mpi/mpich/install/4.3.0/etc
|
||||
includedir=/Users/girgis/Documents/code/cpp-thirdparty-src/mpi/mpich/install/4.3.0/include
|
||||
libdir=/Users/girgis/Documents/code/cpp-thirdparty-src/mpi/mpich/install/4.3.0/lib
|
||||
|
||||
# Default settings for compiler, flags, and libraries.
|
||||
# Determined by a combination of environment variables and tests within
|
||||
# configure (e.g., determining whether -lsocket is needed)
|
||||
CXX="g++"
|
||||
MPICH_VERSION="4.3.0"
|
||||
|
||||
|
||||
# How to pass a linker flag through the compiler.
|
||||
wl="-Wl,"
|
||||
|
||||
# Static library suffix (normally "a").
|
||||
libext="a"
|
||||
|
||||
# Shared library suffix (normally "so").
|
||||
shlibext="dylib"
|
||||
|
||||
# Format of library name prefix.
|
||||
libname_spec="lib\$name"
|
||||
|
||||
# Library names that the linker finds when passed -lNAME.
|
||||
library_names_spec="\$libname\$shrext"
|
||||
|
||||
# Flag to hardcode $libdir into a binary during linking.
|
||||
# This must work even if $libdir does not exist.
|
||||
hardcode_libdir_flag_spec=""
|
||||
|
||||
# Flag to add dtags to allow using runpath instead of rpath
|
||||
enable_dtags_flag=""
|
||||
disable_dtags_flag=""
|
||||
|
||||
# Whether we need a single -rpath flag with a separated argument.
|
||||
hardcode_libdir_separator=""
|
||||
|
||||
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
|
||||
# resulting binary.
|
||||
hardcode_direct="no"
|
||||
|
||||
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
|
||||
# resulting binary.
|
||||
hardcode_minus_L="no"
|
||||
|
||||
|
||||
# Attempt to construct dynamic loading info, based on the user
|
||||
# preference of rpath, runpath or none and on the detected libdir
|
||||
# flags.
|
||||
with_wrapper_dl_type=runpath
|
||||
if test "X${with_wrapper_dl_type}" = "Xrunpath" ; then
|
||||
eval wrapper_dl_type_flags=\"${hardcode_libdir_flag_spec} ${enable_dtags_flag}\"
|
||||
elif test "X${with_wrapper_dl_type}" = "Xrpath" ; then
|
||||
eval wrapper_dl_type_flags=\"${hardcode_libdir_flag_spec} ${disable_dtags_flag}\"
|
||||
else
|
||||
wrapper_dl_type_flags=""
|
||||
fi
|
||||
|
||||
# Internal variables
|
||||
# Show is set to echo to cause the compilation command to be echoed instead
|
||||
# of executed.
|
||||
Show=
|
||||
#
|
||||
# End of initialization of variables
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
# Environment Variables.
|
||||
# The environment variables MPICH_CXX may be used to override the
|
||||
# default choices.
|
||||
# In addition, if there is a file $sysconfdir/mpicxx-$CXXname.conf,
|
||||
# where CXXname is the name of the compiler with all spaces replaced by hyphens
|
||||
# (e.g., "CC -64" becomes "CC--64", that file is sources, allowing other
|
||||
# changes to the compilation environment. See the variables used by the
|
||||
# script (defined above)
|
||||
# Added MPICH_CXX_OLD, MPICH_CXX can be used to prefix CXX
|
||||
# with external utility, e.g. setenv MPICH_CXX 'eval linkcache $MPICH_CXX_OLD'
|
||||
if [ -n "$MPICH_CXX" ] ; then
|
||||
MPICH_CXX_OLD="$CXX"
|
||||
CXX="$MPICH_CXX"
|
||||
CXXname=`echo $CXX | sed 's/ /-/g'`
|
||||
if [ -s $sysconfdir/mpicxx-$CXXname.conf ] ; then
|
||||
. $sysconfdir/mpicxx-$CXXname.conf
|
||||
fi
|
||||
fi
|
||||
# Allow a profiling option to be selected through an environment variable
|
||||
if [ -n "$MPICXX_PROFILE" ] ; then
|
||||
profConf=$MPICXX_PROFILE
|
||||
fi
|
||||
#
|
||||
# ------------------------------------------------------------------------
|
||||
# Argument processing.
|
||||
# This is somewhat awkward because of the handling of arguments within
|
||||
# the shell. We want to handle arguments that include spaces without
|
||||
# losing the spacing (an alternative would be to use a more powerful
|
||||
# scripting language that would allow us to retain the array of values,
|
||||
# which the basic (rather than enhanced) Bourne shell does not.
|
||||
#
|
||||
# Look through the arguments for arguments that indicate compile only.
|
||||
# If these are *not* found, add the library options
|
||||
|
||||
linking=yes
|
||||
allargs=("$@")
|
||||
argno=0
|
||||
interlib_deps=yes
|
||||
static_mpi=no
|
||||
showinfo=""
|
||||
delay_libs=
|
||||
mpi_abi=no
|
||||
for arg in "$@" ; do
|
||||
# Set addarg to no if this arg should be ignored by the C compiler
|
||||
addarg=yes
|
||||
case "$arg" in
|
||||
# ----------------------------------------------------------------
|
||||
# Compiler options that affect whether we are linking or no
|
||||
-c|-S|-E|-M|-MM)
|
||||
# The compiler links by default
|
||||
linking=no
|
||||
;;
|
||||
# ----------------------------------------------------------------
|
||||
# Options that control how we use mpicxx (e.g., -show,
|
||||
# -cxx=* -config=*
|
||||
-static)
|
||||
interlib_deps=no
|
||||
;;
|
||||
-static-mpi)
|
||||
interlib_deps=no
|
||||
static_mpi=yes
|
||||
addarg=no
|
||||
;;
|
||||
-echo)
|
||||
addarg=no
|
||||
set -x
|
||||
;;
|
||||
-cxx=*)
|
||||
CXX=`echo A$arg | sed -e 's/A-cxx=//g'`
|
||||
addarg=no
|
||||
;;
|
||||
# Backwards compatibility for MPICH1 - scripts
|
||||
-CC=*)
|
||||
CXX=`echo A$arg | sed -e 's/A-CC=//g'`
|
||||
addarg=no
|
||||
;;
|
||||
-show)
|
||||
addarg=no
|
||||
Show=echo
|
||||
;;
|
||||
-show-compile-info)
|
||||
addarg=no
|
||||
Show=echo
|
||||
show_info=compile
|
||||
;;
|
||||
-show-link-info)
|
||||
addarg=no
|
||||
Show=echo
|
||||
show_info=link
|
||||
;;
|
||||
-config=*)
|
||||
addarg=no
|
||||
CXXname=`echo A$arg | sed -e 's/A-config=//g'`
|
||||
if [ -s "$sysconfdir/mpicxx-$CXXname.conf" ] ; then
|
||||
. "$sysconfdir/mpicxx-$CXXname.conf"
|
||||
else
|
||||
echo "Configuration file mpicxx-$CXXname.conf not found"
|
||||
fi
|
||||
;;
|
||||
-compile-info|-compile_info)
|
||||
# -compile_info included for backward compatibility
|
||||
Show=echo
|
||||
addarg=no
|
||||
;;
|
||||
-link-info|-link_info)
|
||||
# -link_info included for backward compatibility
|
||||
Show=echo
|
||||
addarg=no
|
||||
;;
|
||||
-v)
|
||||
# Pass this argument to the compiler as well.
|
||||
echo "mpicxx for MPICH version $MPICH_VERSION"
|
||||
# if there is only 1 argument, it must be -v.
|
||||
if [ "$#" -eq "1" ] ; then
|
||||
linking=no
|
||||
fi
|
||||
;;
|
||||
-profile=*)
|
||||
# Pass the name of a profiling configuration. As
|
||||
# a special case, lib<name>.so or lib<name>.la may be used
|
||||
# if the library is in $libdir
|
||||
profConf=`echo A$arg | sed -e 's/A-profile=//g'`
|
||||
addarg=no
|
||||
# Loading the profConf file is handled below
|
||||
;;
|
||||
-nativelinking)
|
||||
# Internal option to use native compiler for linking without MPI libraries
|
||||
nativelinking=yes
|
||||
addarg=no
|
||||
;;
|
||||
-lcuda|-lcudart|-lze_loader)
|
||||
delay_libs="$delay_libs $arg"
|
||||
addarg=no
|
||||
;;
|
||||
-mpi-abi|-mpi_abi)
|
||||
mpi_abi=yes
|
||||
addarg=no
|
||||
;;
|
||||
-help)
|
||||
NC=`echo "$CXX" | sed 's%\/% %g' | awk '{print $NF}' -`
|
||||
if [ -f "$sysconfdir/mpixxx_opts.conf" ] ; then
|
||||
. $sysconfdir/mpixxx_opts.conf
|
||||
echo " -cxx=xxx - Reset the native compiler to xxx."
|
||||
else
|
||||
if [ -f "./mpixxx_opts.conf" ] ; then
|
||||
. ./mpixxx_opts.conf
|
||||
echo " -cxx=xxx - Reset the native compiler to xxx."
|
||||
fi
|
||||
fi
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
|
||||
esac
|
||||
if [ $addarg = no ] ; then
|
||||
unset allargs[$argno]
|
||||
fi
|
||||
# Some versions of bash do not accept ((argno++))
|
||||
argno=`expr $argno + 1`
|
||||
done
|
||||
|
||||
if [ $# -eq 0 ] ; then
|
||||
echo "Error: Command line argument is needed!"
|
||||
"$0" -help
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check recursive situations
|
||||
# User mistakes, e.g. setting MPICH_CXX=mpicxx, may end up recursively running
|
||||
# this script. A simple check to bail if that's the case.
|
||||
if [ -n "$MPICH_RECURSION_CHECK" ] ; then
|
||||
echo "This script ($0) is being called recursively, check that MPICH_CXX does not refer to mpicxx."
|
||||
exit 1
|
||||
fi
|
||||
MPICH_RECURSION_CHECK=1
|
||||
export MPICH_RECURSION_CHECK
|
||||
|
||||
# -----------------------------------------------------------------------
|
||||
# Derived variables. These are assembled from variables set from the
|
||||
# default, environment, configuration file (if any) and command-line
|
||||
# options (if any)
|
||||
|
||||
PROFILE_FOO=
|
||||
# Handle the case of a profile switch
|
||||
if [ -n "$profConf" ] ; then
|
||||
profConffile=
|
||||
if [ -s "$libdir/lib$profConf.a" -o -s "$libdir/lib$profConf.so" ] ; then
|
||||
PROFILE_FOO="-l$profConf"
|
||||
elif [ -s "$sysconfdir/$profConf.conf" ] ; then
|
||||
profConffile="$sysconfdir/$profConf.conf"
|
||||
elif [ -s "$profConf.conf" ] ; then
|
||||
profConffile="$profConf.conf"
|
||||
else
|
||||
echo "Profiling configuration file $profConf.conf not found in $sysconfdir"
|
||||
fi
|
||||
if [ -n "$profConffile" -a -s "$profConffile" ] ; then
|
||||
. $profConffile
|
||||
fi
|
||||
fi
|
||||
|
||||
final_cxxflags=" "
|
||||
final_cppflags=" "
|
||||
final_ldflags=" "
|
||||
final_libs=""
|
||||
if test "yes" = "no" -o "${interlib_deps}" = "no" ; then
|
||||
final_ldflags="${final_ldflags} -framework Foundation -framework IOKit"
|
||||
final_libs="${final_libs} -lm -lpthread -ldl"
|
||||
fi
|
||||
|
||||
if [ "${0%_abi}" != "$0" ] ; then
|
||||
mpi_abi=yes
|
||||
fi
|
||||
if [ "$mpi_abi" = no ] ; then
|
||||
mpi_libs_shared="-lmpi -lpmpi"
|
||||
mpi_libs_static="$libdir/libmpi.a -lpmpi"
|
||||
else
|
||||
final_cppflags="-DMPI_ABI ${final_cppflags}"
|
||||
mpi_libs_shared="-lmpi_abi -lpmpi_abi"
|
||||
mpi_libs_static="$libdir/libmpi_abi.a -lpmpi_abi"
|
||||
fi
|
||||
|
||||
cxxlibs=
|
||||
if [ "$mpi_abi" = no ] ; then
|
||||
if [ "mpi" != "mpi" ] ; then
|
||||
cxxlibs="-lmpi"
|
||||
fi
|
||||
else
|
||||
true # TODO: Implement support for libmpicxx_abi
|
||||
# if [ "@MPICXXABILIBNAME@" != "mpi_abi" ] ; then
|
||||
# cxxlibs="-l@MPICXXABILIBNAME@"
|
||||
# fi
|
||||
fi
|
||||
|
||||
# -----------------------------------------------------------------------
|
||||
#
|
||||
# A temporary statement to invoke the compiler
|
||||
# Place the -L before any args in case there are any mpi libraries in there.
|
||||
# Eventually, we'll want to move this after any non-MPI implementation
|
||||
# libraries.
|
||||
# We use a single invocation of the compiler. This will be adequate until
|
||||
# we run into a system that uses a separate linking command. With any luck,
|
||||
# such archaic systems are no longer with us. This also lets us
|
||||
# accept any argument; we don't need to know if we've seen a source
|
||||
# file or an object file. Instead, we just check for an option that
|
||||
# suppressing linking, such as -c or -M.
|
||||
if [ "$show_info" = compile ] ; then
|
||||
echo ${final_cppflags} $PROFILE_INCPATHS ${final_cxxflags} -I$includedir
|
||||
elif [ "$show_info" = link ] ; then
|
||||
if [ "$nativelinking" = yes ] ; then
|
||||
echo ${final_ldflags}
|
||||
else
|
||||
if [ "$static_mpi" = no ] ; then
|
||||
echo ${final_ldflags} -L$libdir $cxxlibs $PROFILE_PRELIB $PROFILE_FOO ${wrapper_dl_type_flags} ${mpi_libs_shared} $PROFILE_POSTLIB ${delay_libs} ${final_libs}
|
||||
else
|
||||
echo ${final_ldflags} -L$libdir $cxxlibs $PROFILE_PRELIB $PROFILE_FOO ${wrapper_dl_type_flags} ${mpi_libs_static} $PROFILE_POSTLIB ${delay_libs} ${final_libs}
|
||||
fi
|
||||
fi
|
||||
elif [ "$linking" = yes ] ; then
|
||||
if [ "$nativelinking" = yes ] ; then
|
||||
$Show $CXX ${final_cppflags} $PROFILE_INCPATHS ${final_cxxflags} ${final_ldflags} "${allargs[@]}" -I$includedir
|
||||
rc=$?
|
||||
else
|
||||
if [ "$static_mpi" = no ] ; then
|
||||
$Show $CXX ${final_cppflags} $PROFILE_INCPATHS ${final_cxxflags} ${final_ldflags} "${allargs[@]}" -I$includedir -L$libdir $cxxlibs $PROFILE_PRELIB $PROFILE_FOO ${wrapper_dl_type_flags} ${mpi_libs_shared} $PROFILE_POSTLIB ${delay_libs} ${final_libs}
|
||||
else
|
||||
$Show $CXX ${final_cppflags} $PROFILE_INCPATHS ${final_cxxflags} ${final_ldflags} "${allargs[@]}" -I$includedir -L$libdir $cxxlibs $PROFILE_PRELIB $PROFILE_FOO ${wrapper_dl_type_flags} ${mpi_libs_static} $PROFILE_POSTLIB ${delay_libs} ${final_libs}
|
||||
fi
|
||||
rc=$?
|
||||
fi
|
||||
else
|
||||
$Show $CXX ${final_cppflags} $PROFILE_INCPATHS ${final_cxxflags} "${allargs[@]}" -I$includedir
|
||||
rc=$?
|
||||
fi
|
||||
|
||||
exit $rc
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,6 +1,9 @@
|
||||
#! /usr/bin/perl
|
||||
# -*- Mode: perl; -*-
|
||||
#
|
||||
##
|
||||
## Copyright (C) by Argonne National Laboratory
|
||||
## See COPYRIGHT in top-level directory
|
||||
##
|
||||
|
||||
# Kill all processes running a specified command
|
||||
#
|
||||
# Many systems also have the "killall" command; this should be used instead
|
||||
@@ -93,7 +96,7 @@ while (<FD>) {
|
||||
my $procfile = "/proc/$pid/cmdline";
|
||||
print "Looking for $procfile\n" if $debug;
|
||||
# We *CANNOT USE* -s with a file in /proc because -s filename returns
|
||||
# false alwyas ! (BUG BUG BUG). Instead, we try to open and read from it
|
||||
# false always ! (BUG BUG BUG). Instead, we try to open and read from it
|
||||
$rc = open PFD, "<$procfile";
|
||||
if ($rc) {
|
||||
my $cmdline = <PFD>;
|
||||
|
||||
Reference in New Issue
Block a user