Skip to content
Snippets Groups Projects
Verified Commit 23474b65 authored by baptiste.coudray's avatar baptiste.coudray
Browse files

Added one gpu for each process

parent 1a26d56c
No related branches found
No related tags found
No related merge requests found
...@@ -245,6 +245,9 @@ int main(int argc, char *argv[]) { ...@@ -245,6 +245,9 @@ int main(int argc, char *argv[]) {
/* Futhark Initialization */ /* Futhark Initialization */
struct futhark_context_config *contextConfig = futhark_context_config_new(); struct futhark_context_config *contextConfig = futhark_context_config_new();
int nbDevices = atoi(argv[1]);
char device[3] = {0};
snprintf(device, sizeof(device), "#%d", myRank % nbDevices);
futhark_context_config_set_device(contextConfig, argv[1]); futhark_context_config_set_device(contextConfig, argv[1]);
struct futhark_context *futharkContext = futhark_context_new(contextConfig); struct futhark_context *futharkContext = futhark_context_new(contextConfig);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment