CUDA support broken after update
Hi all, I recently updated Firedrake, PyOP2, etc and now any attempt to use the CUDA backend fails with the following stack trace (the sequential backend still works): ...elided... File "/homes/hjd11/proj/Firedrake/firedrake/firedrake/functionspace.py", line 585, in __init__ super(VectorFunctionSpace, self).__init__(mesh, element, name, dim=dim, rank=1) File "/homes/hjd11/proj/Firedrake/firedrake/firedrake/functionspace.py", line 121, in __init__ with function.Function(self).dat.vec_ro as v: AttributeError: 'Dat' object has no attribute 'vec_ro' The problem seems to be this new code in firedrake/functionspace.py introduced in commit 109e128133d6622d99d80fe99144cf269e1039bf: + # Tell the DM about the layout of the global vector + with function.Function(self).dat.vec_ro as v: + self._dm.setGlobalVector(v.duplicate()) Which depends on Dat having a vec_ro which is defined on the PETSc derived Dat class but not on the CUDA one. Is the CUDA backend broken for everyone, or did I do something wrong when I updated Firedrake? Thanks! Hector Commit: https://github.com/firedrakeproject/firedrake/commit/109e128133d6622d99d80fe... Code in Firedrake master: https://github.com/firedrakeproject/firedrake/blob/master/firedrake/function... Minimal Example & Traceback: https://gist.github.com/chromy/9117a372d1b2c3b9d27d
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 27/04/15 13:45, Hector Dearman wrote:
Hi all,
I recently updated Firedrake, PyOP2, etc and now any attempt to use the CUDA backend fails with the following stack trace (the sequential backend still works):
...elided... File "/homes/hjd11/proj/Firedrake/firedrake/firedrake/functionspace.py", line 585, in __init__ super(VectorFunctionSpace, self).__init__(mesh, element, name, dim=dim, rank=1) File "/homes/hjd11/proj/Firedrake/firedrake/firedrake/functionspace.py", line 121, in __init__ with function.Function(self).dat.vec_ro as v: AttributeError: 'Dat' object has no attribute 'vec_ro'
The problem seems to be this new code in firedrake/functionspace.py introduced in commit 109e128133d6622d99d80fe99144cf269e1039bf:
+ # Tell the DM about the layout of the global vector + with function.Function(self).dat.vec_ro as v: + self._dm.setGlobalVector(v.duplicate())
Which depends on Dat having a vec_ro which is defined on the PETSc derived Dat class but not on the CUDA one.
Is the CUDA backend broken for everyone, or did I do something wrong when I updated Firedrake?
Firedrake has never claimed to support the CUDA pyop2 backend, so yes, it is broken for everyone. Given that there's no way the cuda backend is going to support most of the functionality that came in there, you could try just removing that bit of code. Lawrence -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVPjHqAAoJECOc1kQ8PEYv7xcH/1t1vK7vUKZe0eoCFSwjtpI6 1MpjlUw+UAMxF+FAhgSZbdsj+YeOn1tVLl1d+MBerXnc46KVpI1LOEigwcUN2hdn Q4D5u8zNtnWUEzIzvwQi2ZSuUTbIKt5xC1xCgn1tOdDEZw5zdQPHeXaUmBhNctO3 7bZ/2L9MuRV4yIcrdHEV8JgloN6cQlwaf8/CystJZFG79vIWCvazKsKjsLgtM5Z5 B2uWkvT+6AVPJOcGl5y949aKc2YlauWdmGYyVi0NDRqB7WQrcZJUau/9RLof/hiS fh83+3oyjhd5PFClyU25UVFHdjncqYU1GUhj8dDCEMx+zlO3p+GHxE+wO4POhrw= =4p6b -----END PGP SIGNATURE-----
participants (2)
- 
                
                Hector Dearman
- 
                
                Lawrence Mitchell