From eebd6a7a7cad2ea557eba7692648bf4d127bd3f6 Mon Sep 17 00:00:00 2001 From: MichaelJGilroy Date: Fri, 28 Jul 2017 00:39:48 -0600 Subject: added secondary loop for mpi_foreach args --- eclass/mpi-select.eclass | 60 ++++++++++++++++++++++++------------------------ 1 file 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}" } -- cgit v1.2.3-65-gdbad