Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.

Update Stan source to tag v2.19.0 #566

Merged
merged 2 commits into from
Mar 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions pystan/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,8 @@ def __init__(self, file=None, charset='utf-8', model_name="anon_model",
os.path.join(pystan_dir, "stan", "src"),
os.path.join(pystan_dir, "stan", "lib", "stan_math"),
os.path.join(pystan_dir, "stan", "lib", "stan_math", "lib", "eigen_3.3.3"),
os.path.join(pystan_dir, "stan", "lib", "stan_math", "lib", "boost_1.66.0"),
os.path.join(pystan_dir, "stan", "lib", "stan_math", "lib", "sundials_3.1.0", "include"),
os.path.join(pystan_dir, "stan", "lib", "stan_math", "lib", "boost_1.69.0"),
os.path.join(pystan_dir, "stan", "lib", "stan_math", "lib", "sundials_4.1.0", "include"),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add opencl folder here too

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we should wait to see what RStan does. Cmdstan 2.19 does not add opencl by default.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. We really need to test it before release.

np.get_include(),
]

Expand Down Expand Up @@ -309,7 +309,7 @@ def __init__(self, file=None, charset='utf-8', model_name="anon_model",
'-ftemplate-depth-256',
'-Wno-unused-function',
'-Wno-uninitialized',
'-std=c++11',
'-std=c++1y',
"-D_hypot=hypot",
"-pthread",
"-fexceptions",
Expand All @@ -321,7 +321,7 @@ def __init__(self, file=None, charset='utf-8', model_name="anon_model",
'-ftemplate-depth-256',
'-Wno-unused-function',
'-Wno-uninitialized',
'-std=c++11',
'-std=c++1y',
] + extra_compile_args

distutils.log.set_verbosity(verbose)
Expand Down
2 changes: 1 addition & 1 deletion pystan/stan
Submodule stan updated 707 files
2 changes: 1 addition & 1 deletion pystan/stan_fit.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1254,7 +1254,7 @@ namespace pystan {
pystan_sample_writer *sample_writer_ptr
= sample_writer_factory(&sample_stream,
comment_stream, "# ",
1,
3,
0,
constrained_param_names.size(),
output_samples + 1,
Expand Down
1 change: 0 additions & 1 deletion pystan/tests/test_extra_compile_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ def test_extra_compile_args(self):
'-ftemplate-depth-1024',
'-Wno-unused-function',
'-Wno-uninitialized',
'-std=c++11',
]
if sys.platform.startswith("win"):
extra_compile_args.extend([
Expand Down
2 changes: 1 addition & 1 deletion pystan/tests/test_unconstrain_pars.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ def test_unconstrain_pars(self):
data, seed = {}, 1
fit = self.model.fit_class(data, seed)
assertRaisesRegex = self.assertRaisesRegexp if PY2 else self.assertRaisesRegex
with assertRaisesRegex(RuntimeError, 'variable x missing'):
with assertRaisesRegex(RuntimeError, 'Variable x missing'):
fit.unconstrain_pars({})
11 changes: 6 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ def find_version(*parts):
stan_include_dirs = ['pystan/stan/src',
'pystan/stan/lib/stan_math/',
'pystan/stan/lib/stan_math/lib/eigen_3.3.3',
'pystan/stan/lib/stan_math/lib/boost_1.66.0',
'pystan/stan/lib/stan_math/lib/sundials_3.1.0/include']
'pystan/stan/lib/stan_math/lib/boost_1.69.0',
'pystan/stan/lib/stan_math/lib/sundials_4.1.0/include']
stan_macros = [
('BOOST_DISABLE_ASSERTS', None),
('BOOST_NO_DECLTYPE', None),
Expand All @@ -115,7 +115,7 @@ def find_version(*parts):
'-ftemplate-depth-256',
'-Wno-unused-function',
'-Wno-uninitialized',
'-std=c++11',
'-std=c++1y',
]

if platform.platform().startswith('Win'):
Expand All @@ -125,7 +125,7 @@ def find_version(*parts):
extra_compile_args = [
'/EHsc',
'-DBOOST_DATE_TIME_NO_LIB',
'/std:c++14',
'/std:c++1y',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think MSVC has c++1y implemented, so c++14 should be used. (or nothing)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We only use/support gcc on windows, right? (I'm just following cmdstan and what seemed to work on httpstan)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. This part is a bit legacy and is here if MSVC starts to work at some point.

]
else:
# fix bug in MingW-W64
Expand All @@ -140,16 +140,17 @@ def find_version(*parts):
stanc_sources = [
"pystan/stan/src/stan/lang/ast_def.cpp",
"pystan/stan/src/stan/lang/grammars/bare_type_grammar_inst.cpp",
"pystan/stan/src/stan/lang/grammars/block_var_decls_grammar_inst.cpp",
"pystan/stan/src/stan/lang/grammars/expression07_grammar_inst.cpp",
"pystan/stan/src/stan/lang/grammars/expression_grammar_inst.cpp",
"pystan/stan/src/stan/lang/grammars/functions_grammar_inst.cpp",
"pystan/stan/src/stan/lang/grammars/indexes_grammar_inst.cpp",
"pystan/stan/src/stan/lang/grammars/local_var_decls_grammar_inst.cpp",
"pystan/stan/src/stan/lang/grammars/program_grammar_inst.cpp",
"pystan/stan/src/stan/lang/grammars/semantic_actions_def.cpp",
"pystan/stan/src/stan/lang/grammars/statement_2_grammar_inst.cpp",
"pystan/stan/src/stan/lang/grammars/statement_grammar_inst.cpp",
"pystan/stan/src/stan/lang/grammars/term_grammar_inst.cpp",
"pystan/stan/src/stan/lang/grammars/var_decls_grammar_inst.cpp",
"pystan/stan/src/stan/lang/grammars/whitespace_grammar_inst.cpp",
]

Expand Down