#!/bin/sh # sit class file # # Christoph Niethammer (C) 2012 # # laki sit command: # PREFIX_BASE=/opt COMPILER=gnu COMPILER_VERSION=4.8.1 MPI=openmpi MPI_VERSION=1.6.5 ./sit numlib/zoltan/3.81-parmetis-4.0.3-scotch-6.0.0 # # hermit sit command: # PREFIX_BASE=/opt/hlrs COMPILER=pgi COMPILER_VERSION=13.10.0 ./sit numlib/zoltan/3.81-parmetis-4.0.3-scotch-6.0.0 CATEGORY="numlib" PACKAGE="zoltan" VERSION="3.81" ADD_PACKAGES="parmetis-4.0.3-scotch-6.0.0" URL="http://www.labri.fr/perso/pelegrin/scotch/" INSTALLER="Elke Flehmig " # Archive A and package name P A=${PACKAGE}_distrib_v${VERSION}.tar.gz P=Zoltan_v${VERSION} case $PLATFORM in hermit|hermit1) echo "Building for hermit." # target prefix - show compiler version before additional packages: PREFIX="${PREFIX_BASE}/${CATEGORY}/${PACKAGE}/${VERSION}-${COMPILER}-${COMPILER_VERSION}-${ADD_PACKAGES}" SCOTCH=numlib/scotch/6.0.0 PARMETIS=numlib/parmetis/4.0.3 METIS=numlib/metis/5.1.0 CC_CMD=cc CXX_CMD=CC CONFIGURE_OPTS="CC=cc CXX=CC --with-id-type=ullong --with-scotch --with-scotch-incdir=$PREFIX_BASE/$SCOTCH/include --with-scotch-libdir=$PREFIX_BASE/$SCOTCH/lib --with-parmetis --with-parmetis-incdir=$PREFIX_BASE/$PARMETIS/include --with-parmetis-libdir=$PREFIX_BASE/$PARMETIS/lib --with-libdirs=\"-L$PREFIX_BASE/$METIS/lib\" --with-incdirs=\"-I$PREFIX_BASE/$METIS/include\" --with-libs=\"-lscotch\"" ;; laki|*) echo "Building for laki." # target prefix - show mpi and compiler version before additional packages: PREFIX="${PREFIX_BASE}/${CATEGORY}/${PACKAGE}/${VERSION}-${MPI}-${MPI_VERSION}-${ADD_PACKAGES}" SCOTCH=numlib/scotch/6.0.0-openmpi-1.6.5-gnu-4.8.1 PARMETIS=numlib/parmetis/4.0.3-openmpi-1.6.5-gnu-4.8.1 METIS=numlib/metis/5.1.0 CC_CMD=mpicc CXX_CMD=mpicxx CONFIGURE_OPTS="CC=mpicc CXX=mpicxx --with-id-type=ullong --with-scotch --with-scotch-incdir=$PREFIX_BASE/$SCOTCH/include --with-scotch-libdir=$PREFIX_BASE/$SCOTCH/lib --with-parmetis --with-parmetis-incdir=$PREFIX_BASE/$PARMETIS/include --with-parmetis-libdir=$PREFIX_BASE/$PARMETIS/lib --with-libdirs=\"-L$PREFIX_BASE/$METIS/lib\" --with-incdirs=\"-I$PREFIX_BASE/$METIS/include\" --with-libs=\"-lscotch\"" ;; esac src_pretest() { sit_info "Checking zoltan ..." make check || sit_fail "Checking zoltan failed" } src_postinst() { # as examples and doc are already installed with zoltan, set a link: cd $PREFIX case $PLATFORM in hermit|hermit1) ln -s ${PREFIX_BASE}/${CATEGORY}/${PACKAGE}/${VERSION}-$COMPILER-$COMPILER_VERSION/example ln -s ${PREFIX_BASE}/${CATEGORY}/${PACKAGE}/${VERSION}-$COMPILER-$COMPILER_VERSION/doc ;; laki|*) ln -s ${PREFIX_BASE}/${CATEGORY}/${PACKAGE}/${VERSION}-$MPI-$MPI_VERSION/example ln -s ${PREFIX_BASE}/${CATEGORY}/${PACKAGE}/${VERSION}-$MPI-$MPI_VERSION/doc ;; esac }