diff options
author | 2017-07-28 00:39:48 -0600 | |
---|---|---|
committer | 2017-07-28 00:39:48 -0600 | |
commit | eebd6a7a7cad2ea557eba7692648bf4d127bd3f6 (patch) | |
tree | e4a344792aa25a91a261d91a5e2a39f8b968dd6a | |
parent | uses mpi_foreach instead of multilib_foreach (diff) | |
download | gentoo-mpi-eebd6a7a7cad2ea557eba7692648bf4d127bd3f6.tar.gz gentoo-mpi-eebd6a7a7cad2ea557eba7692648bf4d127bd3f6.tar.bz2 gentoo-mpi-eebd6a7a7cad2ea557eba7692648bf4d127bd3f6.zip |
added secondary loop for mpi_foreach args
-rw-r--r-- | eclass/mpi-select.eclass | 60 |
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}" } |