]> https://gitweb.dealii.org/ - candi.git/commitdiff
deal.II: Added SuperLUDist support for Trilinos/Amesos
authorUwe Köcher <koecher@hsu-hamburg.de>
Thu, 10 Jul 2014 13:52:04 +0000 (15:52 +0200)
committerUwe Köcher <koecher@hsu-hamburg.de>
Thu, 10 Jul 2014 13:52:04 +0000 (15:52 +0200)
13 files changed:
deal.II/packages/parmetis.package [new file with mode: 0644]
deal.II/packages/superlu_dist.package [new file with mode: 0644]
deal.II/packages/trilinos.package
deal.II/patches/Amesos_Superludist.cpp.patch [new file with mode: 0644]
deal.II/platforms/supported/centos7.platform
deal.II/platforms/supported/fedora19.platform
deal.II/platforms/supported/fedora20.platform
deal.II/platforms/supported/opensuse12.platform
deal.II/platforms/supported/opensuse13.platform
deal.II/platforms/supported/rhel6.platform
deal.II/platforms/supported/rhel7.platform
deal.II/platforms/supported/ubuntu13.platform
deal.II/platforms/supported/ubuntu14.platform

diff --git a/deal.II/packages/parmetis.package b/deal.II/packages/parmetis.package
new file mode 100644 (file)
index 0000000..4612387
--- /dev/null
@@ -0,0 +1,21 @@
+NAME=parmetis-4.0.3
+SOURCE=http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/
+PACKING=.tar.gz
+CHECKSUM=f69c479586bf6bb7aff6a9bc0c739628
+BUILDCHAIN=custom
+
+package_specific_build() {
+    cp -rf ${UNPACK_PATH}/${EXTRACTSTO}/* .
+    cd metis
+    make config prefix=${INSTALL_PATH} shared=1
+    make -j ${PROCS}
+    make install
+    cd ..
+    make config prefix=${INSTALL_PATH} shared=1
+    make -j ${PROCS}
+    make install
+}
+
+package_specific_register () {
+    export PARMETIS_DIR=${INSTALL_PATH}
+}
diff --git a/deal.II/packages/superlu_dist.package b/deal.II/packages/superlu_dist.package
new file mode 100644 (file)
index 0000000..24dc635
--- /dev/null
@@ -0,0 +1,82 @@
+VERSION=3.3
+NAME=superlu_dist_${VERSION}
+EXTRACTSTO=SuperLU_DIST_${VERSION}
+SOURCE=http://crd-legacy.lbl.gov/~xiaoye/SuperLU/
+PACKING=.tar.gz
+CHECKSUM=f4805659157d93a962500902c219046b
+#1d77f10a265f5751d4e4b59317d778f8  superlu_dist_3.0.tar.gz
+#5b114d6f97d9e94d643f51bb3c6cf03f  superlu_dist_3.1.tar.gz
+#b67bab5bb1ee92d38ad6c345b3c2b18d  superlu_dist_3.2.tar.gz
+#f4805659157d93a962500902c219046b  superlu_dist_3.3.tar.gz
+BUILDCHAIN=custom
+
+package_specific_build() {
+    cp -rf ${UNPACK_PATH}/${EXTRACTSTO}/* .
+    mv make.inc make.inc.bak
+    #create make.inc
+echo "#  The machine (platform) identifier to append to the library names
+#
+PLAT            = _x86_64
+
+#
+#  The name of the libraries to be created/linked to
+#
+DSuperLUroot    = ${INSTALL_PATH}
+DSUPERLULIB     = \$(DSuperLUroot)/lib/libsuperlu_dist_${VERSION}.a
+
+#
+BLASDEF         = -DUSE_VENDOR_BLAS
+BLASLIB         = -lblas
+
+## parmetis 4.x.x
+METISLIB        = -L${PARMETIS_DIR}/lib -lmetis
+PARMETISLIB     = -L${PARMETIS_DIR}/lib -lparmetis
+
+# Define the required Fortran libraries, if you use C compiler to link
+#FLIBS          = -lpgf90 -lpgf90_rpm1
+
+# Define all the libraries
+LIBS            = \$(DSUPERLULIB) \$(BLASLIB) \$(PARMETISLIB) \$(METISLIB) \$(FLIBS)
+
+#
+#  The archiver and the flag(s) to use when building archive (library)
+#  If your system has no ranlib, set RANLIB = echo.
+#
+ARCH            = ar
+ARCHFLAGS      = cr
+RANLIB          = ranlib
+
+############################################################################
+# C compiler setup
+# CFLAGS should be set to be the C flags that include optimization
+CFLAGS          = -fPIC -DDEBUGlevel=0 -DPRNTlevel=1 -DPROFlevel=0
+#
+# NOOPTS should be set to be the C flags that turn off any optimization
+NOOPTS          = -fPIC -O0
+############################################################################
+# FORTRAN compiler setup
+FORTRAN         = \$(FC)
+#F90FLAGS      = -fast -Mipa=fast,safe
+############################################################################
+LOADER          = \$(CC)
+#LOADOPTS      = -fast
+############################################################################
+#  C preprocessor defs for compilation (-DNoChange, -DAdd_, or -DUpCase)
+#
+#  Need follow the convention of how C calls a Fortran routine.
+#
+CDEFS        = -DAdd_
+" >> make.inc
+
+    # now compile superlu_dist
+    make superlulib
+    rm -f ${INSTALL_PATH}/lib/libsuperlu_dist.a
+    ln -s ${INSTALL_PATH}/lib/libsuperlu_dist_${VERSION}.a ${INSTALL_PATH}/lib/libsuperlu_dist.a
+    mkdir -p ${INSTALL_PATH}/include/superlu
+    cp SRC/*.h ${INSTALL_PATH}/include/superlu
+}
+
+package_specific_register () {
+    export SUPERLU_DIR=${INSTALL_PATH}
+}
+
index 4b7e3e2aa1f74b2990a57ab856a193eab3e488e9..476c5e8ff3efc21e1c1986a57508af730e7850b8 100644 (file)
@@ -7,10 +7,14 @@ BUILDCHAIN=cmake
 
 CONFOPTS="-D Trilinos_ENABLE_OpenMP:BOOL=OFF \
           -D TPL_ENABLE_TBB:BOOL=OFF \
-          -D Trilinos_ENABLE_OPTIONAL_PACKAGES:BOOL=ON \
           -D Trilinos_ENABLE_Didasko:BOOL=ON \
           -D Trilinos_ENABLE_Sacado:BOOL=ON \
           -D Trilinos_ENABLE_Stratimikos:BOOL=ON \
+          -D TPL_ENABLE_ParMETIS:BOOL=ON \
+          -D TPL_ParMETIS_LIBRARIES:FILEPATH=${INSTALL_PATH}/lib/libparmetis.so \
+          -D TPL_ENABLE_SuperLUDist:BOOL=ON \
+          -D TPL_SuperLUDist_LIBRARIES:FILEPATH=${INSTALL_PATH}/lib/libsuperlu_dist_3.3.a \
+          -D SuperLUDist_INCLUDE_DIRS:PATH=${INSTALL_PATH}/include/superlu \
           -D CMAKE_BUILD_TYPE:STRING=RELEASE \
           -D CMAKE_CXX_FLAGS:STRING=-fPIC -g -O3 \
           -D CMAKE_C_FLAGS:STRING=-fPIC -g -O3 \
@@ -21,6 +25,12 @@ CONFOPTS="-D Trilinos_ENABLE_OpenMP:BOOL=OFF \
           -D TPL_ENABLE_MPI:BOOL=ON \
           -D BUILD_SHARED_LIBS:BOOL=ON"
 
+package_specific_setup() {
+    # Apply patch to let Trilinos/Amesos work with SuperLUDist_3.3
+    cd ${UNPACK_PATH}/${EXTRACTSTO}/packages/amesos/src
+    patch Amesos_Superludist.cpp < ${ORIG_DIR}/${PROJECT}/patches/Amesos_Superludist.cpp.patch
+}
+
 package_specific_register () {
     export TRILINOS_DIR=${INSTALL_PATH}
 }
diff --git a/deal.II/patches/Amesos_Superludist.cpp.patch b/deal.II/patches/Amesos_Superludist.cpp.patch
new file mode 100644 (file)
index 0000000..7680945
--- /dev/null
@@ -0,0 +1,7 @@
+476,477c476,477
+<     else if( IterRefine_ == "DOUBLE" ) PrivateSuperluData_->options_.IterRefine = DOUBLE;
+<     else if( IterRefine_ == "EXTRA" ) PrivateSuperluData_->options_.IterRefine = EXTRA;
+---
+>     else if( IterRefine_ == "DOUBLE" ) PrivateSuperluData_->options_.IterRefine = SLU_DOUBLE;
+>     else if( IterRefine_ == "EXTRA" ) PrivateSuperluData_->options_.IterRefine = SLU_EXTRA;
+
index c2bc6114080cc486c7acc880400fbb609b07c2c4..641b7e57e77ced314822c372586ac281972257d7 100644 (file)
@@ -19,6 +19,8 @@
 #
 # Define the packages this platform needs
 PACKAGES=(
+once:parmetis
+once:superlu_dist
 once:hdf5
 once:p4est
 once:trilinos
index a672ad49e31454f63e03744adc6de7efb503c0a7..ae7257d12a09e86757c6dfe63b762ae1f56355ae 100644 (file)
@@ -17,6 +17,8 @@
 # Define the packages this platform needs
 PACKAGES=(
 #once:boost
+once:parmetis
+once:superlu_dist
 once:hdf5
 once:p4est
 once:trilinos
index 30caadd6c785f88712e6811a35e8be4b48d48239..bf4945006bd3ec731a455f9b55b4911ad1341964 100644 (file)
@@ -18,6 +18,8 @@
 # Define the packages this platform needs
 PACKAGES=(
 #once:boost
+once:parmetis
+once:superlu_dist
 once:hdf5
 once:p4est
 once:trilinos
index 5e54364c04c022c001894f9bda621909eb19714c..fa623702aaea3c0ef5f8e090c37c06b84f622ac4 100644 (file)
@@ -23,6 +23,8 @@
 # Define the packages this platform needs
 PACKAGES=(
 #once:boost
+once:parmetis
+once:superlu_dist
 once:hdf5
 once:p4est
 once:trilinos
index a0ce5653bde093230284b771dad3a37ed608a1bc..95c15c544e5fdec62b4e6b153278b89758394a1e 100644 (file)
@@ -18,6 +18,8 @@
 # Define the packages this platform needs
 PACKAGES=(
 #once:boost
+once:parmetis
+once:superlu_dist
 once:hdf5
 once:p4est
 once:trilinos
index 29f38ea4b654d6d2fadc46b394c361643fb5fde5..82ce6f4fc734e0944e079dccb760bdb31d63d9c2 100644 (file)
@@ -16,6 +16,8 @@
 #
 # Define the packages this platform needs
 PACKAGES=(
+once:parmetis
+once:superlu_dist
 once:hdf5
 once:p4est
 once:trilinos
index 8379e3407adc1f0df028cf63c17ca32c4d918b35..9f45b429623e460387f994137a6e4c3d9f3b11e0 100644 (file)
@@ -16,6 +16,8 @@
 #
 # Define the packages this platform needs
 PACKAGES=(
+once:parmetis
+once:superlu_dist
 once:hdf5
 once:p4est
 once:trilinos
index 616b88c1f3b75b79f8da30901af9a68e4baa9280..946f7f86d292a2efe5bc54ab86f54742db83b468 100644 (file)
@@ -15,6 +15,8 @@
 # Define the packages this platform needs
 PACKAGES=(
 #once:boost
+once:parmetis
+once:superlu_dist
 once:hdf5
 once:p4est
 once:trilinos
index a078ddca74ec6fabbc0cf053fcd546e6d1c7789f..8209eea359122aef834faf43834b301013ea3c6e 100644 (file)
@@ -16,6 +16,8 @@
 # Define the packages this platform needs
 PACKAGES=(
 #once:boost
+once:parmetis
+once:superlu_dist
 once:hdf5
 once:p4est
 once:trilinos

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.