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.
* 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.
This PR adds hypre_ParCSRMatrixDiagScale for computing left and right parallel matrix scaling. The function also works when one of the scaling factors, which are stored as vectors, are not present. Regression tests have been added for this new function.
Introduce new AddFEMBoxValues() routines to improve system setup time when using the SStruct finite element interface. This initial implementation can produce significant speedups, but there is room for future optimizations.
Co-authored-by: Victor A. P. Magri <paludettomag1@llnl.gov>
This PR adds the function hypre_IntArrayCount for counting the number of occurrences of a value in a hypre_IntArray. Also, it moves device methods to a new file int_array_device.c.
Co-authored-by: Wayne Mitchell <mitchell82@llnl.gov>
This PR cleans the code for the warning Wstrict-prototypes. This flag was also added to the debug build of machine-tux.
Co-authored-by: Pierre Jolivet <pierre@joliv.et>
This PR adds two new search paths for the NVIDIA math libraries (cuSPARSE, cuBLAS, cuSOLVER). This fixes build issues on Polaris and Perlmutter.
* Add two new search paths for the NVIDIA math libs to configure
* Turn off CUDA math libs when CUDA is disabled
This PR fixes a few variable types inconsistencies arisen from the mixedint build. Additionally, it fixes the CUDA-11.1.1 build.
* Fix cuSPARSE version tag for using generic SpMM and new SpMV algorithms
* Bug fixes on hypre_ILU: S_row_starts computation and m -> big_m
* Bug fix: HYPRE_MPI_REAL -> HYPRE_MPI_COMPLEX
* Bug fix: HYPRE_Int -> HYPRE_BigInt
* Bug fix: HYPRE_MPI_INT -> HYPRE_MPI_BIG_INT
Co-authored-by: TotoGaz <49004943+TotoGaz@users.noreply.github.com>
* added changes required for the new AMG benchmark, including a new routine that returns wall clock time and some new parameters which generate cumulative numbers of nonzeros for A, coarse grid and prolongation operators in AMG
Several bug fixes and small changes for the sycl build. Addition of full regression testing on florentia with consistent and correct results for struct and ij tests with sycl backend.
This PR modifies hypre_ParCSRMatrixGenerateFFFC to act as a wrapper between the host and device implementations. Consequently, hypre_ParCSRMatrixGenerateFFFCHost has been added.
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
* Fixing the FEI interface to SuperLU_Dist. This uses the same structs
as src/parcsr_ls/dsuperlu.c.
* Updates to the CMake build system and other spots to support SuperLU_Dist, SuperLU, and the FEI.
Some Windows build bits.
* Reverting this change, it's just in the comments.
* Changes from Tim Dunn's FEI branch (feature/dunn13/tad220914-fei).
This prevents the solver from exiting out with a failure even though
the initial guess is the solution. There is also a fix to prevent a
floating point exception.
* Removing this #ifndef, as it is no longer necessary for our Windows build.
* Only enable CXX if building the FEI.
This PR updates hypre_device_allocator to use hypre's abstract memory model. This means that:
hypre configured with unified memory support: those allocations will be on managed memory.
hypre configured without unified memory support: those allocations will be on device memory.
This PR enables 2-stage GS relaxation to work properly with multi-component vectors.
* some optimizations to get 2-stage GS working faster
* Update loop unrolling at DiagScaleVector2
* computeY is a template argument now
Co-authored-by: Paul Mullowney <Paul.Mullowney@nrel.gov>
This PR adds a new variable in `HYPRE_config.h` for naming the hypre's branch currently in use. Internal drivers have been updated to use this variable
* Add HYPRE_BRANCH_NAME to Makefile and cmake builds
* Run config/update.sh
* Ignore files generated by cmake in the cmbuild folder
* Update drivers
* Update regression tests
This PR enables the use of Krylov methods for solving linear systems with multi-component vectors. Regression tests have been added on src/test/TEST_ij/vector.sh. Additionally, hypre_ParCSRDiagScaleVector and hypreDevice_DiagScaleVector have been extended to work with multi-component vectors.
* Small changes to support multi-component Krylov algorithms. This seems to work with GMRES.
* Extend hypre_ParCSRDiagScaleVector to multicomponent vectors
* Extend hypreDevice_DiagScaleVector to multicomponent vectors
* Test Krylov solvers support for multi-component vectors
* Update result for the final residual norm (Tux)
* Add hypreGPUKernel_CSRMatvecShuffleGT8 and update hypreDevice_CSRMatrixMatvec with new kernel dispatching strategy
* Add number of matvecs as a command line option for the IJ driver
* Add vector.saved.lassen and vector.saved.arcticus files
* Run astyle
Co-authored-by: Paul Mullowney <Paul.Mullowney@nrel.gov>
Co-authored-by: Wayne Mitchell <mitchell82@llnl.gov>
This PR adds "runtime switch" feature to the solvers in hypre.
Co-authored-by: Victor A. P. Magri <paludettomag1@llnl.gov>
Co-authored-by: Wayne Mitchell <mitchell82@llnl.gov>
This avoid an #include issue with newer C++ compilers.
Co-authored-by: Paul T. Bauman <ptbauman@gmail.com>
Co-authored-by: Rob Falgout <rfalgout@llnl.gov>
* Add device functions to perform strided copy
* Extend BoomerAMG with L1-Jac to vectors with multiple components
* Add ParVectorSetLocalSize calls to MGR
* Extend hypre_ParCSRCommPkg with a new member (num_components) that allows communicating several vector components at once.
* Add hypre_ParCSRCommPkgCreateAndFill for allocating and filling a communication package with its data.
* Improve parallel SpMV performance for vectors with multiple components
Co-authored-by: Wayne Mitchell <mitchell82@llnl.gov>
This is part of a series of PRs for enabling BoomerAMG to be applied to vectors with multiple components.
* Extend hypre's SpMV on CUDA to multivectors and add calls to cusparse's SpMM.
* Add loop unrolling to hypre's SpMV on CPUs when using multivectors with less than 5 components.
* Add HYPRE_SPMV_FILL variables to hypre's SpMV on GPUs
* Add SYCL changes to SpMV
Co-authored-by: Wayne Mitchell <mitchell82@llnl.gov>
* This commit adds the public and internal APIs for doing jacobi approximation to iterative triangular solve. At the moment, this code simply sets parameters for the ILU classes.
* Fixing defaults, docs, and comments.
Co-authored-by: Paul Mullowney <Paul.Mullowney@nrel.gov>
* Add new device functions needed by multivectors (`hypreDevice_IntStridedCopy` and `hypreDevice_IVAMXPMY`)
* Extend `hypre_SeqVectorElmdivpy` to work with multivectors.
Ports some missing routines to allow the IJ driver to run without unified memory with the sycl backend:
IJ vector set/add values and assembly
Routines in par_coarse_parms_device.c
hypre_ParCSRComputeL1Norms()
This PR enables Set/AddTo/GetValues for multivectors through the IJ interface. It also adds regression tests for the new functionalities (TEST_ij/vector) and the HYPRE_IJVectorInnerProd function
This adds sycl support for interpolation optionsExtInterp, ExtPIInterp,
and ExtPEInterp (which correspond to InterpType 6, 14, 16, 17, 18).
Generation of the strength matrix is also ported to sycl.
Further unification of cuda/hip/sycl kernel functions.
Adds regression tests for the sycl backend on arcticus including both ij and struct tests.