aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'eclass/mpi-select.eclass')
-rw-r--r--eclass/mpi-select.eclass34
1 files changed, 29 insertions, 5 deletions
diff --git a/eclass/mpi-select.eclass b/eclass/mpi-select.eclass
index 49d2ef9..4dfa8d3 100644
--- a/eclass/mpi-select.eclass
+++ b/eclass/mpi-select.eclass
@@ -6,6 +6,8 @@
# Michael Gilroy <michael.gilroy24@gmail.com>
# @BLURB: Allow mpi software to select mpi implementation of choice.
+EXPORT_FUNCTIONS src_configure src_compile src_test src_install
+
case ${EAPI:-0} in
6) ;;
5) ;;
@@ -18,19 +20,20 @@ esac
# List of used MPI implementation
IMPLEMENTATION_LIST="mpich mpich2 openmpi openib-mvapich2"
-# @ECLASS-VARIABLE: INSTALLED_IMPLEMENTATIONS
+# @ECLASS-VARIABLE: MPI_DIR
# @INTERNAL
# @DESCRIPTION:
-# To be populated by mpi-select_detect_installs
-INSTALLED_IMPLEMENTATIONS=""
+# Location in which mpi software should be installed
+MPI_DIR="/usr/$(get_libdir)/mpi"
# @ECLASS-FUNCTION: mpi-select_implementation_install
# @DESCRIPTION:
# Install MPI software with arbitrary implementations
mpi-select_implementation_install (){
+ local installed=mpi-select_detect_installs
for implementation in "$@"
do
- if [[ "${IMPLEMENTATION_LIST}" == *"${implementation}"* ]]; then
+ if [[ "${installed}" == *"${implementation}"* ]]; then
# go through src_[phase]
else
die "invalid implementation"
@@ -41,5 +44,26 @@ mpi-select_implementation_install (){
# @DESCRIPTION:
# See what MPI software is installed on the system
mpi-select_detect_installs (){
- # iterate through /usr/lib/mpi to populate INSTALLED_IMPLEMENTATIONS
+ for dir in "${MPI_DIR}"/*
+ do
+ INSTALLED_IMPLEMENTATIONS="${INSTALLED_IMPLEMENTATIONS} ${dir}"
+ done
+
+ echo "${INSTALLED_IMPLEMENTATIONS}"
+}
+
+mpi-select_src_configure (){
+ default
+}
+
+mpi-select_src_compile (){
+ default
+}
+
+mpi-select_src_test (){
+ default
+}
+
+mpi-select_src_install (){
+ default
}