new scripts for scotch installation
This commit is contained in:
parent
604d15e1ec
commit
3b5d70ac82
5 changed files with 109 additions and 0 deletions
95
packages/numlib/scotch/6.0.0
Executable file
95
packages/numlib/scotch/6.0.0
Executable file
|
@ -0,0 +1,95 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# sit class file
|
||||||
|
#
|
||||||
|
# Christoph Niethammer <niethammer@hlrs.de> (C) 2012
|
||||||
|
#
|
||||||
|
|
||||||
|
CATEGORY="numlib"
|
||||||
|
PACKAGE="scotch"
|
||||||
|
VERSION="6.0.0"
|
||||||
|
URL="http://www.labri.fr/perso/pelegrin/scotch/"
|
||||||
|
INSTALLER="Elke Flehmig <flehmig@hlrs.de>"
|
||||||
|
|
||||||
|
# Archive A and package name P
|
||||||
|
A=${PACKAGE}_${VERSION}.tar.gz
|
||||||
|
P=${PACKAGE}_${VERSION}/src
|
||||||
|
|
||||||
|
BUILDDIR=$SRCDIR
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
case $PLATFORM in
|
||||||
|
hermit|hermit1)
|
||||||
|
# there are some GNU extensions Cray compiler doesn't (yet) know about
|
||||||
|
module swap PrgEnv-cray PrgEnv-gnu
|
||||||
|
echo "Building for hermit."
|
||||||
|
# link most fitting Makefile.inc sample:
|
||||||
|
cd $SRCDIR
|
||||||
|
ln -s Make.inc/Makefile.inc.x86-64_cray-xt4_linux2 Makefile.inc
|
||||||
|
echo "Linking Makefile.inc in $SRCDIR"
|
||||||
|
# adjust CFLAGS:
|
||||||
|
# remove not working options: -c99 -fast -fastsse
|
||||||
|
# add options: -DINTSIZE64 -DCOMMON_MEMORY_TRACE -DSCOTCH_METIS_PREFIX
|
||||||
|
# -DINTSIZE64 - set 64bit type width
|
||||||
|
# -DCOMMON_MEMORY_TRACE - enable monitoring of memory allocation
|
||||||
|
# -DSCOTCH_METIS_PREFIX - prefix scotch versions of metis files so as to avoid multiply defined symbol conflicts when using scotch and metis together
|
||||||
|
|
||||||
|
patch Makefile.inc < $SRC_POOL/6.0.0_Makefile.inc_patch_cray
|
||||||
|
;;
|
||||||
|
laki|*)
|
||||||
|
echo "Building for laki."
|
||||||
|
# link most fitting Makefile.inc sample:
|
||||||
|
cd $SRCDIR
|
||||||
|
ln -s Make.inc/Makefile.inc.x86-64_pc_linux2 Makefile.inc
|
||||||
|
echo "Linking Makefile.inc in $SRCDIR"
|
||||||
|
# add options to CFLAGS:
|
||||||
|
# -DINTSIZE64 -DCOMMON_MEMORY_TRACE -DSCOTCH_METIS_PREFIX
|
||||||
|
# -DINTSIZE64 - set 64bit type width
|
||||||
|
# -DCOMMON_MEMORY_TRACE - enable monitoring of memory allocation
|
||||||
|
# -DSCOTCH_METIS_PREFIX - prefix scotch versions of metis files so as to avoid multiply defined symbol conflicts when using scotch and metis together
|
||||||
|
# set CCD to avoid compilation errors for ptscotch:
|
||||||
|
# CCD = mpicc
|
||||||
|
patch Makefile.inc < $SRC_POOL/6.0.0_Makefile.inc_patch_laki
|
||||||
|
|
||||||
|
# check fails on cray (for now...)
|
||||||
|
src_pretest() {
|
||||||
|
# add stdint.h to testfile to avoid failure
|
||||||
|
patch check/test_strat_seq.c < $SRC_POOL/6.0.0_test_strat_seq.c_patch_laki
|
||||||
|
sit_info "Checking scotch..."
|
||||||
|
make check || sit_fail "Checking scotch failed"
|
||||||
|
# ptcheck uses mpirun/requires qsub, which we will not process here
|
||||||
|
# may be done separately after installation...
|
||||||
|
# patch check/test_strat_par.c < $SRC_POOL/6.0.0_test_strat_par.c_patch_laki
|
||||||
|
# make ptcheck
|
||||||
|
}
|
||||||
|
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# set installation target path for prefix:
|
||||||
|
cd $SRCDIR
|
||||||
|
sed -i -e "/^prefix.*\?= /s#/usr/local#$PREFIX#" Makefile
|
||||||
|
}
|
||||||
|
|
||||||
|
sit_configure() {
|
||||||
|
sit_info "Configure not required"
|
||||||
|
}
|
||||||
|
|
||||||
|
src_build() {
|
||||||
|
sit_info "Building scotch..."
|
||||||
|
make scotch || sit_fail "Building scotch failed"
|
||||||
|
sit_info "Building ptscotch..."
|
||||||
|
make ptscotch || sit_fail "Building ptscotch failed"
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
mkdir -p $PREFIX
|
||||||
|
make install || sit_fail "Installation failed"
|
||||||
|
}
|
||||||
|
|
||||||
|
src_postinst() {
|
||||||
|
# mv documentation to target (not included in make install)
|
||||||
|
cd ${WORKDIR}/${PACKAGE}_${VERSION}; mv doc $PREFIX
|
||||||
|
|
||||||
|
sit_info "NOTE: you may want to run 'make ptcheck' on laki, but this has to be done via qsub as it calls mpirun!"
|
||||||
|
sit_info "NOTE: try 'make check' and 'ptcheck' on cray, but some may fail or have to be run with mpirun...!"
|
||||||
|
}
|
4
packages/numlib/scotch/6.0.0_Makefile.inc_patch_cray
Normal file
4
packages/numlib/scotch/6.0.0_Makefile.inc_patch_cray
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
12c12
|
||||||
|
< CFLAGS = -O3 -c99 -fast -fastsse -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_PTHREAD -DSCOTCH_RENAME -DIDXSIZE64
|
||||||
|
---
|
||||||
|
> CFLAGS = -O3 -std=gnu99 -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_PTHREAD -DSCOTCH_RENAME -DSCOTCH_RENAME_PARSER -DIDXSIZE64 -DINTSIZE64 -DCOMMON_MEMORY_TRACE -DSCOTCH_METIS_PREFIX
|
6
packages/numlib/scotch/6.0.0_Makefile.inc_patch_laki
Normal file
6
packages/numlib/scotch/6.0.0_Makefile.inc_patch_laki
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
11,12c11,12
|
||||||
|
< CCD = gcc
|
||||||
|
< CFLAGS = -O3 -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -DSCOTCH_PTHREAD -Drestrict=__restrict -DIDXSIZE64
|
||||||
|
---
|
||||||
|
> CCD = mpicc
|
||||||
|
> CFLAGS = -O3 -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -DSCOTCH_PTHREAD -Drestrict=__restrict -DIDXSIZE64 -DINTSIZE64 -DCOMMON_MEMORY_TRACE -DSCOTCH_METIS_PREFIX
|
2
packages/numlib/scotch/6.0.0_test_strat_par.c_patch_laki
Normal file
2
packages/numlib/scotch/6.0.0_test_strat_par.c_patch_laki
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
55a56
|
||||||
|
> #include <stdint.h>
|
2
packages/numlib/scotch/6.0.0_test_strat_seq.c_patch_laki
Normal file
2
packages/numlib/scotch/6.0.0_test_strat_seq.c_patch_laki
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
54a55
|
||||||
|
> #include <stdint.h>
|
Loading…
Reference in a new issue