Updates will be applied - 12:30pm EDT (UTC -400). Site will be down for around 30

Commit 894299cd authored by cyrush's avatar cyrush

merge mfem 3.0 upgrade changes from the 2.9 RC to the trunk

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@25524 18c085ea-50e0-402c-830e-de6fd14e8384
parent c917a046
......@@ -74,6 +74,9 @@
#include <JSONRoot.h>
using std::string;
using std::ostringstream;
using std::vector;
using namespace mfem;
// ****************************************************************************
// Method: avtMFEMFileFormat constructor
......
......@@ -52,6 +52,7 @@
class JSONRoot;
// ****************************************************************************
// Class: avtMFEMFileFormat
//
......@@ -103,7 +104,7 @@ class avtMFEMFileFormat : public avtSTMDFileFormat
private:
int selectedLOD;
Mesh *FetchMesh(const std::string &mesh_name,
mfem::Mesh *FetchMesh(const std::string &mesh_name,
int chunk);
vtkDataSet *GetRefinedMesh(const std::string &mesh_name,
......
......@@ -25,12 +25,10 @@ function bv_mfem_depends_on
function bv_mfem_info
{
export MFEM_VERSION=${MFEM_VERSION:-"68e941f8fe"}
export MFEM_VERSION=${MFEM_VERSION:-"3.0"}
export MFEM_FILE=${MFEM_FILE:-"mfem-${MFEM_VERSION}.tgz"}
export MFEM_BUILD_DIR=${MFEM_BUILD_DIR:-"mfem-${MFEM_VERSION}"}
export MFEM_URL=${MFEM_URL:-"https://mfem.googlecode.com/files/mfem-${MFEM_VERSION}.tgz"}
export MFEM_MD5_CHECKSUM="673ec6b60626673767722562aa940eb3"
export MFEM_SHA256_CHECKSUM="ab24aa878344dfe34b3bbf7cd062f63967b99739426bbc870bc11b4bed16919f"
}
function bv_mfem_print
......@@ -83,87 +81,9 @@ function bv_mfem_dry_run
fi
}
function apply_mfem_patch
{
#
# mfem ignores CXX, CXX , CFLAGS, etc, so we have to patch them into
# their main makefiles (GNUMakefile & makefile)
#
info "Patching mfem"
patch -p0 << \EOF
*** GNUmakefile.orig Mon Jul 14 14:43:58 2014
--- GNUmakefile Mon Jul 14 15:00:57 2014
***************
*** 10,19 ****
# Software Foundation) version 2.1 dated February 1999.
# Serial compiler
! CC = g++
! CCOPTS =
! DEBUG_OPTS = -g -DMFEM_DEBUG
! OPTIM_OPTS = -O3
DEPCC = $(CC)
# Parallel compiler
--- 10,19 ----
# Software Foundation) version 2.1 dated February 1999.
# Serial compiler
! CC = ${CXX}
! CCOPTS = ${CXXFLAGS}
! DEBUG_OPTS = ${CXXFLAGS} -g -DMFEM_DEBUG
! OPTIM_OPTS = ${CXXFLAGS}
DEPCC = $(CC)
# Parallel compiler
EOF
if [[ $? != 0 ]] ; then
warn "mfem patch 1 failed."
return 1
fi
patch -p0 << \EOF
*** makefile.orig Mon Jul 14 14:44:03 2014
--- makefile Mon Jul 14 14:45:03 2014
***************
*** 10,18 ****
# Software Foundation) version 2.1 dated February 1999.
# Serial compiler
! CC = g++
! CCOPTS = -O3
! DEBUG_OPTS = -g -DMFEM_DEBUG
# Parallel compiler
MPICC = mpicxx
--- 10,18 ----
# Software Foundation) version 2.1 dated February 1999.
# Serial compiler
! CC = ${CXX}
! CCOPTS = ${CXXFLAGS}
! DEBUG_OPTS = ${CXXFLAGS} -g -DMFEM_DEBUG
# Parallel compiler
MPICC = mpicxx
EOF
if [[ $? != 0 ]] ; then
warn "mfem patch 2 failed."
return 1
fi
return 0
}
# *************************************************************************** #
# Function 8, build_mfem
#
#
# *************************************************************************** #
function build_mfem
{
#
......@@ -176,72 +96,31 @@ function build_mfem
return 1
fi
#
# Call configure
#
#info "Configuring mfem . . ."
cd $MFEM_BUILD_DIR || error "Can't cd to mfem build dir."
apply_mfem_patch
if [[ $? != 0 ]] ; then
if [[ $untarred_MFEM == 1 ]] ; then
warn "Giving up on MFEM 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
#
# mfem as an scons configure, we don't support scons, so we
# simply use their makefile
# Call configure
#
info "Configuring mfem . . ."
info $MAKE config CXX="$CXX_COMPILER" CXXFLAGS="$CXXFLAGS"
$MAKE config CXX="$CXX_COMPILER" CXXFLAGS="$CXXFLAGS"
#
# Build mfem
#
info "Building mfem . . . (~2 minutes)"
env CXX="$CXX_COMPILER" CC="$C_COMPILER" \
CFLAGS="$CFLAGS $C_OPT_FLAGS" CXXFLAGS="$CXXFLAGS $CXX_OPT_FLAGS" \
$MAKE $MAKE_OPT_FLAGS
$MAKE $MAKE_OPT_FLAGS
if [[ $? != 0 ]] ; then
warn "mfem build failed. Giving up"
return 1
fi
#
# mfem's default makefile doesn't have install logic.
#
#
# Install into the VisIt third party location.
#
info "Installing mfem"
mkdir "$VISITDIR/mfem"
mkdir "$VISITDIR/mfem/$MFEM_VERSION"
mkdir "$VISITDIR/mfem/$MFEM_VERSION/$VISITARCH"
mkdir "$VISITDIR/mfem/$MFEM_VERSION/$VISITARCH/include"
mkdir "$VISITDIR/mfem/$MFEM_VERSION/$VISITARCH/include/fem"
mkdir "$VISITDIR/mfem/$MFEM_VERSION/$VISITARCH/include/general"
mkdir "$VISITDIR/mfem/$MFEM_VERSION/$VISITARCH/include/mesh"
mkdir "$VISITDIR/mfem/$MFEM_VERSION/$VISITARCH/include/linalg"
mkdir "$VISITDIR/mfem/$MFEM_VERSION/$VISITARCH/lib"
cp libmfem.a "$VISITDIR/mfem/$MFEM_VERSION/$VISITARCH/lib"
cp *.hpp "$VISITDIR/mfem/$MFEM_VERSION/$VISITARCH/include"
cp fem/*.hpp "$VISITDIR/mfem/$MFEM_VERSION/$VISITARCH/include/fem"
cp general/*.hpp "$VISITDIR/mfem/$MFEM_VERSION/$VISITARCH/include/general"
cp mesh/*.hpp "$VISITDIR/mfem/$MFEM_VERSION/$VISITARCH/include/mesh"
cp linalg/*.hpp "$VISITDIR/mfem/$MFEM_VERSION/$VISITARCH/include/linalg"
$MAKE install PREFIX="$VISITDIR/mfem/$MFEM_VERSION/$VISITARCH/"
if [[ "$DO_GROUP" == "yes" ]] ; then
chmod -R ug+w,a+rX "$VISITDIR/mfem"
......@@ -252,6 +131,7 @@ function build_mfem
return 0
}
function bv_mfem_is_enabled
{
if [[ $DO_MFEM == "yes" ]]; then
......
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