Modified from #718, this PR squashes out zero columns of the off-diagonal part of a `hypre_ParCSRMatrix`.
The issue was in offd there exist empty columns (columns with no nonzeros), which correspond to "useless" entries in col_map_offd. This caused issues in at coarser grids in the communications with large number of ranks. We added a routine to compress the zero columns out and shorten col_map_offd. This should reduce communication cost even at higher levels.
Two sources of the empty columns have been located and fixed:
- Truncation after building P
- P^T(AP): only the transpose multiplication part.
---------
Co-authored-by: Noel Chalmers <noel.chalmers@gmail.com>
Co-authored-by: Ruipeng Li <li50@llnl.gov>
Co-authored-by: Wayne Mitchell <mitchell82@llnl.gov>
This PR adds HIP support to hypre_ILU (setup and solve phases):
- Algorithm type 0 (BJ-ILU0)
- Algorithm type 10 (GMRES-ILU0)
- Iterative triangular solves for backward and forward substitutions.
---------
Co-authored-by: Paul Mullowney <Paul.Mullowney@nrel.gov>
This allows users to direct hypre's error messages to a memory buffer instead of stderr. With this, there are now three basic ways to use hypre when configured --with-print-errors:
- Default (mode 0): Errors are printed immediately to stderr (there is no processor information available in this print).
- Store errors in memory (mode 1) and call PrintErrorMessages to print them.
- Store errors in memory (mode 1) and call GetErrorMessages to manage the error messages however you like.
* Use unroll_factor=8 for rocm-5.4.3
* Add SortCSRRocsparse back
* Fix Wunused-variable warnings
* Set _hypre_memory_tracker to NULL after destroy
* Update tioga results after changing default rocm version to 5.2.0
The memory leak was happening when:
A complex smoother for BoomerAMG was selected.
The AMG hierarchy consisted of one level.
The BoomerAMG preconditioner was destroyed and recomputed again.
* Add hypre_State type to track initialization state of hypre
* Add HYPRE_Initialized to determine whether hypre has been initialized
* Add HYPRE_Finalized to determine whether hypre has been finalized
* Add private implementations for hypre_initialized/finalized
* Add HYPRE_Initialize
* Update Fortran interface for HYPRE_Initialize
* Use HYPRE_Initialize in test drivers and examples
* Clean-up mentions of HYPRE_Init
* Add HYPRE_DEPRECATED macro to autotools and CMake builds
* Add regression test for library initialization/finalization
* Update HYPRE_WARP_FULL_MASK to 64-bit length for HIP
* Add hypre_mask type depending on the GPU architecture
* Change unsigned -> hypre_uint. Move a few hypre_int to hypre_uint
* Remove SyncCompute call to fix compilation with device omp
* Fix hypre_SeqVectorAxpyzDevice implementation for device omp
* Add warning for function not implemented for device omp
Do not enable HYPRE_USING_GPU when using the device openmp backend.
This allows cuda/hip/sycl implementation throughout the code to be grouped
under the HYPRE_USING_GPU macro instead of always combining the cuda/
hip/sycl macros. In addition some other extraneous macro guards are removed.
This PR adds device support to various MGR options:
Non-galerkin coarse grid correction options (except for option 4)
Block diagonal interpolation (interp_type = 12)
Block Jacobi relaxation (level_smooth_type = 0 for global relaxation and interp_type = 12 for F-relaxation)
The main code changes are listed below:
* Add hypre_ParCSRMatrixExtractBlockDiagDevice
* Add hypre_ParCSRMatrixExtractBlockDiagDevice and respective GPU kernels
* Add hypre_ParCSRMatrixGenerateFFFCHost and respective backend wrapper
* Add device support to hypre_MGRBuildPBlockJacobi
* Add hypre_ParCSRMatrixBlockDiagMatrixDevice
* Add hypre_ParCSRMatrixExtractBlockDiagDevice
* Add MGRBuildPFromWpDevice
* Add implementation for batched matrix transpose on the device
* hypre_ParCSRMatrixDropSmallEntriesDevice: exit if tolerance is zero
* Add hypre_ParCSRMatrixGenerateCCCFDevice
* Port MGR's Non-Galerkin option to device
* Add L1-Jacobi global smoother to MGR
* Add missing comments about MGR's public APIs
* Add hypre_MGRComputeNonGalerkinCGDevice
* Update style of hypre_MGRCycle
* Add sanity checks to hypre_SeqVectorElmdivpyMarked
* Add hypre_MGRBlockRelaxSolveDevice
* Add GPUProfiling to several places
* MGR setup: simplify computation of l1_norms
* MGR solve: make use of ParVectorSetZeros to make residual computations faster
* Exit hypre_SeqVectorElmdivpyMarked earlier for vectors with zero size
* Update caliper region names for MGR
* Add wrappers to cublas batched getrf and getri functions
* General performance improvements for MGR
When hypre handle is not initialized and a call to hypre_handle() is made, report an error and call HYPRE_Init() rather than just calling hypre_HandleCreate() with no error reporting.
This PR has three main goals:
1. Enable ILU to work without UVM on device builds.
2. Add the runtime switch option to ILU. Thus, in device builds, one can choose now whether to execute ILU's setup and solve on the device or host.
3. Improve error handling. e.g, when trying to execute on the device ILU types that are not supported yet.
A summary of the code changes is given below:
* Enable ILU reordering algorithms to work without UVM memory.
* Update hypre_ILUSetupILU0Device with new intArray functions
* Fix memory location of S_offd + style updates
* Simplify hypre_ParILUCusparseILUExtractEBFC
* Remove unused function: hypre_ParILUCusparseExtractDiagonalCSR
* Refactor hypre_ILUGetInteriorExteriorPerm
* Refactor hypre_ILULocalRCM
* Refactor hypre_ILUSortOffdColmap
* Refactor hypre_ILUGetLocalPerm
* Refactor hypre_ILUGetPermddPQ
* Fix memory transfer at hypre_ILUGetInteriorExteriorPerm
* Add error messages for ILUK and ILUT for device runs
* Add error messages for GMRES-ILUK and GMRES-ILUT for device runs
* Add execution policy to ILU setup/solve
* Bug fixes for -exec_host/-memory_host on device builds
* Add ILU reordering option to IJ driver
* Refactor hypre_ILUSetupILUKDevice
* Refactor hypre_ILULocalRCM
* Remove duplicated code
* Bug fix on hypre_ILUGetPermddPQPre
* Update lassen results in accordance with CPU runs
---------
Co-authored-by: Paul Mullowney <Paul.Mullowney@nrel.gov>
This PR changes the type of four variables in the auxiliary matrix data structure to avoid the multiplication of integers and floating-point numbers during `hypre_IJMatrixSetAddValuesParCSRDevice`
Fixes for oneMKL sparse matmat and port of our custom spmv and spgemm routines to sycl. Note that this also involves significant updates to basic handling of kernel launches in sycl due to the need to support multi-dimensional kernels and the use of local shared memory.
This PR adds hypre_SeqVectorResize and hypre_ParVectorResize for resizing sequential and parallel vectors, respectively. This is useful for block-Krylov solvers/eigensolvers using BoomerAMG and multi-component vectors.