diff options
author | 2016-08-29 13:57:46 -0600 | |
---|---|---|
committer | 2016-08-29 13:57:46 -0600 | |
commit | d223fbab4e43b5b2bb78f3a4df7c3caf3632ab5a (patch) | |
tree | dd29a4eb2e652c2c9167f0d5e932facc7f45688a /sys-cluster | |
parent | sys-cluster/mpich: add forgotten mpi_root (diff) | |
download | sci-d223fbab4e43b5b2bb78f3a4df7c3caf3632ab5a.tar.gz sci-d223fbab4e43b5b2bb78f3a4df7c3caf3632ab5a.tar.bz2 sci-d223fbab4e43b5b2bb78f3a4df7c3caf3632ab5a.zip |
sys-cluster/mpich: bring back thread logic
Package-Manager: portage-2.2.28
Diffstat (limited to 'sys-cluster')
-rw-r--r-- | sys-cluster/mpich/mpich-3.2-r2.ebuild | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/sys-cluster/mpich/mpich-3.2-r2.ebuild b/sys-cluster/mpich/mpich-3.2-r2.ebuild index d66b32dd7..28dad07fe 100644 --- a/sys-cluster/mpich/mpich-3.2-r2.ebuild +++ b/sys-cluster/mpich/mpich-3.2-r2.ebuild @@ -18,7 +18,6 @@ SLOT="0" LICENSE="mpich" KEYWORDS="" IUSE="+cxx doc fortran mpi-threads romio threads" -REQUIRED_USE="mpi-threads? ( threads )" COMMON_DEPEND=" >=dev-libs/libaio-0.3.109-r5[${MULTILIB_USEDEP}] @@ -53,7 +52,22 @@ src_prepare() { multilib_src_configure() { # The configure statements can be somewhat confusing, as they # don't all show up in the top level configure, however, they - # are picked up in the children directories. + # are picked up in the children directories. Hence the separate + # local vars. + + local c= + if use mpi-threads; then + # MPI-THREAD requries threading. + c="${c} --with-thread-package=pthreads" + c="${c} --enable-threads=runtime" + else + if use threads ; then + c="${c} --with-thread-package=pthreads" + else + c="${c} --with-thread-package=none" + fi + c="${c} --enable-threads=single" + fi export MPICHLIB_CFLAGS="${CFLAGS}" export MPICHLIB_CPPFLAGS="${CPPFLAGS}" @@ -67,8 +81,7 @@ multilib_src_configure() { --enable-shared \ --sysconfdir="${EPREFIX}/etc/${PN}" \ --with-hwloc-prefix="${EPREFIX}/usr" \ - --enable-threads=$(usex mpi-threads runtime single) \ - --with-thread-package=$(usex threads pthreads none) \ + ${c} \ --with-pm=hydra \ --disable-fast \ --enable-versioning \ |