How can I change the configuration of compilation mode to 64 bit in Nsight?


I am a CUDA newbie and I have encountered some errors when I want to use the unified memory feature in CUDA 6.0

Firstly, it seems cudaMallocManaged doesn’t work. For example(piece of my code in main function):

int N = 1000;
int *a;
cudaMallocManaged(&a, N*sizeof(int));
for(int i = 0; i < N; i++){
    a[i] = i;

If the cudaMallocManaged call is gone, then this will print 0, but if the call is there, it prints nothing.


#include <stdio.h>
__device__ __managed__ int ret[1000];

__global__ void AplusB(int a, int b) {
		ret[threadIdx.x] = a + b + threadIdx.x;
int main() {
	AplusB<<< 1, 1000 >>>(10, 100);
	for(int i=0; i<1000; i++) {
		printf("%d: A+B = %d\n", i, ret[i]);
	return 0;

will return an error:

error: managed variables are not yet supported for this configuration (compilation mode (32/64 bit) and/or target operating system)

I think all these problems are due to this error: compilation mode (32/64 bit) because I noticed that the unified memory feature is for 64 bit system only. I am using Macbook Pro with GT 750M installed. Could anyone tell me how to resolve this problem?(Possibly change the setting to 64 bits only). Thank you!

Figure it out. Mac doesn’t support unified memory management in CUDA 6. That’s a pity.

I am getting the same error with CUDA 7.5. Did you find a fix? What about running a Linux on the MacBook?

add proper cuda error checking to your code. If you don’t know what that is, google “proper cuda error checking” and take the first hit.

You can also review the requirements for UM:

Mac OSX is still not a supported platform for UM.

Actually does the trick. However getting a Linux properly running on a MacBook can also be quite challenging, I gave up on power management …