[petsc-dev] ViennaCL-bindings in next
Jose E. Roman
jroman at dsic.upv.es
Fri Mar 22 09:32:03 CDT 2013
I had to add this to be able to compile:
diff --git a/config/PETSc/packages/viennacl.py b/config/PETSc/packages/viennacl.py
index 9c2ace5..7f70a36 100644
--- a/config/PETSc/packages/viennacl.py
+++ b/config/PETSc/packages/viennacl.py
@@ -7,7 +7,7 @@ class Configure(PETSc.package.NewPackage):
self.download = ['http://downloads.sourceforge.net/project/viennacl/1.4.x/Vien
self.downloadfilename = str('ViennaCL-1.4.1')
self.includes = ['viennacl/forwards.h']
- self.includedir = ['.']
+ self.includedir = ['include']
self.cxx = 1
self.archIndependent = 1
self.worksonWindows = 1
diff --git a/src/vec/vec/impls/seq/seqviennacl/vecviennacl.cxx b/src/vec/vec/impls/seq/seq
index f8b70e4..3a178fd 100644
--- a/src/vec/vec/impls/seq/seqviennacl/vecviennacl.cxx
+++ b/src/vec/vec/impls/seq/seqviennacl/vecviennacl.cxx
@@ -167,7 +167,7 @@ static PetscErrorCode VecDestroy_SeqViennaCL_Private(Vec v)
PetscErrorCode ierr;
PetscFunctionBegin;
- ierr = PetscObjectDepublish(v);CHKERRQ(ierr);
+ ierr = PetscObjectAMSViewOff(v);CHKERRQ(ierr);
#if defined(PETSC_USE_LOG)
PetscLogObjectState((PetscObject)v,"Length=%D",v->map->n);
#endif
Jose
El 22/03/2013, a las 00:50, Karl Rupp escribió:
> Hi,
>
> the interface to ViennaCL [1] has just been merged to 'next', enabling PETSc to use OpenCL-enabled devices (most notably Intel's Xeon Phi and GPUs from AMD in addition to the existing NVIDIA bindings). I tested it with Vector-, Matrix-, and KSP- examples.
>
> The new bindings are enabled by the configure flags
> --download-viennacl
> --with-opencl-include=/path/to/OpenCL-Headers
> --with-opencl-lib=/path/to/libOpenCL.so
>
> The OpenCL headers can be obtained on the Khronos webpage [2] and are often available via package managers, e.g.
> $> sudo apt-get install opencl-headers
> or
> $> sudo yam install opencl-headers
> In such case, the OpenCL include directory is typically /usr/include
> (BuildSystem may not detect these headers correctly on Mac OS, I'm working on this). The OpenCL library comes with your graphics driver and is usually located at /usr/lib/. There is no separate compiler as for CUDA needed!
>
> FAQ:
>
> - What is the performance difference between OpenCL and CUDA for GPUs?
> My experience is that for large problem sizes they are equivalent for almost all linear algebra kernels. For small problem sizes (kernel execution less than 1ms), CUDA is currently superior because of lower latency.
>
> - Which solvers can I use with the ViennaCL-bindings?
> The same as with CUSP. Most notably the usual CG, BiCGS, GMRES.
>
> - Which preconditioners are provided in the ViennaCL-bindings?
> Currently none. You can, however, use all the standard CPU-based preconditioners in PETSc together with ViennaCL matrices and vectors.
>
> - Which command line options do I need to use?
> Use -vec_type viennacl -mat_type aijviennacl
> On Intel's Xeon Phi you also need to pass -viennacl_device_accelerator.
> (If you read this email in an archive: Check the manual for current flags).
>
> Best regards,
> Karli
>
> [1] http://viennacl.sourceforge.net/
> [2] http://www.khronos.org/registry/cl/
More information about the petsc-dev
mailing list