tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [PATCH] math/fftw and math/fftwf OpenMP and MPI options



Am Tue, 23 Jun 2020 22:29:39 +0200
schrieb "Dr. Thomas Orgis" <thomas.orgis%uni-hamburg.de@localhost>: 

> Would somebody mind to test/apply? Seems simple enough to me … I

It was kindly pointed out to me that I forgot a remnant of my
copy'n'paste process for PLIST in the patch. Attached is an updated one
without a duplicate @comment line.


Alrighty then,

Thomas

-- 
Dr. Thomas Orgis
HPC @ Universität Hamburg
diff -ruN -x CVS pkgsrc-2020Q1/math/fftw/buildlink3.mk pkgsrc/math/fftw/buildlink3.mk
--- pkgsrc-2020Q1/math/fftw/buildlink3.mk	2009-03-20 20:24:56.000000000 +0100
+++ pkgsrc/math/fftw/buildlink3.mk	2020-06-23 22:16:58.773132136 +0200
@@ -8,6 +8,13 @@
 BUILDLINK_API_DEPENDS.fftw+=	fftw>=3.0
 BUILDLINK_ABI_DEPENDS.fftw+=	fftw>=3.1nb1
 BUILDLINK_PKGSRCDIR.fftw?=	../../math/fftw
+
+pkgbase := fftw
+.include "../../mk/pkg-build-options.mk"
+.if ${PKG_BUILD_OPTIONS.fftw:Mmpi}
+.include "../../mk/mpi.buildlink3.mk"
+.endif
+
 .endif # FFTW_BUILDLINK3_MK
 
 BUILDLINK_TREE+=	-fftw
diff -ruN -x CVS pkgsrc-2020Q1/math/fftw/Makefile pkgsrc/math/fftw/Makefile
--- pkgsrc-2020Q1/math/fftw/Makefile	2019-08-11 15:21:44.000000000 +0200
+++ pkgsrc/math/fftw/Makefile	2020-06-23 21:24:53.351808246 +0200
@@ -2,7 +2,7 @@
 
 .include "Makefile.common"
 
-PKGREVISION=	2
+PKGREVISION=	3
 
 COMMENT=	Collection of fast C routines to compute DFTs
 
diff -ruN -x CVS pkgsrc-2020Q1/math/fftw/options.mk pkgsrc/math/fftw/options.mk
--- pkgsrc-2020Q1/math/fftw/options.mk	2018-05-30 08:45:58.000000000 +0200
+++ pkgsrc/math/fftw/options.mk	2020-06-23 21:31:31.621971348 +0200
@@ -1,7 +1,7 @@
 # $NetBSD: options.mk,v 1.3 2018/05/30 06:45:58 adam Exp $
 
 PKG_OPTIONS_VAR=	PKG_OPTIONS.fftw
-PKG_SUPPORTED_OPTIONS=	fftw-fortran
+PKG_SUPPORTED_OPTIONS=	fftw-fortran openmp mpi
 # Enable fortran support by default on platforms supported by lang/g95.
 .if (!empty(MACHINE_ARCH:Mi386) || !empty(MACHINE_ARCH:Mx86_64) || \
 	!empty(MACHINE_ARCH:Mia64) || !empty(MACHINE_ARCH:Mpowerpc*) || \
@@ -18,3 +18,19 @@
 .else
 CONFIGURE_ARGS+=	--disable-fortran
 .endif
+
+PLIST_VARS+=	omp
+.if !empty(PKG_OPTIONS:Mopenmp)
+PLIST.omp=	yes
+CONFIGURE_ARGS+=	--enable-openmp
+.endif
+
+PLIST_VARS+=	mpi mpif03
+.if !empty(PKG_OPTIONS:Mmpi)
+PLIST.mpi=	yes
+.if !empty(PKG_OPTIONS:Mfftw-fortran)
+PLIST.mpif03=	yes
+.endif
+CONFIGURE_ARGS+=	--enable-mpi
+.include "../../mk/mpi.buildlink3.mk"
+.endif
diff -ruN -x CVS pkgsrc-2020Q1/math/fftw/PLIST pkgsrc/math/fftw/PLIST
--- pkgsrc-2020Q1/math/fftw/PLIST	2017-11-23 21:24:13.000000000 +0100
+++ pkgsrc/math/fftw/PLIST	2020-06-23 21:39:26.702158828 +0200
@@ -11,6 +11,11 @@
 lib/cmake/fftw3/FFTW3ConfigVersion.cmake
 lib/libfftw3.la
 ${PLIST.pthreads}lib/libfftw3_threads.la
+${PLIST.omp}lib/libfftw3_omp.la
+${PLIST.mpi}lib/libfftw3_mpi.la
+${PLIST.mpi}include/fftw3-mpi.h
+${PLIST.mpif03}include/fftw3l-mpi.f03
+${PLIST.mpif03}include/fftw3-mpi.f03
 lib/pkgconfig/fftw3.pc
 man/man1/fftw-wisdom-to-conf.1
 man/man1/fftw-wisdom.1
diff -ruN -x CVS pkgsrc-2020Q1/math/fftwf/Makefile pkgsrc/math/fftwf/Makefile
--- pkgsrc-2020Q1/math/fftwf/Makefile	2019-08-11 15:21:44.000000000 +0200
+++ pkgsrc/math/fftwf/Makefile	2020-06-23 22:20:28.163229658 +0200
@@ -1,6 +1,6 @@
 # $NetBSD: Makefile,v 1.27 2019/08/11 13:21:44 wiz Exp $
 
-PKGREVISION= 1
+PKGREVISION= 2
 .include "../../math/fftw/Makefile.common"
 
 PKGNAME=	${DISTNAME:C/fftw/fftwf/}
@@ -25,6 +25,12 @@
 	${SETENV} ${INSTALL_ENV} ${MAKE_ENV} 				\
 		${MAKE_PROGRAM} ${MAKE_FLAGS} ${INSTALL_MAKE_FLAGS}	\
 		install-libLTLIBRARIES
+.endif
+.if ${PKG_OPTIONS:Mmpi}
+	cd ${WRKSRC}/mpi &&                                             \
+	${SETENV} ${INSTALL_ENV} ${MAKE_ENV} 				\
+		${MAKE_PROGRAM} ${MAKE_FLAGS} ${INSTALL_MAKE_FLAGS}	\
+		install-libLTLIBRARIES
 .endif
 	cd ${WRKSRC}/tools &&						\
 	${SETENV} ${INSTALL_ENV} ${MAKE_ENV} 				\
diff -ruN -x CVS pkgsrc-2020Q1/math/fftwf/PLIST pkgsrc/math/fftwf/PLIST
--- pkgsrc-2020Q1/math/fftwf/PLIST	2016-04-03 14:45:39.000000000 +0200
+++ pkgsrc/math/fftwf/PLIST	2020-06-24 08:04:37.502155742 +0200
@@ -3,4 +3,6 @@
 lib/libfftw3f.la
 ${PLIST.pthreads}lib/libfftw3f_threads.la
 lib/pkgconfig/fftw3f.pc
+${PLIST.omp}lib/libfftw3f_omp.la
+${PLIST.mpi}lib/libfftw3f_mpi.la
 man/man1/fftwf-wisdom.1


Home | Main Index | Thread Index | Old Index