-
Notifications
You must be signed in to change notification settings - Fork 23
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
Fix for building and passing tests for 32-bit archs #39
Conversation
ad8f04b
to
d27b8f5
Compare
@endrebak this is a bug in Debian with NCLS failing in 32-bit arches. Could you please review this? |
Thanks! I will do so after work today :) |
I will need to look more closely. This might break macOS. Let me test. |
I am not an expert on C types, but long means different things on different architectures, I think. So it is best to use int64_t, not long. The test is for 64-bit architectures (actually, I do not test NCLS directly, only indirectly through the extensive tests in pyranges). Why does the build fail on 32-bit architectures? Wouldn't it be better to just skip the tests on 32-bit architectures? I need more context. I think by using long instead of int64_t you are going to break NCLS for windows. |
I'm not sure here - if the dtype of This lead to a build failure leading to inconsistent types here.
OK,
Because of two things:
That can be an option but it might be better to actually fix the problem instead.
I admit, I don't use windows. Maybe modifying .travis.yml can give us the results? Again, since you're the author of the package you are much more aware of how this works - please let me know what you'd think should be the best solution? |
I will try to make the types consistent. I will also look into how to check whether we are testing in a 32-bit arch. Then I can run the appropriate tests for 32 and 64-bit arches. |
Does 0.0.55 work? I've added a check in the tests to see whether we are on a 32 or 64-bit architecture: https://github.com/biocore-ntnu/ncls/blob/master/tests/test_ncls.py |
Just tested it. It doesn't, fails with:
|
d27b8f5
to
b6851a2
Compare
@endrebak on applying this patch, it works. I've modified the PR accordingly.
Also, could you please tag NCLS with a 0.0.55 github release? It'd enable me to update the same package in Debian accordingly. |
I am confused though. Shouldn't it be np.int32 if you want to use it on a 32-bit architecture? |
Can you try with int32 instead of int64 and confirm that it still works? (I am guessing the 32-64 bits are just ignored and that is why it works) |
I've uploaded 0.0.56 where I corrected the test. It uses 32-bits consistently. I had made some sloppy mistakes, sorry. |
Please report whether 0.0.56 works :) |
b6851a2
to
99fc30e
Compare
@endrebak it doesn't work again.
This was the case earlier as well with np.int32 - I've no idea why though. This is the output with the patch applied:
|
99fc30e
to
ed5a56a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are just changing the test, which is fine by me 👍
@endrebak thanks a lot for your fixes and work. Could you please tag a git release to 0.0.56 so I can upload this new version which would fix NCLS in Debian? |
Alrighty, it's done. Super thanks! |
I am so happy we were able to find a solution :) |
Hi,
I suppose NCLS is compatible to run with 32-bit archs right?
The tests actually seem to fail with those archs due to very large values as well as type mismatch at a couple of points.
This is my attempt to fix it.
I tried testing it in a 32-bit environment and it works.