]> https://gitweb.dealii.org/ - candi.git/commitdiff
DTM++.toolbox: Added SuperLUDist 3.3 to Trilinos 11.8.1
authorUwe Köcher <koecher@hsu-hamburg.de>
Thu, 10 Jul 2014 12:17:01 +0000 (14:17 +0200)
committerUwe Köcher <koecher@hsu-hamburg.de>
Thu, 10 Jul 2014 12:17:01 +0000 (14:17 +0200)
DTM++.toolbox/packages/parmetis.package [new file with mode: 0644]
DTM++.toolbox/packages/superlu_dist.package [new file with mode: 0644]
DTM++.toolbox/packages/trilinos.package
DTM++.toolbox/patches/Amesos_Superludist.cpp.patch [new file with mode: 0644]
DTM++.toolbox/platforms/supported/fedora20.platform
DTM++.toolbox/platforms/supported/rhel6.platform
DTM++.toolbox/platforms/supported/saucy.platform
local-DTM++.toolbox.cfg

diff --git a/DTM++.toolbox/packages/parmetis.package b/DTM++.toolbox/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/DTM++.toolbox/packages/superlu_dist.package b/DTM++.toolbox/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..23abc2d0fe2a98f55315a6bd35e41ec2f29d2aee 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:PATH=${INSTALL_PATH}/lib \
+          -D TPL_ENABLE_SuperLUDist:BOOL=ON \
+          -D TPL_SuperLUDist_LIBRARIES:FILEPATH=${INSTALL_PATH}/lib/libsuperlu_dist.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/DTM++.toolbox/patches/Amesos_Superludist.cpp.patch b/DTM++.toolbox/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 505d97f36545f85112dc6e515b9216a9c4bb56cf..d1eaa3d141ee4e89cbf6e721e5b1044d93160e57 100644 (file)
@@ -28,6 +28,8 @@ default UMFPACK_INCLUDE_DIR=/usr/include/suitesparse
 # Define the packages this platform needs
 PACKAGES=(
 #once:hwloc
+once:parmetis
+once:superlu_dist
 once:hdf5
 once:p4est
 once:trilinos
index 1e85b576ce8081b59e80e357e50bbf6b1650ed03..80cc77af49f2d6c2f987113780a040a849bc3aea 100644 (file)
@@ -27,6 +27,8 @@ default UMFPACK_INCLUDE_DIR=/usr/include/suitesparse
 
 # Define the packages this platform needs
 PACKAGES=(
+once:parmetis
+once:superlu_dist
 once:hdf5
 once:p4est
 once:trilinos
index 6a943553e3c8fc8869fae23faa30e34a585001fc..81c120bb06fb075b18447e7e479f12b0633a5cf0 100644 (file)
@@ -1,4 +1,4 @@
-# Fedora 20
+# Saucy
 
 # This build script assumes that you have several packages already
 # installed via Fedora's yum using the following command:
@@ -14,6 +14,8 @@
 
 # Define the packages this platform needs
 PACKAGES=(
+once:parmetis
+once:superlu_dist
 once:hdf5
 once:p4est
 once:trilinos
index d233520c0f18d6609acda431c3a00ec1809dfac8..f631cd97b28cb83ae2593ce3418db9b6303009dc 100644 (file)
@@ -7,12 +7,15 @@
 PROJECT=DTM++.toolbox
 CLEAN_BUILD=false
 
-COMPILER=native-openmpi
+COMPILERBASE=native
 #COMPILERBASE=gcc-4.9.0
 #COMPILERBASE=llvm
+
+COMPILERMPI=openmpi
 #COMPILERMPI=openmpi-1.6.5
 #COMPILERMPI=mpich-3.0.4
-#COMPILER=${COMPILERBASE}-${COMPILERMPI}
+
+COMPILER=${COMPILERBASE}-${COMPILERMPI}
 
 # How many processes would you like to build using?
 PROCS=1
@@ -35,5 +38,8 @@ INSTALL_PATH=${PREFIX_PATH}/${PROJECT}/${COMPILER}
 # Would you like to build stable versions of projects?
 # If STABLE_BUILD=false, then the development version of deal.II will be
 # installed.
-STABLE_BUILD=true
-#STABLE_BUILD=false
+#STABLE_BUILD=true
+STABLE_BUILD=false
+
+CXXFLAGS=-Wno-literal-suffix
+

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.