[petsc-users] Fail to install petsc4py with CUDA

Li, Weichao liw23 at rpi.edu
Thu Nov 14 14:21:19 CST 2024


Hi, thanks for your help, I want to use petsc4py with CUDA follow the instructions  from https://urldefense.us/v3/__https://github.com/caidao22/pnode?tab=readme-ov-file__;!!G_uCfscf7eWS!bQq3ISq79y5ZF67ko1BF1T_P37kAaWIzpwJSfJR_K4OWgj3IKF1qIcQiTYBoBWi9zBqQiTWXny2RAjXGkjY$ 

git clone https://urldefense.us/v3/__https://gitlab.com/petsc/petsc.git__;!!G_uCfscf7eWS!bQq3ISq79y5ZF67ko1BF1T_P37kAaWIzpwJSfJR_K4OWgj3IKF1qIcQiTYBoBWi9zBqQiTWXny2RzgYyUHQ$ 
cd petsc
./configure PETSC_ARCH=arch-linux-opt --with-debugging=0 --download-petsc4py

If I do not use CUDA it works, if I use CUDA
./configure PETSC_ARCH=arch-linux-opt --with-debugging=0 --download-petsc4py --with-cuda=1


Then make check, there has some errors and when I run my code get the error. Cannnot import PETSc
correctly. I attach the make.log and configue.log. Thanks.


Traceback (most recent call last):
  File "/opt/dino/share/DINo_parallel_fabric/train.py", line 85, in <module>
    from pnode import petsc_adjoint as odeint
  File "/opt/Dino_parallel/lib/python3.8/site-packages/pnode/__init__.py", line 3, in <module>
    from . import petsc_adjoint
  File "/opt/Dino_parallel/lib/python3.8/site-packages/pnode/petsc_adjoint.py", line 6, in <module>
    from petsc4py import PETSc
  File "/opt/dino/share/DINo_parallel_fabric/petsc/arch-linux-opt/lib/petsc4py/PETSc.py", line 4, in <module>
    PETSc = ImportPETSc(ARCH)
  File "/opt/dino/share/DINo_parallel_fabric/petsc/arch-linux-opt/lib/petsc4py/lib/__init__.py", line 33, in ImportPETSc
    return Import('petsc4py', 'PETSc', path, arch)
  File "/opt/dino/share/DINo_parallel_fabric/petsc/arch-linux-opt/lib/petsc4py/lib/__init__.py", line 100, in Import
    module = import_module(pkg, name, path, arch)
  File "/opt/dino/share/DINo_parallel_fabric/petsc/arch-linux-opt/lib/petsc4py/lib/__init__.py", line 77, in import_module
    module = importlib.util.module_from_spec(spec)
ImportError: /opt/dino/share/DINo_parallel_fabric/petsc/arch-linux-opt/lib/libpetsc.so.3.022: undefined symbol: cusparseSpMV_preprocess, version libcusparse.so.12


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20241114/cd838be3/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: make.log
Type: text/x-log
Size: 169782 bytes
Desc: make.log
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20241114/cd838be3/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: configure.log
Type: text/x-log
Size: 1626964 bytes
Desc: configure.log
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20241114/cd838be3/attachment-0003.bin>


More information about the petsc-users mailing list