Skip to content

gpus with foreach

3 messages · John Denton, Brian G. Peterson, Charles Determan

#
Hi, all.

Does anybody know of a library that allows foreach to be called over GPUs, specifically? I'm interested in parallelizing a very large number of calls to system(), and am still debugging a cluster issue, so doMPI, etc are not working at the moment.

Thanks.

John S. S. Denton, Ph.D.
Department of Vertebrate Paleontology
American Museum of Natural History
www.johnssdenton.com
#
On Mon, 2016-04-25 at 17:04 +0000, John Denton wrote:
There's no reason you can't call system() from inside your foreach loop,
so you could, for example, use foreach with a socket cluster, or a redis
cluster, to send jobs to workers on different physical machines, and
call system() in the body of the foreach loop.

Or perhaps your questions isn't specific enough for me to understand
what you're trying to do?

Regards,

Brian
#
Hi John,

I'm not sure about a package designed specifically for this but I have been
toying with the idea about how I could implement it with my GPU package
gpuR (https://cran.r-project.org/web/packages/gpuR/index.html).  Do you
have at least as many CPUs and GPUs?  If so, that should make the
implementation easier.  Essentially this would consist of using the
'setContext' function within each fork generated by foreach corresponding
to different GPU.  There is an existing issue on my it repo regarding
selection of specific GPUs (https://github.com/cdeterman/gpuR/issues/9).
Once I have a user willing to test my code (I only have one GPU personally)
I can finalize that feature and it is theoretically plausible to use
foreach with my package on your GPUs.

If you are interested we may want to move this conversation off-list since
this would be developmental.

Regards,

Charles Determan PhD
Data Scientist
On Mon, Apr 25, 2016 at 12:04 PM, John Denton <jdenton at amnh.org> wrote: