summaryrefslogtreecommitdiff
path: root/dev-python/mpi4py
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-01-17 08:06:37 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-01-17 08:06:37 +0000
commite74bddc195533f6d160ee96220f5cfcc205bda1c (patch)
tree147bf202fd80bf604f6d289e985630f30b5a8438 /dev-python/mpi4py
parent20c23c152d2e7b44a6f93ec9476b808659e5ff1e (diff)
gentoo auto-resync : 17:01:2024 - 08:06:37
Diffstat (limited to 'dev-python/mpi4py')
-rw-r--r--dev-python/mpi4py/Manifest3
-rw-r--r--dev-python/mpi4py/files/mpi4py-3.1.5-test_memory.testReadOnly.patch33
-rw-r--r--dev-python/mpi4py/mpi4py-3.1.5.ebuild70
3 files changed, 106 insertions, 0 deletions
diff --git a/dev-python/mpi4py/Manifest b/dev-python/mpi4py/Manifest
index dc0ad5526139..4db8ed99d61c 100644
--- a/dev-python/mpi4py/Manifest
+++ b/dev-python/mpi4py/Manifest
@@ -1,3 +1,6 @@
+AUX mpi4py-3.1.5-test_memory.testReadOnly.patch 1197 BLAKE2B ede5e0a7185e507ccd22714ae422a99ec77beddb72293a1402d364545453faddeb9835577bcd68ea9accc36d37d9488811ea5e00e74ef458d63f8aa44407b89c SHA512 dff934a684cd3758dac721741cfe625a25930d3af00f9386047c4f2344ec56238aef6e6a7335a9cb33f348e312210525c41d2f5088c0e6e3d7e84cbd14fe7a0c
DIST mpi4py-3.1.4.tar.gz 2493282 BLAKE2B e1a048e6053263f6685c549e2e6f96072b7d95db68595c8848d0ecdb0a6cadf2b102e4c4ce589053ed17a090335afc56f4b3630b60944aeac7e4bc4ad82d4a1b SHA512 f59ad765bc272f8b63f74cfde4e588f640c4fc3d47d05729509da45a2155f830c1d409ec716ff374756748fa8ebfa6e72f9fbe188a6b89ea3fa115740a532b08
+DIST mpi4py-3.1.5.tar.gz 2469777 BLAKE2B 0638e3def52f731b64e2999f83f2d6ccc94dc2f8b37d964c10e49ca12470d3d3ef77ff2737294d85614b2d59d1eec49880e74f2ba3d73fd090152b63c8cc701e SHA512 04da1d6daf66cc86fa3ec574eea6e01749f895035e3394afbc68d6245394c5b03557ede0bda3642b06d9c6ff2c1e6e878a6c8c30d3fa3491392e2e13b82cdec8
EBUILD mpi4py-3.1.4.ebuild 1520 BLAKE2B b62d397d02ef1996d627f73f50e54db13e83f6dec605fc67c5cb2a16aae404653252817375d56d43ad80f77c6b1cc336f45d257be9e678eb3d9a34a0462903b8 SHA512 c89e7b37be6c7a8c44c5be146c396e4c3334f23263299ccf402fe22a1b462f1cac2acbbf7845f5e1f1d2277947845109b47202579147cd0fd07b5e437e1b46ef
+EBUILD mpi4py-3.1.5.ebuild 1713 BLAKE2B befea86ec8188a2b4a302cd3678f10195155288281f5c75fae24bf67460e5c0fc63de3b269d64a068ae21cf38dc80d529f069a2071cedb94b25b4e077ada9fb5 SHA512 aa0a06745d91dedc0f01f067c1b1a228266afcc654fd485b456942c7253c928adf927facdd140e601ba4853ba087995dc7294bde89f5b339c7722adb4f661a64
MISC metadata.xml 1229 BLAKE2B 1634ae0e35f9b9362e9b4eaf21443a1fe6c7fc54ec6e4cc5914695533a3563586371cde7b48e34dfcdad6dc5a89f49bec705e434e68353e93e122c272fa163f3 SHA512 d0892adce1d1b5253185a9b539d2dca2a0d4cc96ce7e6e5cfb0507a90fdc88d92d7c74fc6fc93e951872bcfad73d4071b403b7e4269081c55b18789f09b35226
diff --git a/dev-python/mpi4py/files/mpi4py-3.1.5-test_memory.testReadOnly.patch b/dev-python/mpi4py/files/mpi4py-3.1.5-test_memory.testReadOnly.patch
new file mode 100644
index 000000000000..986e565588a0
--- /dev/null
+++ b/dev-python/mpi4py/files/mpi4py-3.1.5-test_memory.testReadOnly.patch
@@ -0,0 +1,33 @@
+https://github.com/mpi4py/mpi4py/pull/452
+From: Paul Zander <negril.nx+gentoo@gmail.com>
+
+From 3adbd69b7219525f32636552394935a0a770896d Mon Sep 17 00:00:00 2001
+From: Lisandro Dalcin <dalcinl@gmail.com>
+Date: Mon, 15 Jan 2024 10:45:38 +0300
+Subject: [PATCH] fix: Fix implementation of MPI.buffer.toreadonly()
+
+---
+ src/mpi4py/MPI/asbuffer.pxi | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/src/mpi4py/MPI/asbuffer.pxi b/src/mpi4py/MPI/asbuffer.pxi
+index 15e06a1..6536c1f 100644
+--- a/src/mpi4py/MPI/asbuffer.pxi
++++ b/src/mpi4py/MPI/asbuffer.pxi
+@@ -257,14 +257,12 @@ cdef class memory:
+
+ def toreadonly(self) -> memory:
+ """Return a readonly version of the memory object"""
+- cdef void *buf = self.view.buf
+- cdef Py_ssize_t size = self.view.len
+ cdef object obj = self
+ if self.view.obj != NULL:
+ obj = <object>self.view.obj
+ cdef memory mem = memory.__new__(memory)
+- PyBuffer_FillInfo(&mem.view, obj,
+- buf, size, 1, PyBUF_SIMPLE)
++ PyMPI_GetBuffer(obj, &mem.view, PyBUF_SIMPLE)
++ mem.view.readonly = 1
+ return mem
+
+ def release(self) -> None:
diff --git a/dev-python/mpi4py/mpi4py-3.1.5.ebuild b/dev-python/mpi4py/mpi4py-3.1.5.ebuild
new file mode 100644
index 000000000000..b0a4789dda26
--- /dev/null
+++ b/dev-python/mpi4py/mpi4py-3.1.5.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517=setuptools
+inherit distutils-r1 pypi
+
+DESCRIPTION="Message Passing Interface for Python"
+HOMEPAGE="https://github.com/mpi4py/mpi4py https://pypi.org/project/mpi4py/"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc examples test"
+
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ dev-python/cython[${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ virtual/mpi
+"
+DEPEND="${RDEPEND}
+ test? (
+ virtual/mpi[romio]
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-3.1.5-test_memory.testReadOnly.patch"
+)
+
+python_prepare_all() {
+ # not needed on install
+ rm -vr docs/source || die
+ rm test/test_pickle.py || die # disabled by Gentoo-bug #659348
+ distutils-r1_python_prepare_all
+}
+
+python_test() {
+ echo "Beginning test phase"
+ local -x PYTHONPATH="${BUILD_DIR}/install$(python_get_sitedir)"
+
+ # python want's all arguments as separate strings
+ local mpi_opts=(
+ "-n" "1"
+ )
+ # spawn is not stable in OpenMPI 4
+ # https://github.com/jsquyres/ompi/pull/4#issuecomment-806897758
+ # oob_tcp_if_include lo is needed to allow test in systemd-nspawn container
+ has_version sys-cluster/openmpi && mpi_opts+=(
+ "--use-hwthread-cpus"
+ "--mca" "btl" "tcp,self"
+ "--mca" "oob_tcp_if_include" "lo"
+ )
+ mpiexec \
+ "${mpi_opts[@]}" \
+ "${PYTHON}" -B -v ./test/runtests.py -v \
+ --exclude="test_msgspec" --exclude="test_spawn" ||
+ die "Testsuite failed under ${EPYTHON}"
+}
+
+python_install_all() {
+ use doc && local HTML_DOCS=( docs/. )
+ use examples && local DOCS=( demo )
+ distutils-r1_python_install_all
+}