Skip to content
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

Please help: osx10.11-xcode7.3 test failures? #150

Closed
kwgoodman opened this issue Oct 5, 2016 · 20 comments
Closed

Please help: osx10.11-xcode7.3 test failures? #150

kwgoodman opened this issue Oct 5, 2016 · 20 comments

Comments

@kwgoodman
Copy link
Collaborator

median and nanmedian are now failing on travis in bottleneck master. Travis passed and then after one commit (which only touched the AppVeyor files) it failed.

I don't think the failures are related to the appveyor commit. Maybe related to a change in the osx builds? Help!

@kwgoodman kwgoodman mentioned this issue Oct 5, 2016
@kwgoodman
Copy link
Collaborator Author

From the log files mentioned above: Travis upgraded from osx10.9-xcode6.1 (bottleneck unit tests pass) to osx10.11-xcode7.3 (median, nanmedian fail).

@kwgoodman
Copy link
Collaborator Author

Difference between previous Xcode 6.1 image and current Xcode 7.3 image.

@kwgoodman
Copy link
Collaborator Author

I don't have osx so I added some printf statements and then looked at the results on Travis. Travis takes 15 to 20 minutes just to start a build on osx. So it has been painful. (Dealing with osx and windows, systems I don't use, is the most frustrating part of developing bottleneck.)

Adding printf statements got the unit tests to pass but travis still says it is a failure. This message appears at the end of the log:

Ran 2 tests in 0.006s

OK

travis_nanoseconds

uname

travis_result $?

The command "source "tools/travis/bn_setup.sh"" exited with 0.

echo -e "\nDone. Your build exited with $TRAVIS_TEST_RESULT."

Done. Your build exited with 0.

travis_terminate $TRAVIS_TEST_RESULT

shell_session_update

/Users/travis/build.sh: line 109: shell_session_update: command not found

At this point I neither know what is causing the unit test failures or why shell_session_update isn't found.

@kwgoodman
Copy link
Collaborator Author

Does anyone have a computer with osx10.11-xcode7.3? If so, do the unit tests pass on bottleneck master?

@Midnighter
Copy link
Contributor

Looks to be a common problem over at travis-ci, e.g., travis-ci/travis-ci#6307, travis-ci/travis-ci#6495, travis-ci/travis-ci#6522, and travis-ci/travis-ci#6677. A quick fix could be to force an older OS X image, i.e., put the following entry into the matrix of the .travis.yml:

osx_image: xcode6.4

@kwgoodman
Copy link
Collaborator Author

Yep, that passes. I read that the old xcode will only be around until the end of the month.

The big question for me is the unit test failures. Hopefully someone will test on their computer with osx10.11-xcode7.3.

I guess I'll hold the release of bottleneck 1.2 for a little while.

hredestig added a commit to opencobra/cobrapy that referenced this issue Oct 6, 2016
@kwgoodman
Copy link
Collaborator Author

We now know (e.g. PR #151) that bottleneck master works with osx10.9-xcode6.1 and osx10.10-xcode6.4. It does not appear to work with osx10.11-xcode7.3. But it would be nice if someone can confirm that.

@kwgoodman kwgoodman changed the title Please help: OSX failures on Travis Please help: osx10.11-xcode7.3 test failures? Oct 10, 2016
@kwgoodman
Copy link
Collaborator Author

I guess I'll release bottleneck 1.2 without knowing if it runs on osx 10.11. No mac user has confirmed the bug or spoken up.

@jakirkham
Copy link

Is the only issue the shell_session_update error? That's just some Travis CI oddity that nobody seems to know how to solve.

xref: travis-ci/travis-ci#6307
xref: travis-ci/travis-ci#6495
xref: travis-ci/travis-ci#6522

@kwgoodman
Copy link
Collaborator Author

I'm also seeing unit test failures on osx10.11. Travis made a bunch of changes (e.g. the shell_session_update thing) so I was hoping that someone with osx 10.11 could tell us if the unit tests pass on the master branch.

@jakirkham
Copy link

If you have a script that you want me to run, I can run it tomorrow. Maybe longer if I need to cobble it together from source.

@kwgoodman
Copy link
Collaborator Author

There are a few different ways to run the test. Perhaps the most straightforward is to download the code:

https://github.com/kwgoodman/bottleneck/archive/master.zip

Then install it:

sudo python setup.py install

Then in python:

import bottleneck as bn
bn.test()

@jakirkham
Copy link

So I can confirm seeing all the same errors you saw on Travis CI on 10.11 with XCode 7.3.

@jakirkham
Copy link

Is there anything else you would like me to try?

@kwgoodman
Copy link
Collaborator Author

That's not the results I was hopping for :( But it is good to know.

Can you print the unit test failures? Something like this I would imagine:

Running unit tests for bottleneck

NumPy version 1.11.0

NumPy relaxed strides checking option: False

NumPy is installed in /Users/travis/miniconda/envs/test-python-3.4_64bit/lib/python3.4/site-packages/numpy

Python version 3.4.5 |Continuum Analytics, Inc.| (default, Jul  2 2016, 17:47:57) [GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.28)]

