diff --git a/lib/libem.bash b/lib/libem.bash index cf4af5e..b86c8dd 100644 --- a/lib/libem.bash +++ b/lib/libem.bash @@ -2,6 +2,11 @@ PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin +shopt -s expand_aliases + +source "${PSI_PREFIX}/${PSI_CONFIG_DIR}/profile.bash" +module use unstable + declare -r MODULECMD="${MODULESHOME}/bin/modulecmd" declare -r BUILDSCRIPT=$( cd $(dirname "$0") && pwd )/$(basename "$0") @@ -503,12 +508,13 @@ function em.install_doc() { } function _set_link() { - [[ ${cur_module_release} == ${MODULE_RELEASE} ]] && return 0 local _path if [[ "${cur_module_release}" != '' ]]; then _path="${PSI_PREFIX}/${PSI_MODULES_ROOT}/${MODULE_FAMILY}${cur_module_release/.stable}/${MODULE_NAME}" - info "Removing old sym-link \"${_path}\" ..." - rm "${_path}" + if [[ -e "${_path}" ]]; then + info "Removing old sym-link \"${_path}\" ..." + rm "${_path}" + fi fi ( _path="${PSI_PREFIX}/${PSI_MODULES_ROOT}/${MODULE_FAMILY}${MODULE_RELEASE/.stable}/${MODULE_NAME%/*}" diff --git a/scripts/OPAL.build b/scripts/OPAL.build index aa49cc3..fca9ff3 100755 --- a/scripts/OPAL.build +++ b/scripts/OPAL.build @@ -2,18 +2,18 @@ source "$(dirname $0)/../lib/libem.bash" +# add -fopenmp to CC and CXX, if you want to compile with OpenMP function em.configure() { - CC="$MPICC -fopenmp" CXX="$MPICXX -fopenmp" cmake \ + CC="$MPICC" CXX="$MPICXX" cmake \ -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ -DCMAKE_BUILD_TYPE=RELEASE \ -DENABLE_SAAMG_SOLVER=TRUE \ "${MODULE_SRCDIR}" } -em.add_to_family 'Tools' +em.add_to_family 'MPI' em.set_runtime_dependencies "${COMPILER}" "${MPI}" em.set_build_dependencies 'cmake' "${COMPILER}" "${MPI}" 'hdf5' 'H5hut' 'trilinos' 'ippl' 'gsl' -em.set_supported_compilers 'gcc/4.7' +em.set_supported_compilers 'gcc/4.7' 'gcc/4.8' em.make_all -