git: be927e1c8772 - main - science/ascent: Fix MPI, add MPI options NOMPI, MPICH, OPENMPI

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Tue, 23 Aug 2022 18:33:56 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=be927e1c87723f345c05e7624f72ade636da47ba

commit be927e1c87723f345c05e7624f72ade636da47ba
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2022-08-23 08:34:51 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2022-08-23 18:33:53 +0000

    science/ascent: Fix MPI, add MPI options NOMPI, MPICH, OPENMPI
---
 science/ascent/Makefile  | 17 +++++++++++++++--
 science/ascent/pkg-plist |  3 +++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/science/ascent/Makefile b/science/ascent/Makefile
index 1ccc1f27742e..a3617f44fec1 100644
--- a/science/ascent/Makefile
+++ b/science/ascent/Makefile
@@ -1,7 +1,7 @@
 PORTNAME=	ascent
 DISTVERSIONPREFIX=	v
 DISTVERSION=	0.8.0
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	science
 PKGNAMESUFFIX=	-visualizer
 
@@ -27,7 +27,6 @@ GH_TUPLE=	Alpine-DAV:spack_configs:26ea412:spack_configs/../scripts/uberenv_conf
 
 CMAKE_OFF=	ENABLE_PYTHON ENABLE_DOCS ENABLE_TESTS ENABLE_EXAMPLES
 CMAKE_OFF+=	ENABLE_UTILS # utils are installed into a non-standard path, see https://github.com/Alpine-DAV/ascent/issues/814
-CMAKE_OFF+=	ENABLE_MPI # MPI fails to link, see https://github.com/Alpine-DAV/ascent/issues/813
 CMAKE_ARGS=	-DCONDUIT_DIR=${LOCALBASE}
 CMAKE_TESTING_ON=	ENABLE_TESTS # one testcase fails because conduit lacks HDF5, see https://github.com/LLNL/conduit/issues/840
 
@@ -35,4 +34,18 @@ LDFLAGS+=	-lsysinfo
 
 WRKSRC_SUBDIR=	src
 
+OPTIONS_SINGLE=		MPI
+OPTIONS_SINGLE_MPI=	NOMPI MPICH OPENMPI
+OPTIONS_DEFAULT=	MPICH
+OPTIONS_SUB=		yes
+
+NOMPI_DESC=		Build without parallel processing support
+NOMPI_CMAKE_ON=		-DENABLE_MPI=OFF
+
+MPICH_USES=		mpi:mpich
+MPICH_CMAKE_ON=		-DENABLE_MPI=ON
+
+OPENMPI_USES=		mpi:openmpi
+OPENMPI_CMAKE_ON=	-DENABLE_MPI=ON
+
 .include <bsd.port.mk>
diff --git a/science/ascent/pkg-plist b/science/ascent/pkg-plist
index 926b64b73fc1..5e0d1af99949 100644
--- a/science/ascent/pkg-plist
+++ b/science/ascent/pkg-plist
@@ -21,6 +21,7 @@ include/ascent/ascent_expressions_tokens.hpp
 include/ascent/ascent_file_system.hpp
 include/ascent/ascent_flow_runtime.hpp
 include/ascent/ascent_hola.hpp
+%%NO_NOMPI%%include/ascent/ascent_hola_mpi.hpp
 include/ascent/ascent_insertion_ordered_set.hpp
 include/ascent/ascent_jit_array.hpp
 include/ascent/ascent_jit_field.hpp
@@ -40,6 +41,7 @@ include/ascent/ascent_resources_cinema_web.hpp
 include/ascent/ascent_runtime.hpp
 include/ascent/ascent_runtime_blueprint_filters.hpp
 include/ascent/ascent_runtime_filters.hpp
+%%NO_NOMPI%%include/ascent/ascent_runtime_hola_filters.hpp
 include/ascent/ascent_runtime_param_check.hpp
 include/ascent/ascent_runtime_query_filters.hpp
 include/ascent/ascent_runtime_relay_filters.hpp
@@ -69,6 +71,7 @@ lib/cmake/ascent/ascent_setup_targets.cmake
 lib/libascent.so
 lib/libascent_flow.so
 lib/libascent_lodepng.so
+%%NO_NOMPI%%lib/libascent_mpi.so
 %%DATADIR%%/ascent_config.mk
 %%DATADIR%%/web_clients/ascent/index.html
 %%DATADIR%%/web_clients/ascent/resources/ascent_style.css