diff --git a/packages/numlib/metis/5.1.0 b/packages/numlib/metis/5.1.0 new file mode 100755 index 0000000..295e6e5 --- /dev/null +++ b/packages/numlib/metis/5.1.0 @@ -0,0 +1,48 @@ +#!/bin/sh +# sit class file +# +# Christoph Niethammer (C) 2012 +# + +CATEGORY="numlib" +PACKAGE="metis" +VERSION="5.1.0" +URL="http://glaros.dtc.umn.edu/gkhome/metis/metis/overview" +INSTALLER="Elke Flehmig " + +# cmake 2.8 or higher is required +case $PLATFORM in + hermit|hermit1) + module load tools/cmake/2.8.10 + module swap PrgEnv-cray PrgEnv-gnu + ;; + laki) + module load tools/cmake/2.8.11.1 + ;; +esac + +# Archive A and package name P +A=${PACKAGE}-${VERSION}.tar.gz +P=${PACKAGE}-${VERSION} + +BUILDDIR=$SRCDIR + +src_prepare() { +# set 64bit width for elementary data types + sit_info "patching metis.h with 64bit width" + cd $SRCDIR/include + patch metis.h < $SRC_POOL/5.1.0_metis.h_patch +} + +src_configure() { + make config prefix=$PREFIX +} + +src_install() { + make install + +# mv manual to target (not included in make install) + sit_info "Installing manual" + cd $SRCDIR/manual; mv manual.pdf $PREFIX +} + diff --git a/packages/numlib/metis/5.1.0_metis.h_patch b/packages/numlib/metis/5.1.0_metis.h_patch new file mode 100755 index 0000000..443373f --- /dev/null +++ b/packages/numlib/metis/5.1.0_metis.h_patch @@ -0,0 +1,8 @@ +33c33 +< #define IDXTYPEWIDTH 32 +--- +> #define IDXTYPEWIDTH 64 +43c43 +< #define REALTYPEWIDTH 32 +--- +> #define REALTYPEWIDTH 64 diff --git a/packages/numlib/parmetis/4.0.3 b/packages/numlib/parmetis/4.0.3 new file mode 100755 index 0000000..63fdc56 --- /dev/null +++ b/packages/numlib/parmetis/4.0.3 @@ -0,0 +1,55 @@ +#!/bin/sh +# sit class file +# +# Christoph Niethammer (C) 2012 +# + +CATEGORY="numlib" +PACKAGE="parmetis" +VERSION="4.0.3" +URL="http://glaros.dtc.umn.edu/gkhome/metis/parmetis/download" +INSTALLER="Elke Flehmig " + +# cmake 2.8 or higher is required +case $PLATFORM in + hermit|hermit1) + module load tools/cmake/2.8.10 + ;; + laki) + module load tools/cmake/2.8.11.1 + ;; +esac + +# Archive A and package name P +A=${PACKAGE}-${VERSION}.tar.gz +P=${PACKAGE}-${VERSION} + +BUILDDIR=$SRCDIR + +src_prepare() { +# set 64bit width for elementary data types + sit_info "patching metis.h with 64bit width" + cd $SRCDIR/metis/include + patch metis.h < $SRC_POOL/4.0.3_metis.h_patch + +# on cray, replace mpicc and mpicxx with cray mpi compiler commands + case $PLATFORM in + hermit|hermit1) + sit_info "patching Makefile with cray mpi compiler on hermit" + cd $SRCDIR + patch Makefile < $SRC_POOL/4.0.3_Makefile_patch_cray + ;; + esac +} + +src_configure() { + make config prefix=$PREFIX +} + +src_install() { + make install + +# mv manual to target (not included in make install) + sit_info "Installing manual" + cd $SRCDIR/manual; mv manual.pdf $PREFIX +} diff --git a/packages/numlib/parmetis/4.0.3_Makefile_patch_cray b/packages/numlib/parmetis/4.0.3_Makefile_patch_cray new file mode 100755 index 0000000..0633c8d --- /dev/null +++ b/packages/numlib/parmetis/4.0.3_Makefile_patch_cray @@ -0,0 +1,6 @@ +11,12c11,12 +< cc = mpicc +< cxx = mpicxx +--- +> cc = cc +> cxx = CC diff --git a/packages/numlib/parmetis/4.0.3_metis.h_patch b/packages/numlib/parmetis/4.0.3_metis.h_patch new file mode 100755 index 0000000..443373f --- /dev/null +++ b/packages/numlib/parmetis/4.0.3_metis.h_patch @@ -0,0 +1,8 @@ +33c33 +< #define IDXTYPEWIDTH 32 +--- +> #define IDXTYPEWIDTH 64 +43c43 +< #define REALTYPEWIDTH 32 +--- +> #define REALTYPEWIDTH 64 diff --git a/packages/numlib/petsc/3.4.0 b/packages/numlib/petsc/3.4.0 new file mode 100755 index 0000000..b695cae --- /dev/null +++ b/packages/numlib/petsc/3.4.0 @@ -0,0 +1,59 @@ +#!/bin/sh +# sit class file +# +# Christoph Niethammer (C) 2012 +# + +CATEGORY="numlib" +PACKAGE="petsc" +VERSION="3.4.0" +URL="http://www.mcs.anl.gov/petsc/" +INSTALLER="Elke Flehmig " + +#module load tools/cmake/2.8.11.1 + +# Archive A and package name P +A=${PACKAGE}-${VERSION}.tar.gz +P=${PACKAGE}-${VERSION} + + +# our petsc default config: 32bit real double precision +# blas_lapack: with intel compiler, use intel's mkl instead +case $COMPILER in + gnu) + ARCH=linux-gnu + BLAS_LAPACK="--download-f-blas-lapack=$SRC_POOL/fblaslapack-3.1.1.tar.gz" + ;; + intel) + ARCH=linux-gnu-intel + module load numlib/intel/mkl/11.0 + BLAS_LAPACK="--with-blas-lapack-dir=/opt/compiler/intel/composer_xe_2013-2-146/composer_xe_2013/mkl/lib/intel64" + ;; +esac + +# Other interesting configure options: +# --enable-mpi-threads +# --enable-progress-threads + +CONFIGURE_OPTS=" + --CC=$MPICC --CXX=$MPICXX --FC=$MPIFC \ + --with-mpiexec=mpirun \ + PETSC_ARCH=$ARCH \ + --with-clanguage=cxx \ + --with-c-support \ + --with-fortran-datatypes=1 \ + $BLAS_LAPACK \ + " + +# default is make -j, which doesn't work here! +#(petsc automatically builds parallel) +MAKEOPTS="" + +BUILDDIR=$SRCDIR + +src_prepare() { + export PETSC_DIR=${SRCDIR} +} +src_pretest() { + make PETSC_DIR=$SRCDIR PETSC_ARCH=$ARCH test +}