-
-
Notifications
You must be signed in to change notification settings - Fork 93
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
Running multiple chains in one Stan program #987
Merged
Merged
Changes from 38 commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
a6beb44
adds command line options for multiple chain in adapt diag_e
SteveBronder fe10358
[Jenkins] auto-formatting by clang-format version 6.0.0-1ubuntu2~16.0…
stan-buildbot 9d01a8d
update to parallel nuts adapt sampler
SteveBronder 59baf8b
update
SteveBronder fbca7ae
update with parallel argument
SteveBronder fca7202
update to develop
SteveBronder dfca52f
remove extra output files
SteveBronder 6a1d2cf
[Jenkins] auto-formatting by clang-format version 6.0.0-1ubuntu2~16.0…
stan-buildbot 2088b14
update with dense_e_adapt
SteveBronder bfc6111
update with parallel and chains/threads args
SteveBronder c23eb83
Updates to parallel stan branch
SteveBronder 050e282
[Jenkins] auto-formatting by clang-format version 6.0.0-1ubuntu2~16.0…
stan-buildbot 2d3c3be
update to use recent changes from stan branch
SteveBronder 8a1718e
update to develop
SteveBronder e78f407
[Jenkins] auto-formatting by clang-format version 6.0.0-1ubuntu2~16.0…
stan-buildbot db7aab3
move chains argument from top level to sample
SteveBronder d1aaf50
remove pre-built examples
SteveBronder 51789f9
update argument names
SteveBronder 2de737b
update default num threads to 1 and check mismatch of STAN_NUM_THREADS
SteveBronder e791d64
update to review comments and bump Stan PR version
SteveBronder 6242ee3
move stan version to normal version
SteveBronder 1ba04b8
change back bernoulli example
SteveBronder 425dfa6
Merge remote-tracking branch 'origin/develop' into proto/multi-chain
SteveBronder 331e184
[Jenkins] auto-formatting by clang-format version 6.0.0-1ubuntu2~16.0…
stan-buildbot 4ddf7e0
Merge remote-tracking branch 'origin/develop' into proto/multi-chain
SteveBronder d8d625f
includes
SteveBronder 26a4be0
Merge remote-tracking branch 'origin/develop' into proto/multi-chain
SteveBronder 1810823
update fstream writer for setting precision
SteveBronder 5863733
[Jenkins] auto-formatting by clang-format version 6.0.0-1ubuntu2~16.0…
stan-buildbot e6f3452
update fstream get
SteveBronder f2bebfe
merge to develop
SteveBronder d4da0ef
update stan
SteveBronder f8a84bc
[Jenkins] auto-formatting by clang-format version 6.0.0-1ubuntu2~16.0…
stan-buildbot ab9f185
Merge remote-tracking branch 'origin/develop' into proto/multi-chain
SteveBronder 4e76e00
update make to compile stansummary etc when threading is on. Fixes sm…
SteveBronder c03addb
[Jenkins] auto-formatting by clang-format version 6.0.0-1ubuntu2~16.0…
stan-buildbot 96a7283
use test_model for multi chain test
SteveBronder b4b9953
[Jenkins] auto-formatting by clang-format version 6.0.0-1ubuntu2~16.0…
stan-buildbot 7facac5
Merge remote-tracking branch 'origin/develop' into proto/multi-chain
SteveBronder e80e5eb
adds id to the output name
SteveBronder 45a3276
Merge remote-tracking branch 'origin/develop' into proto/multi-chain
SteveBronder 2367739
Fix diagonstic file name and add check for diagnostic file name in mu…
SteveBronder 422b26f
[Jenkins] auto-formatting by clang-format version 6.0.0-1ubuntu2~16.0…
stan-buildbot dc0d85b
update error message for num_chains/num_threads
SteveBronder bc4bc94
Merge branch 'proto/multi-chain' of github.com:stan-dev/cmdstan into …
SteveBronder File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,5 +46,7 @@ make/local | |
src/docs/**/*.pdf | ||
|
||
output.csv | ||
|
||
output*.csv | ||
*.d | ||
# gdb | ||
.gdb_history |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#ifndef CMDSTAN_ARGUMENTS_ARG_NUM_CHAINS_HPP | ||
#define CMDSTAN_ARGUMENTS_ARG_NUM_CHAINS_HPP | ||
|
||
#include <cmdstan/arguments/singleton_argument.hpp> | ||
|
||
namespace cmdstan { | ||
|
||
class arg_num_chains : public int_argument { | ||
public: | ||
arg_num_chains() : int_argument() { | ||
_name = "num_chains"; | ||
_description = std::string("Number of chains"); | ||
_default = "1"; | ||
_default_value = 1; | ||
_value = _default_value; | ||
} | ||
|
||
bool is_valid(int value) { return value > 0; } | ||
}; | ||
|
||
} // namespace cmdstan | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#ifndef CMDSTAN_ARGUMENTS_ARG_NUM_THREADS_HPP | ||
#define CMDSTAN_ARGUMENTS_ARG_NUM_THREADS_HPP | ||
|
||
#include <cmdstan/arguments/singleton_argument.hpp> | ||
|
||
namespace cmdstan { | ||
|
||
class arg_num_threads : public int_argument { | ||
public: | ||
arg_num_threads() : int_argument() { | ||
_name = "num_threads"; | ||
_description = std::string("Number of threads available to the program."); | ||
_default = "1"; | ||
_default_value = 1; | ||
_value = _default_value; | ||
} | ||
#ifdef STAN_THREADS | ||
bool is_valid(int value) { return value > -2 && value != 0; } | ||
#else | ||
bool is_valid(int value) { return value == 1; } | ||
#endif | ||
}; | ||
|
||
} // namespace cmdstan | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we encode here a minimal and maximal value of 1 whenever
STAN_THREADS
is absent (I am not familiar with the argument processing stuff too much; so this is a naive q)? WheneverSTAN_THREADS
is defined, then there is no upper limit. I recall that others were not happy with using -1 for "use all cores". Instead "0" was preferred, but we probably keep that consistent.