Add automatic generated fortran support for setting and returning contextsMajor cleanup of the code for setting and returning application (previously called user) contexts - PetscCtx ctx is now t
Add automatic generated fortran support for setting and returning contextsMajor cleanup of the code for setting and returning application (previously called user) contexts - PetscCtx ctx is now the standard for passing in contexts - PetscCtxRt ctx is the standard for passing out contexts, including context destroy routines based on PetscCtxDestroyFnBoth of these are typedef to void*Also removed most use of user and userctx for context arguments now consistently named ctxImproved documentation on PetscCtx and PetscCtxRt and on how to use contexts (including getting them) from Fortran
show more ...
Merge remote-tracking branch 'origin/release'
Fix builds against CUDA 13.1- Fix usage of deprecated thrust:: APIs in CCCL 3.1- Explicitly include "thrust/copy.h" to fix builds w/ CUDA 13.1- configure: use SuperLU_DIST 9.2.1 for CUDA 13.1- C
Fix builds against CUDA 13.1- Fix usage of deprecated thrust:: APIs in CCCL 3.1- Explicitly include "thrust/copy.h" to fix builds w/ CUDA 13.1- configure: use SuperLU_DIST 9.2.1 for CUDA 13.1- CI: update linux-cuda-latest to test with CUDA 13.1
Merge branch 'release'
MatAssemblyEnd(): fix missing space in -info
Fix typos
- Replace MatMissingDiagonal() and MatMarkDiagonals_SeqXXX() with MatGetDiagonalMarkers_SeqXXX() - Mat_SeqXXX->diag is not automatically created during MatAssemblyEnd() saving memory and time
- Replace MatMissingDiagonal() and MatMarkDiagonals_SeqXXX() with MatGetDiagonalMarkers_SeqXXX() - Mat_SeqXXX->diag is not automatically created during MatAssemblyEnd() saving memory and time - Accessing Mat_SeqXXX->diag now requires the use of MatGetDiagonalMarkers_SeqXXX() except when the current values are known to be correct; for example during numerical factorizations and solves - Mat_SeqXXX->diag is now never shared among matrices; hence the free_diag flag is gone. That was always a risky proposition since any of the owning matrices could chang the values thus making them incorrect for other owners.
This MR optimize some MAT[SB]AIJ operations related to the diagonalThe longer term goal is to refactor some Mat_SeqXXX non-numeric code to make it easier to also implement it on GPUs. For example,
This MR optimize some MAT[SB]AIJ operations related to the diagonalThe longer term goal is to refactor some Mat_SeqXXX non-numeric code to make it easier to also implement it on GPUs. For example, MatGetDiagonal() and friendsThis commit- MatMarkDiagonal_SeqAIJ/ELL() - now use change in mat->nonzerostate to determine if it needs to recheck the diagonal locations - sets diagDense flag for a complete diagonal- MatInvertDiagonal_SeqAIJ/ELL() - now uses change in mat->state to determine if diagonal entries and inverses need to be recomputed - name changed to MatInvertDiagonalForSOR_SeqAIJ/ELL() for code clarity- Added MatInvertDiagonal_SeqAIJ_Inode() for use by MatSOR_SeqAIJ_Inode() - now uses change in mat->state to determine if block diagonal entries and inverses need to be recomputed
Change names of Mat_XXX product contexts to MatProductCtx_XXX for code maintainabilityUpdate destroy callback of all MatProductCtx and MatShellSetMatProductOperation() to use PetscCtxDestroyFn
Implements MatGetDiagonal for CUDA to take place on device.Reported-by: Pierre.LEDAC@cea.frThanks-to: Junchao Zhang
Minor fixes to MATXXXAIJCUSPARSE manual pages
MatZeroEntries_SeqAIJCUSPARSE() was zeroing both the CPU and GPU array. Instead just zero the GPU array if it is available, save unneeded CPU operation.
the etags parse got confused by the text Function cxxxx() in a comment in a CU file so remove it
Gather CUDA lib includes in petscdevice_cuda.h + disable cuSPARSE warnings using DISABLE_CUSPARSE_DEPRECATEDDefining DISABLE_CUSPARSE_DEPRECATED is Nvidia's recommended way of disabling cuSPARSE wa
Gather CUDA lib includes in petscdevice_cuda.h + disable cuSPARSE warnings using DISABLE_CUSPARSE_DEPRECATEDDefining DISABLE_CUSPARSE_DEPRECATED is Nvidia's recommended way of disabling cuSPARSE warningsThis avoids requiring -Wdeprecated-declarations - that can mask other (non-cuSPARSE) warnings
Fix compile warningsrc/mat/impls/aij/seq/seqcusparse/aijcusparse.cu: In function ‘PetscErrorCode MatGetCurrentMemType_SeqAIJCUSPARSE(Mat, PetscMemType*)’:src/mat/impls/aij/seq/seqcusparse/aijcuspa
Fix compile warningsrc/mat/impls/aij/seq/seqcusparse/aijcusparse.cu: In function ‘PetscErrorCode MatGetCurrentMemType_SeqAIJCUSPARSE(Mat, PetscMemType*)’:src/mat/impls/aij/seq/seqcusparse/aijcusparse.cu:3979:63: error: unused parameter ‘A’ [-Werror=unused-parameter] 3979 | static PetscErrorCode MatGetCurrentMemType_SeqAIJCUSPARSE(Mat A, PetscMemType *m) | ~~~~^
Make MatGetCurrentMemType first class API
Fix warnings with CUDA 12.9Thanks-to: Lawrence Mitchell <lawrence@wence.uk> CUDAC arch-linux-c-opt/obj/src/mat/impls/aij/seq/seqcusparse/aijcusparse.oIn file included from tmpxft_001e8c9f_0
Fix warnings with CUDA 12.9Thanks-to: Lawrence Mitchell <lawrence@wence.uk> CUDAC arch-linux-c-opt/obj/src/mat/impls/aij/seq/seqcusparse/aijcusparse.oIn file included from tmpxft_001e8c9f_00000000-6_aijcusparse.cudafe1.stub.c:1:/tmp/tmpxft_001e8c9f_00000000-6_aijcusparse.cudafe1.stub.c:182:616: warning: ‘template<class T> struct thrust::THRUST_200802_SM_860_NS::identity’ is deprecated: use cuda::std::identity instead [-Wdeprecated-declarations] 182 | inline namespace CUB_200802_SM_860{ | ^/software/cuda/12.9/include/thrust/functional.h:840:58: note: declared here 840 | struct CCCL_DEPRECATED_BECAUSE("use cuda::std::identity instead") identity | ^~~~~~~~
Mat: rename inode.size and change it to csr format to facilitate parallel computing
Fix wrong case for PETSc
aijcusparse: leverage cusparseSpSV_updateMatrix in cuda-12.1.1When only matrix values have changed, calling cusparseSpSV_updateMatrix() is faster than calling cusparseSpSV_analysis() again.
Merge branch 'jczhang/2025-03-18/revise-aijkokkos-matsolve' into 'main'Add options to do factorization and solve on host for matseqaijkokkosSee merge request petsc/petsc!8209
Mat: change -mat_factor_bind_factorization <host | device> to -pc_factor_mat_factor_on_host <bool>Also add an option -pc_factor_mat_solve_on_host
aijcusparse: change a variable name
Remove dead code/comments
12345678910>>...17