Merge branch 'master' of gitorious.psi.ch:pmodules/src

Conflicts:
	scripts/Bootstrap/Pmodules/libpmodules.bash
	scripts/Bootstrap/Pmodules/modmanage.in
This commit is contained in:
2015-04-13 15:35:25 +02:00
31 changed files with 521 additions and 256 deletions

View File

@@ -1,2 +1,3 @@
environment.bash
modulecmd
modmanage.bash

View File

@@ -2,7 +2,7 @@
#set -o functrace
source "$(dirname $0)/../../../lib/libem.bash"
TCL_DIR="${PSI_PREFIX}/Tools/Pmodules/0.99.0"
TCL_DIR="${PSI_PREFIX}/Tools/Pmodules/${PMODULES_VERSION}"
PATH="${TCL_DIR}/bin:${PATH}"

View File

@@ -90,27 +90,50 @@ prepend_path () {
fi
}
#
# Replace or remove a directory in a path variable.
#
# To remove a dir:
# replace_path PATH <pattern>
#
# To replace a dir:
# replace_path PATH <pattern> /replacement/path
#
# Args:
# $1 name of the shell variable to set (e.g. PATH)
# $2 a grep pattern identifying the element to be removed/replaced
# $3 the replacement string (use "" for removal)
#
# Based on solution published here:
# https://stackoverflow.com/questions/273909/how-do-i-manipulate-path-elements-in-shell-scripts
#
function replace_path () {
local -r path=$1
local -r removepat=$2
local -r replacestr=$3
local -r removestr=$(echo "${!path}" | tr ":" "\n" | grep -m 1 "^$removepat\$")
export $path=$(echo "${!path}" | tr ":" "\n" | sed "s:^${removestr}\$:${replacestr}:" |
sed '/^\s*$/d' | tr "\n" ":" | sed -e 's|^:||' -e 's|:$||')
}
module purge
#############################################################################
# setup environment
#
if [[ -z ${LOADEDMODULES} ]]; then
declare -x LOADEDMODULES=''
fi
if [[ -z ${MODULEPATH} ]]; then
declare -x MODULEPATH=''
fi
if [[ -z ${PSI_LOADEDFAMILIES} ]]; then
declare -x PSI_LOADEDFAMILIES=''
fi
declare -x LOADEDMODULES=''
declare -x PSI_LOADEDFAMILIES=''
declare -x MODULEPATH=''
for f in ${PSI_DEFAULT_FAMILIES}; do
append_path MODULEPATH "${PSI_PREFIX}/${PSI_MODULES_ROOT}/$f"
append_path PSI_LOADEDFAMILIES "${f}"
done
append_path PATH "${PMODULES_HOME}/bin"
append_path MANPATH "${PMODULES_HOME}/share/man"
replace_path PATH "${PMODULES_HOME%/*}/.*"
replace_path MANPATH "${PMODULES_HOME%/*}/.*"
append_path PATH "${PMODULES_HOME}/bin"
append_path MANPATH "${PMODULES_HOME}/share/man"
#############################################################################
# initialize bash completion
@@ -122,10 +145,9 @@ fi
#############################################################################
# legacy...
#
declare -x MODULE_VERSION=${PMODULES_VERSION}
declare -x MODULE_VERSION_STACK="${PMODULE_VERSION}"
declare -x MODULESHOME="${PMODULES_HOME}"
unset MODULE_VERSION
unset MODULE_VERSION_STACK
unset MODULESHOME
# Local Variables:
# mode: sh

View File

@@ -338,7 +338,7 @@ function module_picker() {
# if DIALOG_LIB is NOT set, call module picker
[[ ${DIALOG_LIB:+"is_lib"} == "is_lib" ]] || {
if [[ -x ${PMODULES_HOME}/bin/modulecmd ]]; then
module_picker "$1" < <(${PMODULES_HOME}/bin/modulecmd bash search --no-header -a 2>&1)
module_picker "${1:-$PSI_PREFIX}" < <(${PMODULES_HOME}/bin/modulecmd bash search --src="${2:-/afs/psi.ch/sys/psi.x86_64_slp6}" --no-header -a 2>&1)
else
echo "ERROR: module environment configuration: ${PMODULES_HOME}/bin/modulecmd is not an executable!"
fi

View File

@@ -3,7 +3,7 @@
declare -x PSI_PREFIX=$(cd $(dirname "${BASH_SOURCE}")/.. && pwd)
if [[ -z ${PMODULES_VERSION} ]]; then
declare -x PMODULES_VERSION="0.99.1"
declare -x PMODULES_VERSION="@PMODULES_VERSION@"
fi
declare -x PMODULES_HOME="${PSI_PREFIX}/Tools/Pmodules/${PMODULES_VERSION}"

View File

@@ -181,6 +181,8 @@ proc set_std_environment { PREFIX name version } {
if { [lsearch ${::dont-setenv} "${NAME}_HOME"] == -1 } {
setenv ${NAME}_HOME $PREFIX
}
} else {
debug "$PREFIX is not a directory"
}
if { [file isdirectory "$PREFIX/bin"] } {

View File

@@ -58,22 +58,30 @@ get_options() {
"${bindir}/getopt" "$@"
}
check_pmodules_env() {
check_pmodules_env_vars() {
[[ -n "${PSI_PREFIX}" ]] &&
[[ -n "${PSI_CONFIG_DIR}" ]] &&
[[ -n "${PSI_MODULES_ROOT}" ]] &&
[[ -n "${PSI_TEMPLATES_DIR}" ]] &&
[[ -n "${PMODULES_HOME}" ]] &&
[[ -n "${PMODULES_VERSION}" ]] || die 1 "
Error: not running within a valid module environment!"
Error: the module environment you are going to use as source has not been
initialized properly!"
}
[[ -d "${PSI_PREFIX}" ]] &&
[[ -d "${PSI_PREFIX}/${PSI_CONFIG_DIR}" ]] &&
[[ -d "${PSI_PREFIX}/${PSI_MODULES_ROOT}" ]] &&
[[ -d "${PSI_PREFIX}/${PSI_TEMPLATES_DIR}" ]] &&
[[ -d "${PMODULES_HOME}" ]] || die 1 "
Error: the module environment '$PSI_PREFIX' is invalid!"
check_pmodules_directories() {
local -r src_prefix="$1"
[[ -d "${src_prefix}" ]] &&
[[ -d "${src_prefix}/${PSI_CONFIG_DIR}" ]] &&
[[ -d "${src_prefix}/${PSI_MODULES_ROOT}" ]] &&
[[ -d "${src_prefix}/${PSI_TEMPLATES_DIR}" ]] &&
[[ -d "${src_prefix}/Tools/Pmodules/${PMODULES_VERSION}" ]] || die 1 "
Error: the module environment '${src_prefix}' has not been initialized properly!"
}
check_pmodules_env() {
check_pmodules_env_vars
check_pmodules_directories "${PSI_PREFIX}"
}

View File

@@ -1,5 +1,7 @@
#!@PMODULES_HOME@/bin/bash
unset CDPATH
shopt -s expand_aliases
declare -r bindir=$(cd $(dirname "$0") && pwd)
@@ -25,7 +27,7 @@ Switches:
--force force overwrite
Available SubCommands and Args:
init [--src=<src>] [--user=<user>] --dst=<dst>
init [--src=<src>] [--user=<user>] <dst>
Initialize a new minimal Pmodule environment.
install <module> [--with=<dep>...]
@@ -54,7 +56,7 @@ init [--src=<src>] [--user=<user>] <dst>
subcommand_help_install() {
echo "
install <module> [--with=<dep>...]
install <module>... [--with=<dep>...] [--release=<release>...] [--src=<src>]
Install matching modules
" 1>&2
}
@@ -125,11 +127,12 @@ sync_module() {
local -r rel_module_prefix=$( get_module_prefix "${rel_modulefile}" )
local -r rel_releasefile=$( get_releasefile_name "${rel_modulefile}" )
$DRY mkdir -p "${target_prefix}/${rel_module_prefix}" || return $?
$DRY rsync --links --perms --recursive --delete \
"${src_prefix}/${rel_module_prefix}/" \
"${target_prefix}/${rel_module_prefix}/" || return $?
if [[ ! -d "${target_prefix}/${rel_module_prefix}" ]] || [[ "${force}" == 'yes' ]]; then
$DRY mkdir -p "${target_prefix}/${rel_module_prefix}" || return $?
$DRY rsync --links --perms --recursive --delete \
"${src_prefix}/${rel_module_prefix}/" \
"${target_prefix}/${rel_module_prefix}/" || return $?
fi
local -r src_modulefile="${src_prefix}/${PSI_MODULES_ROOT}/${rel_modulefile}"
local -r src_releasefile="${src_prefix}/${PSI_MODULES_ROOT}/${rel_releasefile}"
local -r target_modulefile="${target_prefix}/${PSI_MODULES_ROOT}/${rel_modulefile}"
@@ -174,7 +177,7 @@ subcommand_init() {
local target_prefixes=()
local user=''
local opts=''
opts=$(get_options -o h -l src: -l user: -l help -- "$@")
opts=$(get_options -o h -l src: -l user: -l help -l version: -- "$@")
if [[ $? != 0 ]]; then
subcommand_help_init
exit 1
@@ -190,6 +193,10 @@ subcommand_init() {
user=$2
shift
;;
--version )
PMODULES_VERSION=$2
shift
;;
-- )
:
;;
@@ -231,6 +238,7 @@ environment at '${PSI_PREFIX}'
"
init_pmodules_environment() {
local -r src_prefix="${PSI_PREFIX}"
local -r target_prefix=$1
local src=''
local dst=''
@@ -250,12 +258,23 @@ environment at '${PSI_PREFIX}'
sync_config "${PSI_PREFIX}" \
"${target_prefix}" || die 1 "Error: configuration synchronization failed!"
dst="${target_prefix}/${PSI_MODULES_ROOT}/"
echo "Creating root directory '${dst}' for module hierarchy ..."
$DRY mkdir -p "${dst}"
echo
echo "Syncing Pmodules ..."
sync_module "Tools/Pmodules/${PMODULES_VERSION}" \
"${PSI_PREFIX}" \
"${src_prefix}" \
"${target_prefix}" || die 1 "Error: sync Pmodules failed!"
echo
dst="${target_prefix}/${PSI_CONFIG_DIR}/environment.bash"
echo "Adding installation source '${src_prefix}' to '${dst}'..."
sed -i .bak '/PMODULES_INSTALL_SOURCE/d' "${dst}"
echo "declare -x PMODULES_INSTALL_SOURCE=\"${src_prefix}\"" >> "${dst}"
echo
if [[ -n "${user}" ]]; then
echo "Changing user of new module environment to '${user}'..."
$DRY chown -R "${user}" "${target_prefix}" || die 1 "Error: changing owner failed!"
@@ -279,8 +298,10 @@ subcommand_install() {
local -a with=()
local -a releases=()
local -a module_pattern=()
local -r src_prefix="${PMODULES_INSTALL_SOURCE}"
local -r target_prefix="${PSI_PREFIX}"
opts=$(get_options -o h -l with: -l release: -l help -- "$@")
opts=$(get_options -o hf -l dry-run -l force -l with: -l release: -l help -l src: -- "$@")
if [[ $? != 0 ]]; then
subcommand_help_install
exit 1
@@ -288,9 +309,18 @@ subcommand_install() {
eval set -- "${opts}"
while (($# > 0)); do
case $1 in
--dry-run )
DRY='echo'
;;
--force | -f )
force='yes'
;;
--release )
releases+=( "$2" )
echo $2
shift
;;
--src )
src_prefix="$2"
shift
;;
--with )
@@ -300,7 +330,11 @@ subcommand_install() {
-- )
:
;;
-* | -h | --help )
-h | --help )
subcommand_help_install
exit 1
;;
-* )
echo "$1: illegal option" 1>&2
subcommand_help_init
exit 1
@@ -311,7 +345,36 @@ subcommand_install() {
esac
shift
done
${PMODULES_HOME}/bin/modulecmd bash search "${module_pattern[@]}" "${with[@]/#/--with}" "${releases[@]/#/--release=}" --no-header
local -A modules_to_install
local -i n=0
while read rel_modulefile; do
modules_to_install["${rel_modulefile}"]+='.'
let n+=1
done < <(${PMODULES_HOME}/bin/modulecmd bash search \
"${module_pattern[@]}" \
"${with[@]/#/--with=}" \
"${releases[@]/#/--release=}" \
--no-header --print-modulefiles \
--src="${src_prefix}" 2>&1)
(( n == 0 )) && die 0 "Nothing to install..."
echo -e "The following modules will be installed/updated:\n" 1>&2
for key in "${!modules_to_install[@]}"; do
echo " ${key}" 1>&2
done
echo 1>&2
get_YN_answer "Do you want to continue? [n] " || die 1 "Aborting..."
echo 1>&2
for rel_modulefile in "${!modules_to_install[@]}"; do
if [[ -d "${target_prefix}/${rel_modulefile}" ]]; then
echo " Updating; ${rel_modulefile}..." 1>&2
else
echo " Installing: ${rel_modulefile}..."
fi
sync_module "${rel_modulefile}" \
"${src_prefix}" \
"${target_prefix}"
done
echo -e "\nDone!\n" 1>&2
}
subcommand_sync() {

View File

@@ -1,4 +1,8 @@
#!@PMODULES_HOME@/bin/bash
#
# we have to unset CDPATH, otherwise 'cd' prints the directoy!
unset CDPATH
declare -r PMODULES_DIR=$( cd "$(dirname $0)/.." && pwd )
declare -r version='@PMODULES_VERSION@'
@@ -10,6 +14,8 @@ declare -rx PSI_LIBMODULES="${PMODULES_DIR}/lib/libmodules.tcl"
declare -r modulepath_root="${PSI_PREFIX}/${PSI_MODULES_ROOT}"
declare -ra modulepath=( ${MODULEPATH//:/ } )
source "${PMODULES_DIR}/lib/libpmodules.bash"
if set -o | grep 'xtrace' | grep -q 'on'; then
declare -r __XTRACE__='on'
else
@@ -462,6 +468,11 @@ subcommand_generic1plus() {
"${modulecmd}" "${shell}" "${subcommand}" "$@"
}
#
# load module
#
# $1: module to load
#
subcommand_load() {
output_load_hints() {
local -ra rels=( ${available_releases//:/ } )
@@ -507,7 +518,9 @@ subcommand_load() {
}
local -r m=$1
if module_is_available "${m}"; then
if [[ "${m}" == "" ]]; then
echo "No module specified." 1>&2
elif module_is_available "${m}"; then
"${modulecmd}" "${shell}" load "${m}"
else
if [[ ${userlvl} = 'novice' ]]; then
@@ -668,22 +681,25 @@ subcommand_avail() {
}
get_families () {
if [[ ! -d "${modulepath_root}" ]]; then
local -r module_hierarchy_root="$1"
if [[ ! -d "${module_hierarchy_root}" ]]; then
echo ""
else
{
cd "${modulepath_root}"
cd "${module_hierarchy_root}"
ls -1
}
fi
}
#
# $1: family name (not path!)
# $1: root of modulefile hierarchy
# $2: family name (not path!)
compute_family_depth () {
local -r module_hierarchy_root="$1"
local -r family=$2
{
local -r family=$1
cd "${modulepath_root}"
cd "${module_hierarchy_root}"
local -r tmp=$(find "${family}" -depth -type f -o -type l | head -1)
local -ar tmp2=( ${tmp//\// } )
local depth=${#tmp2[@]}
@@ -701,8 +717,8 @@ subcommand_use() {
echo -e "\t${f}" 1>&2
done
echo -e "\nFamilies you may use in addition:" 1>&2
for family in $(get_families); do
local -i depth=$( compute_family_depth "${family}")
for family in $(get_families "${modulepath_root}"); do
local -i depth=$( compute_family_depth "${modulepath_root}" "${family}")
if ! is_used_family $f && (( depth == 0 )); then
echo -e "\t${f}" 1>&2
fi
@@ -739,7 +755,7 @@ subcommand_use() {
# releases are always *appended*
append_path PSI_USED_RELEASES "${arg}"
elif [[ ! ${arg} =~ */* ]] && [[ -d ${modulepath_root}/${arg} ]]; then
local -i depth=$(compute_family_depth "${arg}")
local -i depth=$(compute_family_depth "${modulepath_root}" "${arg}")
if (( depth == 0 )); then
dirs_to_add+=( ${modulepath_root}/${arg} )
else
@@ -816,6 +832,7 @@ subcommand_clear() {
subcommand_search() {
local modules=()
local with_modules='//'
local src_prefix=''
local _print_header='yes'
local _print_modulefiles='no'
local use_releases=':'
@@ -833,22 +850,23 @@ subcommand_search() {
# $1: module name pattern
search () {
local -r module=$1
local -r module_hierarchy_root="${src_prefix}/${PSI_MODULES_ROOT}"
# we must write temporary results to a file for sorting
local -r tmpfile=$( mktemp /tmp/$(basename $0).XXXXXX ) || exit 1
local family
# loop over all families
for family in $(get_families); do
local -i depth=$( compute_family_depth ${family} )
for family in $(get_families "${module_hierarchy_root}"); do
local -i depth=$( compute_family_depth "${module_hierarchy_root}" "${family}" )
# get all potential directories of family $f with module-files
local mpaths=( $(find \
"${modulepath_root}/${family}" \
"${module_hierarchy_root}/${family}" \
-type d \
-mindepth ${depth} -maxdepth ${depth} \
2>/dev/null))
local mpath
for mpath in "${mpaths[@]}"; do
# get dependencies encoded in directory name
local p="${mpath/${modulepath_root}}"
local p="${mpath/${module_hierarchy_root}}"
p=( ${p//\// } )
local deps=()
local -i i
@@ -870,15 +888,15 @@ subcommand_search() {
done
done
done
if [[ "{_print_modulefiles}" == "no" ]]; then
if [[ "${_print_modulefiles}" == "no" ]]; then
sort -k 1,1 -k 4,4 -k 5,5 "${tmpfile}" | awk "${with_modules}" 1>&2
else
while read -a line; do
echo -n "${line[2]}/"
echo -n "${line[2]}/" 1>&2
for d in "${line[@]:3}"; do
echo -n "$d/"
echo -n "$d/" 1>&2
done
echo "${line[0]}"
echo "${line[0]}" 1>&2
done < <(sort -k 1,1 -k 4,4 -k 5,5 "${tmpfile}" | awk "${with_modules}")
fi
rm -f "${tmpfile}"
@@ -914,6 +932,10 @@ subcommand_search() {
-a | --all-releases )
use_releases=${available_releases}
;;
--src=* )
src_prefix=${1/--src=}
check_pmodules_directories "${src_prefix}"
;;
-? | -h | --help )
usage
;;
@@ -927,9 +949,12 @@ subcommand_search() {
esac
shift
done
if [[ -z "${src_prefix}" ]]; then
src_prefix="${PSI_PREFIX}"
fi
if [[ "${use_releases}" == ":" ]]; then
use_releases=":${PSI_USED_RELEASES}:"
use_releases=":${PSI_USED_RELEASES}:"
fi
[[ "${_print_header}" == "yes" ]] && print_header

View File

@@ -0,0 +1,7 @@
declare -x PMODULES_VERSION=0.99.1
declare -x MODULES_VERSION=3.2.10
declare -a COMPILER_VERSIONS=( 'gcc/4.7.4' 'gcc/4.8.3' 'gcc/4.8.4' 'gcc/4.9.2' )
declare -a MPI_VERSIONS=( 'openmpi/1.6.5' 'openmpi/1.8.2' 'openmpi/1.8.4' )
declare -a HDF5_VERSIONS=( 'hdf5/1.8.12' 'hdf5/1.8.14' )
declare -a HDF5_SERIAL_VERSIONS=( 'hdf5_serial/1.8.12' 'hdf5_serial/1.8.14' )

View File

@@ -21,7 +21,6 @@ function em.post_install() {
{ cd "${PREFIX}"/bin && rm -f tclsh && ln -fs tclsh${V%.*} tclsh; };
}
em.add_to_family 'Programming'
em.add_to_family 'Tools'
em.set_docfiles 'license.terms' 'README'
em.set_build_dependencies "${COMPILER}"
em.make_all

View File

@@ -8,6 +8,5 @@ function em.configure() {
|| exit 1
}
em.add_to_family 'System'
em.set_build_dependencies "${COMPILER}"
em.add_to_family 'Tools'
em.make_all

View File

@@ -3,18 +3,18 @@
declare -r BASE_DIR=$(cd "$(dirname $0)/../.." && pwd)
declare -r BOOTSTRAP_DIR="${BASE_DIR}/scripts/Bootstrap"
source "${BASE_DIR}/config/Pmodules.conf"
source "${BOOTSTRAP_DIR}/Pmodules_version.conf"
unset PMODULES_HOME
source "/opt/psi/config/environment.bash"
${BOOTSTRAP_DIR}/gettext/build --bootstrap
${BOOTSTRAP_DIR}/getopt/build --bootstrap
${BOOTSTRAP_DIR}/dialog/build --bootstrap
${BOOTSTRAP_DIR}/bash/build --bootstrap
${BOOTSTRAP_DIR}/Tcl/build --bootstrap
${BOOTSTRAP_DIR}/gettext/build --bootstrap || { echo "compiling 'gettext' failed!"; exit 1; }
${BOOTSTRAP_DIR}/getopt/build --bootstrap || { echo "compiling 'getopt' failed!"; exit 1; }
${BOOTSTRAP_DIR}/dialog/build --bootstrap || { echo "compiling 'dialog' failed!"; exit 1; }
${BOOTSTRAP_DIR}/bash/build --bootstrap || { echo "compiling 'bash' failed!"; exit 1; }
${BOOTSTRAP_DIR}/Tcl/build --bootstrap || { echo "compiling 'Tcl' failed!"; exit 1; }
# we have to remove the init directory - otherwise the next build will fail...
rm -rf "${PMODULES_HOME}/init"
${BOOTSTRAP_DIR}/Modules/build --bootstrap
${BOOTSTRAP_DIR}/Modules/build --bootstrap || { echo "compiling 'Modules' failed!"; exit 1; }
mv -v "${PMODULES_HOME}/bin/modulecmd" "${PMODULES_HOME}/bin/modulecmd.tcl"

View File

@@ -9,5 +9,4 @@ function em.configure() {
}
em.add_to_family 'Tools'
em.set_build_dependencies "${COMPILER}"
em.make_all

View File

@@ -20,5 +20,4 @@ function em.configure() {
}
em.add_to_family 'Tools'
em.set_build_dependencies "${COMPILER}"
em.make_all

View File

@@ -4,7 +4,7 @@ declare -r BASE_DIR=$(cd "$(dirname $0)/../.." && pwd)
declare -r BOOTSTRAP_DIR="${BASE_DIR}/scripts/Bootstrap"
declare -r SRC_DIR="${BOOTSTRAP_DIR}/Pmodules"
source "${BASE_DIR}/config/Pmodules.conf"
source "${BOOTSTRAP_DIR}/Pmodules_version.conf"
unset PMODULES_HOME
source "/opt/psi/config/environment.bash"
@@ -14,6 +14,7 @@ sed_cmd+="s:@PMODULES_VERSION@:${PMODULES_VERSION}:g;"
sed_cmd+="s:@MODULES_VERSION@:${MODULES_VERSION}:g"
sed "${sed_cmd}" "${SRC_DIR}/modulecmd.in" > "${SRC_DIR}/modulecmd"
sed "${sed_cmd}" "${SRC_DIR}/modmanage.in" > "${SRC_DIR}/modmanage.bash"
sed "${sed_cmd}" "${SRC_DIR}/environment.bash.in" > "${SRC_DIR}/environment.bash"
install -d -m 0755 "${PMODULES_HOME}/bin"
install -d -m 0755 "${PMODULES_HOME}/config"

View File

@@ -18,7 +18,6 @@ function em.configure() {
--prefix="${PREFIX}" \
--enable-parallel \
--enable-debug \
--enable-vtkconverter \
--with-hdf5=$HDF5_PREFIX \
--with-pic \
|| exit 1
@@ -37,7 +36,7 @@ function em.install() {
em.add_to_family 'HDF5'
em.set_runtime_dependencies "${COMPILER}" "${MPI}" 'hdf5'
em.set_build_dependencies "autoconf" "automake" "libtool" "${COMPILER}" "${MPI}" "vtk" "hdf5"
em.set_build_dependencies "autoconf" "automake" "libtool" "${COMPILER}" "${MPI}" "hdf5"
em.set_docfiles 'AUTHORS' 'COPYING'
em.make_all

View File

@@ -19,6 +19,7 @@ for cc in "${COMPILER_VERSIONS[@]}"; do
echo " compile: $cc"
echo " mpi: $mpi"
echo " hdf5: $hdf5"
exit 1
}
done
done

View File

@@ -0,0 +1,23 @@
#!/bin/bash
declare -r basedir=$(dirname $0)
source '../../config/Pmodules.conf'
declare -r recipe="${basedir}/$1/build"
shift
if [[ ! -x "${recipe}" ]]; then
echo "Error: no recipe to build '$1'!"
exit 1
fi
for cc in "${COMPILER_VERSIONS[@]}"; do
for hdf in "${HDF5_SERIAL_VERSIONS[@]}"; do
"${recipe}" "$@" --with=$cc --with=$hdf || {
echo "Oops: build failed for:"
echo " compiler: $cc"
echo " HDF5 (serial): $hdf"
exit 1
}
done
done

View File

@@ -0,0 +1,9 @@
gcc/4.8.3
openmpi/1.8.2
ippl/1.1.4
hdf5/1.8.12
H5hut/1.99.13
trilinos/11.10.2
boost/1.55.0
gsl/1.15
root/5.34.19

View File

@@ -17,6 +17,7 @@ for cc in "${COMPILER_VERSIONS[@]}"; do
echo "Oops: build failed for:"
echo " compiler: $cc"
echo " mpi: $mpi"
exit 1
}
done
done

View File

@@ -12,9 +12,9 @@ function em.configure() {
"${MODULE_SRCDIR}"
}
em.add_to_family 'MPI'
em.add_to_family 'OPAL'
em.set_runtime_dependencies "${COMPILER}" "${MPI}"
em.set_build_dependencies 'cmake' "${COMPILER}" "${MPI}" 'boost' 'hdf5' 'H5hut' 'trilinos' 'ippl' 'gsl' 'boost' 'OPAL'
em.set_supported_compilers 'gcc/4.7' 'gcc/4.8'
em.set_supported_compilers 'gcc/4.8'
em.make_all

View File

@@ -0,0 +1,10 @@
gcc/4.8.3
openmpi/1.8.2
ippl/1.1.4
hdf5/1.8.12
H5hut/1.99.13
trilinos/11.10.2
boost/1.55.0
gsl/1.15
root/5.34.19
OPAL/1.3.2

View File

@@ -21,7 +21,9 @@ function em.post_install() {
{ cd "${PREFIX}"/bin && rm -f tclsh && ln -fs tclsh${V%.*} tclsh; };
}
# use system's cc
declare CC=cc
em.add_to_family 'Programming'
em.set_docfiles 'license.terms' 'README'
em.set_build_dependencies "${COMPILER}"
em.make_all

32
scripts/Programming/Tk/build Executable file
View File

@@ -0,0 +1,32 @@
#!/bin/bash
source "$(dirname $0)/../../../lib/libem.bash"
function em.configure() {
case ${OS} in
Linux )
srcdir="${MODULE_SRCDIR}/unix"
;;
Darwin )
srcdir="${MODULE_SRCDIR}/macosx"
;;
esac
"${srcdir}"/configure \
--prefix="${PREFIX}" \
--with-tcl=${TCL_PREFIX}/lib \
--enable-shared=no \
|| exit 1
}
function em.post_install() {
:
#{ cd "${PREFIX}"/bin && rm -f tclsh && ln -fs tclsh${V%.*} tclsh; };
}
# use system's cc
declare CC=cc
em.add_to_family 'Programming'
em.set_build_dependencies 'Tcl'
em.set_docfiles 'license.terms' 'README'
em.make_all

View File

@@ -23,7 +23,6 @@ function em.install() {
make install
}
em.release 'unstable'
em.add_to_family 'System'
em.set_build_dependencies "${COMPILER}"
em.make_all

27
scripts/Tools/git/build Executable file
View File

@@ -0,0 +1,27 @@
#!/bin/bash
source "$(dirname $0)/../../../lib/libem.bash"
function em.configure() {
cd "${MODULE_SRCDIR}"
"${MODULE_SRCDIR}"/configure \
--prefix="${PREFIX}" \
--with-tcltk \
|| exit 1
}
function em.build() {
cd "${MODULE_SRCDIR}"
make
}
em.add_to_family 'Tools'
em.set_runtime_dependencies 'Tcl' 'Tk'
em.set_docfiles 'COPYING' 'README'
em.make_all
# Local Variables:
# mode: sh
# sh-basic-offset: 8
# tab-width: 8
# End:

View File

@@ -0,0 +1,2 @@
Tcl/8.6.4
Tk/8.6.4