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

3.1.3: pytest is failing #216

Closed
kloczek opened this issue May 30, 2022 · 12 comments · Fixed by #224
Closed

3.1.3: pytest is failing #216

kloczek opened this issue May 30, 2022 · 12 comments · Fixed by #224
Assignees
Labels

Comments

@kloczek
Copy link

kloczek commented May 30, 2022

I'm trying to package your module as an rpm package. So I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.

  • python3 -sBm build -w --no-isolation
  • because I'm calling build with --no-isolation I'm using during all processes only locally installed modules
  • install .whl file in </install/prefix>
  • run pytest with PYTHONPATH pointing to sitearch and sitelib inside </install/prefix>

Here is pytest output:

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-mpi4py-3.1.3-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-mpi4py-3.1.3-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.13, pytest-7.1.2, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/mpi4py-3.1.3, configfile: setup.cfg, testpaths: test
collected 1402 items

test/test_address.py .....                                                                                                                                           [  0%]
test/test_attributes.py ........................................ssssssss                                                                                             [  3%]
test/test_cco_buf.py ........................................................................                                                                        [  8%]
test/test_cco_nb_buf.py ......................................................................                                                                       [ 13%]
test/test_cco_nb_vec.py ..........................................................                                                                                   [ 18%]
test/test_cco_ngh_buf.py ................                                                                                                                            [ 19%]
test/test_cco_ngh_obj.py ........                                                                                                                                    [ 19%]
test/test_cco_obj.py ........................................                                                                                                        [ 22%]
test/test_cco_obj_inter.py ssssssssssssssssssssssss                                                                                                                  [ 24%]
test/test_cco_vec.py ..............................................................                                                                                  [ 28%]
test/test_cffi.py ss                                                                                                                                                 [ 28%]
test/test_comm.py ...................................................................                                                                                [ 33%]
test/test_comm_inter.py ssssssssssss                                                                                                                                 [ 34%]
test/test_comm_topo.py ............................                                                                                                                  [ 36%]
test/test_ctypes.py ..                                                                                                                                               [ 36%]
test/test_datatype.py .........................                                                                                                                      [ 38%]
test/test_dl.py ....                                                                                                                                                 [ 38%]
test/test_doc.py .                                                                                                                                                   [ 38%]
test/test_dynproc.py sss.                                                                                                                                            [ 39%]
test/test_environ.py ..............                                                                                                                                  [ 40%]
test/test_errhandler.py .....s                                                                                                                                       [ 40%]
test/test_errorcode.py .....                                                                                                                                         [ 40%]
test/test_exceptions.py ....................................sssss...                                                                                                 [ 44%]
test/test_file.py ..............                                                                                                                                     [ 45%]
test/test_fortran.py ...........                                                                                                                                     [ 45%]
test/test_grequest.py ...                                                                                                                                            [ 46%]
test/test_group.py ................................................                                                                                                  [ 49%]
test/test_info.py ..........                                                                                                                                         [ 50%]
test/test_io.py ............................                                                                                                                         [ 52%]
test/test_memory.py .............                                                                                                                                    [ 53%]
test/test_mpimem.py ..                                                                                                                                               [ 53%]
test/test_msgspec.py ..s....ss............FF.........ssssss......ssssssssssssssssss......................................................ssssssssssss......s.s...... [ 63%]
s..ss                                                                                                                                                                [ 63%]
test/test_msgzero.py ...s...s                                                                                                                                        [ 64%]
test/test_objmodel.py .........                                                                                                                                      [ 64%]
test/test_op.py .........                                                                                                                                            [ 65%]
test/test_p2p_buf.py ....................................                                                                                                            [ 68%]
test/test_p2p_buf_matched.py ..........                                                                                                                              [ 68%]
test/test_p2p_obj.py ................................................................................                                                                [ 74%]
test/test_p2p_obj_matched.py ..........                                                                                                                              [ 75%]
test/test_pack.py ......                                                                                                                                             [ 75%]
test/test_pickle.py ..s...s                                                                                                                                          [ 76%]
test/test_rc.py ...                                                                                                                                                  [ 76%]
test/test_request.py .........                                                                                                                                       [ 77%]
test/test_rma.py ssssssssssssssssssssssssssssssssssss                                                                                                                [ 79%]
test/test_rma_nb.py ssssssssssssss                                                                                                                                   [ 80%]
test/test_spawn.py ssssssssssssssssssssssssssssssssssssssss                                                                                                          [ 83%]
test/test_status.py .........                                                                                                                                        [ 84%]
test/test_subclass.py ..............................ss..                                                                                                             [ 86%]
test/test_threads.py ...                                                                                                                                             [ 86%]
test/test_util_dtlib.py ...................                                                                                                                          [ 88%]
test/test_util_pkl5.py ..........................................................................................                                                    [ 94%]
test/test_win.py ssssssssssssssssss......................................ssssssssssssssssssss                                                                        [100%]

================================================================================= FAILURES =================================================================================
_________________________________________________________________ TestMessageSimpleNumPy.testNotContiguous _________________________________________________________________

>   ???
E   ValueError: ndarray is not contiguous

mpi4py/MPI/asbuffer.pxi:140: ValueError

During handling of the above exception, another exception occurred:

self = <test_msgspec.TestMessageSimpleNumPy testMethod=testNotContiguous>

    def testNotContiguous(self):
        sbuf = numpy.ones([3,2])[:,0]
        rbuf = numpy.zeros([3])
        sbuf.flags.writeable = False
>       self.assertRaises((BufferError, ValueError),
                          Sendrecv, sbuf, rbuf)

test/test_msgspec.py:457:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test/test_msgspec.py:158: in Sendrecv
    MPI.COMM_SELF.Sendrecv(sendbuf=smsg, dest=0,   sendtag=0,
mpi4py/MPI/Comm.pyx:327: in mpi4py.MPI.Comm.Sendrecv
    ???
mpi4py/MPI/msgbuffer.pxi:455: in mpi4py.MPI.message_p2p_send
    ???
mpi4py/MPI/msgbuffer.pxi:438: in mpi4py.MPI._p_msg_p2p.for_send
    ???
mpi4py/MPI/msgbuffer.pxi:203: in mpi4py.MPI.message_simple
    ???
mpi4py/MPI/msgbuffer.pxi:138: in mpi4py.MPI.message_basic
    ???
mpi4py/MPI/asbuffer.pxi:365: in mpi4py.MPI.getbuffer
    ???
mpi4py/MPI/asbuffer.pxi:144: in mpi4py.MPI.PyMPI_GetBuffer
    ???
mpi4py/MPI/commimpl.pxi:142: in mpi4py.MPI.PyMPI_Lock
    ???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

>   ???
E   TypeError: NumPy currently only supports dlpack for writeable arrays

mpi4py/MPI/asdlpack.pxi:193: TypeError
_________________________________________________________________ TestMessageSimpleNumPy.testNotWriteable __________________________________________________________________

>   ???
E   ValueError: buffer source array is read-only

mpi4py/MPI/asbuffer.pxi:140: ValueError

During handling of the above exception, another exception occurred:

self = <test_msgspec.TestMessageSimpleNumPy testMethod=testNotWriteable>

    def testNotWriteable(self):
        sbuf = numpy.ones([3])
        rbuf = numpy.zeros([3])
        rbuf.flags.writeable = False
>       self.assertRaises((BufferError, ValueError),
                          Sendrecv, sbuf, rbuf)

test/test_msgspec.py:450:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test/test_msgspec.py:158: in Sendrecv
    MPI.COMM_SELF.Sendrecv(sendbuf=smsg, dest=0,   sendtag=0,
mpi4py/MPI/Comm.pyx:328: in mpi4py.MPI.Comm.Sendrecv
    ???
mpi4py/MPI/msgbuffer.pxi:460: in mpi4py.MPI.message_p2p_recv
    ???
mpi4py/MPI/msgbuffer.pxi:446: in mpi4py.MPI._p_msg_p2p.for_recv
    ???
mpi4py/MPI/msgbuffer.pxi:203: in mpi4py.MPI.message_simple
    ???
mpi4py/MPI/msgbuffer.pxi:138: in mpi4py.MPI.message_basic
    ???
mpi4py/MPI/asbuffer.pxi:365: in mpi4py.MPI.getbuffer
    ???
mpi4py/MPI/asbuffer.pxi:144: in mpi4py.MPI.PyMPI_GetBuffer
    ???
mpi4py/MPI/commimpl.pxi:142: in mpi4py.MPI.PyMPI_Lock
    ???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

>   ???
E   TypeError: NumPy currently only supports dlpack for writeable arrays

mpi4py/MPI/asdlpack.pxi:193: TypeError
========================================================================= short test summary info ==========================================================================
SKIPPED [1] test/test_attributes.py:20: mpi-win-attr
SKIPPED [1] test/test_attributes.py:190: mpi-win-attr
SKIPPED [1] test/test_attributes.py:42: mpi-win-attr
SKIPPED [1] test/test_attributes.py:45: mpi-win-attr
SKIPPED [1] test/test_attributes.py:48: mpi-win-attr
SKIPPED [1] test/test_attributes.py:71: mpi-win-attr
SKIPPED [1] test/test_attributes.py:100: mpi-win-attr
SKIPPED [1] test/test_attributes.py:96: mpi-win-attr
SKIPPED [3] test/test_cco_obj_inter.py:115: mpi-world-size<2
SKIPPED [3] test/test_cco_obj_inter.py:158: mpi-world-size<2
SKIPPED [3] test/test_cco_obj_inter.py:124: mpi-world-size<2
SKIPPED [3] test/test_cco_obj_inter.py:55: mpi-world-size<2
SKIPPED [3] test/test_cco_obj_inter.py:59: mpi-world-size<2
SKIPPED [3] test/test_cco_obj_inter.py:77: mpi-world-size<2
SKIPPED [3] test/test_cco_obj_inter.py:132: mpi-world-size<2
SKIPPED [3] test/test_cco_obj_inter.py:96: mpi-world-size<2
SKIPPED [1] test/test_cffi.py:49: cffi
SKIPPED [1] test/test_cffi.py:70: cffi
SKIPPED [3] test/test_comm_inter.py:34: mpi-world-size<2
SKIPPED [3] test/test_comm_inter.py:41: mpi-world-size<2
SKIPPED [3] test/test_comm_inter.py:57: mpi-world-size<2
SKIPPED [3] test/test_comm_inter.py:50: mpi-world-size<2
SKIPPED [1] test/test_dynproc.py:63: mpi-world-size<2
SKIPPED [1] test/test_dynproc.py:112: mpi-world-size<2
SKIPPED [1] test/test_dynproc.py:161: mpi-world-size<2
SKIPPED [1] test/test_errhandler.py:45: mpi-win
SKIPPED [1] test/test_exceptions.py:314: mpi-win
SKIPPED [1] test/test_exceptions.py:301: mpi-win
SKIPPED [1] test/test_exceptions.py:305: mpi-win
SKIPPED [1] test/test_exceptions.py:309: mpi-win
SKIPPED [1] test/test_exceptions.py:331: mpi-win
SKIPPED [1] test/test_msgspec.py:239: python3
SKIPPED [1] test/test_msgspec.py:231: python3
SKIPPED [1] test/test_msgspec.py:263: mpi-world-size<2
SKIPPED [2] test/test_msgspec.py:393: cupy
SKIPPED [2] test/test_msgspec.py:396: cupy
SKIPPED [2] test/test_msgspec.py:399: cupy
SKIPPED [2] test/test_msgspec.py:402: cupy
SKIPPED [2] test/test_msgspec.py:405: cupy
SKIPPED [2] test/test_msgspec.py:408: cupy
SKIPPED [1] test/test_msgspec.py:506: cupy
SKIPPED [1] test/test_msgspec.py:493: cupy
SKIPPED [1] test/test_msgspec.py:499: cupy
SKIPPED [1] test/test_msgspec.py:393: numba
SKIPPED [1] test/test_msgspec.py:396: numba
SKIPPED [1] test/test_msgspec.py:399: numba
SKIPPED [1] test/test_msgspec.py:402: numba
SKIPPED [1] test/test_msgspec.py:405: numba
SKIPPED [1] test/test_msgspec.py:408: numba
SKIPPED [1] test/test_msgspec.py:550: numba
SKIPPED [1] test/test_msgspec.py:524: numba
SKIPPED [1] test/test_msgspec.py:537: numba
SKIPPED [1] test/test_msgspec.py:1040: cupy
SKIPPED [1] test/test_msgspec.py:1043: cupy
SKIPPED [1] test/test_msgspec.py:1046: cupy
SKIPPED [1] test/test_msgspec.py:1049: cupy
SKIPPED [1] test/test_msgspec.py:1052: cupy
SKIPPED [1] test/test_msgspec.py:1055: cupy
SKIPPED [1] test/test_msgspec.py:1040: numba
SKIPPED [1] test/test_msgspec.py:1043: numba
SKIPPED [1] test/test_msgspec.py:1046: numba
SKIPPED [1] test/test_msgspec.py:1049: numba
SKIPPED [1] test/test_msgspec.py:1052: numba
SKIPPED [1] test/test_msgspec.py:1055: numba
SKIPPED [1] test/test_msgspec.py:1199: cupy
SKIPPED [1] test/test_msgspec.py:1208: numba
SKIPPED [1] test/test_msgspec.py:1332: cupy
SKIPPED [1] test/test_msgspec.py:1341: numba
SKIPPED [1] test/test_msgspec.py:1300: python3
SKIPPED [2] test/test_msgzero.py:33: openmpi
SKIPPED [1] test/test_pickle.py:126: dill
SKIPPED [1] test/test_pickle.py:168: yaml
SKIPPED [2] test/test_rma.py:91: mpi-rma
SKIPPED [2] test/test_rma.py:261: mpi-rma
SKIPPED [2] test/test_rma.py:270: mpi-rma
SKIPPED [2] test/test_rma.py:207: mpi-rma
SKIPPED [2] test/test_rma.py:307: mpi-rma
SKIPPED [2] test/test_rma.py:319: mpi-rma
SKIPPED [2] test/test_rma.py:163: mpi-rma
SKIPPED [2] test/test_rma.py:407: mpi-rma
SKIPPED [2] test/test_rma.py:114: mpi-rma
SKIPPED [2] test/test_rma.py:279: mpi-rma
SKIPPED [2] test/test_rma.py:256: mpi-rma
SKIPPED [2] test/test_rma.py:340: mpi-rma
SKIPPED [2] test/test_rma.py:42: mpi-rma
SKIPPED [2] test/test_rma.py:251: mpi-rma
SKIPPED [2] test/test_rma.py:335: mpi-rma
SKIPPED [2] test/test_rma.py:369: mpi-rma
SKIPPED [2] test/test_rma.py:345: mpi-rma
SKIPPED [2] test/test_rma.py:397: mpi-rma
SKIPPED [2] test/test_rma_nb.py:67: mpi-rma-nb
SKIPPED [2] test/test_rma_nb.py:151: mpi-rma-nb
SKIPPED [2] test/test_rma_nb.py:161: mpi-rma-nb
SKIPPED [2] test/test_rma_nb.py:100: mpi-rma-nb
SKIPPED [2] test/test_rma_nb.py:144: mpi-rma-nb
SKIPPED [2] test/test_rma_nb.py:44: mpi-rma-nb
SKIPPED [2] test/test_rma_nb.py:137: mpi-rma-nb
SKIPPED [4] test/test_spawn.py:120: using CUDA
SKIPPED [4] test/test_spawn.py:219: using CUDA
SKIPPED [4] test/test_spawn.py:94: using CUDA
SKIPPED [4] test/test_spawn.py:151: using CUDA
SKIPPED [4] test/test_spawn.py:169: using CUDA
SKIPPED [4] test/test_spawn.py:183: using CUDA
SKIPPED [4] test/test_spawn.py:106: using CUDA
SKIPPED [4] test/test_spawn.py:197: using CUDA
SKIPPED [4] test/test_spawn.py:134: using CUDA
SKIPPED [4] test/test_spawn.py:239: using CUDA
SKIPPED [1] test/test_subclass.py:234: mpi-win
SKIPPED [1] test/test_subclass.py:229: mpi-win
SKIPPED [2] test/test_win.py:47: mpi-win-create
SKIPPED [2] test/test_win.py:95: mpi-win-create
SKIPPED [2] test/test_win.py:30: mpi-win-create
SKIPPED [2] test/test_win.py:53: mpi-win-create
SKIPPED [2] test/test_win.py:71: mpi-win-create
SKIPPED [2] test/test_win.py:61: mpi-win-create
SKIPPED [2] test/test_win.py:85: mpi-win-create
SKIPPED [2] test/test_win.py:38: mpi-win-create
SKIPPED [2] test/test_win.py:106: mpi-win-create
SKIPPED [2] test/test_win.py:194: mpi-win-dynamic
SKIPPED [2] test/test_win.py:189: mpi-win-dynamic
SKIPPED [2] test/test_win.py:95: mpi-win-dynamic
SKIPPED [2] test/test_win.py:176: mpi-win-dynamic
SKIPPED [2] test/test_win.py:53: mpi-win-dynamic
SKIPPED [2] test/test_win.py:71: mpi-win-dynamic
SKIPPED [2] test/test_win.py:61: mpi-win-dynamic
SKIPPED [2] test/test_win.py:85: mpi-win-dynamic
SKIPPED [2] test/test_win.py:182: mpi-win-dynamic
SKIPPED [2] test/test_win.py:106: mpi-win-dynamic
FAILED test/test_msgspec.py::TestMessageSimpleNumPy::testNotContiguous - TypeError: NumPy currently only supports dlpack for writeable arrays
FAILED test/test_msgspec.py::TestMessageSimpleNumPy::testNotWriteable - TypeError: NumPy currently only supports dlpack for writeable arrays
=============================================================== 2 failed, 1167 passed, 233 skipped in 24.75s ===============================================================

In my build procedure I've added temporary those failing units to to --deselect list.

@dalcinl
Copy link
Member

dalcinl commented May 30, 2022

I don't usually run the testsuite with pytest. Could you try to run the tests the following way?

mpiexec -n 1 python test/main.py
mpiexec -n 2 python test/main.py
mpiexec -n 5 python test/main.py # if you have enough cores

PS: What NumPy version are you using? You may need to patch or disable these failing tests, the issue seems to be just the specific exception type being raised. Look at commit 069bfde.

@dalcinl
Copy link
Member

dalcinl commented Jun 12, 2022

@kloczek Any update on your issue? pytest 6.2.5 seems to be running fine in current master branch.

@kloczek
Copy link
Author

kloczek commented Jun 12, 2022

I have no idea. I'm using only pytest 7.x (pytest 6,x is +1.5y old).
Will try to check master if you want (will beck with results shortly)

@kloczek
Copy link
Author

kloczek commented Jun 12, 2022

Hmm cannot apply all master patches on top of 3.1.3 (+200 commits).
Looks like 3.1.3 has been released not out of master but some other branch).

@kloczek
Copy link
Author

kloczek commented Jun 12, 2022

BTW I'm uisng belopw patch with your module

--- a/conf/mpidistutils.py~     2021-11-25 14:05:59.000000000 +0000
+++ b/conf/mpidistutils.py      2022-01-25 16:44:44.505301307 +0000
@@ -42,16 +42,6 @@

 # Normalize linker flags for runtime library dirs
 from distutils.unixccompiler import UnixCCompiler
-rpath_option_orig = UnixCCompiler.runtime_library_dir_option
-def rpath_option(compiler, dir):
-    option = rpath_option_orig(compiler, dir)
-    if sys.platform.startswith('linux'):
-        if option.startswith('-R'):
-            option =  option.replace('-R', '-Wl,-rpath,', 1)
-        elif option.startswith('-Wl,-R,'):
-            option =  option.replace('-Wl,-R,', '-Wl,-rpath,', 1)
-    return option
-UnixCCompiler.runtime_library_dir_option = rpath_option

 def fix_compiler_cmd(cc, mpicc):
     if not mpicc: return
@@ -835,7 +825,6 @@
         self.libraries_so = []

         self.library_dirs = None
-        self.rpath = None
         self.link_objects = None

         self.build_lib = None
@@ -940,8 +929,6 @@
             self.compiler.set_include_dirs(self.include_dirs)
         if self.library_dirs is not None:
             self.compiler.set_library_dirs(self.library_dirs)
-        if self.rpath is not None:
-            self.compiler.set_runtime_library_dirs(self.rpath)
         if self.link_objects is not None:
             self.compiler.set_link_objects(self.link_objects)
         #
@@ -1129,12 +1116,6 @@
             libdir = sysconfig.get_config_var("LIBDIR")
             if libdir not in self.library_dirs:
                 self.library_dirs.append(libdir)
-            if libdir not in self.rpath:
-                self.rpath.append(libdir)
-            # Special-case
-            if sys.exec_prefix == '/usr':
-                self.library_dirs.remove(libdir)
-                self.rpath.remove(libdir)

     def run (self):
         if self.distribution.has_c_libraries():

That patch removes hardcoing use RPATH on linking.
IMO that should not used and if someone really needs use rpath it can be done by:

$ LDFLAGS="-Wl,-rpath /some/direcory" python3 -sBm build -w --no-isolation

@dalcinl
Copy link
Member

dalcinl commented Jun 12, 2022

I'm using only pytest 7.x (pytest 6,x is +1.5y old).

I upgraded my pytest, and tried again with the maint branch (a few commits after tag 3.1.3). Then I ran:

mpiexec -n 5 pytest

and everything seems to be OK (using Python 3.10, NumPy 1.22.0, and MPICH 3.4.3 from Fedora 36).

Hmm cannot apply all master patches on top of 3.1.3 (+200 commits).

Of course you cannot, and you should not. But you can try applying selected patches to fix issues. Look at branch maint.

That patch removes hardcoing use RPATH on linking. IMO that should not used and if someone really needs use rpath it can be done by:

$ LDFLAGS="-Wl,-rpath /some/direcory" python3 -sBm build -w --no-isolation

And then all the beginners who have no idea how things work will start complaining that they cannot build mpi4py to do their homework in their half-broken workstation with a mixture of packages installed by hand and with apt-get.

Anyway, you have a good point, I'll reconsider all this rpath handling. Note however that I believe the rpath patch you are using is not 100% correct. You should only keep the code removal from the last patch hunk, the other stuff above it should remain there. Could you please confirm whether this suggestion actually works fine on your side?

@kloczek
Copy link
Author

kloczek commented Jun 12, 2022

And then all the beginners who have no idea how things work will start complaining that they cannot build mpi4py to do their homework in their half-broken workstation with a mixture of packages installed by hand and with apt-get.

If someone is begginer it should red documentation fiorst.
Such detail should be in that documenation 😋

Anyway, you have a good point, I'll reconsider all this rpath handling.

Thx 😃

If you are thinning that this issue is resolved on the master feel free to close it.
I'm keeping track of my tickets so on next release will retest that and if anything will be wrong will add here some comment.
BTW .. do you have ETA of next release? 🤔

@dalcinl
Copy link
Member

dalcinl commented Jun 12, 2022

do you have ETA of next release?

Not yet. There are a few things I still have to work on. In any case, next mpi4py release will not happen before Open MPI releases v5.0. I'm waiting for them to fix many issues related to MPI-4 support.

@dalcinl dalcinl self-assigned this Jun 12, 2022
@dalcinl dalcinl added the build label Jun 12, 2022
@dalcinl
Copy link
Member

dalcinl commented Jun 12, 2022

@kloczek Still thinking about the rpath thing. I'm trying to figure out why you needed to remove my rpath handling.
What's the output of sys.exec_prefix and sysconfig.get_config_var("LIBDIR") in the system you are running?

@kloczek
Copy link
Author

kloczek commented Jun 12, 2022

As I'm installing all libraries in libdir adding rpath on that directory only slows down resolving symbols by ld.so.
This is why in almost all distribution packaging frameworks is checking in post installation all binaries for RPATH and especially if those RPATH points on default libdir.
Usually packagers in such cases are using like chrpath to strip RPATH from elf binaries. I'm patching source tree to not ling with rpath to not waste time on additional operations and install additional tools in build env.
Just regular KISS principle 😋

@kloczek
Copy link
Author

kloczek commented Jun 12, 2022

And again .. if someone may really need binaries with RPATH it is possible to do that without touching source tree by passing -Wl,rpath in $LDFLAGS.

@dalcinl
Copy link
Member

dalcinl commented Jun 23, 2022

@kloczek Please look at fbe56aa, you may need pieces of that patch for NumPy 1.23.

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

Successfully merging a pull request may close this issue.

2 participants