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
Comments
I don't usually run the testsuite with pytest. Could you try to run the tests the following way?
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. |
@kloczek Any update on your issue? pytest 6.2.5 seems to be running fine in current master branch. |
I have no idea. I'm using only pytest 7.x (pytest 6,x is +1.5y old). |
Hmm cannot apply all master patches on top of 3.1.3 (+200 commits). |
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. $ LDFLAGS="-Wl,-rpath /some/direcory" python3 -sBm build -w --no-isolation |
I upgraded my pytest, and tried again with the
and everything seems to be OK (using Python 3.10, NumPy 1.22.0, and MPICH 3.4.3 from Fedora 36).
Of course you cannot, and you should not. But you can try applying selected patches to fix issues. Look at branch
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? |
If someone is begginer it should red documentation fiorst.
Thx 😃 If you are thinning that this issue is resolved on the master feel free to close it. |
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. |
@kloczek Still thinking about the rpath thing. I'm trying to figure out why you needed to remove my rpath handling. |
As I'm installing all libraries in libdir adding rpath on that directory only slows down resolving symbols by ld.so. |
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. |
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
build
with--no-isolation
I'm using during all processes only locally installed modulesHere is pytest output:
In my build procedure I've added temporary those failing units to to --deselect list.
The text was updated successfully, but these errors were encountered: