<html><head><meta http-equiv="content-type" content="text/html; charset=us-ascii"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><br><div><br><blockquote type="cite"><div>On Sep 10, 2023, at 5:54 AM, Maruthi NH <maruthinh@gmail.com> wrote:</div><br class="Apple-interchange-newline"><div><div dir="ltr"><div>Hi all,</div><div><br></div><div>I am trying to accelerate the linear solver with PETSc GPU backend. For testing I have a simple 1D heat diffusion solver, here are some observations. <br></div><div>1. If I use -pc_type gamg it throws the following error <br></div><div> ** On entry to cusparseCreateCsr() parameter number 5 (csrRowOffsets) had an illegal value: NULL pointer<br><br>[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------<br>[0]PETSC ERROR: GPU error<br>[0]PETSC ERROR: cuSPARSE errorcode 3 (CUSPARSE_STATUS_INVALID_VALUE) : invalid value<br>[0]PETSC ERROR: See <a href="https://petsc.org/release/faq/">https://petsc.org/release/faq/</a> for trouble shooting.<br>[0]PETSC ERROR: Petsc Development GIT revision: v3.19.4-959-g92f1e92e88 GIT Date: 2023-08-13 19:43:04 +0000</div><div><br></div></div></div></blockquote> Can you share the code that triggers this?</div><div><br><blockquote type="cite"><div><div dir="ltr"><div>2. Default pc ilu takes about 1.2 seconds on a single CPU and it takes about 105.9 seconds on a GPU. Similar observations with pc_type asm </div><div>I have NVIDIA RTX A2000 8GB Laptop GPU <br></div></div></div></blockquote><div><br></div> This is expected. The triangular solves sequentialize on the GPU so naturally are extremely slow since they cannot take advantage of the massive parallelism of the GPU.</div><div><br><blockquote type="cite"><div><div dir="ltr"><div><br></div><div>3. What I could be missing? Also, are there any general guidelines for better GPU performance using PETSc? <br></div><div><br></div><div>Regards,</div><div>Maruthi<br></div></div>
</div></blockquote></div><br></body></html>