From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C4668158091 for ; Fri, 10 Jun 2022 14:08:06 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9CC61E0963; Fri, 10 Jun 2022 14:08:05 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7D13AE0963 for ; Fri, 10 Jun 2022 14:08:05 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 94170341800 for ; Fri, 10 Jun 2022 14:08:04 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2A8F250A for ; Fri, 10 Jun 2022 14:08:02 +0000 (UTC) From: "Andrew Ammerlaan" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andrew Ammerlaan" Message-ID: <1654833484.58c97e9106f584db6d57c33cfc4d450fc72f3b47.andrewammerlaan@gentoo> Subject: [gentoo-commits] repo/proj/guru:master commit in: sys-cluster/sionlib/ X-VCS-Repository: repo/proj/guru X-VCS-Files: sys-cluster/sionlib/sionlib-1.7.7-r4.ebuild X-VCS-Directories: sys-cluster/sionlib/ X-VCS-Committer: andrewammerlaan X-VCS-Committer-Name: Andrew Ammerlaan X-VCS-Revision: 58c97e9106f584db6d57c33cfc4d450fc72f3b47 X-VCS-Branch: master Date: Fri, 10 Jun 2022 14:08:02 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 500e8d00-4ef8-4f79-8892-57193dddcc3b X-Archives-Hash: bb89f7ba0e4a48611fd6bfdd1a63e44b commit: 58c97e9106f584db6d57c33cfc4d450fc72f3b47 Author: Alessandro Barbieri gmail com> AuthorDate: Thu Jun 9 22:47:12 2022 +0000 Commit: Andrew Ammerlaan gentoo org> CommitDate: Fri Jun 10 03:58:04 2022 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=58c97e91 sys-cluster/sionlib: fix mpich detection Signed-off-by: Alessandro Barbieri gmail.com> sys-cluster/sionlib/sionlib-1.7.7-r4.ebuild | 38 +++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/sys-cluster/sionlib/sionlib-1.7.7-r4.ebuild b/sys-cluster/sionlib/sionlib-1.7.7-r4.ebuild index 06981810e..4e0eba149 100644 --- a/sys-cluster/sionlib/sionlib-1.7.7-r4.ebuild +++ b/sys-cluster/sionlib/sionlib-1.7.7-r4.ebuild @@ -8,7 +8,7 @@ DOCS_CONFIG_NAME="doxy" FORTRAN_NEEDED="fortran" PYTHON_COMPAT=( pypy3 python3_{8..11} ) -inherit docs flag-o-matic fortran-2 python-any-r1 toolchain-funcs +inherit docs edo flag-o-matic fortran-2 python-any-r1 toolchain-funcs DESCRIPTION="Scalable I/O library for parallel access to task-local files" HOMEPAGE="https://www.fz-juelich.de/ias/jsc/EN/Expertise/Support/Software/SIONlib/_node.html" @@ -22,10 +22,6 @@ IUSE="+cxx debug deep-est-sdv doc examples +fortran hostname-regex +mpi +ompi +o RDEPEND=" mpi? ( virtual/mpi ) - ompi? ( - || ( sys-devel/gcc:*[openmp] sys-libs/libomp ) - virtual/mpi - ) openmp? ( || ( sys-devel/gcc:*[openmp] sys-libs/libomp ) ) sionfwd? ( sys-cluster/SIONfwd ) " @@ -34,7 +30,10 @@ DEPEND=" ${PYTHON_DEPS} " -REQUIRED_USE="?? ( hostname-regex deep-est-sdv )" +REQUIRED_USE=" + ompi? ( mpi openmp ) + ?? ( hostname-regex deep-est-sdv ) +" PATCHES=( "${FILESDIR}/${PN}-respect-flags-v3.patch" "${FILESDIR}/${PN}-build-shared-libraries.patch" @@ -43,7 +42,6 @@ PATCHES=( pkg_setup() { FORTRAN_NEED_OPENMP=0 use openmp && FORTRAN_NEED_OPENMP=1 - use ompi && FORTRAN_NEED_OPENMP=1 fortran-2_pkg_setup } @@ -77,7 +75,11 @@ src_configure() { #custom configure? use cxx || myconf+=( "--disable-cxx" ) use fortran || myconf+=( "--disable-fortran" ) - use mpi || myconf+=( "--disable-mpi" ) + if use mpi; then + myconf+=( "--mpi=$(detect_mpi_implementation || die)" ) + else + myconf+=( "--disable-mpi" ) + fi use ompi || myconf+=( "--disable-ompi" ) use openmp || myconf+=( "--disable-omp" ) use parutils || myconf+=( "--disable-parutils" ) @@ -126,3 +128,23 @@ src_install() { find "${ED}" -name '*.la' -delete || die } + +detect_mpi_implementation() { + cat > testmpi.c <<- EOF +#include "mpi.h" +#include "stdio.h" + +int main(){ + #ifdef OPEN_MPI + printf("%s","openmpi"); + #endif + + #ifdef MPICH + printf("%s%i","mpich",MPICH_NAME); + #endif + return 0; +} +EOF + edo ${CC} testmpi.c -o testmpi + ./testmpi || die +}