Commit Graph

57 Commits

Author SHA1 Message Date
adam-sim-dev
64604ec075
Fix typo in krylov solvers comments (#938) 2023-06-24 08:47:02 -04: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
b08a962924
Fix comparisons between HYPRE_Real and HYPRE_Complex (#880)
This fixes the machine-tux regression failures from 04/12/23
2023-04-12 14:04:18 -04:00
Victor A. P. Magri
461b6eee60
New features for MGR (#817)
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
2023-04-11 15:34:12 -04:00
Daniel Osei-Kuffuor
065613399b
Fix floating point conversion warnings (#827)
* Updated gcc compiler flags for strict-checking build option to throw floating point conversion warnings
* Several minor edits to clean up floating point conversion warnings and minor bugs.  
* Updated saved files to reflect changes.
2023-02-06 13:53:14 -08:00
Daniel Osei-Kuffuor
2b1dd32d10
Direct frelax solve (#805)
* Added new options to use GE for F-relaxation
* Updated documentation to include new options.
2023-01-02 03:03:38 -08:00
Victor A. Paludetto Magri
c886ad9f71
MGR - HIP support (#719)
This PR adds HIP support to MGR. Additionally:

* Add sanity checks at Setup and Solve functions
* Fix a bug in the computation of P_FF on MGR when using GPUs.
* Enable AMG level profiling with HIP
* Enable ROCTX regions in the IJ driver
2022-11-02 10:54:59 -04:00
Victor A. Paludetto Magri
ce3ecb0daf
[Multivec 4/5]: BoomerAMG partially supports vector with multiple components (#695)
* Extend BoomerAMG with L1-Jacobi to vector with multiple components.
* Add ParVectorSetLocalSize calls to MGR.
2022-08-11 16:21:31 -04:00
Daniel Osei-Kuffuor
00d1dfd3f7
Mgr block jacobi (#607)
* Added new capabilities to allow multilevel assignment of solver options
* New (local) block Jacobi option for smoothers and intergrid operators
* Added capabilities to do CPR in MGR
* Updated non-Galerkin strategy for constructing the coarse grid.

Co-authored-by: Quan Bui <mquan.bui@gmail.com>
2022-05-09 08:30:05 -07:00
Victor A. Paludetto Magri
e16167fe46
Fix copyright (#615)
This PR updates Copyright headers from "Copyright 1998-2019 ..." to "Copyright (c) 1998 ..."
2022-04-05 16:19:51 -07:00
Quan Bui
734a10fcb7
Mgr setup gpu (#400)
Enable GPU setup for MGR solver.
* Added device specific functionality for interpolation
* Made device and host calls to interpolation consistent
* Edited IJ driver to use GPU capable options for MGR
* Updated saved files for new GPU options
* Updated CMakeLists to support new MGR capabilities

Co-authored-by: Ruipeng Li <li50@llnl.gov>
Co-authored-by: Daniel Osei-Kuffuor <oseikuffuor1@llnl.gov>
2022-02-07 15:54:52 -08:00
Rob Falgout
805ee77be8
Adding source file indentation with astyle (#498)
This PR adds automatic indentation using Artistic Style (astyle).  The script config/astyle-apply.sh runs the indentation using the configuration file config/astylerc.  The script also runs headers in all of the directories that automatically generate internal _hypre_*.h header files.  Much of this was borrowed from the MFEM project.  A pre-commit git hook was also added.
2021-11-08 19:26:59 -08:00
Wayne Mitchell
001d4fe2c7
Add hypre_IntArray (#434)
This PR adds the hypre_IntArray data structure, which wraps HYPRE_Int* and includes
memory location and size information. The CFMarker and DofFunc arrays in BoomerAMG
are wrapped with hypre_IntArray, and their default location is moved to the device when 
using GPU acceleration, avoiding some copies between host and device.
2021-09-14 14:55:47 -07:00
Daniel Osei-Kuffuor
c272f6980c
Fix MGR setup on GPU and MGR bugfixes. (#260)
This PR addresses initial changes necessary to perform MGR setup on GPUs. It also fixes a bug in the iterative use of AMG for F-relaxation, adds options to print statistics of the F-relaxation solver (for the V-cycle smoother), and places the diagonal of a transposed square matrix as the first element in the row. This last change required a couple minor changes to the saved files.
2021-05-10 13:19:34 -07:00
Daniel Osei-Kuffuor
7c663ef6cf Fixes for check-header errors. 2020-08-16 22:10:17 -07:00
Quan Bui
4431a4acd7 Minor clean up. 2020-07-30 06:39:30 -07:00
Quan Bui
079e99515f First implementation of direct solver option for coarse grid solve in MGR. 2020-07-30 06:21:26 -07:00
Victor A. P. Magri
d8a270c3fa Merge branch 'master' into fix-caliper 2020-07-18 23:44:21 -07:00
Victor A. P. Magri
d2c4df7f6f Annotate MGR 2020-07-17 13:57:33 -07:00
Quan Bui
105dae6b97 - Change option for using full AMG V-cycle for F-relaxation from 99 -> 2
- Put in temporary fix to disable threading in MGR for get sub-block of a matrix
and build interpolation operator.

- Rename function to build A_FF block.
2020-07-02 18:13:56 -07:00
Quan Bui
96cd74c43b - Set tolerance of global smoother, F-relaxation,
and coarse grid solvers to 0 to avoid non-convergence error return.

- Fixed hard-coded number of blocks option for non-Galerkin coarse grid computation.
2020-07-02 09:04:53 -07:00
liruipeng
55475ea61f changed function arg `l1_norms' back to HYPRE_Real * 2020-03-27 21:53:15 -07:00
Ruipeng Li
0f20a71d72 fix after pull in master 2020-02-27 14:41:19 -08:00
Ruipeng Li
f491d130f1 Merge branch 'master' of https://github.com/hypre-space/hypre into amg-setup
Conflicts:
	src/IJ_mv/HYPRE_IJ_mv.h
	src/parcsr_ls/HYPRE_parcsr_ls.h
	src/parcsr_ls/_hypre_parcsr_ls.h
	src/parcsr_ls/par_amg.h
	src/parcsr_ls/par_amg_setup.c
	src/parcsr_ls/par_coarsen.c
	src/parcsr_ls/par_cycle.c
	src/parcsr_ls/par_interp.c
	src/parcsr_ls/par_mgr.h
	src/parcsr_ls/par_mgr_setup.c
	src/parcsr_ls/par_mgr_solve.c
	src/parcsr_ls/par_strength.c
	src/parcsr_mv/par_csr_matrix.c
	src/test/ij.c
2020-02-27 14:41:09 -08:00
Ruipeng Li
60101610dc 1. put l1-norms inside container hypre_vector 2. code restructure 2020-02-06 13:56:03 -08:00
Daniel Osei-Kuffuor
776122b97f Passes GPU regression test 2020-01-07 07:56:46 -08:00
Quan Bui
2191feedb9 - Add the option to reduce the reserved Cpoints after a specified level.
- Remove building A_ff matrix if an external F-relaxation solver is given.
2019-10-31 17:01:41 -07:00
Daniel Osei-Kuffuor
9a621e346d Edits to cleanup build warnings 2019-10-21 14:08:47 -07:00
Daniel Osei-Kuffuor
6e96511493 Merge branch 'master' into mgr-dev 2019-07-23 22:52:39 -07:00
Rob Falgout
48c9f0b972 Changed all of the headers 2019-07-07 19:26:24 -07:00
Daniel Osei-Kuffuor
e4e2560bf9 Merged BigInt changes and minor cleanup of unused variables 2019-06-10 14:22:44 -07:00
Daniel Osei-Kuffuor
62fcc11b14 Merge branch 'mgr-dev' of github.com:hypre-space/hypre into mgr-dev 2019-06-03 13:54:06 -07:00
Daniel Osei-Kuffuor
b00f87412b Merged changes to use hypre ILU and approximate inverse smoothers and interpolation operators 2019-06-03 13:48:50 -07:00
Quan Bui
80aa9dba93 Merge with orgin/mgr-dev. Add non-Galerkin coarse grid option.
Also add approximate inverse for building interpolation and coarse grid.
2019-04-16 17:40:03 -07:00
Daniel Osei-Kuffuor
8fcad73a88 Fixed bug for multilevel with vcycle smoother 2019-03-12 13:08:38 -07:00
Daniel Osei-Kuffuor
6b32feb050 Some minor bug fixes and code cleanup. 2019-01-24 17:33:45 -08:00
Quan Bui
53087be588 Changes made in this version include
- Added block Gauss-Seidel relaxation and change the function name
  from 'hypre_block_jacobi' to 'hypre_blockRelax_solve'.
- Remove 'last_level' argument from hypre_MGRBuildInterp. Now users
  can specify the interpolation type at all levels.
- Fixed some memory leaks when using full AMG for F-relaxation.
2018-12-12 14:08:41 -08:00
Daniel Osei-Kuffuor
ea047fdf45 Fixed misleading indentation. 2018-10-24 11:58:13 -07:00
Rob Falgout
236c420abd Fixed misleading indentation and boolean-use warnings from gcc v6+ 2018-10-18 13:12:11 -07:00
Quan Bui
89a35de555 Make functions that set parameters for MGR more consistent. Fixed some memory leaks. 2018-10-16 17:01:34 -07:00
Quan Bui
5735f51920 Put back option for doing a full AMG V-cycle for F-relaxation for testing purposes. 2018-10-11 18:18:43 -07:00
Quan Bui
6d087582a9 Fixed the routine building the strength connection matrix for a sub-matrix block. The previous version does not account for the off diagonal part. 2018-10-10 14:55:28 -07:00
Quan Bui
574fc2a9ac Do some clean up and fix indentation to make the
code more readable. We use 2 spaces (not tab) for indentation.
2018-09-18 14:37:51 -07:00
Quan Bui
a7bc1f9b31 Changes for this update include:
- Allow for different interpolation and restriction options for each MGR level.
- Add the number of functions for the Frelax V-cycle.
- Fixed a bug for Frelax V-cycle when used as a preconditioner. The RHS should
  be obtained from the Solve phase, not the Setup phase.
- Optimize sparsity pattern of interpolation operator. Injection does not need
  non-zero mapping for zero block.
- Set some default values for using AMG for F-relaxation to prevent crashes.
2018-09-18 13:19:39 -07:00
Quan Bui
142dd59125 This update contains the following changes:
- New interface for setting C-F splitting for
matrices with block structure, i.e., the same variables
are ordered contiguously (s_1,s_2,...,s_n,p_1,p_2,...,p_n,...)
- Allow different methods for F-relaxation at different levels.
- Added a test file for MGR to test flow matrices coming from
geocentric.
2018-08-22 10:22:39 -07:00
Daniel Osei-Kuffuor
8829a27315 Added AIR option for restriction 2018-05-09 14:52:49 -07:00
Daniel Osei-Kuffuor
74d90b74d4 Modified to change print_level option for printing MGR solver paramenters 2018-02-20 14:14:18 -08:00
Daniel Osei-Kuffuor
1d38dd6772 Code cleanup to remove regression test failures 2018-02-15 14:07:21 -08:00
Daniel Osei-Kuffuor
28e3df86df Some bug fixes and added a few more options to MGR solver 2018-02-12 10:37:23 -08:00
Rob Falgout
c425c897ec Fixed some error messages and modified MGR interface for consistency with other solvers 2017-10-19 11:50:56 -07:00