[petsc-users] Fail to install petsc4py with CUDA

Satish Balay balay.anl at fastmail.org
Thu Nov 14 14:27:56 CST 2024


This issue is also posted at https://urldefense.us/v3/__https://gitlab.com/petsc/petsc/-/issues/1672__;!!G_uCfscf7eWS!Y0YGMtJ1zE_1JyNSpmN0S6SSGzQrjzQt9diycTWSwIjBjne7KZKf1UK0SguHuz-MHWJB5z8otU7tmRb5zkw3wwcn2Yo$ 

Lets continue follow-up on the issue tracker - not the mailing list.

Satish

On Thu, 14 Nov 2024, Li, Weichao wrote:

> 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
> 
> 
> 



More information about the petsc-users mailing list