Commit ec774f24 authored by allens's avatar allens

added force flag for explicitly requesting a library, if mpich is requested...

added force flag for explicitly requesting a library, if mpich is requested parallel is set, and if optional libs (Uintah/Adios) are requested but parallel is not set they will not be built.

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@23385 18c085ea-50e0-402c-830e-de6fd14e8384
parent 14096e3a
function bv_adios_initialize
{
export DO_ADIOS="no"
export ON_ADIOS="off"
export FORCE_ADIOS="no"
export DO_ADIOS="no"
export ON_ADIOS="off"
export USE_SYSTEM_ADIOS="no"
add_extra_commandline_args "adios" "alt-adios-dir" 1 "Use alternative directory for adios"
}
function bv_adios_enable
{
DO_ADIOS="yes"
ON_ADIOS="on"
#TODO: temporary until I get dependencies working
DO_MXML="yes"
ON_MXML="on"
if [[ "$1" == "force" ]]; then
FORCE_ADIOS="yes"
fi
DO_ADIOS="yes"
ON_ADIOS="on"
}
function bv_adios_disable
{
DO_ADIOS="no"
ON_ADIOS="off"
DO_ADIOS="no"
ON_ADIOS="off"
}
function bv_adios_alt_adios_dir
{
echo "Using alternate Adios directory"
# Check to make sure the directory or a particular include file exists.
# [ ! -e "$1" ] && error "Adios not found in $1"
bv_adios_enable
USE_SYSTEM_ADIOS="yes"
ADIOS_INSTALL_DIR="$1"
}
function bv_adios_depends_on
{
echo "mxml"
if [[ "$USE_SYSTEM_ADIOS" == "yes" ]]; then
echo ""
else
echo "mxml"
fi
}
function bv_adios_initialize_vars
{
if [[ "$FORCE_ADIOS" == "no" && "$parallel" == "no" ]]; then
bv_adios_disable
warn "Adios requested by default but the parallel flag has not been set. Adios will not be built."
return
fi
if [[ "$USE_SYSTEM_ADIOS" == "no" ]]; then
ADIOS_INSTALL_DIR="${VISITDIR}/adios/$ADIOS_VERSION/$VISITARCH"
fi
}
function bv_adios_info
......@@ -63,16 +97,21 @@ function bv_adios_host_profile
echo "## (configured w/ mpi compiler wrapper)" >> $HOSTCONF
fi
echo "##" >> $HOSTCONF
echo \
"VISIT_OPTION_DEFAULT(VISIT_ADIOS_DIR \${VISITHOME}/ADIOS/$ADIOS_VERSION/\${VISITARCH})" \
>> $HOSTCONF
if [[ "$USE_SYSTEM_ADIOS" == "yes" ]]; then
echo "VISIT_OPTION_DEFAULT(VISIT_ADIOS_DIR $ADIOS_INSTALL_DIR)" >> $HOSTCONF
else
echo \
"VISIT_OPTION_DEFAULT(VISIT_ADIOS_DIR \${VISITHOME}/adios/$ADIOS_VERSION/\${VISITARCH})" \
>> $HOSTCONF
fi
fi
}
function bv_adios_ensure
{
if [[ "$DO_ADIOS" == "yes" ]] ; then
ensure_built_or_ready "ADIOS" $ADIOS_VERSION $ADIOS_BUILD_DIR $ADIOS_FILE
if [[ "$DO_ADIOS" == "yes" && "$USE_SYSTEM_ADIOS" == "no" ]] ; then
ensure_built_or_ready "adios" $ADIOS_VERSION $ADIOS_BUILD_DIR $ADIOS_FILE
if [[ $? != 0 ]] ; then
ANY_ERRORS="yes"
DO_ADIOS="no"
......@@ -116,14 +155,14 @@ function build_ADIOS
CC="$C_COMPILER" CFLAGS="$CFLAGS $C_OPT_FLAGS" CXXFLAGS="$CXXFLAGS $CXX_OPT_FLAGS" \
MPICC="$VISIT_MPI_COMPILER" \
--disable-fortran \
--without-netcdf --without-nc4par --without-hdf5 --without-phdf5 \
--without-netcdf --without-nc4par --without-hdf5 --without-phdf5 \
--with-mxml="$VISITDIR/mxml/$MXML_VERSION/$VISITARCH" \
--prefix="$VISITDIR/ADIOS/$ADIOS_VERSION/$VISITARCH"
else
./configure ${OPTIONAL} CXX="$CXX_COMPILER" \
CC="$C_COMPILER" CFLAGS="$CFLAGS $C_OPT_FLAGS" CXXFLAGS="$CXXFLAGS $CXX_OPT_FLAGS" \
--without-mpi --disable-fortran\
--without-netcdf --without-nc4par --without-hdf5 --without-phdf5 \
--without-netcdf --without-nc4par --without-hdf5 --without-phdf5 \
--with-mxml="$VISITDIR/mxml/$MXML_VERSION/$VISITARCH" \
--prefix="$VISITDIR/ADIOS/$ADIOS_VERSION/$VISITARCH"
fi
......@@ -170,6 +209,10 @@ function bv_adios_is_enabled
function bv_adios_is_installed
{
if [[ "$USE_SYSTEM_ADIOS" == "yes" ]]; then
return 1
fi
check_if_installed "ADIOS" $ADIOS_VERSION
if [[ $? == 0 ]] ; then
return 1
......@@ -180,22 +223,12 @@ function bv_adios_is_installed
function bv_adios_build
{
cd "$START_DIR"
if [[ "$DO_ADIOS" == "yes" ]] ; then
if [[ "$DO_ADIOS" == "yes" && "$USE_SYSTEM_ADIOS" == "no" ]] ; then
check_if_installed "ADIOS" $ADIOS_VERSION
if [[ $? == 0 ]] ; then
info "Skipping ADIOS build. ADIOS is already installed."
else
check_if_installed "mxml" $MXML_VERSION
if [[ $? == 0 ]] ; then
info "Skipping build of MXML"
else
build_mxml
if [[ $? != 0 ]] ; then
error "Unable to build or install mxml. Bailing out."
fi
info "Done building mxml"
fi
info "Building ADIOS (~1 minutes)"
build_ADIOS
if [[ $? != 0 ]] ; then
......@@ -205,4 +238,3 @@ if [[ "$DO_ADIOS" == "yes" ]] ; then
fi
fi
}
......@@ -349,7 +349,6 @@ if [[ "$VISIT_FILE" != "" ]] ; then
fi
export VISIT_FILE=${VISIT_FILE:-"visit${VISIT_VERSION}.tar.gz"}
for (( bv_i=0; bv_i<${#reqlibs[*]}; ++bv_i ))
do
initializeFunc="bv_${reqlibs[$bv_i]}_info"
......@@ -836,7 +835,8 @@ for arg in "${arguments[@]}" ; do
if [[ $? == 0 ]] ; then
#echo "enabling ${resolve_arg}"
initializeFunc="bv_${resolve_arg}_enable"
$initializeFunc
#argument is being explicitly set by the user so add a "force" flag
$initializeFunc force
continue
elif [[ ${#resolve_arg} -gt 3 ]] ; then #in case it is --no-
resolve_arg_no_opt=${resolve_arg:3}
......@@ -1305,35 +1305,6 @@ if [[ $? != 0 ]] ; then
error "Stopping build because of bad variable option setting error."
fi
#
# See if the user wants to build a parallel version.
#
check_parallel
if [[ $? != 0 ]] ; then
error "Stopping build because necessary parallel options are not set."
fi
#
# See if the user wants to modify variables
#
check_variables
if [[ $? != 0 ]] ; then
error "Stopping build because of bad variable option setting error."
fi
if [[ $VISITARCH == "" ]] ; then
export VISITARCH=${ARCH}_${C_COMPILER}
if [[ "$CXX_COMPILER" == "g++" ]] ; then
VERSION=$(g++ -v 2>&1 | grep "gcc version" | cut -d' ' -f3 | cut -d'.' -f1-2)
if [[ ${#VERSION} == 3 ]] ; then
VISITARCH=${VISITARCH}-${VERSION}
fi
fi
fi
if [[ "$DO_ICET" == "yes" && "$PREVENT_ICET" != "yes" ]] ; then
DO_CMAKE="yes"
fi
#
# Log build_visit invocation w/ arguments & the start time.
# Especially helpful if there are multiple starts dumped into the
......@@ -1426,9 +1397,37 @@ if [[ "$DOWNLOAD_ONLY" == "no" ]] ; then
error "Unable to access the third party location. Bailing out."
fi
fi
if [[ $VISITARCH == "" ]] ; then
export VISITARCH=${ARCH}_${C_COMPILER}
if [[ "$CXX_COMPILER" == "g++" ]] ; then
VERSION=$(g++ -v 2>&1 | grep "gcc version" | cut -d' ' -f3 | cut -d'.' -f1-2)
if [[ ${#VERSION} == 3 ]] ; then
VISITARCH=${VISITARCH}-${VERSION}
fi
fi
fi
export VISITDIR=${VISITDIR:-$(pwd)}
cd "$START_DIR"
#
# See if the user wants to build a parallel version.
#
check_parallel
if [[ $? != 0 ]] ; then
error "Stopping build because necessary parallel options are not set."
fi
check_variables
if [[ $? != 0 ]] ; then
error "Stopping build because of bad variable option setting error."
fi
if [[ "$DO_ICET" == "yes" && "$PREVENT_ICET" != "yes" ]] ; then
DO_CMAKE="yes"
fi
#initialize module variables, since all of VisIt's variables should be set by now..
initialize_module_variables
#
......@@ -1504,4 +1503,3 @@ fi
#build visit itself..
bv_visit_build
}
function bv_uintah_initialize
{
export FORCE_UINTAH="no"
export DO_UINTAH="no"
export ON_UINTAH="off"
export USE_SYSTEM_UINTAH="no"
......@@ -8,18 +9,27 @@ add_extra_commandline_args "uintah" "alt-uintah-dir" 1 "Use alternative director
function bv_uintah_enable
{
DO_UINTAH="yes"
ON_UINTAH="on"
if [[ "$1" == "force" ]]; then
FORCE_UINTAH="yes"
fi
DO_UINTAH="yes"
ON_UINTAH="on"
}
function bv_uintah_disable
{
DO_UINTAH="no"
ON_UINTAH="off"
DO_UINTAH="no"
ON_UINTAH="off"
}
function bv_uintah_alt_uintah_dir
{
echo "Using alternate Uintah directory"
# Check to make sure the directory or a particular include file exists.
[ ! -e "$1/../src/StandAlone/tools/uda2vis/udaData.h" ] && error "Uintah not found in $1"
bv_uintah_enable
USE_SYSTEM_UINTAH="yes"
UINTAH_INSTALL_DIR="$1"
......@@ -29,11 +39,19 @@ function bv_uintah_depends_on
{
if [[ "$USE_SYSTEM_UINTAH" == "yes" ]]; then
echo ""
else
echo ""
fi
}
function bv_uintah_initialize_vars
{
if [[ "$FORCE_UINTAH" == "no" && "$parallel" == "no" ]]; then
bv_uintah_disable
warn "Uintah requested by default but the parallel flag has not been set. Uintah will not be built."
return
fi
if [[ "$USE_SYSTEM_UINTAH" == "no" ]]; then
UINTAH_INSTALL_DIR="${VISITDIR}/uintah/$UINTAH_VERSION/$VISITARCH"
fi
......@@ -63,6 +81,7 @@ function bv_uintah_print
function bv_uintah_print_usage
{
printf "%-15s %s [%s]\n" "--uintah" "Build UINTAH" "${DO_UINTAH}"
printf "%-15s %s [%s]\n" "--alt-uintah-dir" "Use Uintah" "Use Uintah from alternative directory"
}
function bv_uintah_graphical
......@@ -81,7 +100,7 @@ function bv_uintah_host_profile
if [[ "$USE_SYSTEM_UINTAH" == "yes" ]]; then
echo "VISIT_OPTION_DEFAULT(VISIT_UINTAH_DIR $UINTAH_INSTALL_DIR)" >> $HOSTCONF
echo "SET(VISIT_USE_SYSTEM_UINTAH TRUE)" >> $HOSTCONF
echo "SET(VISIT_USE_SYSTEM_UINTAH TRUE)" >> $HOSTCONF
else
echo \
"VISIT_OPTION_DEFAULT(VISIT_UINTAH_DIR \${VISITHOME}/uintah/$UINTAH_VERSION/\${VISITARCH})" \
......@@ -307,7 +326,6 @@ function bv_uintah_is_enabled
function bv_uintah_is_installed
{
if [[ "$USE_SYSTEM_UINTAH" == "yes" ]]; then
return 1
fi
......
......@@ -948,6 +948,10 @@ function check_parallel
{
rv=0
if [[ "$DO_MPICH" == "yes" && "$parallel" == "no" ]] ; then
parallel="yes"
fi
#
# Parallelization
#
......@@ -986,7 +990,7 @@ function check_parallel
#
# VisIt's cmake build can obtain all necessary MPI flags from
# a MPI compiler wrapper. If we have found one & the user
# did not set PAR_LIBS or PAR_INCLUDE we are done.
# did not set PAR_LIBS or PAR_INCLUDE we are done.
#
if [[ "$PAR_INCLUDE" == "" && "$PAR_LIBS" == "" && "$MPIWRAPPER" != "" ]] ; then
export VISIT_MPI_COMPILER=$MPIWRAPPER
......@@ -996,6 +1000,21 @@ function check_parallel
return 0
fi
#
# VisIt's build_visit can obtain all necessary MPI flags from
# bv_mpich. If we are building mpich and the user
# did not set PAR_LIBS or PAR_INCLUDE we are done.
#
if [[ "$DO_MPICH" == "yes" && "$PAR_INCLUDE" == "" && "$PAR_LIBS" == "" && "$MPIWRAPPER" == "" ]] ; then
export MPICH_COMPILER="${VISITDIR}/mpich/$MPICH_VERSION/${VISITARCH}/bin/mpicc"
export VISIT_MPI_COMPILER="$MPICH_COMPILER"
export PAR_COMPILER="$MPICH_COMPILER"
info \
"Configuring with build mpich: $MPICH_COMPILER"
return 0
fi
#
# If we have not found a MPI compiler wrapper.
# Keep trying to discover mpi setttings.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment