Commit 51792a80 authored by gsell's avatar gsell
Browse files

major reorganization; updates to versions; fixes

parent 67e3d5c7
autoconf 2.69 autoconf 2.69
automake 1.14 automake 1.14
bash 4.3.30 bash 4.3.30
boost 1.55.0 boost 1.57.0
BoxLib 2014-02-28 BoxLib 2014-02-28
cmake 2.8.12.2 cmake 2.8.12.2
dialog 1.2.1 dialog 1.2.1
...@@ -17,8 +17,8 @@ fsstress 1.0.0 ...@@ -17,8 +17,8 @@ fsstress 1.0.0
h5hut_serial 1.99.13 h5hut_serial 1.99.13
H5hut 1.99.13 H5hut 1.99.13
H5root 1.2.0 H5root 1.2.0
hdf5_serial 1.8.12 hdf5_serial 1.8.14
hdf5 1.8.12 hdf5 1.8.14
ippl 1.1.3 ippl 1.1.3
libtool 2.4.2 libtool 2.4.2
libungif 4.1.4 libungif 4.1.4
...@@ -36,11 +36,11 @@ OpenBLAS_OMP 0.2.9 ...@@ -36,11 +36,11 @@ OpenBLAS_OMP 0.2.9
parmetis 3.2.0 parmetis 3.2.0
patchelf 0.8.1 patchelf 0.8.1
Python 3.4.0 Python 3.4.0
root 5.34.19 root 5.34.26
SuperLU 4.3 SuperLU 4.3
SuperLU_DIST 3.3 SuperLU_DIST 3.3
Tcl 8.6.3 Tcl 8.6.3
tiff 4.0.3 tiff 4.0.3
trilinos 11.10.2 trilinos 11.12.1
UMFPACK 5.6.2 UMFPACK 5.6.2
vtk 5.10.1 vtk 5.10.1
...@@ -25,6 +25,8 @@ declare -xr BUILD_TMPDIR="${BUILD_BASEDIR}/tmp" ...@@ -25,6 +25,8 @@ declare -xr BUILD_TMPDIR="${BUILD_BASEDIR}/tmp"
declare -xr BUILD_DOWNLOADSDIR="${BUILD_BASEDIR}/Downloads" declare -xr BUILD_DOWNLOADSDIR="${BUILD_BASEDIR}/Downloads"
declare -xr BUILD_VERSIONSFILE="${BUILD_CONFIGDIR}/versions.conf" declare -xr BUILD_VERSIONSFILE="${BUILD_CONFIGDIR}/versions.conf"
declare -xr PSI_TEMPLATES_DIR='templates'
if [[ -z "${BUILD_CONFIGDIR}/families.d/"*.conf ]]; then if [[ -z "${BUILD_CONFIGDIR}/families.d/"*.conf ]]; then
die 1 "Default family configuration not set in ${BUILD_CONFIGDIR}/families.d" die 1 "Default family configuration not set in ${BUILD_CONFIGDIR}/families.d"
fi fi
...@@ -151,14 +153,14 @@ fi ...@@ -151,14 +153,14 @@ fi
# while bootstraping the module command is not yet available # while bootstraping the module command is not yet available
if [[ ${bootstrap} == no ]]; then if [[ ${bootstrap} == no ]]; then
source "${PSI_PREFIX}/${PSI_CONFIG_DIR}/profile.bash" source "${PSI_PREFIX}/${PSI_CONFIG_DIR}/profile.bash"
MODULECMD="${PMODULES_HOME}/bin/modulecmd"
[[ -x ${MODULECMD} ]] || die 1 "${MODULECMD}: no such executable" [[ -x ${MODULECMD} ]] || die 1 "${MODULECMD}: no such executable"
module use unstable module use unstable
module purge module purge
fi fi
P=$(basename $0) P=$(basename $(dirname "${BUILDSCRIPT}"))
P=${P%.*}
_P=$(echo $P | tr [:lower:] [:upper:]) _P=$(echo $P | tr [:lower:] [:upper:])
_P=${_P//-/_} _P=${_P//-/_}
_V=${_P}_VERSION _V=${_P}_VERSION
...@@ -193,7 +195,7 @@ function em.add_to_family() { ...@@ -193,7 +195,7 @@ function em.add_to_family() {
if [[ -z ${1} ]]; then if [[ -z ${1} ]]; then
die 42 "${FUNCNAME}: Missing family argument." die 42 "${FUNCNAME}: Missing family argument."
fi fi
if [[ ! -d ${PSI_PREFIX}/${PSI_CONFIG_DIR}/${1} ]]; then if [[ ! -d ${PSI_PREFIX}/${PSI_MODULES_ROOT}/${1} ]]; then
die 43 "${1}: family does not exist." die 43 "${1}: family does not exist."
fi fi
MODULE_FAMILY=$1 MODULE_FAMILY=$1
...@@ -220,8 +222,14 @@ function module_is_available() { ...@@ -220,8 +222,14 @@ function module_is_available() {
} }
function _load_build_dependencies() { function _load_build_dependencies() {
# :FIXME: merge this two loops, load only modules which are required
# this merge is not as easy as it looks like at a first glance!
for m in "${with_modules[@]}"; do for m in "${with_modules[@]}"; do
module load "${m}" if module_is_available "$m"; then
module load "${m}"
else
die 44 "$m: module not available!"
fi
done done
for m in "${MODULE_BUILD_DEPENDENCIES[@]}"; do for m in "${MODULE_BUILD_DEPENDENCIES[@]}"; do
[[ -z $m ]] && continue [[ -z $m ]] && continue
...@@ -274,7 +282,7 @@ function _load_build_dependencies() { ...@@ -274,7 +282,7 @@ function _load_build_dependencies() {
esac esac
shift shift
done done
"${BUILD_SCRIPTSDIR}/${m/\/*}.build" ${args[@]} "${BUILD_SCRIPTSDIR}"/*/"${m/\/*}/build" ${args[@]}
if [[ -z $(module avail "$m" 2>&1) ]]; then if [[ -z $(module avail "$m" 2>&1) ]]; then
die 1 "$m: oops: build failed..." die 1 "$m: oops: build failed..."
fi fi
...@@ -618,7 +626,7 @@ function _set_link() { ...@@ -618,7 +626,7 @@ function _set_link() {
local x local x
IFS='/' x=( ${dir_name/${PSI_PREFIX}\/${PSI_MODULES_ROOT}\/} ) IFS='/' x=( ${dir_name/${PSI_PREFIX}\/${PSI_MODULES_ROOT}\/} )
local n=${#x[@]} local n=${#x[@]}
local -r _target="../"$(eval printf "../%.s" {1..${n}})${PSI_CONFIG_DIR##*/}/"${MODULE_FAMILY}/${P}/modulefile" local -r _target="../"$(eval printf "../%.s" {1..${n}})${PSI_TEMPLATES_DIR##*/}/"${MODULE_FAMILY}/${P}/modulefile"
ln -fs "${_target}" "${MODULE_NAME##*/}" ln -fs "${_target}" "${MODULE_NAME##*/}"
) )
fi fi
......
../System/bash.build
\ No newline at end of file
#!/bin/bash
source "$(dirname $0)/../../lib/libem.bash"
function em.configure() {
"${MODULE_SRCDIR}"/configure \
--prefix="${PREFIX}" \
|| exit 1
}
em.add_to_family 'System'
em.set_build_dependencies "${COMPILER}"
em.make_all
../Tools/dialog.build
\ No newline at end of file
#!/bin/bash
source "$(dirname $0)/../../lib/libem.bash"
function em.configure() {
"${MODULE_SRCDIR}"/configure \
--prefix="${PREFIX}" \
|| exit 1
}
em.add_to_family 'Tools'
em.set_build_dependencies "${COMPILER}"
em.make_all
../System/getopt.build
\ No newline at end of file
#!/bin/bash
source "$(dirname $0)/../../lib/libem.bash"
function em.configure() {
:
}
function em.build() {
case ${OS} in
Linux )
declare -x LDFLAGS="-lintl -liconv"
;;
Darwin )
declare -x LDFLAGS="-lintl -liconv -framework CoreFoundation"
;;
esac
cd "${MODULE_SRCDIR}"
make -e
}
function em.install() {
cd "${MODULE_SRCDIR}"
declare -x DESTDIR="${PREFIX}"
declare -x prefix=''
make -e install
}
function em.cleanup_build() {
cd "${MODULE_SRCDIR}"
make -e realclean
}
em.add_to_family 'Tools'
em.make_all
# Local Variables:
# mode: sh
# sh-basic-offset: 8
# tab-width: 8
# End:
../Tools/gettext.build
\ No newline at end of file
#!/bin/bash
source "$(dirname $0)/../../lib/libem.bash"
function em.configure() {
"${MODULE_SRCDIR}"/configure \
--prefix="${PREFIX}" \
--disable-java \
--disable-threads \
--disable-shared \
--enable-relocatable \
--disable-openmp \
--disable-acl \
--disable-curses \
--with-included-gettext \
--without-libiconv-prefix \
--without-libintl-prefix \
--with-included-libxml \
|| exit 1
}
em.add_to_family 'Tools'
em.set_build_dependencies "${COMPILER}"
em.make_all
...@@ -667,6 +667,13 @@ subcommand_avail() { ...@@ -667,6 +667,13 @@ subcommand_avail() {
done done
} }
get_families () {
{
cd "${modulepath_root}"
echo *
}
}
# #
# $1: family name (not path!) # $1: family name (not path!)
compute_family_depth () { compute_family_depth () {
...@@ -690,18 +697,12 @@ subcommand_use() { ...@@ -690,18 +697,12 @@ subcommand_use() {
echo -e "\t${f}" 1>&2 echo -e "\t${f}" 1>&2
done done
echo -e "\nFamilies you may use in addition:" 1>&2 echo -e "\nFamilies you may use in addition:" 1>&2
local available_families=':' for family in $(get_families); do
{ local -i depth=$( compute_family_depth "${family}")
cd "${PSI_PREFIX}/${PSI_MODULES_ROOT}" if ! is_used_family $f && (( depth == 0 )); then
for f in *; do echo -e "\t${f}" 1>&2
local tmp=$(find $f -d -type f -o -type l | head -1) fi
local -a tmp2=( ${tmp//\// } ) done
local -i depth=${#tmp2[@]}-3
if ! is_used_family $f && (( depth == 0 )); then
echo -e "\t${f}" 1>&2
fi
done
}
echo -e "\nUsed releases:" 1>&2 echo -e "\nUsed releases:" 1>&2
for r in ${used_releases//:/ }; do for r in ${used_releases//:/ }; do
...@@ -831,14 +832,8 @@ subcommand_search() { ...@@ -831,14 +832,8 @@ subcommand_search() {
local -r tmpfile=$( mktemp /tmp/$(basename $0).XXXXXX ) || exit 1 local -r tmpfile=$( mktemp /tmp/$(basename $0).XXXXXX ) || exit 1
local family local family
# loop over all families # loop over all families
push -n . for family in $(get_families); do
cd "${PSI_PREFIX}/${PSI_MODULES_ROOT}" local -i depth=$( compute_family_depth ${family} )
for family in *; do
local tmp=$( find "${family}" -d -type f -o -type l 2>&1 | head -1 )
local -a tmp2=( ${tmp//\// } )
echo ${tmp2[0]}
local -i depth=${tmp2[@]}
let depth-=3
# get all potential directories of family $f with module-files # get all potential directories of family $f with module-files
local mpaths=( $(find \ local mpaths=( $(find \
"${modulepath_root}/${family}" \ "${modulepath_root}/${family}" \
...@@ -870,7 +865,6 @@ subcommand_search() { ...@@ -870,7 +865,6 @@ subcommand_search() {
done done
done done
done done
popd
sort -k 1,1 -k 4,4 -k 5,5 "${tmpfile}" | awk "${with_modules}" 1>&2 sort -k 1,1 -k 4,4 -k 5,5 "${tmpfile}" | awk "${with_modules}" 1>&2
rm -f "${tmpfile}" rm -f "${tmpfile}"
......
#!/bin/bash #!/bin/bash
source $(dirname $0)/../../lib/libem.bash source $(dirname $0)/../../../lib/libem.bash
function em.pre_configure() { function em.pre_configure() {
./autogen.sh ./autogen.sh
......
#!/bin/bash #!/bin/bash
source "$(dirname $0)/../../lib/libem.bash" source "$(dirname $0)/../../../lib/libem.bash"
function em.configure() { function em.configure() {
cat <<EOF > "${MODULE_SRCDIR}/make.inc" cat <<EOF > "${MODULE_SRCDIR}/make.inc"
......
#!/bin/bash #!/bin/bash
source "$(dirname $0)/../../lib/libem.bash" source "$(dirname $0)/../../../lib/libem.bash"
function em.configure() { function em.configure() {
cat <<EOF > "${MODULE_SRCDIR}/make.inc" cat <<EOF > "${MODULE_SRCDIR}/make.inc"
......
#!/bin/bash #!/bin/bash
source "$(dirname $0)/../../lib/libem.bash" source "$(dirname $0)/../../../lib/libem.bash"
function em.configure() { function em.configure() {
cat <<EOF > "${MODULE_SRCDIR}/make.inc" cat <<EOF > "${MODULE_SRCDIR}/make.inc"
......
#!/bin/bash #!/bin/bash
source "$(dirname $0)/../../lib/libem.bash" source "$(dirname $0)/../../../lib/libem.bash"
function em.configure() { function em.configure() {
cat <<EOF > "${MODULE_SRCDIR}/SuiteSparse_config/SuiteSparse_config.mk" cat <<EOF > "${MODULE_SRCDIR}/SuiteSparse_config/SuiteSparse_config.mk"
......
#!/bin/bash #!/bin/bash
source "$(dirname $0)/../lib/libem.bash" source "$(dirname $0)/../../../lib/libem.bash"
# :TODO: detect compiler # :TODO: detect compiler
TOOLSET=gcc TOOLSET=gcc
......
#!/bin/bash #!/bin/bash
source "$(dirname $0)/../lib/libem.bash" source "$(dirname $0)/../../../lib/libem.bash"
function em.configure() { function em.configure() {
"${MODULE_SRCDIR}"/configure \ "${MODULE_SRCDIR}"/configure \
......
#!/bin/bash #!/bin/bash
source "$(dirname $0)/../lib/libem.bash" source "$(dirname $0)/../../../lib/libem.bash"
function em.configure() { function em.configure() {
"${MODULE_SRCDIR}"/configure \ "${MODULE_SRCDIR}"/configure \
......
#!/bin/bash #!/bin/bash
source "$(dirname $0)/../lib/libem.bash" source "$(dirname $0)/../../../lib/libem.bash"
function em.configure() { function em.configure() {
"${MODULE_SRCDIR}"/configure \ "${MODULE_SRCDIR}"/configure \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment