Closed Auerilas closed 8 years ago
Interesting. Did this happen with PyStan 2.11.0 as well?
I can't reproduce with gcc and PyStan 2.12.0.
It looks like an include error, but that isn't consistent with it working in the other case (the model without alphanumeric characters). For example,
/Users/Nate/anaconda/lib/python3.5/site-packages/pystan/stan/src/stan/model/util.hpp:168:12: note:
candidate function template not viable: requires at most 4 arguments, but
5 were provided
double log_prob_grad(const M& model,
...
looks like it isn't finding the right code.
Any thoughts @syclik ?
I can’t say about 2.11. I was using 2.9 and had this problem shortly after upgrading Xcode, that’s when I tried updating pystan to v2.12 and still had issues.
Nathan Lemoine
Research Scientist I USDA NIFA-AFRI Postdoctoral Fellow
Colorado State University Department of Biology Graduate Degree Program in Ecology
On Sep 18, 2016, at 6:15 PM, Allen Riddell notifications@github.com wrote:
Interesting. Did this happen with PyStan 2.11.0 as well?
I can't reproduce with gcc and PyStan 2.12.0.
It looks like an include error, but that isn't consistent with it working in the other case (the model without alphanumeric characters). For example,
/Users/Nate/anaconda/lib/python3.5/site-packages/pystan/stan/src/stan/model/util.hpp:168:12: note: candidate function template not viable: requires at most 4 arguments, but 5 were provided double log_prob_grad(const M& model, ... — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/stan-dev/pystan/issues/259#issuecomment-247893295, or mute the thread https://github.com/notifications/unsubscribe-auth/AI8CSnvzOS9ANwt261fXmjvai8gceRnxks5qrdQcgaJpZM4KAAc2.
Thanks. I'll see if I can reproduce this sometime this week.
I completely missed the first error message! It was buried in the output. Here it is:
In file included from /var/folders/zl/yxc7hlld61b6y2n5ghnn_
q4h0000gn/T/tmpn8_yvo9c/stanfit4anon_model_44de3e647405f3e3843ab13a390ccf ce_3786978871577808257.cpp:345: /var/folders/zl/yxc7hlld61b6y2n5ghnn_q4h0000gn/T/tmpn8_yvo9c/anonmodel 44de3e647405f3e3843ab13a390ccfce.hpp:163:13: error: expected unqualified-id T__ B0; ^ /usr/include/sys/termios.h:291:12: note: expanded from macro 'B0'
define B0 0
^ In file included from /var/folders/zl/yxc7hlld61b6y2n5ghnn_ q4h0000gn/T/tmpn8_yvo9c/stanfit4anon_model_44de3e647405f3e3843ab13a390ccf ce_3786978871577808257.cpp:345: /var/folders/zl/yxc7hlld61b6y2n5ghnn_q4h0000gn/T/tmpn8_yvo9c/anonmodel 44de3e647405f3e3843ab13a390ccfce.hpp:250:16: error: expected unqualified-id double B0 = in__.scalar_constrain(); ^ /usr/include/sys/termios.h:291:12: note: expanded from macro 'B0'
define B0 0
^
I think you're including some sort of other, older copy of Boost somehow. This is the only hit I get on Google that looks relevant is this one:
https://github.com/mapnik/mapnik/issues/2747
The workaround is simple: avoid B0. Looks like you've got something on your system that has that defined as a macro.
The permanent solution: try to figure out if you've installed from somewhere else AND how it's getting included before the include calls to the compiler.
Daniel
On Mon, Sep 19, 2016 at 6:19 AM, Allen Riddell notifications@github.com wrote:
Thanks. I'll see if I can reproduce this sometime this week.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/stan-dev/pystan/issues/259#issuecomment-247909054, or mute the thread https://github.com/notifications/unsubscribe-auth/AAZ_F6w35TsuURtZ_I6Jw1Cystxp3WJWks5qrg1EgaJpZM4KAAc2 .
Also see this:
https://github.com/randombit/botan/issues/350
I don't even know if this is a Python issue or a Boost issue or just an issue with the new Xcode.
On Sep 19, 2016, at 1:19 AM, Daniel Lee notifications@github.com wrote:
I completely missed the first error message! It was buried in the output. Here it is:
In file included from /var/folders/zl/yxc7hlld61b6y2n5ghnn_
q4h0000gn/T/tmpn8_yvo9c/stanfit4anon_model_44de3e647405f3e3843ab13a390ccf ce_3786978871577808257.cpp:345: /var/folders/zl/yxc7hlld61b6y2n5ghnn_q4h0000gn/T/tmpn8_yvo9c/anonmodel 44de3e647405f3e3843ab13a390ccfce.hpp:163:13: error: expected unqualified-id T__ B0; ^ /usr/include/sys/termios.h:291:12: note: expanded from macro 'B0'
define B0 0
^ In file included from /var/folders/zl/yxc7hlld61b6y2n5ghnn_ q4h0000gn/T/tmpn8_yvo9c/stanfit4anon_model_44de3e647405f3e3843ab13a390ccf ce_3786978871577808257.cpp:345: /var/folders/zl/yxc7hlld61b6y2n5ghnn_q4h0000gn/T/tmpn8_yvo9c/anonmodel 44de3e647405f3e3843ab13a390ccfce.hpp:250:16: error: expected unqualified-id double B0 = in__.scalar_constrain(); ^ /usr/include/sys/termios.h:291:12: note: expanded from macro 'B0'
define B0 0
^
I think you're including some sort of other, older copy of Boost somehow. This is the only hit I get on Google that looks relevant is this one:
https://github.com/mapnik/mapnik/issues/2747
The workaround is simple: avoid B0. Looks like you've got something on your system that has that defined as a macro.
The permanent solution: try to figure out if you've installed from somewhere else AND how it's getting included before the include calls to the compiler.
Daniel
On Mon, Sep 19, 2016 at 6:19 AM, Allen Riddell notifications@github.com wrote:
Thanks. I'll see if I can reproduce this sometime this week.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/stan-dev/pystan/issues/259#issuecomment-247909054, or mute the thread https://github.com/notifications/unsubscribe-auth/AAZ_F6w35TsuURtZ_I6Jw1Cystxp3WJWks5qrg1EgaJpZM4KAAc2 .
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
I don’t know if this helps, but it looks like Boost devs are aware of the issue: https://github.com/boostorg/geometry/commit/5fad5e3b7db2f980c13fdf4b07aaad7876f4c364
I just tried to update boost to the latest version using
conda install boost
which installed boost 1.60, but that did not fix the issue. I’m unclear if the fix has been included in Boost 1.61 or if they’re still working on it.
Nathan Lemoine
Research Scientist I USDA NIFA-AFRI Postdoctoral Fellow
Colorado State University Department of Biology Graduate Degree Program in Ecology
On Sep 18, 2016, at 11:26 PM, Bob Carpenter notifications@github.com wrote:
Also see this:
https://github.com/randombit/botan/issues/350
I don't even know if this is a Python issue or a Boost issue or just an issue with the new Xcode.
- Bob
On Sep 19, 2016, at 1:19 AM, Daniel Lee notifications@github.com wrote:
I completely missed the first error message! It was buried in the output. Here it is:
In file included from /var/folders/zl/yxc7hlld61b6y2n5ghnn_
q4h0000gn/T/tmpn8_yvo9c/stanfit4anon_model_44de3e647405f3e3843ab13a390ccf ce_3786978871577808257.cpp:345: /var/folders/zl/yxc7hlld61b6y2n5ghnn_q4h0000gn/T/tmpn8_yvo9c/anonmodel 44de3e647405f3e3843ab13a390ccfce.hpp:163:13: error: expected unqualified-id T__ B0; ^ /usr/include/sys/termios.h:291:12: note: expanded from macro 'B0'
define B0 0
^ In file included from /var/folders/zl/yxc7hlld61b6y2n5ghnn_ q4h0000gn/T/tmpn8_yvo9c/stanfit4anon_model_44de3e647405f3e3843ab13a390ccf ce_3786978871577808257.cpp:345: /var/folders/zl/yxc7hlld61b6y2n5ghnn_q4h0000gn/T/tmpn8_yvo9c/anonmodel 44de3e647405f3e3843ab13a390ccfce.hpp:250:16: error: expected unqualified-id double B0 = in__.scalar_constrain(); ^ /usr/include/sys/termios.h:291:12: note: expanded from macro 'B0'
define B0 0
^
I think you're including some sort of other, older copy of Boost somehow. This is the only hit I get on Google that looks relevant is this one:
https://github.com/mapnik/mapnik/issues/2747
The workaround is simple: avoid B0. Looks like you've got something on your system that has that defined as a macro.
The permanent solution: try to figure out if you've installed from somewhere else AND how it's getting included before the include calls to the compiler.
Daniel
On Mon, Sep 19, 2016 at 6:19 AM, Allen Riddell notifications@github.com wrote:
Thanks. I'll see if I can reproduce this sometime this week.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/stan-dev/pystan/issues/259#issuecomment-247909054, or mute the thread https://github.com/notifications/unsubscribe-auth/AAZ_F6w35TsuURtZ_I6Jw1Cystxp3WJWks5qrg1EgaJpZM4KAAc2 .
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/stan-dev/pystan/issues/259#issuecomment-247913396, or mute the thread https://github.com/notifications/unsubscribe-auth/AI8CSrwObOScTD_IIQWtcxOGQoctCJGyks5qrh0WgaJpZM4KAAc2.
Just so we can track it down, what version of OSX? And compiler version?
Hopefully you're able to work around it by renaming the variable. Thanks for submitting a minimal working example.
Daniel
On Sep 19, 2016, at 6:26 PM, Auerilas notifications@github.com wrote:
I don’t know if this helps, but it looks like Boost devs are aware of the issue: https://github.com/boostorg/geometry/commit/5fad5e3b7db2f980c13fdf4b07aaad7876f4c364
I just tried to update boost to the latest version using
conda install boost
which installed boost 1.60, but that did not fix the issue. I’m unclear if the fix has been included in Boost 1.61 or if they’re still working on it.
Nathan Lemoine
Research Scientist I USDA NIFA-AFRI Postdoctoral Fellow
Colorado State University Department of Biology Graduate Degree Program in Ecology
On Sep 18, 2016, at 11:26 PM, Bob Carpenter notifications@github.com wrote:
Also see this:
https://github.com/randombit/botan/issues/350
I don't even know if this is a Python issue or a Boost issue or just an issue with the new Xcode.
- Bob
On Sep 19, 2016, at 1:19 AM, Daniel Lee notifications@github.com wrote:
I completely missed the first error message! It was buried in the output. Here it is:
In file included from /var/folders/zl/yxc7hlld61b6y2n5ghnn_
q4h0000gn/T/tmpn8_yvo9c/stanfit4anon_model_44de3e647405f3e3843ab13a390ccf ce_3786978871577808257.cpp:345: /var/folders/zl/yxc7hlld61b6y2n5ghnn_q4h0000gn/T/tmpn8_yvo9c/anonmodel 44de3e647405f3e3843ab13a390ccfce.hpp:163:13: error: expected unqualified-id T__ B0; ^ /usr/include/sys/termios.h:291:12: note: expanded from macro 'B0'
define B0 0
^ In file included from /var/folders/zl/yxc7hlld61b6y2n5ghnn_ q4h0000gn/T/tmpn8_yvo9c/stanfit4anon_model_44de3e647405f3e3843ab13a390ccf ce_3786978871577808257.cpp:345: /var/folders/zl/yxc7hlld61b6y2n5ghnn_q4h0000gn/T/tmpn8_yvo9c/anonmodel 44de3e647405f3e3843ab13a390ccfce.hpp:250:16: error: expected unqualified-id double B0 = in__.scalar_constrain(); ^ /usr/include/sys/termios.h:291:12: note: expanded from macro 'B0'
define B0 0
^
I think you're including some sort of other, older copy of Boost somehow. This is the only hit I get on Google that looks relevant is this one:
https://github.com/mapnik/mapnik/issues/2747
The workaround is simple: avoid B0. Looks like you've got something on your system that has that defined as a macro.
The permanent solution: try to figure out if you've installed from somewhere else AND how it's getting included before the include calls to the compiler.
Daniel
On Mon, Sep 19, 2016 at 6:19 AM, Allen Riddell notifications@github.com wrote:
Thanks. I'll see if I can reproduce this sometime this week.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/stan-dev/pystan/issues/259#issuecomment-247909054, or mute the thread https://github.com/notifications/unsubscribe-auth/AAZ_F6w35TsuURtZ_I6Jw1Cystxp3WJWks5qrg1EgaJpZM4KAAc2 .
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/stan-dev/pystan/issues/259#issuecomment-247913396, or mute the thread https://github.com/notifications/unsubscribe-auth/AI8CSrwObOScTD_IIQWtcxOGQoctCJGyks5qrh0WgaJpZM4KAAc2.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
No worries! I’m on OS X 10.11.6, and heres my clang info:
Nates-Macbook:~ Nate$ clang -v Apple LLVM version 8.0.0 (clang-800.0.38) Target: x86_64-apple-darwin15.6.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
PyStan works awesome as long as I avoid B0, so I’m still able to keep working in the meantime. It was just an unusual error and I didn’t know how to debug that one.
Thanks again!
Nathan Lemoine
Research Scientist I USDA NIFA-AFRI Postdoctoral Fellow
Colorado State University Department of Biology Graduate Degree Program in Ecology
On Sep 19, 2016, at 3:02 PM, Daniel Lee notifications@github.com wrote:
Just so we can track it down, what version of OSX? And compiler version?
Hopefully you're able to work around it by renaming the variable. Thanks for submitting a minimal working example.
Daniel
On Sep 19, 2016, at 6:26 PM, Auerilas notifications@github.com wrote:
I don’t know if this helps, but it looks like Boost devs are aware of the issue: https://github.com/boostorg/geometry/commit/5fad5e3b7db2f980c13fdf4b07aaad7876f4c364
I just tried to update boost to the latest version using
conda install boost
which installed boost 1.60, but that did not fix the issue. I’m unclear if the fix has been included in Boost 1.61 or if they’re still working on it.
Nathan Lemoine
Research Scientist I USDA NIFA-AFRI Postdoctoral Fellow
Colorado State University Department of Biology Graduate Degree Program in Ecology
On Sep 18, 2016, at 11:26 PM, Bob Carpenter notifications@github.com wrote:
Also see this:
https://github.com/randombit/botan/issues/350
I don't even know if this is a Python issue or a Boost issue or just an issue with the new Xcode.
- Bob
On Sep 19, 2016, at 1:19 AM, Daniel Lee notifications@github.com wrote:
I completely missed the first error message! It was buried in the output. Here it is:
In file included from /var/folders/zl/yxc7hlld61b6y2n5ghnn_
q4h0000gn/T/tmpn8_yvo9c/stanfit4anon_model_44de3e647405f3e3843ab13a390ccf ce_3786978871577808257.cpp:345: /var/folders/zl/yxc7hlld61b6y2n5ghnn_q4h0000gn/T/tmpn8_yvo9c/anonmodel 44de3e647405f3e3843ab13a390ccfce.hpp:163:13: error: expected unqualified-id T__ B0; ^ /usr/include/sys/termios.h:291:12: note: expanded from macro 'B0'
define B0 0
^ In file included from /var/folders/zl/yxc7hlld61b6y2n5ghnn_ q4h0000gn/T/tmpn8_yvo9c/stanfit4anon_model_44de3e647405f3e3843ab13a390ccf ce_3786978871577808257.cpp:345: /var/folders/zl/yxc7hlld61b6y2n5ghnn_q4h0000gn/T/tmpn8_yvo9c/anonmodel 44de3e647405f3e3843ab13a390ccfce.hpp:250:16: error: expected unqualified-id double B0 = in__.scalar_constrain(); ^ /usr/include/sys/termios.h:291:12: note: expanded from macro 'B0'
define B0 0
^
I think you're including some sort of other, older copy of Boost somehow. This is the only hit I get on Google that looks relevant is this one:
https://github.com/mapnik/mapnik/issues/2747
The workaround is simple: avoid B0. Looks like you've got something on your system that has that defined as a macro.
The permanent solution: try to figure out if you've installed from somewhere else AND how it's getting included before the include calls to the compiler.
Daniel
On Mon, Sep 19, 2016 at 6:19 AM, Allen Riddell notifications@github.com wrote:
Thanks. I'll see if I can reproduce this sometime this week.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/stan-dev/pystan/issues/259#issuecomment-247909054, or mute the thread https://github.com/notifications/unsubscribe-auth/AAZ_F6w35TsuURtZ_I6Jw1Cystxp3WJWks5qrg1EgaJpZM4KAAc2 .
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/stan-dev/pystan/issues/259#issuecomment-247913396, or mute the thread https://github.com/notifications/unsubscribe-auth/AI8CSrwObOScTD_IIQWtcxOGQoctCJGyks5qrh0WgaJpZM4KAAc2.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/stan-dev/pystan/issues/259#issuecomment-248125494, or mute the thread https://github.com/notifications/unsubscribe-auth/AI8CSq1pao5yhp3EQwc4WAANo4MMvGbIks5qrvhQgaJpZM4KAAc2.
If this is a long-running issue, I can flag it in the Stan parser. But I think it's Boost related and that they know about the problem and will fix it.
On Sep 19, 2016, at 5:21 PM, Auerilas notifications@github.com wrote:
No worries! I’m on OS X 10.11.6, and heres my clang info:
Nates-Macbook:~ Nate$ clang -v Apple LLVM version 8.0.0 (clang-800.0.38) Target: x86_64-apple-darwin15.6.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
PyStan works awesome as long as I avoid B0, so I’m still able to keep working in the meantime. It was just an unusual error and I didn’t know how to debug that one.
Thanks again!
Nathan Lemoine
Research Scientist I USDA NIFA-AFRI Postdoctoral Fellow
Colorado State University Department of Biology Graduate Degree Program in Ecology
On Sep 19, 2016, at 3:02 PM, Daniel Lee notifications@github.com wrote:
Just so we can track it down, what version of OSX? And compiler version?
Hopefully you're able to work around it by renaming the variable. Thanks for submitting a minimal working example.
Daniel
On Sep 19, 2016, at 6:26 PM, Auerilas notifications@github.com wrote:
I don’t know if this helps, but it looks like Boost devs are aware of the issue: https://github.com/boostorg/geometry/commit/5fad5e3b7db2f980c13fdf4b07aaad7876f4c364
I just tried to update boost to the latest version using
conda install boost
which installed boost 1.60, but that did not fix the issue. I’m unclear if the fix has been included in Boost 1.61 or if they’re still working on it.
Nathan Lemoine
Research Scientist I USDA NIFA-AFRI Postdoctoral Fellow
Colorado State University Department of Biology Graduate Degree Program in Ecology
On Sep 18, 2016, at 11:26 PM, Bob Carpenter notifications@github.com wrote:
Also see this:
https://github.com/randombit/botan/issues/350
I don't even know if this is a Python issue or a Boost issue or just an issue with the new Xcode.
- Bob
On Sep 19, 2016, at 1:19 AM, Daniel Lee notifications@github.com wrote:
I completely missed the first error message! It was buried in the output. Here it is:
In file included from /var/folders/zl/yxc7hlld61b6y2n5ghnn_
q4h0000gn/T/tmpn8_yvo9c/stanfit4anon_model_44de3e647405f3e3843ab13a390ccf ce_3786978871577808257.cpp:345: /var/folders/zl/yxc7hlld61b6y2n5ghnn_q4h0000gn/T/tmpn8_yvo9c/anonmodel 44de3e647405f3e3843ab13a390ccfce.hpp:163:13: error: expected unqualified-id T__ B0; ^ /usr/include/sys/termios.h:291:12: note: expanded from macro 'B0'
define B0 0
^ In file included from /var/folders/zl/yxc7hlld61b6y2n5ghnn_ q4h0000gn/T/tmpn8_yvo9c/stanfit4anon_model_44de3e647405f3e3843ab13a390ccf ce_3786978871577808257.cpp:345: /var/folders/zl/yxc7hlld61b6y2n5ghnn_q4h0000gn/T/tmpn8_yvo9c/anonmodel 44de3e647405f3e3843ab13a390ccfce.hpp:250:16: error: expected unqualified-id double B0 = in__.scalar_constrain(); ^ /usr/include/sys/termios.h:291:12: note: expanded from macro 'B0'
define B0 0
^
I think you're including some sort of other, older copy of Boost somehow. This is the only hit I get on Google that looks relevant is this one:
https://github.com/mapnik/mapnik/issues/2747
The workaround is simple: avoid B0. Looks like you've got something on your system that has that defined as a macro.
The permanent solution: try to figure out if you've installed from somewhere else AND how it's getting included before the include calls to the compiler.
Daniel
On Mon, Sep 19, 2016 at 6:19 AM, Allen Riddell notifications@github.com wrote:
Thanks. I'll see if I can reproduce this sometime this week.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/stan-dev/pystan/issues/259#issuecomment-247909054, or mute the thread https://github.com/notifications/unsubscribe-auth/AAZ_F6w35TsuURtZ_I6Jw1Cystxp3WJWks5qrg1EgaJpZM4KAAc2 .
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/stan-dev/pystan/issues/259#issuecomment-247913396, or mute the thread https://github.com/notifications/unsubscribe-auth/AI8CSrwObOScTD_IIQWtcxOGQoctCJGyks5qrh0WgaJpZM4KAAc2.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/stan-dev/pystan/issues/259#issuecomment-248125494, or mute the thread https://github.com/notifications/unsubscribe-auth/AI8CSq1pao5yhp3EQwc4WAANo4MMvGbIks5qrvhQgaJpZM4KAAc2.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
I'm going to close this for now since it's not something that can be fixed in the PyStan code. Thanks for the very detailed report @Auerilas . This is very helpful.
Summary:
After upgrading to Xcode 8.0, models that include mixed alpha-numeric characters for parameter names (i.e. B0) no longer compile. This issue has been migrated from the stan mailing list.
Reproducible Steps:
This model compiles fine:
This model fails:
PyStan Version: 2.12.0
Python Version: 3.5.2
Operating System: Mac OS X 10.11.6