-
-
Notifications
You must be signed in to change notification settings - Fork 190
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
Feature/0123 complex funs #1774
Conversation
…re/0123-complex-funs
…re/0123-complex-funs
…re/0123-complex-funs
…re/0123-complex-funs
@bob-carpenter Over 30 warnings and a successful build causes this to be marked unstable. And this blocks the merge -- it's not that anything failed. We could also mark these warnings as okay, but I'd like to reproduce the warnings first before we do that. I have a Windows install on this laptop so I can just hop over and investigate. I'm suspicious that these warnings are only showing up here. Cause we're definitely testing this call in rev. Seems fishy, and like there's something unrelated going on, in which case the warnings might be okay to ignore (or we figure out why this is different and solve them). |
@mitzimorris I don't think those are the problem. Nothing is explicitly blowing up. What is happening is that there are too many warnings when building and this is causing the test to be marked unstable. I suspect this is a problem with the specific test that is generating all these warnings. I will investigate it this afternoon. |
Please see my above comment on how to get to the below links. As a quality gate it was decided to not let more than 30 warnings go to production. ( develop, when we merge this PR in then master on release ) For our build here, we have the following warnings: This job is NOT failing anywhere, everything is building fine, there are no errors! Everything is green and passing!!! This job is UNSTABLE (yellow) because the Quality Gate was triggered, we have more than the limit of 30 warnings. See the code definition here I am by no means in the position to just move the quality gate to 999999 and pass this PR. I hope this clarifies the current situation of this PR, if not please tell me so we can all be on the same page. Thank you! Example of warnings generated from a GNU C Compiler Warnings Develop generated: 16 warnings for To stop this build from failing and follow the current CI/CD TL;DR The build is actually fine, there are no errors in the pipeline. What happens is that this PR generated more warnings than allowed by the pipeline as seen here: GNU C Compiler Warnings Options that I can see are:
Maybe @seantalts or @jgabry has a saying in the Quality gate threshold. |
Jenkins Console Log Machine informationProductName: Mac OS X ProductVersion: 10.11.6 BuildVersion: 15G22010CPU: G++: Clang: |
Thanks. That's super helpful. Sorry to be so dense here but the green lights all confused me, so I wasn't looking on that page for errors, despite the whole thing being yellow-orange and you having told me to look there before. Now I just need to work on recreating locally, because unlike the last ones, these are issues I can't tickle on my own machine. I might be able to guess at fixes, which is the next step if I can't get a login to a machine where I can recreate the issue directly.
Right. @bbbales2 pointed that out and I see what's going on and can now see the actual warnings that are triggering the failed tests (if not a failed build per se). I want to reserve turning up warning threshold as a last resort. Hopefully we can fix this with some platform-specific defs somewhere. |
You're very welcome, I'm here to help you out so don't hesitate to ask! |
It must be failing on The issue is that If someone knows how to write a preprocessor conditional ( @bbbales2 Any headway? You'd asked me not to work on this until you had a chance to look at it. |
You've stolen my glory booo. I just got back from the Wild World of Windows and adding:
to stan/math/prim/fun/pow.hpp (in the stan::math namespace) is the thing that worked. The math.h there only defines pow for all doubles. |
@bbbales2 : How did you find that output you showed that said what the ambiguities were? I can't find it anywhere on Jenkins. @serban-nicusor-toptal's instructions only indicated the top-level cause of failure---too many warnings. Then @mitzimorris and I spent another 15m hunting for where the output could've come from and found a hint one level down from where @serban-nicusor-toptal pointed us. You need to click on the warnings icon highlighted, but then I wouldn't have known to look in I'm sorry to have to keep repeating my question, but I still don't have an answer that I can work from: Is there any way to get the console output from the warnings that are causing failure? Thanks. And sorry for shouting. |
Let's zoom and I'll show you. I'll e-mail you a link |
From below it looks like you can use |
…re/0123-complex-funs
two more steps after Nic's excellent instructions above -
|
…ev/math into feature/0123-complex-funs
…gs/RELEASE_500/final)
@bob-carpenter I made the new pow inline. It was failing in the translation unit tests (multiple symbols or something) |
…stable/2017-11-14)
Jenkins Console Log Machine informationProductName: Mac OS X ProductVersion: 10.11.6 BuildVersion: 15G22010CPU: G++: Clang: |
Thanks---finally something to celebrate! I didn't see your fix, so just pushed the same one to the dead branch :-) Now it's onto matrices and FFTs. |
I would've said "great minds think alike." More seriously, this was a huge group effort from beginning to end. In retrospect, I'm not even sure it was worth as much of my time as I spent on it. I'm thinking this was something like two solid months of effort spread over something like five months. This one I very much mis-estimated based on an assumption that the compilers would implement the spec. |
Do we want to include these at the language level? I think it would be pretty easy to add a |
Yes, and it might be a good project to start the scalar complex numbers before sparse matrices because the I/O is soooo much simpler. For matrices, we'd need new |
Summary
Adds support for forward and reverse mode autodiff for all functions in the
std::complex
spec. The base class implementations were added in a previous PR.Several of the overloads which may seem redundant are there because of differences between g++ and clang++.
Tests
Extensively unit tested.
Boundary conditions are largely not tested because they're inconsistent between
std::complex<T>
implementations in g++ and clang++ default libraries.Side Effects
More overloads of functions like
pow
andexp
andatanh
.Checklist
Math issue complex numbers with vars #123 [this completes complex numbers with vars #123, but there's still one more PR coming that adds Eigen matrix support for complex]
Copyright holder: Simons Foundation
the basic tests are passing (as much as I could run locally)
./runTests.py test/unit
)make test-headers
)make test-math-dependencies
)make doxygen
)make cpplint
)the code is written in idiomatic C++ and changes are documented in the doxygen
the new changes are tested