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

Added one gpu for each process

parent 23474b65
No related branches found
No related tags found
No related merge requests found
...@@ -248,7 +248,7 @@ int main(int argc, char *argv[]) { ...@@ -248,7 +248,7 @@ int main(int argc, char *argv[]) {
int nbDevices = atoi(argv[1]); int nbDevices = atoi(argv[1]);
char device[3] = {0}; char device[3] = {0};
snprintf(device, sizeof(device), "#%d", myRank % nbDevices); snprintf(device, sizeof(device), "#%d", myRank % nbDevices);
futhark_context_config_set_device(contextConfig, argv[1]); futhark_context_config_set_device(contextConfig, device);
struct futhark_context *futharkContext = futhark_context_new(contextConfig); struct futhark_context *futharkContext = futhark_context_new(contextConfig);
/* GoL Initialization */ /* GoL Initialization */
......
...@@ -246,9 +246,15 @@ int main(int argc, char *argv[]) { ...@@ -246,9 +246,15 @@ 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();
futhark_context_config_set_device(contextConfig, argv[1]); futhark_context_config_set_debugging(contextConfig, 1);
int nbDevices = atoi(argv[1]);
char device[3] = {0};
snprintf(device, sizeof(device), "#%d", myRank % nbDevices);
futhark_context_config_set_device(contextConfig, device);
struct futhark_context *futharkContext = futhark_context_new(contextConfig); struct futhark_context *futharkContext = futhark_context_new(contextConfig);
MPI_Abort(MPI_COMM_WORLD, 1);
/* GoL Initialization */ /* GoL Initialization */
int boardN = atoi(argv[2]); int boardN = atoi(argv[2]);
int boardNN = boardN * boardN; int boardNN = boardN * boardN;
......
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