-
-
Notifications
You must be signed in to change notification settings - Fork 370
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
Switch to C++11 #714
Comments
As long as you support whatever is current in Rtools (4.6.3 as of now). According to Duncan Murdoch, keeper of Rtools, when MinGW-64 finishes its updating to 4.8.x, Rtools will follow shortly. |
That would enable us to use more features but uses a lot more RAM. Looks http://docs.continuum.io/anaconda/ says Python 3.3/4 are "available". Does available mean viable with VS 2012? On Thu, Jun 26, 2014 at 7:22 PM, Avraham Adler notifications@github.com
|
I don't think Python 2.x on Windows should hold back the switch to C++11. The main concern is that support for Python 3 is only gradually emerging on Windows. The lack of a 64-bit compiler (MinGW-64 would be used for Python as well) is also a concern. I think it would be nice to give the Python 2.7 Windows users out there fair warning that they need to upgrade to Python 3 and a new compiler. There probably are still a fair number of such users out there and Anaconda has only recently started to have robust support for Python 3. |
Maybe we should wait for Rtools to upgrade? That would possibly permit @bob-carpenter to do multithreading without Boost |
@aadler : Do you have a link to a definitive statement by Duncan about Rtools? |
@bgoodri I have an e-mail from him on May 29, 2014 which I have transcribed below:
I can forward the e-mail for verification if you would like. |
That's fine. It sounds eminent enough for Stan to wait on the switch to On Fri, Jun 27, 2014 at 1:51 PM, Avraham Adler notifications@github.com
|
@ariddell : Would it be feasible to make a pystan binary package (at least for Windows) available via Binstar? http://continuum.io/blog/binstar Maybe this would reduce the pain of forcing C++11 whenever Rtools updates mingw? |
Thanks for the link to the blog post. There is a binary package available for pystan for Windows through continuum's system (just plain |
I guess I was wondering if we put a pystan binary onto binstar that is On Thu, Jul 17, 2014 at 4:39 PM, Allen Riddell notifications@github.com
|
I'm not sure about all the issues here. I gather there's some question of what compiler was used to compile Python itself. If Python 2.7 on Windows is the only stumbling block, I don't think that should stop the switch. |
If possible, we would rather not leave PyStan users on Windows stuck on 2.x On Thu, Jul 17, 2014 at 5:04 PM, Allen Riddell notifications@github.com
|
I've read a bit more about this. If we can support Visual Studio 2010 (which has (It also seems clear that, for Python, MinGW will not be helpful for some I think the steps to take are: [ ] Test compilation of Stan on Jenkins using Visual Studio 2008 (for 2.4) How does that sound? (Is Windows compilation already being tested for any I'll email Daniel about this and try to work on it next week. I have a Windows On 07/17, bgoodri wrote:
|
Here's a table of the C++11 features that Visual Studio 2010, 2012, and 2013 http://msdn.microsoft.com/en-us/library/hh567368.aspx On 07/17, bgoodri wrote:
|
That seems like a good plan. I don't think Visual Studio is tested at all https://groups.google.com/d/msg/stan-users/A_WcImpwaYA/TlPQGMnrCi4J On Fri, Jul 18, 2014 at 8:28 AM, Allen Riddell notifications@github.com
|
If Stan with C++11 features compiles under Visual Studio 2010 then all is well for Python 3 Windows users. If not, there's a risk that Windows users will not be able to use PyStan. From talking to Patrick Snape it sounds like the real concern is the library. Python 3 under Windows is compiled with a Visual Studio 2010 C++ standard library, housed in |
Sorry if this has been answered, but is Python 3 the only I wouldn't want to lock Windows users out of PyStan altogether. But then I don't want to wait forever to go to C++11,
On Jul 22, 2014, at 4:11 PM, Allen Riddell notifications@github.com wrote:
|
Short of users compiling Python themselves, I think it is impossible to On Wed, Jul 23, 2014 at 12:12 AM, Bob Carpenter notifications@github.com
|
Can we really plan to drop PyStan 2.x for Windows users? Or drop PyStan for all Windows users? Either one seems really drastic. Is there any plan to
On Jul 23, 2014, at 12:38 AM, bgoodri notifications@github.com wrote:
|
I imagine the landscape will change in the medium-term because people do want to use C++11 in extensions. MinGW, for example, might change things. From what I'm told, I think it's likely that C++11 features will break PyStan for Python 2.7 users. For Python 3, I think it's a matter of testing. We're safe if Stan only uses Visual Studio 2010 supported C++11 features and one might discover some workaround where one uses Visual Studio 2013 to compile extensions. From what I could tell, nobody has tried this. I think it sends a very good signal to support Windows in some form and I think we might want to try to figure out some solution for Python 3. I'm not worried about Python 2.7 right now because the widely used Python technical computing stack (Anaconda) now supports Python 3 much more fully than it did even six months ago. |
An alternative (not a great alternative) would be to force Windows PyStan Or, this website http://p-nand-q.com/python/building-python-33-with-vs2013.html seems to have compiled Python with VS 2013 and they have Cython and pip On Wed, Jul 23, 2014 at 6:22 AM, Allen Riddell notifications@github.com
|
That looks good. This is the kind of thing that I imagine will eventually gain wider acceptance. For example, I suspect Anaconda (the distribution most Windows users use) will switch to something like this before too long and our problems will be solved. How urgent is the switch to C++11? I think we should at least give fair warning to Windows users about (temporarily, I hope) dropping them. |
I think at a minimum we should wait until Rtools includes a mingw based on On Wed, Jul 23, 2014 at 11:15 AM, Allen Riddell notifications@github.com
|
There's nothing on the planning radar that requires C++11. I'll leave Michael to comment on stuff he's working on --- I
On Jul 23, 2014, at 11:19 AM, bgoodri notifications@github.com wrote:
|
C++11 reduces a huge amount of Boost dependencies. The new autodiff will On Wed, Jul 23, 2014 at 4:45 PM, Bob Carpenter notifications@github.com
|
If that's the only reason, then I'd say stick with Boost. A lot of packages are going to be slow in catching up to As you saw from RStan, it's possible to trim down the Also, as far as Stan itself goes, we don't care about Boost Another solution might be to make the new autodiff
On Jul 23, 2014, at 12:41 PM, Michael Betancourt notifications@github.com wrote:
|
Are we envisioning releasing the autodiff thing standalone with the shared I feel like we either have very few PyStan Windows users or they never On Wed, Jul 23, 2014 at 1:00 PM, Bob Carpenter notifications@github.com
|
On Jul 23, 2014, at 4:04 PM, bgoodri notifications@github.com wrote:
Yes. Both the existing one and the new one. I think it's
I'm not sure I understand what a shared library is. When the new library is integrated into Stan, Stan will get
I'm not sure what you mean by without a standard.
Most of the code we get is from R, so I'm not sure how many PyStan
|
If the most awesome autodiff library would be held back due to lack of But, which aspect(s) of the C++11 standard is/are being used by nomad? On Wed, Jul 23, 2014 at 4:53 PM, Bob Carpenter notifications@github.com
|
Nomad is header only — no shared library. On Jul 23, 2014, at 10:02 PM, bgoodri notifications@github.com wrote:
|
Good, but what features of C++11 would be utilized when compiling it? On Wed, Jul 23, 2014 at 5:06 PM, Michael Betancourt <
|
Of the top of my head, the expanded math libraries, the type trait libraries, auto. On Jul 23, 2014, at 10:09 PM, bgoodri notifications@github.com wrote:
|
If it is just those three, then VS 2010 might work. On Wed, Jul 23, 2014 at 5:31 PM, Michael Betancourt <
|
I'm going to dive into code review tonight. I'll try
|
It looks like Python 3.5 on Windows will use Visual Studio 14. This would mean every C++11 feature would be supported, I think. |
@ariddell Where do we stand on C++11 with Python / Windows? RTools is going to support g++-4.9 on Windows in about a month. See https://github.com/rwinlib/r-base#readme |
C++11 is go in Python. On 03/04, bgoodri wrote:
|
This is magical. On Sat, Mar 5, 2016 at 3:40 PM, Allen Riddell notifications@github.com
|
With MSVC only on Windows? If so, we should try to unit-test with MSVC also. On Sat, Mar 5, 2016 at 3:40 PM, Allen Riddell notifications@github.com
|
For PyStan on Windows it's MSVC 14.0. |
We have a wiki page for this. We can open this again when we are ready. |
We have been ready for a couple of months. On Thu, Jul 21, 2016 at 11:36 AM, Daniel Lee notifications@github.com
|
We should consider forcing
-std=c++11
. This would make g++-4.6.3 the oldest supported compiler and cause at least the following problems:See https://wiki.apache.org/stdcxx/C++0xCompilerSupport
The text was updated successfully, but these errors were encountered: