printf("ERROR: Invalid argument given to %s\n",arg);
return1;
return1;
}
}
replicas=arg_val;
replicas=arg_val;
...
@@ -111,13 +118,14 @@ int main(int argc, char* argv[]) {
...
@@ -111,13 +118,14 @@ int main(int argc, char* argv[]) {
configFile=argv[argc-2];
configFile=argv[argc-2];
outArg=argv[argc-1];
outArg=argv[argc-1];
}
}
printf("Everything's great when you're...BrownTown\n");
GPUManager::init();
GPUManager::safe(safe);
GPUManager::safe(safe);
if(gpuID==-1)
gpuID=GPUManager::getInitialGPU();
Configurationconfig(configFile,replicas,debug);
Configurationconfig(configFile,replicas,debug);
// GPUManager::set(0);
// GPUManager::set(0);
printf("Setting gpuID to %d\n",gpuID);
GPUManager::set(gpuID);
GPUManager::set(gpuID);
//MLog: this copyToCUDA function (along with the one in GrandBrownTown.cpp) was split into pieces to allocate memory into the ComputeForce, due to the location of this call we may get some memory error as a ComputeForce class isn't allocated until later on.
//MLog: this copyToCUDA function (along with the one in GrandBrownTown.cpp) was split into pieces to allocate memory into the ComputeForce, due to the location of this call we may get some memory error as a ComputeForce class isn't allocated until later on.