Thanks to visit codestin.com
Credit goes to github.com

Skip to content

BUG: reorder operations for VS2015 #12526

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 2 commits into from
Dec 13, 2018
Merged

BUG: reorder operations for VS2015 #12526

merged 2 commits into from
Dec 13, 2018

Conversation

mattip
Copy link
Member

@mattip mattip commented Dec 10, 2018

An attempt to influence #12520. Since the offending commit was 24c9faa, I tried reverting the logic in that commit.

@eric-wieser
Copy link
Member

Will try checking this out locally and seeing if it solves my problem tomorrow.

@numpy numpy deleted a comment Dec 11, 2018
@numpy numpy deleted a comment Dec 11, 2018
@numpy numpy deleted a comment Dec 11, 2018
@eric-wieser
Copy link
Member

Yeah, this fixes the problems I was having. Running the full test suite now, but I'm expecting a pass

@mattip mattip added 00 - Bug 09 - Backport-Candidate PRs tagged should be backported labels Dec 12, 2018
@mattip mattip added this to the 1.16.0 release milestone Dec 12, 2018
@eric-wieser
Copy link
Member

Yeah, this fixes everything for me.

It might still be worth holding off on merging this until we can reproduce the failure in CI

@mattip
Copy link
Member Author

mattip commented Dec 12, 2018

Thanks for checking. Added a comment so this hopefully won't happen again

@mattip
Copy link
Member Author

mattip commented Dec 12, 2018

What is even more confusing is that AFAICT Visual Studio 2015 uses Visual C++ 14.0 compiler, but so does Visual Studio 2017? The information on the python windows compiler page is confusing. What exact version of cl do you have?

@eric-wieser
Copy link
Member

eric-wieser commented Dec 12, 2018

C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC>cl
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23918 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

usage: cl [ option... ] filename... [ /link linkoption... ]

It looks like I have the complete VS2015 Update 2 installation.

@eric-wieser
Copy link
Member

eric-wieser commented Dec 12, 2018

When we merge this, we should:

  • Squash the commits so that a git blame shows the comment and code as the same change
  • Include the text gh-12520 in the commit message, to help anyone using blame find the thing we're trying to work around.

@mattip
Copy link
Member Author

mattip commented Dec 12, 2018

It looks like I have the complete VS2015 Update 2 installation.

According to wikipeida, there was update 3 in June 2016. Is there a reason you cannot update?

@eric-wieser
Copy link
Member

Nope, no reason I cannot update - but if the resolution is "update 3 or newer required", then we should blacklist my compiler version

@mattip
Copy link
Member Author

mattip commented Dec 12, 2018

I think we are done. We have a workaround for your (assumed broken) compiler, I would prefer not to add a CI run for a niche compiler. Do we have a mechanism to blacklist compilers, other than documenting the situation?

@tylerjereddy
Copy link
Contributor

I would prefer not to add a CI run for a niche compiler

Fair enough, saves me some work, but in that case I would prefer either:

  1. Robustly detect and blacklist the compiler
  2. Come up with a (likely creative) unit test for reproducing / preventing regression

@eric-wieser
Copy link
Member

Come up with a (likely creative) unit test for reproducing / preventing regression

Such a unit test already exists, which is how we found this in the first place

Robustly detect and blacklist the compiler

I feel like config.h holds the secret to detecting this kind of thing (by compiling and running a dummy program at build time).

@tylerjereddy
Copy link
Contributor

tylerjereddy commented Dec 12, 2018

Sorry, by creative I meant a test that will cause a failure with compilers currently used in CI unless the fix is applied. But yeah, I guess putting some kind of dummy code that will fail for the offending compiler is probably an order of magnitude less ugly & does the job of failing early / reproducibly instead of build successfully and then maybe only failing an isolated unit test.

I suppose the dummy code could even suggest the reason for a specific failure, although I don't know offhand if we annotate that stuff.

@charris
Copy link
Member

charris commented Dec 13, 2018

Is this still WIP ?

@mattip mattip changed the title WIP, BUG: reorder operations for VS2015 BUG: reorder operations for VS2015 Dec 13, 2018
@mattip
Copy link
Member Author

mattip commented Dec 13, 2018

The fix itself is good to go. The remaining question is how much energy we should invest in making sure the problem does not repeat by crafting a stand-alone test for faulty compilation at build time, to let a potential user know early that their build will give wrong results. I am of the opinion we do not need to do anything further, this should just be merged as-is, and users of these kinds of compilers should be running the test suite which would detect the problem.

@charris
Copy link
Member

charris commented Dec 13, 2018

Let's put this in. The fact that such a new compiler can cause problems is disturbing, but it seems we have a workaround. I'll tag this with the compiler label.

Does this mean that the invalid value bit is getting set by some platforms?

@eric-wieser
Copy link
Member

Hmm, I think @charris has a point - don't we have to go back to explicitly clearing the invalid bit again?

@mattip
Copy link
Member Author

mattip commented Dec 14, 2018

I did not remove the existing call to npy_clear_floatstatus_barrier on lines 1879, 1907 and 1065. Without those we would have seen warnings in the tests.

@eric-wieser
Copy link
Member

Huh, I thought we did the initial reordering in order to eliminate those. Guess that's what happens when I respond from mobile. Thanks for fixing this for me, anyway!

@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Dec 16, 2018
@charris charris removed this from the 1.16.0 release milestone Dec 16, 2018
@mattip mattip deleted the fix-12520 branch May 20, 2019 13:45
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.

4 participants