I am trying to use multiple GPU's in parallel using ViennaCL through my
gpuR package.  In essence the context is selected at the R level (one
context per device already initialized).  Then a matrix is created on that
device.  The code looks like this:

create_matrix <- function(id){
# sets context
setContext(id)
# create matrix
mat <- vclMatrix(rnorm(16), nrow=4, ncol=4)
return(mat)
}

# a fork over context 1 and 2
out <- mclapply(1:2, function(x) create_matrix(x))

Yet, strangely this just hangs.  It doesn't return anything.  Perhaps I am
missing something in how OpenCL contexts are handed in parallel?  I ask as
I recall that PETSC had some multi GPU functionality with MPI.  The above
makes sense to me without MPI but again I may be missing something.

The actual copying happens in this file at line 36 (
https://github.com/cdeterman/gpuR/blob/develop/src/dynVCLMat.cpp) just
after "starting to copy".  It seems almost like it a problem with the class
objects (defined in
https://github.com/cdeterman/gpuR/blob/develop/inst/include/gpuR/dynVCLMat.hpp
).

Any insight would be appreciated.

Regards,
Charles
------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
ViennaCL-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/viennacl-devel

Reply via email to