8000 BLD: mingwpy fixes by carlkl · Pull Request #6354 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

BLD: mingwpy fixes #6354

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

Merged
merged 1 commit into from
Oct 9, 2015
Merged

BLD: mingwpy fixes #6354

merged 1 commit into from
Oct 9, 2015

Conversation

carlkl
Copy link
Member
@carlkl carlkl commented Sep 24, 2015

latest patches for OpenBLAS/mingwpy builds on Windows. Features longdouble==double fake to better match MSVC behaviour. Better mingw32 detection.

@carlkl
Copy link
Member Author
carlkl commented Sep 24, 2015

Howto compile numpy master with mingwpy:

Install mingwpy with pip (https://anaconda.org/carlkl/mingwpy) and extract the OpenBLAS archives: https://bitbucket.org/carlkl/mingw-w64-for-python/downloads/OpenBLAS_mingwpy_amd64.7z / https://bitbucket.org/carlkl/mingw-w64-for-python/downloads/OpenBLAS_mingwpy-win32.7z.

site.cfg should contain:

[openblas]
libraries = openblaspy
library_dirs = <path_to>/lib
include_dirs = <path_to>/include

I encountered some new errors in numpy.test() with numpy.master I have to dig in.

# Don't call build_import_library() and build_msvcr_library.

if 'MinGW-W64' not in str(out_string):
if 'MinGW-W64' not in str(out_string) and 'mingwpy' not in str(out_string):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment here about when each of these strings appear?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice if we could warn rather than fail when an different mingw is used.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The strings appear with either vanilla mingw-w64: MinGW-W64 or with mingwpy: mingwpy. In both cases build_import_library() shouldn't be called, see comment above in the code.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line may also be too long. You can put the expression in (...) and split it over two lines if needed.

@charris
Copy link
Member
charris commented Sep 25, 2015

Does this work with the old mingw32 version we have been using?

8000

@matthew-brett
Copy link
Contributor

I guess that leads to the bigger question - are we planning to switch to these tools soon? Maybe that needs to go to the mailing list?

@carlkl
Copy link
Member Author
carlkl commented Sep 26, 2015

I didn't t made tests of the PR with mingw32.

A comparison python-2.7-win32) of numpy-1.10.0rc1 (mingw32 atlas build, sourceforge) and numpy-1.11.0.dev0 (master, mingwpy OpenBLAS build) shows:

mingw32:
Ran 5856 tests in 90.065s
FAILED (KNOWNFAIL=7, SKIP=7, errors=7, failures=14)

mingwpy:
Ran 5947 tests in 73.677s
FAILED (KNOWNFAIL=7, SKIP=9, errors=8)

@matthew-brett
Copy link
Contributor

Carl - how do the error counts compare on the 1.9.x branch?

Are you using mingw32 on the numpy-vendor VM?

@carlkl
Copy link
Member Author
carlkl commented Sep 26, 2015

@matthew-brett I compared the latest numpy binary download from sourceforge http://sourceforge.net/projects/numpy/files/NumPy/1.10.0rc1/numpy-1.10.0rc1-win32-superpack-python2.7.exe (sse2 version) to my self build numpy-master with PR.
I couldn't attach the results ti this issue, take a look at the gists:
https://gist.github.com/carlkl/b33ff3ea0876dad68285
https://gist.github.com/carlkl/c2ffefe74e6da6920996

@matthew-brett
Copy link
Contributor

If you add your patches to the 1.9.x branch, what do you get at the moment, for your toolchain?

@carlkl
Copy link
Member Author
carlkl commented Sep 26, 2015

on 1.9.2: no errors / failures for win32 and 4 errors for amd64.
all errors are due to:

>>> print np.longdouble(-np.inf)
inf

np.longdouble(-np.inf) however gets the correct value, as shown in hex.

@matthew-brett
Copy link
Contributor

Time for another conference call about how to proceed on getting these builds as the standard for numpy etc? I'm around nearly all the time, on West coast US time.

@carlkl
Copy link
Member Author
carlkl < 8000 /strong> commented Sep 26, 2015

I agree on that, I will create a doodle on that the next days.

@charris
Copy link
Member
charris commented Sep 28, 2015

Let me know what happens. At present it looks like this will not be in 1.10.0. Because we are shooting for 1.11.0 in Feb/Mar, that might not be too bad.

@matthew-brett
Copy link
Contributor

Can we merge this one in mean-time though? It would be good to get a version of this into 1.9.4.

@carlkl
Copy link
Member Author
carlkl commented Oct 6, 2015

If requested (for cross checking) I can create a mingwpy patch for 1.9.4.
It would appreciate mingwpy support for numpy1.9.4

@matthew-brett
Copy link
Contributor

Thanks, a patch against 1.9.x maintenance would be excellent.

Any comments here? Christoph?

@rgommers
Copy link
Member
rgommers commented Oct 9, 2015

Carl's builds have been pretty much on par with the old 32-bit toolchain in terms of test errors/failures for a while now. So I'd support a less conservative course at this point: I'd be fine with merging patches into master if they look OK without checking each change against the old toolchain.

charris added a commit that referenced this pull request Oct 9, 2015
@charris charris merged commit cda6493 into numpy:master Oct 9, 2015
@charris
Copy link
Member
charris commented Oct 9, 2015

Let's let this play out in 1.11 development. @rgommers Thanks for the nudge.

@carlkl
Copy link
Member Author
carlkl commented Oct 9, 2015

There is also an announcment on the numpy ML:

I build numpy master (numpy-1.11.0.dev0 , 0243bce) windows binary wheels for testing purpose.

The only thing to do before building was to copy libopenblaspy.dll to numpy/core and to create a site.cfg that points to the OpenBLAS include and lib folders.

Install the wheels on anaconda.org with with pip:

pip install -i https://pypi.anaconda.org/carlkl/simple numpy

These builds are compiled with OPENBLAS trunk for BLAS/LAPACK support and the mingwpy compiler toolchain.

OpenBLAS is deployed within the numpy wheels. To be performant on all usual CPU architectures OpenBLAS is configured with it's 'dynamic architecture' and automatic CPU detection.

This version of numpy fakes long double as double just like the MSVC builds.

Some test statistics:

win32 (32 bit)
numpy-1.11.0.dev0, python-2.6: errors=8, failures=1
numpy-1.11.0.dev0, python-2.7: errors=8, failures=1
numpy-1.11.0.dev0, python-3.3: errors=9
numpy-1.11.0.dev0, python-3.4: errors=9

amd64 (64bit)
numpy-1.11.0.dev0, python-2.6: errors=9, failures=6
numpy-1.11.0.dev0, python-2.7: errors=9, failures=6
numpy-1.11.0.dev0, python-3.3: errors=10, failures=6
numpy-1.11.0.dev0, python-3.4: errors=10, failures=6

@charris
Copy link
Member
charris commented Oct 17, 2015

See also #6495.

charris added a commit to charris/numpy that referenced this pull request Oct 20, 2015
Revert mingwpy modifications to distutils. They are causing problems
for non-windows builds and it is better to wait until mingypy is
further along.

This reverts commit cda6493, reversing
changes made to 8cb3ec6.
jaimefrio pushed a commit to jaimefrio/numpy that referenced this pull request Mar 22, 2016
Revert mingwpy modifications to distutils. They are causing problems
for non-windows builds and it is better to wait until mingypy is
further along.

This reverts commit cda6493, reversing
changes made to 8cb3ec6.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants
0