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

Bathymetry 2d boxes #30

Merged
merged 8 commits into from
Sep 20, 2023

Conversation

jmsexton03
Copy link
Member

Add FillBoundary to fix ghost zones in W for 3d rhs and in DUon, DVom for 2d rhs

@asalmgren
Copy link
Member

asalmgren commented Sep 19, 2023 via email

@asalmgren
Copy link
Member

asalmgren commented Sep 19, 2023 via email

@asalmgren asalmgren marked this pull request as ready for review September 19, 2023 16:34
@WeiqunZhang
Copy link
Collaborator

Right. The original code is like

Real a = b = c;
b = a * x;

This is equivalent to

b = c;
Real a = b;
b = a * x;

For CPU, this is fine even though unnecessary. But for GPU, Ssince b is shared by all gpu threads, there is a race condition.

@WeiqunZhang
Copy link
Collaborator

After merging #35 into this, the diff between CPU and GPU is

$ fcompare.gnu.ex plt00100 cpu/plt00100/

            variable name            absolute error            relative error
                                        (||A - B||)         (||A - B||/||A||)
 ----------------------------------------------------------------------------
 level = 0
 temp                               5.329070518e-14           2.464088545e-15
 omega                                            0                         0
 salt                               7.105427358e-15           2.030122102e-16
 x_velocity                         8.326672685e-17           1.132812766e-15
 y_velocity                         6.245004514e-17           1.085894626e-15
 z_velocity                                       0                         0

@asalmgren asalmgren merged commit 9f4180e into seahorce-scidac:development Sep 20, 2023
7 checks passed
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.

4 participants