hi,
i have 2 pc, windows 7-64 driver 258.96 (or in alternative last devdriver)
PC-A
9800gt (comp capab 1.1)
g210 (comp capab 1.2)
PC-B
gtx480 (comp .capab 2.0)
gt240 (comp. capab 1.2)
i have a cuda code that asks on which device it will run and then call cudaSetDevice on it
if i use my program on PC-A (compiled as sm11 for 9800gt and sm12 for g210) it works.
BUT
if i run THE SAME program on PC-B (compiled as sm12 for gt240 and sm20 for gtx480, or sm12 for both) it DOSEN’T WORK. The program dosen’t crash, but the first cuFFT return a zero matrix without errors.
IF I REMOVE THE GTX480 from PC-B, and i run again my program without recompiling it works.
the code for selecting the gpu follows:
const float PI = 3.141592653589793f;
constant float D_Const_windows [MAXNRBIN];
constant float D_Const_subPhase [2*MAXNFFT];
extern shared cufftComplex SHM_TILE;
shared bool isLastBlockDone;
int main () {
int deviceCount = 0;
int deviceSelected = 0;
struct cudaDeviceProp deviceData;
cudaGetDeviceCount(&deviceCount);
if (deviceCount == 0){
printf("No GPU found !\n");
exit(1);
}
else if (deviceCount ==1){
deviceSelected = 0;
}
else{
printf(" %d GPU detected: which one do you want to use?\n",deviceCount);
for (int i=0; i<deviceCount; i++){
cudaGetDeviceProperties (&deviceData, i);
printf (" %d: %s\n",i, deviceData.name);
}
printf("select a device ID ?\n");
scanf("%d",&deviceSelected);
cudaSetDevice(deviceSelected);
}
…