Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comapatibility with mpy4py v4 #16

Open
avalentino opened this issue Sep 14, 2024 · 0 comments
Open

Comapatibility with mpy4py v4 #16

avalentino opened this issue Sep 14, 2024 · 0 comments

Comments

@avalentino
Copy link
Contributor

After an update to mpi4py v4.0 pyzoltan starts to fail with the following error (see also the original bug report):


creating build/temp.linux-aarch64-cpython-313/pyzoltan/core
aarch64-linux-gnu-g++ -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/lib/python3/dist-packages/numpy/core/include -I/usr/include/trilinos -I/<<PKGBUILDDIR>>/pyzoltan/czoltan -I/usr/lib/python3/dist-packages/cyarray -I/usr/lib/python3/dist-packages/mpi4py/include -I/usr/include/python3.13 -c pyzoltan/core/zoltan.cpp -o build/temp.linux-aarch64-cpython-313/pyzoltan/core/zoltan.o -I/usr/lib/aarch64-linux-gnu/openmpi/include -I/usr/lib/aarch64-linux-gnu/openmpi/include/openmpi
In file included from /usr/lib/python3/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1929,
                 from /usr/lib/python3/dist-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                 from /usr/lib/python3/dist-packages/numpy/core/include/numpy/arrayobject.h:5,
                 from pyzoltan/core/zoltan.cpp:1291:
/usr/lib/python3/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
   17 | #warning "Using deprecated NumPy API, disable it with " \
      |  ^~~~~~~
pyzoltan/core/zoltan.cpp:2287:3: error: ‘MPI_Session’ does not name a type
 2287 |   MPI_Session ob_mpi;
      |   ^~~~~~~~~~~
error: command '/usr/bin/aarch64-linux-gnu-g++' failed with exit code 1
E: pybuild pybuild:389: build: plugin distutils failed with: exit code=1: /usr/bin/python3.13 setup.py build 
I: pybuild base:311: /usr/bin/python3 setup.py build 
----------------------------------------------------------------------
Using Zoltan from:
/usr/include/trilinos
/usr/lib
----------------------------------------------------------------------
/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'setup_requres'
  warnings.warn(msg)
