Inter-process data address transfer


I’m trying to use real-time signals to transfer a GPU address from a process to another so the memory is shared. The value of the address can be sent (0x110000), but results are different :

V2[0] : 0
V2[1] : 1
V2[2] : 2
V2[3] : 3
V2[4] : 4
V2[5] : 5
V2[6] : 6
V2[7] : 7
V2[8] : 8
V2[9] : 9
V2[10] : 10

V[0] : 11
V[1] : 0
V[2] : 4289496
V[3] : 0
V[4] : 30
V[5] : 11049
V[6] : 677825072
V[7] : 32767
V[8] : -1867192756
V[9] : 11049
V[10] : -1867191200

Does someone know what the problem is ? Is there a solution to share a GPU address between two process ?

Thank you.

GPU memory pointers are not portable between processes, what you are trying to do cannot be done (leaving that aside, how could you even be sure that GPU addresses are absolute and not relative?).

I was just trying to see if it was possible. It’s too bad there isn’t a shared memory mechanism like in C. Thank you for your informations.

There is a shared memory mechanism something like the POSIX shm mechanism. CUDA 4.0 supports a unified addressing model which allows multiple GPUs memory spaces to be mapped into a single space, and Fermi cards support direct peer to peer memory transfers between GPUs. But it is only within a single process, not between processes. So you can use a single, multithreaded process to do what you want, but not two separate processes.

Thanks for your infos, but I can’t use threads. I’m designing a program that manages processors on a server. I wanted him to allocate the memory and then send the address to the application (the processus) requesting it. I’m in a multi-process context.