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 between multiapp (sibling) copy transfer #19676

Merged
merged 26 commits into from Apr 4, 2022

Conversation

GiudGiud
Copy link
Contributor

@GiudGiud GiudGiud commented Dec 22, 2021

Early PR to get feedback from @fdkong

And to see if the test suite sees issues with it.

The main limitation of this (beyond all the limitations of copy transfer compared to projection & conservative transfers), I think, is that it cant do anything if different ranks own each sibling.
Maybe there is a way around it though, since copy transfers can assume a lot of things are true, because the same mesh is involved

Also let's say I have two different kinds of multiapps, with three instances for each, and I m running this on 2 processes for the main app. Is the allocation going to be:

  • process 1: subapp1: instances 1&2, subapp2: instances 1&2. Process2: instances 3 for both subapps. (Works for this PR!)
    OR
  • process 1: subapp1: instances 1&2, subapp2: instances 1. Process2: subapp1 instance 3, subapp2 instances 2&3 (doesnt work)

The to_multi_app parameter that is only used for between_multiapp transfers is not a good name. Maybe I should call it "other_multiapp". It's hard to find a name that doesnt convey "to" or "from" in the TO_MULTIAPP and FROM_MULTIAPP contexts, yet do convey it's a target in between_multiapp.

Another difficulty is when do we do these "between" transfers. Before the apps are ran? After they are ran? In between (what I d want actually) ???

App patches:

@GiudGiud GiudGiud changed the title Add between multiapp (sibling) transfer Add between multiapp (sibling) copy transfer Dec 22, 2021
@idaholab idaholab deleted a comment from moosebuild Dec 22, 2021
@moosebuild
Copy link
Contributor

moosebuild commented Dec 22, 2021

Job Documentation on d8ba4c0 wanted to post the following:

View the site here

This comment will be updated on new commits.

@moosebuild
Copy link
Contributor

moosebuild commented Dec 22, 2021

Job Coverage on d8ba4c0 wanted to post the following:

Framework coverage

c90b1f #19676 d8ba4c
Total Total +/- New
Rate 82.56% 82.55% -0.01% 86.82%
Hits 73757 73913 +156 382
Misses 15581 15627 +46 58

Diff coverage report

Full coverage report

Modules coverage

Functional expansion tools

c90b1f #19676 d8ba4c
Total Total +/- New
Rate 83.09% 83.05% -0.04% 81.25%
Hits 924 926 +2 13
Misses 188 189 +1 3

Diff coverage report

Full coverage report

Level set

c90b1f #19676 d8ba4c
Total Total +/- New
Rate 88.12% 88.15% +0.03% 100.00%
Hits 319 320 +1 9
Misses 43 43 - 0

Diff coverage report

Full coverage report

Stochastic tools

c90b1f #19676 d8ba4c
Total Total +/- New
Rate 89.90% 89.84% -0.06% 83.05%
Hits 4425 4432 +7 49
Misses 497 501 +4 10

Diff coverage report

Full coverage report

Full coverage reports

Reports

Warnings

  • framework new line coverage rate 86.82% is less than the suggested 90.0%
  • functional_expansion_tools new line coverage rate 81.25% is less than the suggested 90.0%
  • stochastic_tools new line coverage rate 83.05% is less than the suggested 90.0%

This comment will be updated on new commits.

Copy link
Member

@loganharbour loganharbour left a comment

Choose a reason for hiding this comment

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

Commenting to enable notifications; I've got a few ideas for this but haven't had the chance to get them down.

@fdkong
Copy link
Contributor

fdkong commented Jan 6, 2022

Also let's say I have two different kinds of multiapps, with three instances for each, and I m running this on 2 processes for the main app. Is the allocation going to be:

process 1: subapp1: instances 1&2, subapp2: instances 1&2. Process2: instances 3 for both subapps. (Works for this PR!)
OR
process 1: subapp1: instances 1&2, subapp2: instances 1. Process2: subapp1 instance 3, subapp2 instances 2&3 (doesnt work)

I think we need to talk about two cases here:

  1. Within the same multiapp context, we transfer from a subapp to another subpp, and these apps are on the same level.

  2. Between multiple multiapp contexts, we transfer a subapp of this multiapp to another subpp of another multiapp.

@fdkong
Copy link
Contributor

fdkong commented Jan 6, 2022

The to_multi_app parameter that is only used for between_multiapp transfers is not a good name. Maybe I should call it "other_multiapp". It's hard to find a name that doesnt convey "to" or "from" in the TO_MULTIAPP and FROM_MULTIAPP contexts, yet do convey it's a target in between_multiapp.

I think we should keep using the same TO_MULTIAPP and FROM_MULTIAPP. We think the target is the master in the current code base when we say "FROM_MULTIAPP." We think the source is the master when we say "TO_MULTIAPP."

We should not make that assumption anymore for this "between-MULTIAPP." The between case set both FROM_MULTIAPP and TO_MULTIAPP to be true

@fdkong
Copy link
Contributor

fdkong commented Jan 6, 2022

Another difficulty is when do we do these "between" transfers. Before the apps are ran? After they are ran? In between (what I d want actually) ???

We might introduce extra "execute_on" flags

@GiudGiud
Copy link
Contributor Author

I think we want context 2. here, and assume that there is only one of each (or one per rank at least).

Otherwise, and in context 1 as well, we'd need to start numbering subapps of a given multiapp, and be very precise what is moved where

@GiudGiud
Copy link
Contributor Author

@fdkong I did the parameter renaming for Transfer and MultiAppTransfer (but not all the subclasses yet)
If you could have a look so we can coordinate on those changes for sibling transfers

@GiudGiud
Copy link
Contributor Author

Should pass test now.
using singular to_ and from_multiapp.

I think I ll try to grab a few of the other easy transfers then this will be good to go

@moosebuild
Copy link
Contributor

Job Precheck on dd1dc50 wanted to post the following:

Your code requires style changes.

A patch was auto generated and copied here
You can directly apply the patch by running, in the top level of your repository:

curl -s https://mooseframework.inl.gov/docs/PRs/19676/style.patch | git apply -v

Alternatively, with your repository up to date and in the top level of your repository:

git clang-format c90b1f04c38b5fa8c35d8b16e7ca4ae7c7ad7115

Comment on lines +4505 to +4512
if (parameters.isParamValid("multi_app"))
multiapp = getMultiApp(parameters.get<MultiAppName>("multi_app"));
else if (parameters.isParamValid("from_multi_app"))
multiapp = getMultiApp(parameters.get<MultiAppName>("from_multi_app"));
else if (parameters.isParamValid("to_multi_app"))
multiapp = getMultiApp(parameters.get<MultiAppName>("to_multi_app"));
else
mooseError("Should not reach here");
Copy link
Member

Choose a reason for hiding this comment

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

we need to have a better error message here. A user specified to_multiapp as their parameter name and got the "Should not reach here" error

Copy link
Member

Choose a reason for hiding this comment

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

oh wait ... it's just that these parameter names here are actually wrong. The user had specified the right parameter name in to_multiapp

Copy link
Contributor

Choose a reason for hiding this comment

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

It might be helpful to output users' input

Copy link
Contributor Author

Choose a reason for hiding this comment

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

my bad.
How are they hitting this? All the apps were moved to the new system

Copy link
Contributor Author

Choose a reason for hiding this comment

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

well actually, how are they hitting this just now?
is EXEC_SAME_AS_MULTIAPP just not tested?

Copy link
Member

Choose a reason for hiding this comment

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

I misread the situation. See #20803

lindsayad added a commit to lindsayad/moose that referenced this pull request Apr 15, 2022
lindsayad added a commit to lindsayad/moose that referenced this pull request Apr 15, 2022
Also fix typos: 'directions' to 'direction' towards bottom of
`MultiAppTransfer` constructor

Refs idaholab#19676
lindsayad added a commit to lindsayad/moose that referenced this pull request Apr 15, 2022
Also fix typos: 'directions' to 'direction' towards bottom of
`MultiAppTransfer` constructor

Refs idaholab#19676
lindsayad added a commit to lindsayad/moose that referenced this pull request Apr 15, 2022
Also fix typos: 'directions' to 'direction' towards bottom of
`MultiAppTransfer` constructor

Refs idaholab#19676
lindsayad added a commit to lindsayad/moose that referenced this pull request Apr 19, 2022
Also fix typos: 'directions' to 'direction' towards bottom of
`MultiAppTransfer` constructor

Refs idaholab#19676
GiudGiud added a commit to idaholab/virtual_test_bed that referenced this pull request Apr 26, 2022
@permcody
Copy link
Member

permcody commented Oct 11, 2022 via email

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.

None yet

6 participants