Skip to content

Fix integrate_1d to use msgs ostream pointer like all other functions#1409

Merged
seantalts merged 2 commits into
developfrom
bugfix/issue-933-ostream-argument
Oct 27, 2019
Merged

Fix integrate_1d to use msgs ostream pointer like all other functions#1409
seantalts merged 2 commits into
developfrom
bugfix/issue-933-ostream-argument

Conversation

@seantalts
Copy link
Copy Markdown
Member

@seantalts seantalts commented Oct 19, 2019

Summary

Minor refactor of integrate_1d to use std::ostream* instead of std::ostream& like all other functions. Likely an oversight from its initial implementation.

Checklist

  • Math issue: Fixes ostream argument in integrate_1d #933

  • Copyright holder: (fill in copyright holder information)

    The copyright holder is typically you or your assignee, such as a university or company. By submitting this pull request, the copyright holder is agreeing to the license the submitted work under the following licenses: Columbia University
    - Code: BSD 3-clause (https://opensource.org/licenses/BSD-3-Clause)
    - Documentation: CC-BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

  • the basic tests are passing

    • unit tests pass (to run, use: ./runTests.py test/unit)
    • header checks pass, (make test-headers)
    • docs build, (make doxygen)
    • code passes the built in C++ standards checks (make cpplint)
  • the code is written in idiomatic C++ and changes are documented in the doxygen

Copy link
Copy Markdown
Member

@rok-cesnovar rok-cesnovar left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks!

@seantalts
Copy link
Copy Markdown
Member Author

Anyone ever seen cc1plus run out of memory on the Windows Stan unit tests? Seems pretty unrelated to the code in this PR... @serban-nicusor-toptal ?

@SteveBronder
Copy link
Copy Markdown
Collaborator

I think I've seen that before, it's sort of sporadic. I just kicked it off again so we will see

@bob-carpenter
Copy link
Copy Markdown
Member

bob-carpenter commented Oct 20, 2019 via email

@seantalts
Copy link
Copy Markdown
Member Author

I'm confused - every other function in the Math library uses stream pointers right now, so it seems like the code must be handling it, right?

Agreed that we should refactor to references some day, but I think it's much more important be in a consistent state. This remedies that in the shortest time. Please file an issue for refactoring the Math library to references.

@seantalts
Copy link
Copy Markdown
Member Author

It looks like the Windows EC2 nodes are the culprit - @serban-nicusor-toptal I'm going to turn them off for now in Jenkins until they get sorted.

@rok-cesnovar
Copy link
Copy Markdown
Member

This happens from time to time. Sometime it runs out of space and then can find the sundials .a file. Restarts usually solve that.

@seantalts
Copy link
Copy Markdown
Member Author

java.io.IOException: Unexpected termination of the channel is from running out of space?

@rok-cesnovar
Copy link
Copy Markdown
Member

Could be, either that or a mismatch of Java versions which is somethin Nic mentioned some time ago. Not sure what is the status of that. But yeah, when i see that i just restart the job or part of the job and that does the trick. It doesnt happen that often, so far it wasnt that annoying. But I dont get annoyed quickly :)

@seantalts
Copy link
Copy Markdown
Member Author

Ah, now I need to update the old compiler...

@rok-cesnovar
Copy link
Copy Markdown
Member

Is there a reason to no just switch back to stanc3 on cmdstan develop?

@stan-buildbot
Copy link
Copy Markdown
Contributor

(stat_comp_benchmarks/benchmarks/gp_pois_regr/gp_pois_regr.stan, 1.0)
(stat_comp_benchmarks/benchmarks/low_dim_corr_gauss/low_dim_corr_gauss.stan, 0.96)
(stat_comp_benchmarks/benchmarks/irt_2pl/irt_2pl.stan, 0.98)
(stat_comp_benchmarks/benchmarks/pkpd/one_comp_mm_elim_abs.stan, 0.98)
(stat_comp_benchmarks/benchmarks/eight_schools/eight_schools.stan, 0.98)
(stat_comp_benchmarks/benchmarks/gp_regr/gp_regr.stan, 1.0)
(stat_comp_benchmarks/benchmarks/arK/arK.stan, 1.0)
(performance.compilation, 1.03)
(stat_comp_benchmarks/benchmarks/low_dim_gauss_mix_collapse/low_dim_gauss_mix_collapse.stan, 1.0)
(stat_comp_benchmarks/benchmarks/low_dim_gauss_mix/low_dim_gauss_mix.stan, 1.0)
(stat_comp_benchmarks/benchmarks/sir/sir.stan, 1.02)
(stat_comp_benchmarks/benchmarks/pkpd/sim_one_comp_mm_elim_abs.stan, 1.05)
(stat_comp_benchmarks/benchmarks/garch/garch.stan, 0.99)
(stat_comp_benchmarks/benchmarks/gp_regr/gen_gp_data.stan, 0.98)
(stat_comp_benchmarks/benchmarks/arma/arma.stan, 0.98)
Result: 0.99685086910
Commit hash: bcd4bac5ac1c63dfc3c6554f06d8e8b4d96803b1

@stan-buildbot
Copy link
Copy Markdown
Contributor

(stat_comp_benchmarks/benchmarks/gp_pois_regr/gp_pois_regr.stan, 1.02)
(stat_comp_benchmarks/benchmarks/low_dim_corr_gauss/low_dim_corr_gauss.stan, 0.98)
(stat_comp_benchmarks/benchmarks/irt_2pl/irt_2pl.stan, 1.0)
(stat_comp_benchmarks/benchmarks/pkpd/one_comp_mm_elim_abs.stan, 0.98)
(stat_comp_benchmarks/benchmarks/eight_schools/eight_schools.stan, 1.04)
(stat_comp_benchmarks/benchmarks/gp_regr/gp_regr.stan, 0.99)
(stat_comp_benchmarks/benchmarks/arK/arK.stan, 1.01)
(performance.compilation, 1.04)
(stat_comp_benchmarks/benchmarks/low_dim_gauss_mix_collapse/low_dim_gauss_mix_collapse.stan, 1.0)
(stat_comp_benchmarks/benchmarks/low_dim_gauss_mix/low_dim_gauss_mix.stan, 1.0)
(stat_comp_benchmarks/benchmarks/sir/sir.stan, 1.0)
(stat_comp_benchmarks/benchmarks/pkpd/sim_one_comp_mm_elim_abs.stan, 1.02)
(stat_comp_benchmarks/benchmarks/garch/garch.stan, 1.0)
(stat_comp_benchmarks/benchmarks/gp_regr/gen_gp_data.stan, 1.0)
(stat_comp_benchmarks/benchmarks/arma/arma.stan, 1.0)
Result: 1.00551442888
Commit hash: bcd4bac5ac1c63dfc3c6554f06d8e8b4d96803b1

@seantalts seantalts merged commit 025a142 into develop Oct 27, 2019
@seantalts seantalts deleted the bugfix/issue-933-ostream-argument branch October 27, 2019 04:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ostream argument in integrate_1d

5 participants