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

introducing P-CSI solver #745

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

introducing P-CSI solver #745

wants to merge 10 commits into from

Conversation

lj-mu
Copy link

@lj-mu lj-mu commented Jul 12, 2023

What changes does this PR introduce?

New feature. This P-CSI solver (implemented in CESM, Huang et al., 2016, doi:10.5194/gmd-9-4209-2016) is a potentially faster alternative to the CG2D solver.

What is the current behaviour?

At very high resolution S/R CG2D can be a bottleneck (see #530)

What is the new behaviour

  • the P-CSI solver can be faster by a factor of 2 in specific configurations and architectures
  • the P-CSI solver needs global communications only for checking convergence
  • The code is compiled with PCSI by defining ALLOW_PCSI in the CPP_OPTIONS.h.
  • To use, set usePcsiSolver=.TRUE. and select values for PcsiMaxIters and PcsiTargetResidual in data
  • new flag useCG2DPrecond=.TRUE. by default to use the full cg2d-preconditioner (also for P-CSI), set to .FALSE. to only use the main diagonal (for tuning and testing)
  • global_ocean.90x40x15.idemix tests the new feature

Does this PR introduce a breaking change?

No

Other information:

  • to fool testreport, solve_for_pressure prints pcsi_init_res as cg2d_init_res
  • Yuhu Chen (@xiaohumengdie) contributed most of the code

Suggested addition to tag-index

  • new P-CSI solver for solve_for_pressure, to compile define ALLOW_PCSI, to use set usePcsiSolver=.TRUE. and select values for PcsiMaxIters and PcsiTargetResidual in namelist data&PARM02

lj-mu and others added 10 commits July 4, 2023 21:55
Preconditioned Classical Stiefel Iteration(PCSi) solver
- useCG2DPrecond=.TRUE. by default to use the full cg2d
  preconditioner, set to FALSE to only use the diagonal
- to fool testreport, solve_for_pressure prints pcsi_init_res as cg2d_init_res
- global_ocean.90x40x15.idemix as the test
- some cleanup, upper/lower case, trailing white spaces
- LanczosconvergenceCriterion  = 0.001, maxlanczosstep = 1000 as this
makes it possible to solve more accurately with little overhead in the
initialistion phase.
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

2 participants