nose version 1.3.7

FF

======================================================================

FAIL: test reduce functions

----------------------------------------------------------------------

Traceback (most recent call last):

  File "/Users/travis/miniconda/envs/test-python-3.4_64bit/lib/python3.4/site-packages/nose/case.py", line 198, in runTest

    self.test(*self.arg)

  File "/Users/travis/miniconda/envs/test-python-3.4_64bit/lib/python3.4/site-packages/bottleneck/tests/reduce_test.py", line 126, in unit_maker

    assert_array_almost_equal(actual, desired, decimal, err_msg)

  File "/Users/travis/miniconda/envs/test-python-3.4_64bit/lib/python3.4/site-packages/numpy/testing/utils.py", line 912, in assert_array_almost_equal

    precision=decimal)

  File "/Users/travis/miniconda/envs/test-python-3.4_64bit/lib/python3.4/site-packages/numpy/testing/utils.py", line 733, in assert_array_compare

    raise AssertionError(msg)

AssertionError: 

Arrays are not almost equal to 5 decimals

func median | input a0 (int64) | shape (8,) | axis 0

Input array:

[7 5 1 6 0 2 4 3]

(mismatch 100.0%)

 x: array(2148493684.0)

 y: array(3.5)

======================================================================

FAIL: test reduce functions

----------------------------------------------------------------------

Traceback (most recent call last):

  File "/Users/travis/miniconda/envs/test-python-3.4_64bit/lib/python3.4/site-packages/nose/case.py", line 198, in runTest

    self.test(*self.arg)

  File "/Users/travis/miniconda/envs/test-python-3.4_64bit/lib/python3.4/site-packages/bottleneck/tests/reduce_test.py", line 126, in unit_maker

    assert_array_almost_equal(actual, desired, decimal, err_msg)

  File "/Users/travis/miniconda/envs/test-python-3.4_64bit/lib/python3.4/site-packages/numpy/testing/utils.py", line 912, in assert_array_almost_equal

    precision=decimal)

  File "/Users/travis/miniconda/envs/test-python-3.4_64bit/lib/python3.4/site-packages/numpy/testing/utils.py", line 733, in assert_array_compare

    raise AssertionError(msg)

AssertionError: 

Arrays are not almost equal to 5 decimals

func nanmedian | input a0 (int64) | shape (8,) | axis 0

Input array:

[7 5 1 6 0 2 4 3]

(mismatch 100.0%)

 x: array(2148493684.0)

 y: array(3.5)

----------------------------------------------------------------------

Ran 2 tests in 0.005s

FAILED (failures=2)

@jakirkham
Copy link

I can, but can confirm that I already compared them to Travis CI and the errors were identical.

@kwgoodman
Copy link
Collaborator Author

osx 10.10 also fails if I use xcode 7.1 (but doesn't fail with xcode 6,4). So it seems to be related to xcode 7.

@kwgoodman
Copy link
Collaborator Author

-std=c89 doesn't help

@kwgoodman
Copy link
Collaborator Author

I found it!

I noticed that only slices with an even number of elements fail (median and nanmedian) on xcode 7.3. That narrowed down the lines of code where the problem could be. Turns out the problem is BN_INFINITY which is just NPY_INFINITY. Using gcc's INFINITY didn't solve things.

I don't yet know how to fix it. But at least I now know the problem.

Anybody have any ideas?

@kwgoodman
Copy link
Collaborator Author

I fixed the xcode 7 median, nanmedian bug. And added a workaround for the shell_session_update thing.

I don't understand why other functions, which also use BN_INFINITY, do not also have unit test failures with xcode 7. So I rewrote the entire bottleneck test suite to make it easier to see which functions are tested with infinity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants