-
Notifications
You must be signed in to change notification settings - Fork 13
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
Bathymetry 2d boxes #30
Merged
asalmgren
merged 8 commits into
seahorce-scidac:development
from
jmsexton03:bathymetry_2d_boxes
Sep 20, 2023
Merged
Bathymetry 2d boxes #30
asalmgren
merged 8 commits into
seahorce-scidac:development
from
jmsexton03:bathymetry_2d_boxes
Sep 20, 2023
Conversation
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
WeiqunZhang
reviewed
Sep 19, 2023
WeiqunZhang
reviewed
Sep 19, 2023
That box is definitely not 2D -- when I ran Upwelling just now it prints as
((-2,-2,0) (42,81,15) (0,0,0))
…On Mon, Sep 18, 2023 at 8:59 PM Weiqun Zhang ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In Source/TimeIntegration/ROMSX_advance_2d.cpp
<#30 (comment)>:
> + });
+ amrex::ParallelFor(tbxp2,
+ [=] AMREX_GPU_DEVICE (int i, int j, int )
+ {
+
+ const auto prob_lo = geomdata.ProbLo();
+ const auto dx = geomdata.CellSize();
+
+ pm(i,j,0)=dxi[0];
+ pn(i,j,0)=dxi[1];
+ //defined UPWELLING
+ Real f0=-8.26e-5;
+ Real beta=0.0;
+ Real Esize=1000*(Mm);
+ Real y = prob_lo[1] + (j + 0.5) * dx[1];
+ Real f=fomn(i,j,0)=f0+beta*(y-.5*Esize);
This pattern appears in a number of places. I will submit a PR tomorrow. I
did not change it last time because if the Box is 2D, this is harmless even
though it wastes a write. But if it is not 2d, there are race conditions.
—
Reply to this email directly, view it on GitHub
<#30 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACRE6YXCYUCHXJAKS67AYR3X3EKCNANCNFSM6AAAAAA45CPWTE>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
--
Ann Almgren
Senior Scientist; Dept. Head, Applied Mathematics
Pronouns: she/her/hers
|
WeiqunZhang
reviewed
Sep 19, 2023
WeiqunZhang
reviewed
Sep 19, 2023
WeiqunZhang
reviewed
Sep 19, 2023
WeiqunZhang
reviewed
Sep 19, 2023
what does this line even do?
Real f=fomn(i,j,0)=f0+beta*(y-.5*Esize);
Is
Real a = b = c
the same as
Real a = c
Real b = c
??
…On Tue, Sep 19, 2023 at 9:31 AM Weiqun Zhang ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In Source/TimeIntegration/ROMSX_advance_2d.cpp
<#30 (comment)>:
> +
+ const auto prob_lo = geomdata.ProbLo();
+ const auto dx = geomdata.CellSize();
+
+ pm(i,j,0)=dxi[0];
+ pn(i,j,0)=dxi[1];
+ //defined UPWELLING
+ Real f0=-8.26e-5;
+ Real beta=0.0;
+ Real Esize=1000*(Mm);
+ Real y = prob_lo[1] + (j + 0.5) * dx[1];
+ Real f=fomn(i,j,0)=f0+beta*(y-.5*Esize);
+ fomn(i,j,0)=f*(1.0/(pm(i,j,0)*pn(i,j,0)));
+ });
+
+ amrex::ParallelFor(tbxp2,
⬇️ Suggested change
- amrex::ParallelFor(tbxp2,
+ amrex::ParallelFor(tbxp2D,
—
Reply to this email directly, view it on GitHub
<#30 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACRE6YUETFLUZBCHJ4T53GTX3HCFFANCNFSM6AAAAAA45CPWTE>
.
You are receiving this because you commented.Message ID:
***@***.***>
--
Ann Almgren
Senior Scientist; Dept. Head, Applied Mathematics
Pronouns: she/her/hers
|
Right. The original code is like
This is equivalent to
For CPU, this is fine even though unnecessary. But for GPU, Ssince |
Co-authored-by: Weiqun Zhang <[email protected]>
After merging #35 into this, the diff between CPU and GPU is
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add FillBoundary to fix ghost zones in W for 3d rhs and in DUon, DVom for 2d rhs