aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--eclass/mpi-select.eclass60
1 files changed, 30 insertions, 30 deletions
diff --git a/eclass/mpi-select.eclass b/eclass/mpi-select.eclass
index e25043a..78df12a 100644
--- a/eclass/mpi-select.eclass
+++ b/eclass/mpi-select.eclass
@@ -260,36 +260,36 @@ mpi_foreach_implementation()
# die "No mpi implementations detected"
local status=0
-
- for implementation in "${@}"
- do
- # iterate through implementations, repeat same commands for each variant
- if [[ "${IMPLEMENTATION_LIST}" == *"${implementation}"* ]]; then
- local BUILD_DIR="${WORKDIR}/build"
- einfo ${BUILD_DIR}
-
- # modeling after multibuild for testing & learning
- _mpi_run()
- {
- local i=1
- while [[ ${!1} == _* ]];do
- i+=1
- done
-
- [[ ${i} -le ${#} ]]
- einfo ${@}
- echo ${@}
- }
-
- _mpi_run "${@}"
- else
- die "invalid implementation!"
- fi
-
-
- done
-
- echo "${status}"
+ for arg in "${@}"; do
+ for implementation in "${MPI_TARGETS}"
+ do
+ # iterate through implementations, repeat same commands for each variant
+ if [[ "${IMPLEMENTATION_LIST}" == *"${implementation}"* ]]; then
+ local BUILD_DIR="${WORKDIR}/build"
+ einfo ${BUILD_DIR}
+
+ # modeling after multibuild for testing & learning
+ _mpi_run()
+ {
+ local i=1
+ while [[ ${!1} == _* ]];do
+ i+=1
+ done
+
+ [[ ${i} -le ${#} ]]
+ einfo ${@}
+ ${@}
+ }
+
+ _mpi_run "${@}"
+ else
+ die "invalid implementation!"
+ fi
+
+
+ done
+ done
+ echo "${status}"
}