running build
running build_py
creating /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pyzoltan/build/pyzoltan
copying pyzoltan/api.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pyzoltan/build/pyzoltan
copying pyzoltan/__init__.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pyzoltan/build/pyzoltan
creating /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pyzoltan/build/pyzoltan/core
copying pyzoltan/core/zoltan_utils.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pyzoltan/build/pyzoltan/core
copying pyzoltan/core/__init__.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pyzoltan/build/pyzoltan/core
creating /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pyzoltan/build/pyzoltan/czoltan
copying pyzoltan/czoltan/__init__.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pyzoltan/build/pyzoltan/czoltan
creating /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pyzoltan/build/pyzoltan/tools
copying pyzoltan/tools/__init__.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pyzoltan/build/pyzoltan/tools
copying pyzoltan/tools/run_parallel_script.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pyzoltan/build/pyzoltan/tools
creating /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pyzoltan/build/pyzoltan/core/tests
copying pyzoltan/core/tests/zcomm.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pyzoltan/build/pyzoltan/core/tests
copying pyzoltan/core/tests/__init__.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pyzoltan/build/pyzoltan/core/tests
copying pyzoltan/core/tests/3d_partition.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pyzoltan/build/pyzoltan/core/tests
copying pyzoltan/core/tests/test_zoltan.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pyzoltan/build/pyzoltan/core/tests
copying pyzoltan/core/tests/geometric_partitioner.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pyzoltan/build/pyzoltan/core/tests
running egg_info
writing PyZoltan.egg-info/PKG-INFO
writing dependency_links to PyZoltan.egg-info/dependency_links.txt
writing requirements to PyZoltan.egg-info/requires.txt
writing top-level names to PyZoltan.egg-info/top_level.txt
reading manifest file 'PyZoltan.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'PyZoltan.egg-info/SOURCES.txt'
copying pyzoltan/core/__init__.pxd -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pyzoltan/build/pyzoltan/core
copying pyzoltan/core/msstdint.h -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pyzoltan/build/pyzoltan/core
copying pyzoltan/core/zoltan.pxd -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pyzoltan/build/pyzoltan/core
copying pyzoltan/core/zoltan_comm.pxd -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pyzoltan/build/pyzoltan/core
copying pyzoltan/core/zoltan_dd.pxd -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pyzoltan/build/pyzoltan/core
copying pyzoltan/czoltan/__init__.pxd -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pyzoltan/build/pyzoltan/czoltan
copying pyzoltan/czoltan/czoltan.pxd -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pyzoltan/build/pyzoltan/czoltan
copying pyzoltan/czoltan/czoltan_comm.pxd -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pyzoltan/build/pyzoltan/czoltan
copying pyzoltan/czoltan/czoltan_config.pxd -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pyzoltan/build/pyzoltan/czoltan
copying pyzoltan/czoltan/czoltan_dd.pxd -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pyzoltan/build/pyzoltan/czoltan
copying pyzoltan/czoltan/czoltan_types.pxd -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pyzoltan/build/pyzoltan/czoltan
copying pyzoltan/czoltan/mpi-compat.h -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pyzoltan/build/pyzoltan/czoltan
copying pyzoltan/core/tests/mesh.txt -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pyzoltan/build/pyzoltan/core/tests
running build_ext
building 'pyzoltan.core.zoltan' extension
creating build/temp.linux-aarch64-cpython-312
creating build/temp.linux-aarch64-cpython-312/pyzoltan
creating build/temp.linux-aarch64-cpython-312/pyzoltan/core
aarch64-linux-gnu-g++ -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/lib/python3/dist-packages/numpy/core/include -I/usr/include/trilinos -I/<<PKGBUILDDIR>>/pyzoltan/czoltan -I/usr/lib/python3/dist-packages/cyarray -I/usr/lib/python3/dist-packages/mpi4py/include -I/usr/include/python3.12 -c pyzoltan/core/zoltan.cpp -o build/temp.linux-aarch64-cpython-312/pyzoltan/core/zoltan.o -I/usr/lib/aarch64-linux-gnu/openmpi/include -I/usr/lib/aarch64-linux-gnu/openmpi/include/openmpi
In file included from /usr/lib/python3/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1929,
                 from /usr/lib/python3/dist-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                 from /usr/lib/python3/dist-packages/numpy/core/include/numpy/arrayobject.h:5,
                 from pyzoltan/core/zoltan.cpp:1291:
/usr/lib/python3/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
   17 | #warning "Using deprecated NumPy API, disable it with " \
      |  ^~~~~~~
pyzoltan/core/zoltan.cpp:2287:3: error: ‘MPI_Session’ does not name a type
 2287 |   MPI_Session ob_mpi;
      |   ^~~~~~~~~~~
error: command '/usr/bin/aarch64-linux-gnu-g++' failed with exit code 1
E: pybuild pybuild:389: build: plugin distutils failed with: exit code=1: /usr/bin/python3 setup.py build 
dh_auto_build: error: pybuild --build -i python{version} -p "3.13 3.12" returned exit code 13
make: *** [debian/rules:14: binary-arch] Error 25
dpkg-buildpackage: error: debian/rules binary-arch subprocess returned exit status 2
--------------------------------------------------------------------------------
Build finished at 2024-09-13T09:22:53Z

Looking at the generated zoltan.cpp line 2287 the problem seems to come form the following statement:

/* "mpi4py/MPI.pxd":107
 *     cdef object       __weakref__
 * 
 * ctypedef api class Session [             # <<<<<<<<<<<<<<
 *     type   PyMPISession_Type,
 *     object PyMPISessionObject,
 */
struct PyMPISessionObject {
  PyObject_HEAD
  MPI_Session ob_mpi;  // line 2278
  unsigned int flags;
  PyObject *__weakref__;
};
typedef struct PyMPISessionObject PyMPISessionObject;

Which is clearly linked to mpi4py, probably an API change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant