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

Update Stan source to tag v2.19.0 #566

merged 2 commits into from
Mar 29, 2019

Conversation

riddell-stan
Copy link
Contributor

No description provided.

@ahartikainen
Copy link
Collaborator

We need to edit also the stanfit.hpp for VI to have 3 values before variables in writer

lp__, log_p__, log_g__, var1, var2, ...

1254

    pystan_sample_writer *sample_writer_ptr
      = sample_writer_factory(&sample_stream,
                              comment_stream, "# ",
                              1,
                              0,
                              constrained_param_names.size(),
                              output_samples + 1,
                              0,
                              qoi_idx);

to

    pystan_sample_writer *sample_writer_ptr
      = sample_writer_factory(&sample_stream,
                              comment_stream, "# ",
                              3,
                              0,
                              constrained_param_names.size(),
                              output_samples + 1,
                              0,
                              qoi_idx);

How could we return these samples to user without saving to csv?

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.

@riddell-stan
Copy link
Contributor Author

re: vi, how about getting 2.19 out first and then addressing vi? I don't mind making a 2.19.0.1 release.

@ahartikainen
Copy link
Collaborator

Vi: Sounds fine, but we need to add that 3 to stanfit.hpp or vi will throw runtime error.

@@ -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.

@riddell-stan
Copy link
Contributor Author

I think the travis failure is due to the old gcc version (4.8.4). I'll try updating things to match the setup that httpstan uses.

We probably also need to update the information about the minimum gcc version. Anyone know what that should be?

@ahartikainen
Copy link
Collaborator

Minimum GCC for c++1y is 4.9.x (I think this was mentioned somewhere in the Discourse)

@wds15 ?

@wds15
Copy link

wds15 commented Mar 21, 2019

Rtools for windows uses Mingw 4.9.3...so that one is used for tests. Unfortunately the threading fix did not make it into the release. So you will still have trouble on windows with this compiler.

@ahartikainen
Copy link
Collaborator

This is PyStan 2.x, so threading is not enabled by default.

@riddell-stan
Copy link
Contributor Author

We need to move to a newer version of gcc on travis. This may take some serious work. I suggest tackling this separately from updating to v2.19. I'll create a PR in a bit.

@ahartikainen
Copy link
Collaborator

Could this work

cggos/ptam_cg#1

@riddell-stan
Copy link
Contributor Author

The problem here is, I think, that the newer gcc still uses the older gcc libc++.

@riddell-stan
Copy link
Contributor Author

The xenial image solves the problem. If the VI update works then this should be good to go.

@ahartikainen
Copy link
Collaborator

test_extra_compile_args should use -c++1y

Includes a minor update to stan_fit.hpp to deal with the fact that ADVI
now produces values for `lp__`, `log_p__`, and `log_g__`. Previously it
only produced values for `lp__` (in addition to parameter values).
@riddell-stan
Copy link
Contributor Author

re: windows failures due to long filename (excluded in MANIFEST.in)

This seems to be a problem with setuptools's bdist_wheel ignoring MANIFEST.in (sdist uses it). There is an issue for it already: pypa/setuptools#511

@riddell-stan
Copy link
Contributor Author

@ahartikainen really long filepaths are breaking the wheel on Windows, e.g., build\bdist.win-amd64\wininst\PLATLIB\pystan\stan\lib\stan_math\lib\boost_1.69.0\libs\gil\doc\html\reference\structboost_1_1gil_1_1channel__mapping__type_3_01planar__pixel__reference_3_01_channel_reference60971d1be7c73d78ff725e654349b4f8.html.

I'd like to just delete every doc folder inside pystan\stan\lib\stan_math\lib. On Linux I can just do find pystan/stan/lib/stan_math/lib -type d -iname doc -exec rm -rf "{}" \;. Any ideas how I can do this in powershell or in windows command-line?

@ahartikainen
Copy link
Collaborator

I think that will work.

Also this will probably work : del / *.html

Also FOR /d /r "pystan\stan\lib\stan_math\lib" %d IN (doc) DO @IF EXISTS "%d" rd /s /q "%d"

@riddell-stan
Copy link
Contributor Author

Trying one of your suggestions. If this doesn't work I'm tempted to merge this (since it works fine for Linux and macOS) and ask for help fixing Windows in a separate PR.

This sort of thing is hard for me to work on because I don't have access to a Windows machine.

@ahartikainen
Copy link
Collaborator

Sounds ok

@riddell-stan riddell-stan merged commit ba298a2 into stan-dev:develop Mar 29, 2019
@riddell-stan riddell-stan deleted the feature/update-stan branch March 29, 2019 15:32
@riddell-stan
Copy link
Contributor Author

Thanks. FYI the following did not work:

FOR /d /r "pystan\stan\lib\stan_math\lib" %d IN (doc) DO @IF EXISTS "%d" rd /s /q "%d"

My powershell attempt with

- ps: Get-ChildItem pystan -Filter *.html | rm

did not error but did not seem to actually delete the files.

@ahartikainen
Copy link
Collaborator

Oh, I had typo there

FOR /d /r "pystan\stan\lib\stan_math\lib" %d IN (doc) DO @IF EXIST "%d" rd /s /q "%d"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants