Dual GPU cuMemGetInfo

I’m working with a GTX 295 and trying to get the free memory for both devices.

However when I call cuMemGetInfo(free,total) I am getting exactly the same number of bytes for both devices, implying that it is infact only returning the value for one of them.

I call the routine below from independent threads which have had the ‘gpuIdx’ enumeration passed to them

void createContext(int gpuIdx)
{
int free;
int total;
CU_SAFE_CALL_NO_SYNC(cuDeviceGet(&dev[gpuIdx],gpuIdx));
CU_SAFE_CALL_NO_SYNC(cuCtxCreate(&ctx[gpuIdx],CU_CTX_SCHED_AUTO,dev[gpuIdx]));

            fprintf(logFile,"Created Context %10.10i	%10.10i\n",(gpuIdx),ctx[gpuIdx]);fflush(logFile);

CU_SAFE_CALL_NO_SYNC( cuMemGetInfo(&free, &total) );

fprintf(logFile,"MemInfo	%10.10i	%10.10i	%10.10i\n",gpuIdx,dev[gpuIdx],free);fflush(logFile);

}

the printout looks like this

Created Context 0000000001 0472689488
Created Context 0000000000 0472687408
MemInfo 0000000001 0000000001 0823947264
MemInfo 0000000000 0000000000 0823947264

Looks like it works fine for 32-bit Server 2003, but not 64-bit Server 2008 R2.

If I place another seperate video card in (9500GT) I can see a total of three devices, with the two GTX295 GPUs showing exactly the same memory usage and the 9500GT showing different.

So I suppose it is working, but how can the two GTX295 devices be using the EXACT same amount of memory down to the byte?

and only in the 64-bit version, under 32-bit windows they show different amounts.

I should note that the 32-bit and 64-bit versions are run on two seperate machines with two different GTX295s of identical brand and model.

Looks like it works fine for 32-bit Server 2003, but not 64-bit Server 2008 R2.

If I place another seperate video card in (9500GT) I can see a total of three devices, with the two GTX295 GPUs showing exactly the same memory usage and the 9500GT showing different.

So I suppose it is working, but how can the two GTX295 devices be using the EXACT same amount of memory down to the byte?

and only in the 64-bit version, under 32-bit windows they show different amounts.

I should note that the 32-bit and 64-bit versions are run on two seperate machines with two different GTX295s of identical brand and model.

Just to be extra sure, can you allocate some memory on only one of the GPUs before calling cuMemGetInfo on the 64-bit system?

Just to be extra sure, can you allocate some memory on only one of the GPUs before calling cuMemGetInfo on the 64-bit system?

Yeah already tried that, it still says the same for both devices. No matter which of the three devices I allocate on, the two GTX 295 GPUs always read the same.

Yeah already tried that, it still says the same for both devices. No matter which of the three devices I allocate on, the two GTX 295 GPUs always read the same.