-
Notifications
You must be signed in to change notification settings - Fork 91
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
boomerAMG on GPU for SolidMechanicsLagrangianSSLE #1054
Conversation
All, here are some recommendations for building and running with hypre on the GPU.
Enabling GPU support
Runtime solver options:
There's one minor edit from our discussion yesterday. I believe there were two scenarios:
Since geosx does not rely on unified memory, I am leaning towards option 2, as long as the data given to hypre is a consistent parcsr matrix data. I had mentioned that passing hypre host data should work, but this is only true with unified memory. Without unified memory, option 1 could be realized by moving the assembled matrix to device and calling hypre then. If you have questions about the linear system matrix setup on device, let me know and we can chat again. Of course let me know also if you have additional questions about these notes. |
@AF1990 are these blocks per processor or per unknowns? We do not have a BJ preconditioned for the unknown version, but for the per processor blocks, we have the BJ ILU preconditioner. |
I am interested in the unknown version of the BJ preconditioner. I know that the processor version is already available. |
d194411
to
16ffd62
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@oseikuffuor1 I think this is setup per your instructions, but execution on Lassen using nvprof doesn't show a cuda kernel so it must still be executing on host. Any suggestions?
src/coreComponents/linearAlgebra/interfaces/hypre/HypreInterface.cpp
Outdated
Show resolved
Hide resolved
src/coreComponents/linearAlgebra/interfaces/hypre/HypreSolver.cpp
Outdated
Show resolved
Hide resolved
src/coreComponents/linearAlgebra/interfaces/hypre/HypreSolver.cpp
Outdated
Show resolved
Hide resolved
src/coreComponents/linearAlgebra/interfaces/hypre/HypreInterface.cpp
Outdated
Show resolved
Hide resolved
src/coreComponents/linearAlgebra/interfaces/hypre/HypreInterface.cpp
Outdated
Show resolved
Hide resolved
…parse and cudarand libs to the link line for hypre
…EOSX into feature/boomerAMG-for-elasticity
src/coreComponents/linearAlgebra/interfaces/direct/SuiteSparse.hpp
Outdated
Show resolved
Hide resolved
@@ -26,11 +26,13 @@ namespace geosx | |||
|
|||
// Check matching requirements on index/value types between GEOSX and SuperLU_Dist | |||
|
|||
#if !defined(GEOSX_USE_HYPRE_CUDA) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/coreComponents/linearAlgebra/interfaces/hypre/HypreSolver.cpp
Outdated
Show resolved
Hide resolved
…EOSX into feature/boomerAMG-for-elasticity
src/coreComponents/linearAlgebra/interfaces/hypre/HypreMatrix.hpp
Outdated
Show resolved
Hide resolved
CRSMatrix< real64 > tempMat; | ||
tempMat.resize( localRows, src.numGlobalCols(), maxDstEntries ); | ||
|
||
for( globalIndex r=0; r<localRows; ++r ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you mean for this to be a parallel kernel launch? Or what's the purpose of using 2D arrays for srcIndices
and srcValues
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a bunch of host functions in this for loop. They are from hypre, so we don't have control over them. It is pretty strange, but the underlying hypre functions are all host, but if running on device, they take device pointers.
src/docs/doxygen/GeosxConfig.hpp
Outdated
/// Enables use of PETSc library (CMake option ENABLE_PETSC) | ||
#define GEOSX_USE_PETSC | ||
|
||
/// Choice of global linear algebra interface (CMake option GEOSX_LA_INTERFACE) | ||
#define GEOSX_LA_INTERFACE Hypre | ||
#define GEOSX_LA_INTERFACE Trilinos |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted back to Trilinos, intentional?
(We should look into changing the way this file is handled... it's getting out of hand, especially with more macros added)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be a general issue. I must have built on lassen, and accidentally committed this file.
The purpose of this PR is to enable boomerAMG-preconditioning on GPU for an elasticity problem. The linear algebra interface is set to hypre by default. As a model problem the following simple cantilivered cube problem has been added:
SSLE-QS-cantileveredCube.xml
The mesh consists of a unit cube that is discretized with a regular 10x10x10 Cartesian mesh.
GEOS-DEV/LvArray#213
The Hypre build options are in the corresponding thirdPartyLibs PR:
GEOS-DEV/thirdPartyLibs#132