Question about cuda 4.0b unified addressing how to use cudaDeviceCanAccessPeer()

Hi –

I have two Fermis in a 64-bit Linux machine using cuda 4.0b with driver 270.27 and I would like to try out the peer-to-peer memory access feature with them.
I wrote a simple program that checks the device unified addressing property and the does a cudaDeviceCanAccessPeer(). As expected, the unified addressing device property is returned positive, but cudaDeviceCanAccessPeer() returns a 0. This is my code, followed by output:

#include <stdio.h>
#include <string.h>
#include <cuda_runtime_api.h>

int main(int argc, char* argv) {

int deviceCount;
cudaGetDeviceCount(&deviceCount);
int device;

for (device = 0; device < deviceCount; ++device) {
cudaDeviceProp deviceProp;
cudaGetDeviceProperties(&deviceProp, device);
if (device == 0) {
if (deviceProp.major == 9999 && deviceProp.minor == 9999)
printf(“There is no device supporting CUDA.\n”);
else if (deviceCount == 1)
printf(“There is 1 device supporting CUDA\n”);
else printf(“There are %d devices supporting CUDA\n”, deviceCount);
}
printf(“deviceProp.unifiedAdressing %s\n”, deviceProp.unifiedAddressing ? “Yes” : “No”);
}

cudaSetDevice(0);
int can_acc;

if (cudaDeviceCanAccessPeer(&can_acc,0,1)!=cudaSuccess) printf(“Unsuccessful\n”);
printf(“Can Access Peer %d\n”,can_acc);
}


(output)

There are 2 devices supporting CUDA
deviceProp.unifiedAdressing Yes
deviceProp.unifiedAdressing Yes
Can Access Peer 0


I would appreciate it if someone could tell me what am I doing wrong or leaving out.
Thanks–

If your cards are not Fermi based Telsa or Quadro parts, peer to peer memory access is not supported.

Thanks – I didn’t realize that.

P2P will be enabled on Geforce with the next RC.

aw, there goes the surprise

That is pretty big news too. At the launch webinar we were told it would be Fermi only. I have already started the groveling process to try and get some fermi teslas too…

it’s still Fermi only, just not Fermi Tesla only

I meant Tesla there. Good news all round though. While you and Massimiliano are at it, can either of you confirm that the problem with setting compute exclusively on Geforce with the 4.0rc development driver is a bug and not a feature?

that’ll be fixed in an upcoming RC as well

Awesome, thanks for the information, it makes planning much easier.

Great news! Thanks!