From nobody Fri Aug 30 17:51:00 2024 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WwQg92ZSrz5PQdr; Fri, 30 Aug 2024 17:51:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WwQg908tBz4Kyt; Fri, 30 Aug 2024 17:51:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725040261; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EVQR07pRnFvlZAp0dUrJCmTv7NMB/ln5nJe5k5W+jfA=; b=iPTmNE2ZZiwR1xH7SbHuZUVmmhv/3nwoA50aazSqCYiplFcjnd6vQxsm0+MD3iHsOVObY9 Ioxc079OXmckbMDHJMzOthg7hCLgHzFGvpQMTuCog8kOBO/HXzTac+vmMBoaW6Dpcn1VrI MaaVcrplmy8Q2dahRhpLqulgHz1pXdoNKtQK4ZPW2nmDj+XHkgA0Uw/yAcfGP+QK0DxHGb e+D3muru0N8olUGtiHXTYU+xO2OYHoBbZwwEHferuXHeECpB50QH9RLft/Iz6dFzIyUla6 C7OAJwbrc9dGt5c7vg0H1yVqoTlny5PAEXmdU2udP/9WJ5nlgkWaAuNV6dzoUA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725040261; a=rsa-sha256; cv=none; b=KvZMquwhHohoQphbo5n+grkfWsCZQhkM8m4IvBmGEhXLdPYb6TP3Rv6iutYGwsYdyNBDag NC7zXog3QpA6TDxolMTEkUTUl710EnFMR2oVnADPgW1244oX8hMRLZfnX9Y37nxeI0Ydyi b3lLmUhFOMQo67tvnZlxfnAPBUcWbJmqgHl8vQ09C3wVTEkc3G7EBdscp09vnZd5Sdsf0O nipEpXLkp66QVUPYD6wADtuGDDNouBi5N2Rpuvo95CHQzWIEffXjLd7o5qUxyFRjQZQzr4 6fY02SE5YTFHfJmIur2LFF4ry/nfag62441BCJOrUVyjnc4A26PqqrKzEaNCAA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725040261; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EVQR07pRnFvlZAp0dUrJCmTv7NMB/ln5nJe5k5W+jfA=; b=vtqWwjmozhI2BEPaIgKcTHKwTEfgZaC4FrLAnyYRMeAb/IKREoAhFAEKjv+C21vFFgK6ER YFiKMPFc0zjiNUGQgHKskeD2VNmj6LvHDjVA+lz/pVHkWTEwxeZaFnSLvS3bSijQiEDxOV LCw63XnzQ1HwsfULdLj/gzxWD2eUBuLmqW9XKrW3r8SoG+Gr2RP73xX7+K3KF/WEA1d+n3 dyq4RK3IALZ4nZ68qvd5WR7QgLsIk3mILglplH1EHz1jRQslvZJf1yhcU61/c9bZWcuIhI 4wHWgSisa9jVf2fTpI6T2CDf/c5tGQuOa1MeNgw5qLELC5bCcZRgPqptHbKUFg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WwQg865srz19TX; Fri, 30 Aug 2024 17:51:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 47UHp0jW004474; Fri, 30 Aug 2024 17:51:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 47UHp0AT004471; Fri, 30 Aug 2024 17:51:00 GMT (envelope-from git) Date: Fri, 30 Aug 2024 17:51:00 GMT Message-Id: <202408301751.47UHp0AT004471@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Yuri Victorovich Subject: git: 1afb7cd5cdc7 - main - science/abinit: Add MPI options; Fix run-time failures due to wrong version List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yuri X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1afb7cd5cdc7ba233f6960f1cec714333a4ec76c Auto-Submitted: auto-generated The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=1afb7cd5cdc7ba233f6960f1cec714333a4ec76c commit 1afb7cd5cdc7ba233f6960f1cec714333a4ec76c Author: Yuri Victorovich AuthorDate: 2024-08-30 16:23:38 +0000 Commit: Yuri Victorovich CommitDate: 2024-08-30 17:50:55 +0000 science/abinit: Add MPI options; Fix run-time failures due to wrong version MPI options NOMPI MPICH OPENMPI are added, MPICH is a default. As it turned out, openmpi is also currently broken on FreeBSD due to failure to allocate shmem backing memory. The abinit failure to determine version is also fixed. It used UNKNOWN as version which caused run-time failure to save data. PR: 281122 Reported by: Ramon (run-time failure due to UNKNOWN version) --- science/abinit/Makefile | 63 +++++++++++++++++++++++++++++++++++-------------- 1 file changed, 45 insertions(+), 18 deletions(-) diff --git a/science/abinit/Makefile b/science/abinit/Makefile index 1ee395d138f0..bf8fe2fe8d9d 100644 --- a/science/abinit/Makefile +++ b/science/abinit/Makefile @@ -1,5 +1,6 @@ PORTNAME= abinit DISTVERSION= 10.0.7 +PORTREVISION= 1 CATEGORIES= science MAINTAINER= yuri@FreeBSD.org @@ -55,29 +56,43 @@ PORTDOCS= * BINARY_ALIAS= git=false -OPTIONS_DEFINE= DOCS OPENMP OPENMPI -OPTIONS_DEFAULT= OPENMP OPENMPI +OPTIONS_DEFINE= DOCS OPENMP +OPTIONS_DEFAULT= MPICH +OPTIONS_RADIO= MPIX +OPTIONS_RADIO_MPIX= NOMPI MPICH OPENMPI OPENMP_CONFIGURE_ENABLE= openmp OPENMP_LDFLAGS= -lomp -OPENMPI_CONFIGURE_WITH= mpi=yes -# BROKEN with MPICH4: see -# To set back to mpich when this issue will be fixed. +MIX_DESC= MPI options + +NOMPI_DESC= Do not use MPI +NOMPI_CONFIGURE_ON= CC_LDFLAGS="${LDFLAGS}" CXX_LDFLAGS="${LDFLAGS}" \ + FC_LDFLAGS="${LDFLAGS}" CFLAGS="${CFLAGS}" + OPENMPI_USES= mpi:openmpi -# fftw3 not enabled because libfftw3_mpi is required but not packaged -OPENMPI_VARS= FCFLAGS+="`pkg-config --cflags ompi-fort`" -OPENMPI_CONFIGURE_ENV= CC_LDFLAGS="${MPI_LIBS} ${LDFLAGS}" \ - CXX_LDFLAGS="${MPI_LIBS} ${LDFLAGS}" \ - FC_LDFLAGS="${MPI_LIBS} ${LDFLAGS}" \ - CFLAGS="${MPI_CFLAGS} ${CFLAGS} ${CFLAGS_F2018}" \ - MPI_CPPFLAGS="${MPI_CFLAGS}" \ - MPI_FCFLAGS="`pkg-config --cflags ompi-fort`" \ - MPI_LIBS="${MPI_LIBS}" \ +OPENMPI_CONFIGURE_ON= mpi=yes +OPENMPI_VARS= FCFLAGS+="`pkg-config --cflags ompi-fort`" \ + CFLAGS+="${MPI_CFLAGS}" \ + LDFLAGS+="${MPI_LDFLAGS}" +OPENMPI_CONFIGURE_ENV= ${MPIX_CONFIGURE_ENV} \ + MPI_FCFLAGS="`pkg-config --cflags ompi-fort`" + +MPICH_USES= mpi:mpich +MPICH_CONFIGURE_ON= mpi=yes +MPICH_VARS= FFLAGS+=-I${LOCALBASE}/include FCFLAGS+=-I${LOCALBASE}/include \ + CONFIGURE_ENV+=MPI_LIBS="`pkg-config --libs mpich` -lmpifort" \ + CONFIGURE_ENV+MPI_LDFLAGS="`pkg-config --libs mpich` -lmpifort" +MPICH_CONFIGURE_ENV= ${MPIX_CONFIGURE_ENV} + +MPIX_CONFIGURE_ENV= CC_LDFLAGS="${MPI_LIBS} ${LDFLAGS}" \ + CXX_LDFLAGS="${MPI_LIBS} ${LDFLAGS}" \ + FC_LDFLAGS="${MPI_LIBS} ${LDFLAGS}" \ + CFLAGS="${MPI_CFLAGS} ${CFLAGS} ${CFLAGS_F2018}" \ + MPI_CPPFLAGS="${MPI_CFLAGS}" \ + MPI_LIBS="${MPI_LIBS}" \ MPI_LDFLAGS="${MPI_LIBS}" # When OpenMPI is enabled, put its related variables 1st to avoid conflicts with MPICH -OPENMPI_CONFIGURE_ENV_OFF= CC_LDFLAGS="${LDFLAGS}" CXX_LDFLAGS="${LDFLAGS}" \ - FC_LDFLAGS="${LDFLAGS}" CFLAGS="${CFLAGS}" .if defined(WITH_LEVMAR) # --with-levmar seems deprecated @@ -92,8 +107,11 @@ CONFIGURE_ARGS+= --with-levmar FCFLAGS+= -fallow-argument-mismatch # see https://github.com/abinit/abinit/issues/41 .endif -pre-configure: - (cd ${WRKSRC} && ./autogen.sh) +pre-configure: # version lines below are workaround for https://github.com/abinit/abinit/issues/75 + @cd ${WRKSRC} && \ + ${ECHO} ${PORTVERSION} > .version && \ + ${REINPLACE_CMD} -e 's|UNKNOWN|${PORTVERSION}|' ${WRKSRC}/config/scripts/git-version-gen && \ + ./autogen.sh post-install-DOCS-on: ${REINPLACE_CMD} -e 's|/usr/bin/env python|${PYTHON_CMD}|' \ @@ -105,4 +123,13 @@ post-install-DOCS-on: pre-test: ${TOUCH} ${TEST_WRKSRC}/make.log +test-long: # run all examples from tutorial/Input + @cd ${WRKSRC}/tests/tutorial/Input && \ + for abi in `${LS} *.abi`; do \ + ${ECHO} "===> Running example $$abi" && \ + ${SETENV} PATH=${STAGEDIR}${PREFIX}/bin:${PATH} ABI_PSPDIR=${WRKSRC}/tests/Psps_for_tests abinit $$abi; \ + done + +# fftw3 not enabled because libfftw3_mpi is required but not packaged + .include