-
Notifications
You must be signed in to change notification settings - Fork 121
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
pyarpack: python binding based on Boost.Python.Numpy exposing C++ API. #238
Conversation
Pull Request Test Coverage Report for Build 1121
💛 - Coveralls |
BTW, still a few things to push by the week-end on this PR. |
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.
Wahou, I wasn't expecting that. This is great!
Could you please add some tests too?
Remove Python2 support
And add license headers in the files
CMakeLists.txt
Outdated
@@ -18,6 +18,9 @@ endif () | |||
option(MPI "Enable parallel support" OFF) | |||
option(ICB "Enable support for *[ae]upd_c with ISO_C_BINDING" OFF) | |||
option(ICBEXMM "Enable support for matrix market example based on ICB" OFF) | |||
option(PYTHON2 "Enable python2 support" OFF) |
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.
Please remove python2 support
.travis.yml
Outdated
cd /tmp && \ | ||
cd arpack-ng && \ | ||
git status && \ | ||
git log -2 && \ | ||
sed -e 's/mpirun /mpirun --allow-run-as-root --oversubscribe /' -i CMakeLists.txt && \ | ||
mkdir -p build && cd build && \ | ||
cmake -DEXAMPLES=ON -DMPI=ON -DICB=ON .. && \ | ||
cmake -DEXAMPLES=ON -DMPI=ON -DICB=ON -DPYTHON2=ON .. && \ |
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.
Python 2 is already dead and will be removed from the next Debian and Ubuntu releases...
Not sure it is a good use of our time :(
Did that for my own use (like ICB !), so I actually "just" pushed it... :D Good to hear this sounds good to you (was not sure you would buy it). AFK, I'll get back to this likely tonight or this week-end. I use python2 in CI because boost-python and boost-numpy are built for python2 so I can Works with python3 too, but, boost-python must be built for python3, so I need to add, in CI, some Also, can likely add CI for both python2 and python3 : you decide. Let me know.
Never be very clear with license !... Elaborate what you want me to do and I'll do it |
I have no interest in Python 2 support :) Don't bother about the license, it is missing everywhere! |
OK, no problem for me ! :D But, for the CI, I would say
I needed to test the code as I was writing it, so I kept scripts as tests both for testing and providing simple getting started examples
|
Rebased + finishing a few things (with python2 as it should work) : when all is OK, I'll kill python3 ! |
89c6ffe
to
d4bd3bc
Compare
OK... ILP64 fails : python feature is supported only by cmake yet, and, cmake is not so easy to configure for very specific cases like ILP64 (I prefer autotools who just do what it's told to - cmake is often making stuffs in back-end : looking at traces, seems it does not take BLAS_LIBRARIES and LAPACK_LIBRARIES as is...). I'll try a few tricks to get ILP64 OK with cmake : if I can't get that to work, I'll drop ILP64 ! Can't afford to tune cmake for ILP64 across CI : could be endless.... |
@sylvestre: just hit a architecture problem. F90 tries to compile C : no way this could work !?... :D will test a fix here. If the fix works I'll rebase that at the bottom of the branch and make a PR for that only (that's a big problem so likely better to identify it with a dedicated commit) |
Seems like there is yet another problem on ILP64... Just boring...
Sounds suspiciously like #230 ?!... So I'll try to fix this as suggested there... |
dfee7a2
to
9a0698f
Compare
If 9a0698f works, would say it will fix #230 too. Compared
Would say computing "too many" EV with ILP64 make things more unstable !?... No idea why but it's the only difference I saw... So the solution would be "compute less EV" to get a stable test. |
Looking more closely at
Pushing about that to check out if this fix the ILP64 problem. If so, this really could fix also lots of problems all around the place including #230. As this is tricky : double-check / code-review by any other people is welcome. |
cb4582e
to
9ce06f7
Compare
Seems now computed EV are bad as it's usually cubersome to succeed to tune the cumbersome-cavernistic dead-ols thing that arpack is... really, this library should be rewritten from scratch... If somebody has a clue on "how to tune [iparam/inptr ? other ?...] arpack in ds flavor" speak up... |
|
d2eaffb
to
4c49661
Compare
OK !?... Seems more and more problems show up and are mixing up along the way : this blocks what's behind (pyarpack) @caliarim : AFAIR, you have (or had) some experience on arpack tuning !... Could you have a quick look and tell if you see something wrong in
My feeling (not sure) at the time is that the problem may be in I'am not sure here : still trying to understand where the problem could come from. @sylvestre : can't and won't fix all of this mixed mess ! What I propose is :
OK with you ? |
@sylvestre: will try to begin splitting PR |
Not payed here. Can't afford endlessly stepping back. Just bored. Take it or leave it. |
@fghoussen not paid either... ;) |
bravo! |
@@ -0,0 +1,125 @@ | |||
#!/usr/bin/env python |
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.
I guess the .in could be renamed as we don't plan to run with py2?
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.
As you like. I added .in
as there are some *.py.in
which can not be directly used as python scripts (need replacement of PYINT
variable to handle ILP64 case... But the repo does not compile in ILP64 : I discovered that after which led me to others problems likely related to #230)
apt-get -y install python3-minimal python3-pip python3-numpy && \ | ||
pip3 install numpy && \ | ||
apt-get -y install wget && \ | ||
wget https://sourceforge.net/projects/boost/files/boost/1.67.0/boost_1_67_0.tar.gz && \ |
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.
@sylvestre : as you want python3 only, we need to build from source : wget, tar, ...
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.
Why? Debian works without doing that
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.
Boost 1.67 exists in Debian testing:
https://tracker.debian.org/pkg/boost-defaults
why not running this part of the CI just on this distro ?
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.
Debian provides a package libboost-python-dev
wich is built for python2 , not for python 3, that's why boost must be built-from-source for python3. If you can replace boost-build-from-source by an apt-get install
would be good.
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.
Are you sure ?
https://packages.debian.org/sid/libboost-python1.67-dev
% apt-cache show libboost-python1.67-dev|grep python3 Depends: libboost1.67-dev (= 1.67.0-17), libboost-python1.67.0 (= 1.67.0-17), python-dev, python3-dev
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.
AFAIR, does not work on my debian box for missing symbols : compil or tests fails. #248 should fail
cd /tmp && \ | ||
cd arpack-ng && \ | ||
git status && \ | ||
git log -2 && \ | ||
sed -e 's/mpirun /mpirun --allow-run-as-root --oversubscribe /' -i CMakeLists.txt && \ | ||
mkdir -p build && cd build && \ | ||
cmake -DEXAMPLES=ON -DMPI=ON -DICB=ON .. && \ | ||
cmake -DEXAMPLES=ON -DMPI=ON -DPYTHON3=ON -DBOOST_PYTHON_LIBSUFFIX='36' .. && \ |
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.
@sylvestre : as you want python3 only, BOOST_PYTHON_LIBSUFFIX may change if apt-get upgrade
change the default python version on bionic.
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.
I guess the suffix detection could be done automatically, no?
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.
Nope...
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.
Why?
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.
Don't know. If you don't set it, cmake is lost and find nothing. I think the reason is that all is done in such a way you can have a boost lib for any python version X.Y so automatic detection would not be so "obvious"...
@turboencabulator : could you help at having |
Pull request purpose
pyarpack: python binding based on Boost.Python.Numpy exposing C++ API.
Detailed changes proposed in this pull request