* Fixed a corner-case divide-by-zero in PFMG (see github issue #332)
- The 'mean' computed in PFMG can be zero, so don't divide by it.
- Reduced the size of the dxyz values to avoid an underflow.
- Added comments to better explain this part of the code.
- Added regression tests to check 3D problems that have all of the coefficients
zeroed out in one dimension (so they are basically 2D).
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.
The main objective of this PR is to improve the support of matrices with a large number of zero rows in hypre. More specifically:
* Improve IJMatrixAssemble for matrices with a large number of zero rows.
* Add hypre_AuxParCSRMatrixSetRownnz to build array of nonzero rows in the auxiliary matrix. This saves allocation time for building ParCSRMatrices.
* Improve (Par)CSRMatrix transpose, addition and multiplication operations for matrices with a large number of zero rows.
Secondary changes made in this PR are:
* Update SpMV paths in `csr_matvec` in order to make the calculation of A*x more concise.
* Extend OpenMP support to hypre_CSRMatrixSumElts, hypre_CSRMatrixFnorm and hypre_CSRMatrixReorder.
* Clean gcc-9 warnings
* Update saved files and delete unused variable
Co-authored-by: Ruipeng Li <li50@llnl.gov>
When building the colmap array for prolongation operators that contain a high number of nonzero coefficients living in P_offd, see hypre_build_interp_colmap, the code will make P_offd_size * num_cols_P_offd comparisons, and this can be very high depending on the test case. This PR eliminates such code path and uses a hash table to accomplish the same purpose, thus lowering the algorithmic complexity.
This PR (@pbauman #329) addresses #309, which allows each `hypre_csrmatrix` has a GPU matrix descriptor.
Co-authored-by: Paul T. Bauman <ptbauman@gmail.com>
* Rewrote strength matrix generation for nodal > 0, since it was faulty. This also also fixed a bug that occurred when using hopscotch.
* Added new option HYPRE_BoomerAMGSetKeepSameSign, which keeps values in S if they are of the same sign as the diagonal for nodal > 0.
This option does not affect nodal = 0.
* fixed a bug accidentally introduced in standard interpolation
* removed option to set SCommPkgSwitch, which allowed to reduce communication for strength matrix, but was not working properly. This included removing occurrences of col_offd_S_to_A etc
* included capability to deal with systems of PDEs in MM interpolation operators, except for 2s-MM-ext
* updated saved files
* added regression tests and modified elasticity regression tests
This PR removes GPU device binding in HYPRE_Init() which is now moved into test drivers. It also fixes the issue with Umpire when using non-default device (device id \neq 0)
This PR (by @pbauman #292 ) takes instances of #if defined(HYPRE_USING_CUDA) || defined(HYPRE_USING_DEVICE_OPENMP) and changes them to #if defined(HYPRE_USING_GPU).
Co-authored-by: Paul T. Bauman <ptbauman@gmail.com>
The previous -rhsone option on tests 80-95 resulted in CG solving the problem exactly in 4 or 5 iterations. This required the code to be bitwise accurate to pass the tests, which is not reasonable here. The new cosine-based rhs produces more typical convergence for CG on a Laplacian problem.
This PR separates the jobs that break with --enable-mixedint (CGC, ParaSail, Euclid) from regular job scripts, so regression tests can selectively run jobs with --enable-mixedint. The new runtests<-option> files contain a list of tests for the runtest.sh
script that can be run by passing <-option> to the 'run.sh' autotest script. This should enable more flexibility for building regression test suites.
We should also revisit the notes pointed out by @rfalgout at some point.
Co-authored-by: Rob Falgout <rfalgout@llnl.gov>
The 'memory.h' header file is not standard ISO C, but it is standard C++. Apparently, some C compilers may accidentally find a C++ version of this file and cause compile problems. See issue #274 .
In this PR, we removed the dependency of UVM when building with CUDA for the SStruct solvers, and added a "memory tracker" to help debugging memory leak or misuse.
This PR adds GPU-support to hypre's examples. A new `Makefile_gpu` is provided in `src/examples` as an sample makefile, so one can compile the examples with make -f Makefile_gpu if hypre has been built with GPUs.
This pull request adds a -save <ext> feature to the runtest.sh script to allow testing against different saved files on different platforms such as GPU machines. See Issue #255. A few additional things were done:
- All of the checks against the saved files were moved out of the individual tests and into runtest.sh.
- The output-file sanity checks that are in many of the tests were modified so they no longer depend on the saved files. Several issues were also uncovered and fixed.
This PR contains the support of UMPIRE pooling allocators for host and GPU memory. Configure hypre with --with-umpire, device and uvm allocations and deallocations are done with umpire, whereas host pool is not enabled by default. This PR also includes some other minor changes:
Adding .gitignore to the repo
Removing all malloc/calloc/realloc/free and regression testing on finding them
No longer compile ij.c with C++ compiler. It goes back to a C code now.
Introducing HYPRE_USING_GPU, which is equivalent to HYPRE_USING_CUDA || HYPRE_USING_DEVICE_OPENMP
Adding a few user-level interfaces: HYPRE_SetMemoryLocation, HYPRE_SetExecutionPolicy, HYPRE_SetGPUMemoryPoolSize and HYPRE_CSRMatrixSetSpGemmUseCusparse
Co-authored-by: li50@llnl.gov <liruipengblue@gmail.com>
Co-authored-by: Rob Falgout <rfalgout@llnl.gov>
Co-authored-by: Ruipeng Li <li50@llnl.gov>
This PR adds HYPRE_WARP_BITSHIFT macro, which will allow us to hide instances of '>> 5' for forthcoming HIP changes that will need a bit shift of 6 rather than 5. This PR was copied from #265 by @pbauman
Co-authored-by: Paul T. Bauman <ptbauman@gmail.com>
* This commit has CUDA based smoothers for AMG based on the triangular parts of sparse matrices. This includes an Gauss-Seidel (relax_type==3), which uses CUSPARSE triangular solvers to invert L. Symmetric Gauss Seidel is implemented in relax_type==6 also via CUSPARSE. Finally, 2 new smoothers are added. THe first is a 2 stage approximation to Gauss Seidel using a parallel MatVec and L (relax_type==11). The second (relax_type==12) is a less effective version of 11. It uses A_diag instead of L for the smoothing. CPU implementations of these new smoothers are also provided. For the two stage algorithms, L and U are NOT explicitly created. This seems faster and saves memory. In the two stage preconditioner, multiply by invdiag rather than divide by diagonal reduces register pressure and yields full occupancy.
Co-authored-by: Paul Mullowney <pmullown@nrel.gov>
Co-authored-by: PaulMullowney <60452402+PaulMullowney@users.noreply.github.com>