[petsc-users] dyld: Symbol not found: _MatCreate_MPIAIJViennaCL

Satish Balay balay at mcs.anl.gov
Wed Apr 15 10:58:11 CDT 2020


> Configure Options: --configModules=PETSc.Configure --optionsModule=config.compilerOptions --prefix=/Users/fire/opt/petsc313 --with-zlib --with-viennacl=1 --with-viennacl-dir=/Users/fire/opt/viennacl

I guess you are running viennacl (opencl) on CPU.

please try the attached patch.

cd petsc
patch -Np1 < viennacl.patch

Or use branch balay/viennacl-cpu-check/maint in petsc repo

Satish

On Wed, 15 Apr 2020, huabel via petsc-users wrote:

> Dear Users,
> 
> I’m try to use petsc3.13 with ViennaCL , when I try to run src/vec/vec/tutorials/ex1.c, I get next error,  thanks.
> 
> dyld: Symbol not found: _MatCreate_MPIAIJViennaCL
>   Referenced from: /Users/fire/opt/petsc313/lib/libpetsc.3.13.dylib
>   Expected in: flat namespace
>  in /Users/fire/opt/petsc313/lib/libpetsc.3.13.dylib
> [1]    22602 abort      ./ex1
> 
> ➜  tutorials git:(master) ✗ ./ex1 -vec_type viennacl -mat_type aijviennacl
> dyld: Symbol not found: _MatCreate_MPIAIJViennaCL
>   Referenced from: /Users/fire/opt/petsc313/lib/libpetsc.3.13.dylib
>   Expected in: flat namespace
>  in /Users/fire/opt/petsc313/lib/libpetsc.3.13.dylib
> [1]    23268 abort      ./ex1 -vec_type viennacl -mat_type aijviennacl
> 
> 
> 
> Thanks
>                  Abel Hu
> 
> 
-------------- next part --------------
diff --git a/config/BuildSystem/config/packages/viennacl.py b/config/BuildSystem/config/packages/viennacl.py
index aa614c7af8..9e3076cb50 100644
--- a/config/BuildSystem/config/packages/viennacl.py
+++ b/config/BuildSystem/config/packages/viennacl.py
@@ -41,10 +41,10 @@ class Configure(config.package.Package):
         shutil.copytree(srcdir,destdir)
       except RuntimeError as e:
         raise RuntimeError('Error installing ViennaCL include files: '+str(e))
+    return self.installDir
 
+  def configureLibrary(self):
+    config.package.Package.configureLibrary(self)
     #check for CUDA:
     if not self.cuda.found:
       self.addDefine('HAVE_VIENNACL_NO_CUDA', 1)
-
-    return self.installDir
-


More information about the petsc-users mailing list