On Thu, Nov 7, 2013 at 8:11 AM, Carl Dr. Kleffner <cmkleff...@gmx.de> wrote:
> Hi list, > > my name is Carl and I'm new to the list. With the advent of the recently > released mingw-w64 libs and headers v-3.0 ( > http://sourceforge.net/projects/mingw-w64/files/mingw-w64/mingw-w64-release) > I decided to build a custom version of the mingw-w64 toolchain for both: > i686 (32bit) and x86_64 (64 bit) adapted for python-2.7. > > highlights are: > > - build on Windows 7 with the help of msys2 ( > http://sourceforge.net/projects/msys2/files/Alpha-versions/ ) and the > mingw-build scripts found at > https://github.com/niXman/mingw-builds/tree/develop . > - recent gcc-4.8.1 and mingw-w64 rev 3.0 code base. > - no multilib and thus pure native compile on Windows. > - fully statically build, thus no dependancy on any mingw dlls. > - languages: C/C++/Fortran/LTO. > - SEH exceptions (x86_64) and SJLJ exceptions (i686) configuration. > - win32 threads (default) configuration with winpthreads as option. > - additional spec files for linkage to MSVCR90 runtime according to > http://developer.berlios.de/devlog/akruis/2012/06/10/msvcr90dll-and-mingw/(now > defunct). > - API compatible build to the following officially mingw-w64 toolchains: > http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/4.8.1/threads-win32/sjlj/i686-4.8.1-release-win32-sjlj-rt_v3-rev2.7z > > http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/4.8.1/threads-win32/seh/x86_64-4.8.1-release-win32-seh-rt_v3-rev2.7z > > A first test with mingw-w64 (32bit) and a serial (single threaded) > OpenBLAS compiled with the toolchain mentioned above I was able to build a > numpy-1.8.0rc2-py2.7 against OpenBLAS. 64 bit is on my TODO list. The build > stage needed a lot of manual intervention due to my non-understanding of > distutils. numpy.test(verbose=2) runs without segfault. Failures and Errors > are pasted below. > > Regards > > Carl > > numyp.test(verbose=2) results: > test_field_names (test_multiarray.TestRecord) ... SKIP: non ascii unicode > field indexing skipped; raises segfault on python 2.x > test_inf_ninf (test_umath.TestArctan2SpecialValues) ... > D:\tmp\mingw_w64_i686\tmp\numpytest_i686\numpy\core\tests\test_umath.py:417: > RuntimeWarning: invalid value encountered in arctan2 > assert_almost_equal(ncu.arctan2( np.inf, -np.inf), 0.75 * np.pi) > FAIL > test_inf_pinf (test_umath.TestArctan2SpecialValues) ... > D:\tmp\mingw_w64_i686\tmp\numpytest_i686\numpy\core\tests\test_umath.py:422: > RuntimeWarning: invalid value encountered in arctan2 > assert_almost_equal(ncu.arctan2( np.inf, np.inf), 0.25 * np.pi) > FAIL > test_nan_outputs2 (test_umath.TestHypotSpecialValues) ... FAIL > test_umath_complex.TestCabs.test_cabs_inf_nan(<ufunc 'absolute'>, inf, > nan, inf) ... FAIL > test_umath_complex.TestCabs.test_cabs_inf_nan(<ufunc 'absolute'>, -inf, > nan, inf) ... FAIL > test_umath_complex.TestCarg.test_special_values(<ufunc '_arg'>, -inf, inf, > 2.356194490192345, False) ... > D:\tmp\mingw_w64_i686\tmp\numpytest_i686\numpy\core\tests\test_umath_complex.py:525: > RuntimeWarning: invalid value encountered in _arg > assert_almost_equal(f(z1), x) > FAIL > test_umath_complex.TestCarg.test_special_values(<ufunc '_arg'>, -inf, > -inf, -2.356194490192345, False) ... FAIL > test_umath_complex.TestCarg.test_special_values(<ufunc '_arg'>, inf, inf, > 0.7853981633974483, False) ... FAIL > test_umath_complex.TestCarg.test_special_values(<ufunc '_arg'>, inf, -inf, > -0.7853981633974483, False) ... FAIL > Failure: SkipTest (Skipping test: test_special_values: Numpy is using > complex functions (e.g. sqrt) provided by yourplatform's C library. > However, they do not seem to behave accordingto C99 -- so C99 tests are > skipped.) ... SKIP: Skipping test: test_special_values: Numpy is using > complex functions (e.g. sqrt) provided by yourplatform's C library. > However, they do not seem to behave accordingto C99 -- so C99 tests are > skipped. > test_special_values (test_umath_complex.TestClog) ... SKIP: Skipping test: > test_special_values: Numpy is using complex functions (e.g. sqrt) provided > by yourplatform's C library. However, they do not seem to behave > accordingto C99 -- so C99 tests are skipped. > Failure: SkipTest (Skipping test: test_special_values: Numpy is using > complex functions (e.g. sqrt) provided by yourplatform's C library. > However, they do not seem to behave accordingto C99 -- so C99 tests are > skipped.) ... SKIP: Skipping test: test_special_values: Numpy is using > complex functions (e.g. sqrt) provided by yourplatform's C library. > However, they do not seem to behave accordingto C99 -- so C99 tests are > skipped. > Failure: ImportError (cannot import name ccompiler) ... ERROR > SKIP: No C compiler available > test_ufunc (test_function_base.TestVectorize) ... FAIL > test_lapack (test_build.TestF77Mismatch) ... SKIP: Skipping test: > test_lapack: Skipping fortran compiler mismatch on non Linux platform > test_linalg.test_xerbla_override ... SKIP: Not POSIX or fork failed. > ====================================================================== > ERROR: Failure: ImportError (cannot import name ccompiler) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "d:\devel32\python-2.7.5\lib\site-packages\nose\loader.py", line > 413, in loadTestsFromName > addr.filename, addr.module) > File "d:\devel32\python-2.7.5\lib\site-packages\nose\importer.py", line > 47, in importFromPath > return self.importFromDir(dir_path, fqname) > File "d:\devel32\python-2.7.5\lib\site-packages\nose\importer.py", line > 94, in importFromDir > mod = load_module(part_fqname, fh, filename, desc) > File "numpy\distutils\__init__.py", line 9, in <module> > from . import ccompiler > File "numpy\distutils\ccompiler.py", line 9, in <module> > from distutils.ccompiler import * > File "numpy\distutils\__init__.py", line 9, in <module> > from . import ccompiler > File "numpy\distutils\ccompiler.py", line 10, in <module> > from distutils import ccompiler > ImportError: cannot import name ccompiler > ====================================================================== > FAIL: test_inf_ninf (test_umath.TestArctan2SpecialValues) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File > "D:\tmp\mingw_w64_i686\tmp\numpytest_i686\numpy\core\tests\test_umath.py", > line 417, in test_inf_ninf > assert_almost_equal(ncu.arctan2( np.inf, -np.inf), 0.75 * np.pi) > File "numpy\testing\utils.py", line 462, in assert_almost_equal > raise AssertionError(msg) > AssertionError: > Arrays are not almost equal to 7 decimals > ACTUAL: nan > DESIRED: 2.356194490192345 > ====================================================================== > FAIL: test_inf_pinf (test_umath.TestArctan2SpecialValues) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File > "D:\tmp\mingw_w64_i686\tmp\numpytest_i686\numpy\core\tests\test_umath.py", > line 422, in test_inf_pinf > assert_almost_equal(ncu.arctan2( np.inf, np.inf), 0.25 * np.pi) > File "numpy\testing\utils.py", line 462, in assert_almost_equal > raise AssertionError(msg) > AssertionError: > Arrays are not almost equal to 7 decimals > ACTUAL: nan > DESIRED: 0.7853981633974483 > ====================================================================== > FAIL: test_nan_outputs2 (test_umath.TestHypotSpecialValues) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File > "D:\tmp\mingw_w64_i686\tmp\numpytest_i686\numpy\core\tests\test_umath.py", > line 337, in test_nan_outputs2 > assert_hypot_isinf(np.nan, np.inf) > File > "D:\tmp\mingw_w64_i686\tmp\numpytest_i686\numpy\core\tests\test_umath.py", > line 328, in assert_hypot_isinf > "hypot(%s, %s) is %s, not inf" % (x, y, ncu.hypot(x, y))) > File "numpy\testing\utils.py", line 44, in assert_ > raise AssertionError(msg) > AssertionError: hypot(nan, inf) is nan, not inf > ====================================================================== > FAIL: test_umath_complex.TestCabs.test_cabs_inf_nan(<ufunc 'absolute'>, > inf, nan, inf) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "d:\devel32\python-2.7.5\lib\site-packages\nose\case.py", line 197, > in runTest > self.test(*self.arg) > File > "D:\tmp\mingw_w64_i686\tmp\numpytest_i686\numpy\core\tests\test_umath_complex.py", > line 523, in check_real_value > assert_equal(f(z1), x) > File "numpy\testing\utils.py", line 260, in assert_equal > return assert_array_equal(actual, desired, err_msg, verbose) > File "numpy\testing\utils.py", line 718, in assert_array_equal > verbose=verbose, header='Arrays are not equal') > File "numpy\testing\utils.py", line 607, in assert_array_compare > chk_same_position(x_isnan, y_isnan, hasval='nan') > File "numpy\testing\utils.py", line 587, in chk_same_position > raise AssertionError(msg) > AssertionError: > Arrays are not equal > x and y nan location mismatch: > x: array([ nan]) > y: array(inf) > ====================================================================== > FAIL: test_umath_complex.TestCabs.test_cabs_inf_nan(<ufunc 'absolute'>, > -inf, nan, inf) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "d:\devel32\python-2.7.5\lib\site-packages\nose\case.py", line 197, > in runTest > self.test(*self.arg) > File > "D:\tmp\mingw_w64_i686\tmp\numpytest_i686\numpy\core\tests\test_umath_complex.py", > line 523, in check_real_value > assert_equal(f(z1), x) > File "numpy\testing\utils.py", line 260, in assert_equal > return assert_array_equal(actual, desired, err_msg, verbose) > File "numpy\testing\utils.py", line 718, in assert_array_equal > verbose=verbose, header='Arrays are not equal') > File "numpy\testing\utils.py", line 607, in assert_array_compare > chk_same_position(x_isnan, y_isnan, hasval='nan') > File "numpy\testing\utils.py", line 587, in chk_same_position > raise AssertionError(msg) > AssertionError: > Arrays are not equal > x and y nan location mismatch: > x: array([ nan]) > y: array(inf) > ====================================================================== > FAIL: test_umath_complex.TestCarg.test_special_values(<ufunc '_arg'>, > -inf, inf, 2.356194490192345, False) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "d:\devel32\python-2.7.5\lib\site-packages\nose\case.py", line 197, > in runTest > self.test(*self.arg) > File > "D:\tmp\mingw_w64_i686\tmp\numpytest_i686\numpy\core\tests\test_umath_complex.py", > line 525, in check_real_value > assert_almost_equal(f(z1), x) > File "numpy\testing\utils.py", line 454, in assert_almost_equal > return assert_array_almost_equal(actual, desired, decimal, err_msg) > File "numpy\testing\utils.py", line 811, in assert_array_almost_equal > header=('Arrays are not almost equal to %d decimals' % decimal)) > File "numpy\testing\utils.py", line 607, in assert_array_compare > chk_same_position(x_isnan, y_isnan, hasval='nan') > File "numpy\testing\utils.py", line 587, in chk_same_position > raise AssertionError(msg) > AssertionError: > Arrays are not almost equal to 7 decimals > x and y nan location mismatch: > x: array([ nan]) > y: array(2.356194490192345) > ====================================================================== > FAIL: test_umath_complex.TestCarg.test_special_values(<ufunc '_arg'>, > -inf, -inf, -2.356194490192345, False) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "d:\devel32\python-2.7.5\lib\site-packages\nose\case.py", line 197, > in runTest > self.test(*self.arg) > File > "D:\tmp\mingw_w64_i686\tmp\numpytest_i686\numpy\core\tests\test_umath_complex.py", > line 525, in check_real_value > assert_almost_equal(f(z1), x) > File "numpy\testing\utils.py", line 454, in assert_almost_equal > return assert_array_almost_equal(actual, desired, decimal, err_msg) > File "numpy\testing\utils.py", line 811, in assert_array_almost_equal > header=('Arrays are not almost equal to %d decimals' % decimal)) > File "numpy\testing\utils.py", line 607, in assert_array_compare > chk_same_position(x_isnan, y_isnan, hasval='nan') > File "numpy\testing\utils.py", line 587, in chk_same_position > raise AssertionError(msg) > AssertionError: > Arrays are not almost equal to 7 decimals > x and y nan location mismatch: > x: array([ nan]) > y: array(-2.356194490192345) > ====================================================================== > FAIL: test_umath_complex.TestCarg.test_special_values(<ufunc '_arg'>, inf, > inf, 0.7853981633974483, False) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "d:\devel32\python-2.7.5\lib\site-packages\nose\case.py", line 197, > in runTest > self.test(*self.arg) > File > "D:\tmp\mingw_w64_i686\tmp\numpytest_i686\numpy\core\tests\test_umath_complex.py", > line 525, in check_real_value > assert_almost_equal(f(z1), x) > File "numpy\testing\utils.py", line 454, in assert_almost_equal > return assert_array_almost_equal(actual, desired, decimal, err_msg) > File "numpy\testing\utils.py", line 811, in assert_array_almost_equal > header=('Arrays are not almost equal to %d decimals' % decimal)) > File "numpy\testing\utils.py", line 607, in assert_array_compare > chk_same_position(x_isnan, y_isnan, hasval='nan') > File "numpy\testing\utils.py", line 587, in chk_same_position > raise AssertionError(msg) > AssertionError: > Arrays are not almost equal to 7 decimals > x and y nan location mismatch: > x: array([ nan]) > y: array(0.7853981633974483) > ====================================================================== > FAIL: test_umath_complex.TestCarg.test_special_values(<ufunc '_arg'>, inf, > -inf, -0.7853981633974483, False) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "d:\devel32\python-2.7.5\lib\site-packages\nose\case.py", line 197, > in runTest > self.test(*self.arg) > File > "D:\tmp\mingw_w64_i686\tmp\numpytest_i686\numpy\core\tests\test_umath_complex.py", > line 525, in check_real_value > assert_almost_equal(f(z1), x) > File "numpy\testing\utils.py", line 454, in assert_almost_equal > return assert_array_almost_equal(actual, desired, decimal, err_msg) > File "numpy\testing\utils.py", line 811, in assert_array_almost_equal > header=('Arrays are not almost equal to %d decimals' % decimal)) > File "numpy\testing\utils.py", line 607, in assert_array_compare > chk_same_position(x_isnan, y_isnan, hasval='nan') > File "numpy\testing\utils.py", line 587, in chk_same_position > raise AssertionError(msg) > AssertionError: > Arrays are not almost equal to 7 decimals > x and y nan location mismatch: > x: array([ nan]) > y: array(-0.7853981633974483) > ====================================================================== > FAIL: test_ufunc (test_function_base.TestVectorize) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File > "D:\tmp\mingw_w64_i686\tmp\numpytest_i686\numpy\lib\tests\test_function_base.py", > line 554, in test_ufunc > assert_array_equal(r1, r2) > File "numpy\testing\utils.py", line 718, in assert_array_equal > verbose=verbose, header='Arrays are not equal') > File "numpy\testing\utils.py", line 644, in assert_array_compare > raise AssertionError(msg) > AssertionError: > Arrays are not equal > (mismatch 40.0%) > x: array([ 1.00000000e+00, 6.12323400e-17, -1.00000000e+00, > -1.83697020e-16, 1.00000000e+00]) > y: array([ 1.00000000e+00, 6.12303177e-17, -1.00000000e+00, > -1.83690953e-16, 1.00000000e+00]) > ---------------------------------------------------------------------- > Ran 4413 tests in 74.154s > FAILED (KNOWNFAIL=9, SKIP=7, errors=1, failures=10) > Running unit tests for numpy > NumPy version 1.8.0rc2 > NumPy is installed in numpy > Python version 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit > (Intel)] > nose version 1.3.0 > > > Could you take a look at https://github.com/numpy/numpy/pull/4021? Chuck
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion