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

chore: update trilinos, hypre and fmt. #3214

Merged
merged 25 commits into from
Jul 11, 2024

Conversation

CusiniM
Copy link
Collaborator

@CusiniM CusiniM commented Jul 5, 2024

GEOS-DEV/thirdPartyLibs#273
GEOS-DEV/LvArray#322

Updated tpls:

  • Trilinos: 15.1.1
  • Hypre: hypre-v2.31.0-26-gf6cfb0355. Contains MGR improvements that required GEOS code changes.
  • fmt 11.01.1

@CusiniM CusiniM self-assigned this Jul 5, 2024
@CusiniM CusiniM added flag: TPL(s) build check A PR accompanying a TPL PR to check against GEOS's CI flag: requires updated TPL(s) Needs a specific TPL PR flag: requires updated submodule(s) and removed flag: TPL(s) build check A PR accompanying a TPL PR to check against GEOS's CI labels Jul 5, 2024
Copy link

codecov bot commented Jul 6, 2024

Codecov Report

Attention: Patch coverage is 3.12500% with 31 lines in your changes missing coverage. Please review.

Project coverage is 55.73%. Comparing base (94a0e86) to head (92c1457).
Report is 89 commits behind head on develop.

Files with missing lines Patch % Lines
...Strategies/MultiphasePoromechanicsReservoirFVM.hpp 0.00% 18 Missing ⚠️
src/coreComponents/common/DataTypes.hpp 0.00% 1 Missing ⚠️
src/coreComponents/dataRepository/DataContext.hpp 0.00% 1 Missing ⚠️
...onents/linearAlgebra/interfaces/hypre/HypreMGR.hpp 0.00% 1 Missing ⚠️
...hypre/mgrStrategies/CompositionalMultiphaseFVM.hpp 0.00% 1 Missing ⚠️
...mgrStrategies/CompositionalMultiphaseHybridFVM.hpp 0.00% 1 Missing ⚠️
...Strategies/CompositionalMultiphaseReservoirFVM.hpp 0.00% 1 Missing ⚠️
...gies/CompositionalMultiphaseReservoirHybridFVM.hpp 0.00% 1 Missing ⚠️
...es/hypre/mgrStrategies/MultiphasePoromechanics.hpp 0.00% 1 Missing ⚠️
...es/SinglePhasePoromechanicsConformingFractures.hpp 0.00% 1 Missing ⚠️
... and 4 more
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3214      +/-   ##
===========================================
- Coverage    55.75%   55.73%   -0.02%     
===========================================
  Files         1041     1041              
  Lines        88534    88562      +28     
===========================================
+ Hits         49358    49362       +4     
- Misses       39176    39200      +24     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@CusiniM CusiniM changed the title Update raja chai build: update raja chai Jul 8, 2024
@CusiniM CusiniM changed the title build: update raja chai build: update raja, chai and trilinos. Jul 8, 2024
@CusiniM CusiniM requested a review from rrsettgast July 8, 2024 17:27
victorapm and others added 3 commits July 8, 2024 20:44
* Add coarse matrix truncation
* Fix Non-Galerkin truncation
* Remove galerkinRAI option in favor of just galerkin
* Adjust threshold
@CusiniM CusiniM changed the title build: update raja, chai and trilinos. build: update raja, chai, trilinos and hypre. Jul 9, 2024
@CusiniM CusiniM added the ci: run CUDA builds Allows to triggers (costly) CUDA jobs label Jul 9, 2024
src/coreComponents/common/Format.hpp Show resolved Hide resolved
Comment on lines +93 to +97
#if GEOS_USE_HYPRE_DEVICE == GEOS_USE_HYPRE_CPU
HYPRE_Real m_coarseGridThreshold{ 1.0e-20 }; ///< Coarse grid truncation threshold
#else
HYPRE_Real m_coarseGridThreshold{ 0.0 }; ///< Coarse grid truncation threshold
#endif
Copy link
Member

Choose a reason for hiding this comment

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

this doesn't make sense to me? I read it as
"If we GEOS_USE_HYPRE_DEVICE is the same as GEOS_USE_HYPRE_CPU then do something"...but should these ever be the same?

Copy link
Contributor

Choose a reason for hiding this comment

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

I've seen a few test cases with GPUs where threshold > 0 causes a crash in hypre, which does not seem straightforward to resolve. Since threshold > 0 works for CPUs, and for the sake of getting this new truncation functionality used in GEOS, I'm currently setting different threshold according to the architecture. After the GPU path in hypre is improved, I will change back the threshold parameter to the same default for CPUs and GPUs in GEOS

@@ -73,7 +73,7 @@ class CompositionalMultiphaseFVM : public MGRStrategyBase< 2 >
m_levelFRelaxType[1] = MGRFRelaxationType::none;
m_levelInterpType[1] = MGRInterpolationType::injection;
m_levelRestrictType[1] = MGRRestrictionType::blockColLumped; // True-IMPES
m_levelCoarseGridMethod[1] = MGRCoarseGridMethod::galerkinRAI;
m_levelCoarseGridMethod[1] = MGRCoarseGridMethod::galerkin;
Copy link
Member

Choose a reason for hiding this comment

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

are these settings documented somewhere?

Copy link
Contributor

Choose a reason for hiding this comment

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

There is some documentation via doxygen, see https://geosx-geosx.readthedocs-hosted.com/en/latest/doxygen_output/html/namespacegeos_1_1hypre.html#a05c6983a0ed8e068d0861c91767e83da

We've talked about adding a more detailed description on RTD. Should we re-prioritize that? cc @castelletto1

Copy link
Member

Choose a reason for hiding this comment

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

I meant to ask whether there is a discussion on the documentation regarding the strategy? So in this case, for CompositionalMultiphaseFVM there is a strategy that consists of:

     m_levelFRelaxType[0]          = MGRFRelaxationType::jacobi;
     m_levelFRelaxIters[0]         = 1;
     m_levelInterpType[0]          = MGRInterpolationType::jacobi;
     m_levelRestrictType[0]        = MGRRestrictionType::injection;
     m_levelCoarseGridMethod[0]    = MGRCoarseGridMethod::galerkin;
     m_levelGlobalSmootherType[0]  = MGRGlobalSmootherType::none;
     m_levelFRelaxType[1]          = MGRFRelaxationType::none;
     m_levelInterpType[1]          = MGRInterpolationType::injection;
     m_levelRestrictType[1]        = MGRRestrictionType::blockColLumped; // True-IMPES
     m_levelCoarseGridMethod[1]    = MGRCoarseGridMethod::galerkin;
     m_levelGlobalSmootherType[1]  = MGRGlobalSmootherType::ilu0;
     m_levelGlobalSmootherIters[1] = 1;

And is there an easily accessible explanation for all of these options, and why they go together in the geos documentation....or in the hypre documentation? I suspect the hypre documentation is more of an expert level documentation??

Copy link
Contributor

Choose a reason for hiding this comment

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

There isn't an easily accessible explanation in neither documentations. I believe hypre's documentation is a better place for a detailed documentation, while in GEOS, we could provide an overview of these preconditioning techniques for each physics model, e.g., the strategy above resembles the commonly used CPR method

@@ -64,7 +64,7 @@ class SolidMechanicsEmbeddedFractures : public MGRStrategyBase< 1 >
setupLabels();

// Level 0
m_levelFRelaxType[0] = MGRFRelaxationType::gsElimWInverse;
m_levelFRelaxType[0] = MGRFRelaxationType::jacobi;
Copy link
Member

Choose a reason for hiding this comment

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

what is the effect of this?

Copy link
Collaborator Author

@CusiniM CusiniM Jul 9, 2024

Choose a reason for hiding this comment

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

My guess is that the gsElimWInverse is not really scalable. Shouldn't we do block jacobi though? It's a block diagonal matrix so wouldn't block jacobi be exact?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, we should be doing block jacobi

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, now I recall what's going on here...

Under the hood, hypre does block-Jacobi because of the interpolation choice m_levelInterpType[0] = MGRInterpolationType::blockJacobi. However, this logic is confusing (it shouldn't depend on the interpolation) and hypre should have a specific option for doing block-Jacobi F-relaxation.

I can work on that.

@CusiniM CusiniM requested a review from cssherman as a code owner July 10, 2024 16:09
@untereiner
Copy link
Contributor

Hello @CusiniM
I am wondering, are raja and chai direct dependencies of GEOS or are they transitive dependencies via lvarray ?

@CusiniM
Copy link
Collaborator Author

CusiniM commented Jul 10, 2024

Hello @CusiniM I am wondering, are raja and chai direct dependencies of GEOS or are they transitive dependencies via lvarray ?

direct dependencies:

@CusiniM CusiniM force-pushed the tpls-update/cusini/update-raja-chai branch from 254c876 to dafdf54 Compare July 10, 2024 22:53
@CusiniM CusiniM changed the title build: update raja, chai, trilinos and hypre. chore: update trilinos, hypre and fmt. Jul 11, 2024
@CusiniM CusiniM added the ci: run integrated tests Allows to run the integrated tests in GEOS CI label Jul 11, 2024
@CusiniM
Copy link
Collaborator Author

CusiniM commented Jul 11, 2024

@cssherman can you approve this?

@CusiniM CusiniM merged commit 23a3372 into develop Jul 11, 2024
39 of 44 checks passed
@CusiniM CusiniM deleted the tpls-update/cusini/update-raja-chai branch July 11, 2024 20:55
@untereiner
Copy link
Contributor

untereiner commented Jul 12, 2024

I am looking a bit more to the Lvarray dependencies:

  • Lvarray needs raja
  • geos needs lvarray but also raja.

Can lvarray live without raja ?
In the negative case it would be cleaner that geos only depends on lvarray and let lvarray manage the raja dependency (version, public API for geos, etc.)
Do you agree ?

@corbett5
Copy link
Contributor

RAJA is one of the few hard dependencies of LvArray.

rrsettgast pushed a commit that referenced this pull request Jul 18, 2024
Updated tpls:
- Trilinos: 15.1.1
- Hypre: hypre-v2.31.0-26-gf6cfb0355. Contains MGR improvements that required GEOS code changes.
- fmt 11.01.1
Algiane pushed a commit that referenced this pull request Jul 30, 2024
Updated tpls:
- Trilinos: 15.1.1
- Hypre: hypre-v2.31.0-26-gf6cfb0355. Contains MGR improvements that required GEOS code changes.
- fmt 11.01.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci: run CUDA builds Allows to triggers (costly) CUDA jobs ci: run integrated tests Allows to run the integrated tests in GEOS CI flag: requires updated submodule(s) flag: requires updated TPL(s) Needs a specific TPL PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants