Commit Graph

12191 Commits

Author SHA1 Message Date
Victor A. P. Magri
2e29e665bb
Fix compilation on Windows (#990)
* Do not use dirent.h in windows
2023-10-19 10:56:58 -04:00
Victor A. P. Magri
14b5544d8b
Fix regressions (#988)
* CMake uses C99 by default
* HYPRE_PRINT_INDENT works without a loop
2023-10-17 10:28:34 -04:00
Victor A. P. Magri
8ff65e8124
Improve MGR data printing (#976)
This enhances what print_level can achieve in MGR. Particularly, now we can dump linear system info to files according to the print_level code. We also have the ability now of printing a sequence of linear systems to file (useful when hypre is used in time-stepping application).

A detailed list of changes is given below:

* Add utilities for creating/checking directories
* Add print_level codes to MGR and new info_path member
* Add hypre_MGRDataPrint
* Add call to hypre_MGRDataPrint and logic to update the print_level variable
* Update MGRSolve with new print_level logic
* Remove hypre_MGRWriteSolverParams
* Update documentation for HYPRE_MGRSetPrintLevel
* Implement new logic for HYPRE_MGR_PRINT_MODE_ASCII
2023-10-12 23:15:23 -04:00
Victor A. P. Magri
36cf73191f
Add MGR statistics (#897)
This PR improves statistics reporting for MGR.

A list with detailed changes is given below:
* Add MatrixStats and MatrixStatsArray
* Add hypre_squared utility
* Fix divisor line location for Rectangular matrices
* Minor fix on hypre_squared definition
* Move nonzero variable definitions up
* Initialize global number of nonzeros at matrix creation
* Add hypre_ParCSRMatrixStatsArray and helper functions
* Add par_csr_matstats_device
* Add par_mgr_stats
* Print F-relax data only once
* Fix clang-13 build
* IJ driver now passes in print_level option to MGR
* GPU runs always require A_FF in MGR
* Add HYPRE_PRINT_SHIFTED_PARAM macro
* Add hypre_IntArraySetInterleavedValues (host/device implementations)
* Fix F-relaxation reporting + refactoring
* Update global number of nonzeros of the matrix
* Move new BoomerAMG functions to par_stats
* Apply astyle
2023-10-12 16:32:29 -04:00
Wayne Mitchell
a84fe35022
SYCL triangular solves, Chebyshev relaxation, etc. (#972)
Adding more sycl functionality including chebyshev relaxation and triangular solves,
which in turn enables Gauss-Seidel, ILU, etc.
2023-10-11 15:05:21 -07:00
Victor A. P. Magri
3e56e6e590
Fix MSVC build (#978)
* Allocate buffer on heap memory
* Fix Pragma definition for MSVC
* Fix uninitiliazed variable
* Loop counter cannot be non-negative for MSVC
2023-10-10 08:28:24 -04:00
Victor A. P. Magri
fc49a5ec6b
Add CUDA support to dense direct solver options (#950)
This PR adds CUDA support to dense direct solver options (98, 99, 198, and 199) of BoomerAMG and MGR:
  - Options 98 and 99 compute the LU factorization with pivoting.
  - Options 198 and 199 compute the dense inverse matrix explicitly.

Detailed list of changes below:

* Add hypre_ParCSRMatrixToCSRMatrixAll_v2
* Add hypre_SeqVectorMigrate
* Add hypre_ParVectorToVectorAll_v2
* Refactor implementation of BoomerAMG's Gaussian Elimination
* Add hypre_GaussElimAllSetup and hypre_GaussElimAllSolve
* Add device support via MAGMA and cuSOLVER to BoomerAMG's LU coarsest linear solver (options 98, 99)
* Add device support via MAGMA and cuSOLVER to BoomerAMG's exact inverse solver (options 198, 199)
* Add wrappers to MAGMA's getrf and getrs
* Add MAGMA info on AMG stats + code formatting
* Add wrappers to cuSOLVER and cuBLAS functions
* Add wrapper hypre_magma_getri_nb
* Add header file for collecting hypre functors
* Add memory location to Gaussian elimination data structure
* Improve description of coarsest level solver options
* Update GE data structure in MGR
* Change Ainv to Awork
2023-10-08 11:39:50 -04:00
Victor A. P. Magri
dcd6468ae4
Fix regression tests (#979)
Initialize `P_max_elmts` if not set by user.
2023-10-04 10:16:20 -04:00
Victor A. P. Magri
8b7e65a231
Add HYPRE_MGRSetLevelPMaxElmts (#975)
Also adds its private interface, and accompanying code (#975)
2023-10-03 06:51:04 -04:00
Wayne Mitchell
27b8471742
Doc updates (#974)
* Updated documentation for clarity and to clean up a few typos.
* Add warning messages to FEI,  ParaSails, PILUT, Euclid.
* Improved and updated GPU information
* Added CMake build information
2023-09-28 18:43:53 -07:00
Victor A. P. Magri
57862ef6e2
Add HYPRE_GetExecutionPolicyName (#969)
* Add HYPRE_GetExecutionPolicyName
* Add doc entries to memory/execution routines
2023-09-22 16:02:53 -04:00
Victor A. P. Magri
593fe4cba7
Apply Debian patches (#966)
1. Fix make checkpar
2. Add missing `finalizeAllTimings
3. Add error code support to checktest.sh

---------

Co-authored-by: Drew Parsons <dparsons@debian.org>
2023-09-22 14:41:40 -04:00
Rui Peng Li
36ab29ba09
L1 HSGS (#927)
This PR provides a convergent l1-hybrid symmetric Gauss-Seidel (HSGS) method.
2023-09-05 12:44:05 -07:00
tisaac
cd8f9c363e
Keep smooth_num_levels in sync with amg_data (#954)
This solves an out-of-bounds memory error during `hypre_BoomerAMGSetup` when called multiple times without a call to `hypre_BoomerAMGDestroy` interleaved. This pull request makes sure that `smooth_num_levels` is reset to `hypre_ParAMGDataSmoothNumLevels(amg_data)` before the smoothers variable is allocated.
2023-09-05 15:29:30 -04:00
Victor A. P. Magri
0e43aec1d4
Add Binary I/O functions for IJ matrices and vectors (#826)
This PR adds new Print and Read functions for matrices and vectors to be stored/read in binary format. A detailed list of changes is given below:

* Add IJMatrix/ParCSRMatrix routines for binary I/O
* Add IJVector/ParVector routines for binary I/O
* Add typedefs for unsigned integer types and single-precision floating-point
* Change char sizes to HYPRE_MAX_FILE_NAME_LEN
* Add options to IJ driver for reading binary matrices/vectors
* Add regression tests for IJ input/output
2023-08-27 20:10:55 -04:00
Victor A. P. Magri
b372b31a11
Change sh to bash (#900)
Change shell scripts from `#!/bin/sh` to `#!/bin/bash`
2023-08-16 20:09:43 -04:00
Victor A. P. Magri
03b9d3d090
Fix Copyright message (#951)
Fix year in Copyright message of a few source files.
2023-07-20 21:27:37 -04:00
Victor A. P. Magri
9449cb919e
Add MAGMA option to FSAI (#940)
Allow the use of MAGMA as local linear solver for FSAI.
Add `HYPRE_FSAISetLocalSolveType` for choosing the local linear solve type used in FSAI and add `HYPRE_BoomerAMGSetFSAILocalSolveType` for the case when FSAI is used as a smoother to BoomerAMG.
2023-07-20 19:19:20 -04:00
Victor A. P. Magri
31e3bf3b06
Add FSAI support with CUDA and HIP (#739)
This PR adds CUDA and HIP support to FSAI according to a static pattern generation algorithm. The resulting method can also be used as a preconditioner for BoomerAMG. A detailed list of changes is given below:

* Add par_fsai_device.c 
* Add hypre_FSAIApply
* Add function to dump local linear systems in dense format
* Implement static FSAI pattern computation via powers of A
* Improve filtering of candidate pattern
* Improve local linear systems extraction
* Add option for a 125pt matrix (27pt squared)
* Add options to control sizes of the memory pools with umpire
* Add hypre_GpuProfiling calls
* Improve candidate pattern truncation times
* Add max_nnz_row member and its private and public functions to FSAI
* Use max_nnz_row in FSAISetupDevice
* Add num_levels member and its private and public functions to FSAI
* Add threshold member and its public/private functions to FSAI
* Expose FSAI algorithm type to BoomerAMG
* Expose options to control FSAI setup
* Add cuSOLVER variables and calls
* Add batched dense linear solver calls to FSAI
* Improve execution time for generating random numbers
* Show FSAI parameters when amg_print_level >= 1
* Improve output of FSAIPrintStats 
* Implement warp calls
* Add hypre_mask type and hypre_ballot_sync wrapper function
* Add hypre_popc and hypre_ffs wrapper functions
* Implement warp_allreduce_max calls
* Change: hypreDevice -> hypre_*Device
* Add rocSOLVER calls
* Apply astyle
* Remove redundant line
2023-07-20 12:34:53 -04:00
Victor A. P. Magri
7df4f63377
Improve ILU documentation (#939)
Add warnings for Euclid and PILUT redirecting users to hypre-ILU.
Rewrite hypre-ILU overview section.
Add new sections to hypre-ILU documentation: "User-level functions", "ILU as smoother for BoomerAMG", and "GPU support".
Include info about new iterative ILU options.
Update BoomerAMG complex smoothers section.
Change name "hypre-ILU" to "ILU"
2023-07-17 13:43:57 -04:00
adam-sim-dev
64604ec075
Fix typo in krylov solvers comments (#938) 2023-06-24 08:47:02 -04:00
Rob Falgout
09d4bd8849
Update mac autotest to use a tolerance when diffing residual norms (#926) 2023-06-23 10:42:28 -07:00
Rob Falgout
8f6bdc6ab8
Release 2.29.0 (#936) 2023-06-23 05:01:41 -07:00
Victor A. P. Magri
5e0bf05b42
Fax valgrind issue in AIR (#930) 2023-06-20 15:52:18 -04:00
Victor A. P. Magri
64ce05b405
Offd num cols fix (#901)
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>
2023-06-19 20:18:26 -04:00
Victor A. P. Magri
a39cecc555
Fix compilation error (#929)
This PR fixes a compilation error that arises in PETSc when hypre is used
2023-06-17 22:21:37 -04:00
Victor A. P. Magri
18b98805ba
Extend ILU support to AMD GPUs (#877)
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>
2023-06-15 20:10:52 -04:00
Rui Peng Li
72f5f3e136
Cuda versions (#879)
This PR adds support and regression tests for all the versions from CUDA 9.0 to 12.0.
2023-06-15 06:26:12 -07:00
Rui Peng Li
7d1d9ca95c
ame/ams to use Jacobi on GPUs (#924)
This PR updates the ams driver to use Jacobi smoothers on GPUs.
2023-06-14 13:25:59 -07:00
Victor A. P. Magri
f02bc17bbd
Fix device build (#925)
This PR removes a call to hypre_error_w_msg inside two GPU lambdas and fixes the device build.
2023-06-14 11:07:13 -04:00
Rob Falgout
f478498295
New error handling feature to print messages to memory (#920)
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.
2023-06-13 20:17:25 -07:00
Rob Falgout
f3e8fb852f
Fix warning messages about set-but-not-used variables (#923)
Fixed warning messages about set-but-not-used variables and ran astyle
2023-06-13 13:20:56 -07:00
Wayne Mitchell
2794aa3b28
SYCL MGR, AMS, AIR, etc. (#904)
This PR enables more functionality with sycl:
MGR
AMS/ADS/AME
AIR restriction
2023-06-12 14:03:52 -07:00
Victor A. P. Magri
48d13c6e28
Add MAGMA support (#868)
* Add MAGMA support to autotools build
* Add MAGMA interface files
* Call MAGMA init/finalize interfaces
* Add MAGMA support to CMake build
2023-06-11 23:17:22 -04:00
Victor A. P. Magri
80bf97e8a2
Check whether CF_marker exists before using it (#918)
This PR implements a check on whether CF_marker exists before using it.
2023-06-09 11:37:09 -04:00
Victor A. P. Magri
f45de31a3d
Fix exact block inversion with HIP in MGR
Fix cublasHandle -> vendorSolverHandle
2023-06-05 18:04:27 -04:00
Victor A. P. Magri
f7850206cd
Extend exact block inversion to HIP via batched solvers (#913)
This PR adds HIP support to exact block inversion in MGR via rocSOLVER's batched routines.
2023-06-05 14:04:44 -04:00
Victor A. P. Magri
bd1073ad70
MGR non-UVM device support (#906)
Allow MGR to work without UVM in device runs
2023-06-02 17:40:18 -04:00
Wayne Mitchell
7ff7f2f60d
oneDPL fixes and Sunspot regressions (#905)
Fixes needed due to recent changes with oneDPL.
Move regression testing of sycl build to sunspot.
2023-05-30 10:23:01 -07:00
Victor A. P. Magri
37bd6071fc
Fix SetInitialized/Finalized position (#912)
This PR fixes the positions of the hypre_SetInitialized and hypre_SetFinalized calls
2023-05-26 17:20:37 -04:00
Victor A. P. Magri
2b2e9d2eee
Update comment about HYPRE_BoomerAMGSetGridRelaxPoints (#908)
The function HYPRE_BoomerAMGSetGridRelaxPoints is particularly useful for AIR. Thus, it should not be phased out.
2023-05-19 14:53:03 -04:00
Rui Peng Li
ec86992c4b
Cuda12 (#871)
This PR adds the support for CUDA 12.
2023-05-17 20:01:41 -07:00
Victor A. P. Magri
8b39b73a52
Fixes for Rocm 5.4.3 (#902)
* 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
2023-05-11 09:05:26 -04:00
Victor A. P. Magri
412a6b1a48
Update sanity checks (#903)
This fixes issue #883
2023-05-10 18:45:16 -04:00
Victor A. P. Magri
6ac5d7d0c8
Remove deprecated warning from Init (#899)
When using HYPRE_Init, the compiler no longer gives a deprecated function warning message.
2023-05-08 10:25:07 -04:00
Victor A. P. Magri
fbfc271cfa
Remove deprecated warning from Init (#899)
When using HYPRE_Init, the compiler no longer gives a deprecated function warning message.
2023-05-08 10:24:32 -04:00
Victor A. P. Magri
991f2e15eb
Fix memory leak on BoomerAMG complex smoothers (#890)
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.
2023-05-04 10:59:02 -04:00
Victor A. P. Magri
dc487086b4
Add HYPRE_Initialized and HYPRE_Finalized (#889)
* 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
2023-05-04 10:42:40 -04:00
Victor A. P. Magri
cfb3ae4e32
Update HYPRE_WARP_FULL_MASK for HIP builds (#895)
* 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
2023-05-03 06:44:45 -04:00
adam-sim-dev
e351324df8
Fix the comments (#892)
This PR fixes comments in testij.c
2023-05-02 08:37:43 -07:00