Skip to content
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

Add capability to store Monte Carlo sample data in parallel #13906

Closed

Conversation

jiangwen84
Copy link
Contributor

Please do not close ref #13879.

@jiangwen84 jiangwen84 changed the title Added an option to store Monte Carlo sample data in parallel Add option to store Monte Carlo sample data in parallel Aug 13, 2019
@jiangwen84 jiangwen84 changed the title Add option to store Monte Carlo sample data in parallel Add capability to store Monte Carlo sample data in parallel Aug 13, 2019
@moosebuild
Copy link
Contributor

moosebuild commented Aug 13, 2019

Job Documentation on d666216 wanted to post the following:

View the site here

This comment will be updated on new commits.

@jiangwen84
Copy link
Contributor Author

@aeslaughter could you take a look at this PR? Thanks.

@aeslaughter aeslaughter self-assigned this Aug 20, 2019
Copy link
Contributor

@aeslaughter aeslaughter left a comment

Choose a reason for hiding this comment

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

I don't prefer this design as it restricts the distributed version to a very specific case where the number of matrices match the number or processors. It also introduces two new virtual methods to implement.

My goal for the Sampler object is for the number of matrices and rows per matrix to be arbitrary. I don't want to run into a case in the future were are rigid design of the matrix and row structure makes it difficult to implement.

I am open to discuss this further. Hopefully we can get something that is general but allows you to meet your needs.

What if "reinit" accepted size pairs for the number of rows and columns for each matrix and an overloaded version for when they are all the same:
reinit( (10,2), (11,3), ...)
reinit(3, (10, 10))

Also, the distribution should can just break matrices wherever needed and we can provide a smart
iterator: localSampleRowBegin(), localSampleRowEnd() that would allow each row to be accessed for on the local process.

@aeslaughter
Copy link
Contributor

Another possibility is that I am trying to be too general, in that case we should just remove the multiple DenseMatrices and just use one. This would allow a single offset to be stored for distributing the data.

@jiangwen84
Copy link
Contributor Author

The current implementation should allow the number of rows/matrices to be different from the number of processors? Maybe I misunderstand what said about "specific case where the number of matrices match the number or processors"

If you agree to have just one DenseMatrix, it will be easier to implement at least for now.

Could you explain to me how you would like the DenseMatirx to be distributed across all processors? Do you think the use of linear partitioning of number of rows is not a good idea?

@jiangwen84
Copy link
Contributor Author

@bwspenc since you are also interested in this for Grizzly application, so I am tagging you to join in our discussion.

@aeslaughter
Copy link
Contributor

@jiangwen84 I misunderstood what you were doing with the two getTotal... methods. Also, the distribution looks fine. I just went through this too quick, sorry about that.

The only thing don't like about this is two function overrides. Can we go with setters instead that are called from the constructor of MonteCarloSampler. The reinit() method can error if they have not been called.

setTotalNumberOfMatrices(42);
setTotalNumberOfSamples(10000);

@jiangwen84
Copy link
Contributor Author

@aeslaughter Can you take another look at? I made the sample matrix partitioning consistent with multi-app batch. I also added a new option in MCSampler to reuse the computed sample matrix because recompute might take a long time when there are more than 100million samples. Thanks!

@jiangwen84
Copy link
Contributor Author

@aeslaughter any thoughts? Thanks.

@aeslaughter
Copy link
Contributor

I like where this is going, I am going to add a few things to this rather than try to explain what I am thinking.

aeslaughter added a commit to aeslaughter/moose that referenced this pull request Sep 6, 2019
aeslaughter added a commit to aeslaughter/moose that referenced this pull request Sep 6, 2019
aeslaughter added a commit to aeslaughter/moose that referenced this pull request Nov 20, 2019
(refs idaholab#13906)

The test removed isn't needed, it is executed with threads by the test system
aeslaughter added a commit to aeslaughter/moose that referenced this pull request Nov 20, 2019
aeslaughter added a commit to aeslaughter/moose that referenced this pull request Nov 20, 2019
aeslaughter added a commit to aeslaughter/moose that referenced this pull request Nov 20, 2019
(refs idaholab#13906)

The test removed isn't needed, it is executed with threads by the test system
@aeslaughter aeslaughter added this to In progress in Stochastic Tools via automation Nov 21, 2019
aeslaughter added a commit to aeslaughter/moose that referenced this pull request Nov 21, 2019
aeslaughter added a commit to aeslaughter/moose that referenced this pull request Nov 25, 2019
aeslaughter added a commit to aeslaughter/moose that referenced this pull request Nov 25, 2019
aeslaughter added a commit to aeslaughter/moose that referenced this pull request Nov 25, 2019
aeslaughter added a commit to aeslaughter/moose that referenced this pull request Nov 25, 2019
aeslaughter added a commit to aeslaughter/moose that referenced this pull request Nov 25, 2019
aeslaughter added a commit to aeslaughter/moose that referenced this pull request Nov 25, 2019
aeslaughter added a commit to aeslaughter/moose that referenced this pull request Nov 25, 2019
aeslaughter added a commit to aeslaughter/moose that referenced this pull request Nov 25, 2019
aeslaughter added a commit to aeslaughter/moose that referenced this pull request Nov 25, 2019
aeslaughter added a commit to aeslaughter/moose that referenced this pull request Nov 25, 2019
aeslaughter added a commit to aeslaughter/moose that referenced this pull request Nov 25, 2019
aeslaughter added a commit to aeslaughter/moose that referenced this pull request Nov 25, 2019
aeslaughter added a commit to aeslaughter/moose that referenced this pull request Nov 25, 2019
(refs idaholab#13906)

The test removed isn't needed, it is executed with threads by the test system
aeslaughter added a commit to aeslaughter/moose that referenced this pull request Nov 25, 2019
aeslaughter added a commit to aeslaughter/moose that referenced this pull request Nov 25, 2019
aeslaughter added a commit to aeslaughter/moose that referenced this pull request Nov 25, 2019
aeslaughter added a commit to aeslaughter/moose that referenced this pull request Nov 27, 2019
aeslaughter added a commit to aeslaughter/moose that referenced this pull request Nov 27, 2019
aeslaughter added a commit to aeslaughter/moose that referenced this pull request Nov 27, 2019
aeslaughter added a commit to aeslaughter/moose that referenced this pull request Nov 27, 2019
aeslaughter added a commit to aeslaughter/moose that referenced this pull request Nov 27, 2019
@aeslaughter aeslaughter moved this from In progress to Done in Stochastic Tools Dec 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants