Commit 22a73c5a authored by cyrush's avatar cyrush

merge build_visit adios changes from 2.7RC

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@23426 18c085ea-50e0-402c-830e-de6fd14e8384
parent 4058ecda
......@@ -40,6 +40,11 @@ function bv_adios_depends_on
{
if [[ "$USE_SYSTEM_ADIOS" == "yes" ]]; then
echo ""
return 0;
fi
if [[ "$DO_MPICH" == "yes" ]] ; then
echo "mxml mpich"
else
echo "mxml"
fi
......@@ -134,6 +139,122 @@ function bv_adios_dry_run
#
# ***************************************************************************
function apply_ADIOS_1_6_0_patch
{
# fix for osx -- malloc.h doesn't exist (examples/C/schema includes this file)
info "Patching ADIOS"
patch -p0 << \EOF
diff -rcN adios-1.6.0-orig/examples/C/schema/rectilinear2d.c adios-1.6.0/examples/C/schema/rectilinear2d.c
*** adios-1.6.0-orig/examples/C/schema/rectilinear2d.c 2013-12-05 08:15:37.000000000 -0800
--- adios-1.6.0/examples/C/schema/rectilinear2d.c 2014-06-02 15:27:23.000000000 -0700
***************
*** 10,16 ****
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
! #include <malloc.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
--- 10,18 ----
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
! #if !defined(__APPLE__)
! #include <malloc.h>
! #endif
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
diff -rcN adios-1.6.0-orig/examples/C/schema/structured2d.c adios-1.6.0/examples/C/schema/structured2d.c
*** adios-1.6.0-orig/examples/C/schema/structured2d.c 2013-12-05 08:15:37.000000000 -0800
--- adios-1.6.0/examples/C/schema/structured2d.c 2014-06-02 15:27:23.000000000 -0700
***************
*** 10,16 ****
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
! #include <malloc.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
--- 10,18 ----
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
! #if !defined(__APPLE__)
! #include <malloc.h>
! #endif
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
diff -rcN adios-1.6.0-orig/examples/C/schema/tri2d.c adios-1.6.0/examples/C/schema/tri2d.c
*** adios-1.6.0-orig/examples/C/schema/tri2d.c 2013-12-05 08:15:37.000000000 -0800
--- adios-1.6.0/examples/C/schema/tri2d.c 2014-06-02 15:27:23.000000000 -0700
***************
*** 10,16 ****
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
! #include <malloc.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
--- 10,18 ----
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
! #if !defined(__APPLE__)
! #include <malloc.h>
! #endif
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
diff -rcN adios-1.6.0-orig/examples/C/schema/uniform2d.c adios-1.6.0/examples/C/schema/uniform2d.c
*** adios-1.6.0-orig/examples/C/schema/uniform2d.c 2013-12-05 08:15:37.000000000 -0800
--- adios-1.6.0/examples/C/schema/uniform2d.c 2014-06-02 15:27:23.000000000 -0700
***************
*** 10,16 ****
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
! #include <malloc.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
--- 10,18 ----
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
! #if !defined(__APPLE__)
! #include <malloc.h>
! #endif
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
EOF
if [[ $? != 0 ]] ; then
warn "ADIOS patch failed."
return 1
fi
return 0;
}
function apply_ADIOS_patch
{
if [[ ${ADIOS_VERSION} == 1.6.0 ]] ; then
apply_ADIOS_1_6_0_patch
if [[ $? != 0 ]] ; then
return 1
fi
fi
return 0
}
function build_ADIOS
{
#
......@@ -145,27 +266,48 @@ function build_ADIOS
warn "Unable to prepare ADIOS Build Directory. Giving Up"
return 1
fi
apply_ADIOS_patch
if [[ $? != 0 ]] ; then
if [[ $untarred_ADIOS == 1 ]] ; then
warn "Giving up on ADIOS build because the patch failed."
return 1
else
warn "Patch failed, but continuing. I believe that this script\n" \
"tried to apply a patch to an existing directory which had " \
"already been patched ... that is, that the patch is " \
"failing harmlessly on a second application."
fi
fi
#
info "Configuring ADIOS . . ."
cd $ADIOS_BUILD_DIR || error "Can't cd to ADIOS build dir."
info "Invoking command to configure ADIOS"
if [[ "$VISIT_MPI_COMPILER" != "" ]] ; then
./configure ${OPTIONAL} CXX="$CXX_COMPILER" \
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 \
--with-mxml="$VISITDIR/mxml/$MXML_VERSION/$VISITARCH" \
--prefix="$VISITDIR/ADIOS/$ADIOS_VERSION/$VISITARCH"
ADIOS_MPI_OPTS="MPICC=\"$VISIT_MPI_COMPILER\" MPICXX=\"$VISIT_MPI_COMPILER_CXX\""
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 \
--with-mxml="$VISITDIR/mxml/$MXML_VERSION/$VISITARCH" \
--prefix="$VISITDIR/ADIOS/$ADIOS_VERSION/$VISITARCH"
ADIOS_MPI_OPTS="--without-mpi"
fi
info ./configure ${OPTIONAL} CXX="$CXX_COMPILER" \
CC="$C_COMPILER" CFLAGS=\"$CFLAGS $C_OPT_FLAGS\" \
CXXFLAGS=\"$CXXFLAGS $CXX_OPT_FLAGS\" \
$ADIOS_MPI_OPTS \
--disable-fortran \
--without-netcdf --without-nc4par --without-hdf5 --without-phdf5 \
--with-mxml="$VISITDIR/mxml/$MXML_VERSION/$VISITARCH" \
--prefix="$VISITDIR/ADIOS/$ADIOS_VERSION/$VISITARCH"
sh -c "./configure ${OPTIONAL} CXX=\"$CXX_COMPILER\" CC=\"$C_COMPILER\" \
CFLAGS=\"$CFLAGS $C_OPT_FLAGS\" CXXFLAGS=\"$CXXFLAGS $CXX_OPT_FLAGS\" \
$ADIOS_MPI_OPTS \
--disable-fortran \
--without-netcdf --without-nc4par --without-hdf5 --without-phdf5 \
--with-mxml=\"$VISITDIR/mxml/$MXML_VERSION/$VISITARCH\" \
--prefix=\"$VISITDIR/ADIOS/$ADIOS_VERSION/$VISITARCH\""
if [[ $? != 0 ]] ; then
warn "ADIOS configure failed. Giving up"
......
......@@ -963,10 +963,15 @@ function check_parallel
# Check if PAR_COMPILER is set & if so use that.
#
export VISIT_MPI_COMPILER=""
export VISIT_MPI_COMPILER_CXX=""
if [[ "$PAR_COMPILER" != "" ]] ; then
export VISIT_MPI_COMPILER=$PAR_COMPILER
export VISIT_MPI_COMPILER="$PAR_COMPILER"
info \
"Configuring with mpi compiler wrapper: $VISIT_MPI_COMPILER"
if [[ "$PAR_COMPILER_CXX" != "" ]] ; then
export VISIT_MPI_COMPILER_CXX="$PAR_COMPILER_CXX"
"Configuring with mpi c++ compiler wrapper: $VISIT_MPI_COMPILER_CXX"
fi
return 0
fi
......@@ -978,10 +983,14 @@ function check_parallel
if [[ "$DO_MPICH" == "yes" && "$PAR_INCLUDE" == "" && "$PAR_LIBS" == "" && "$MPIWRAPPER" == "" ]] ; then
export MPICH_COMPILER="${VISITDIR}/mpich/$MPICH_VERSION/${VISITARCH}/bin/mpicc"
export MPICH_COMPILER_CXX="${VISITDIR}/mpich/$MPICH_VERSION/${VISITARCH}/bin/mpic++"
export VISIT_MPI_COMPILER="$MPICH_COMPILER"
export VISIT_MPI_COMPILER_CXX="$MPICH_COMPILER_CXX"
export PAR_COMPILER="$MPICH_COMPILER"
info \
"Configuring with build mpich: $MPICH_COMPILER"
export PAR_COMPILER_CXX="$MPICH_COMPILER_CXX"
info "Configuring parallel with mpich build: "
info " PAR_COMPILER: $MPICH_COMPILER "
info " PAR_COMPILER_CXX: $MPICH_COMPILER_CXX"
return 0
fi
......
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