Is unified memory broken for anyone else? O_o

Okay, so I’m on Arch Linux and I think I updated some nVidia stuff today. The thing is, I’m confident that it broke unified memory. Like, this code puts one core of my CPU to 100% usage.

#include <thrust/device_vector.h>
#include <thrust/copy.h>
#include <thrust/fill.h>
#include <iostream>

int main(void)
{
    int *x = 0;
    const int size = 1;

    cudaMallocManaged(&x, size * sizeof(*x));
    
    x[0] = 256; // this is the cause of the loop

    cudaFree(x);
}

Is this happening to anyone else?

I compiled with :

nvcc -o test test.cu

Update : I filed a bug report with nVidia. I chose to call this one a “showstopper” because it’s a very broken fundamental part of the language.

“Okay, so I’m on Arch Linux”

perhaps just mention to nvidia that “Okay, so I’m on Arch Linux”

Lol I’m glad I could amuse you XD

I’m trying to download CUDA 7 so we’ll see if that fixes it. It’s what nVidia told me to do.

But I’m really starting to think of it as my GPU and OS telling me to step it up.

Arch Linux + my GPU : “Unified memory is for the noobs! Step it up, son!”

Arch Linux is not a supported distro AFAIK.

It doesn’t seem like it’s “officially” supported. The developer zone had releases for several distros but Arch was not listed but the drivers and toolkit are part of the official repositories.

I wound up installing CUDA 7 but couldn’t use it because the latest driver didn’t play with gdm (GNOME device manager).

So instead I’m just using thrust::device_ptr everywhere I can because it works.

There were reports both here and on SO about P2P access being broken on Arch (You can google them) UM uses P2P access IIRC.

Interesting. Thanks for the heads up.

I am also an Arch user and after the update to the driver 346.35 unified memory stopped working. I am using cuda 6.5.19. I’ll try other versions and see what happens…

Downgrading from kernel 3.18.2 to 3.17.6 fixed the problem. With kernel 3.18.2 unified memory fails. It seems the nvidia driver does not have full compatibility with the latest kernel :(

Yeah, it seems like nVidia is having a lot of trouble with Arch lately so I started dual booting Ubuntu and Arch. I’m using Ubuntu 14.04 and it’s actually pretty great. CUDA 7 actually works for it.

Before when I tried to upgrade to CUDA 7 on Arch, the required driver failed with the Gnome display manager so there were plenty of signs telling me that it was time to try a new distro for my needs.

Which is good. That’s the point of Linux. You choose distros the same way you choose programming languages, as tools to an end. Ubuntu has actual support for CUDA and Steam.

This problem is still not solved. Is anyone here using cuda unified memory with kernels versions higher than 3.17? I tried in Siduction(debian based) and had no success just like in Arch.

The stated compatibility requirements for CUDA are pretty clear. You must use one of the specified distros and one of the specified versions.

[url]http://docs.nvidia.com/cuda/cuda-getting-started-guide-for-linux/index.html#system-requirements[/url]

“The CUDA development environment relies on tight integration with the host development environment, including the host compiler and C runtime libraries, and is therefore only supported on distribution versions that have been qualified for this CUDA Toolkit release.”

Arch is not listed. There are no 3.18 kernels listed.

Unified Memory in particular involves fairly tight coupling with the host OS, including the page-fault servicing mechanism, for example.

If you want to explore around and see what appears to work and what doesn’t, feel free to explore. If you’re looking for a stable development environment, I would certainly suggest that you start with a supported configuration (so as to not waste time chasing avoidable issues). If you’re looking to run production codes, I would strongly encourage you to use a supported environment.

Yes, definitely migrate distros. If you’re serious about CUDA then it does require shifting to a supported OS which is lame but Arch is a rolling release distro so you can’t be mad when developers don’t target it. It’s like aiming for a moving target. It’s just not worth it when other distros will gladly sit there for an extended period of time.

Thanks for the feedback guys, but there’s no need at all to migrate to another distro. I have been using cuda in Arch for years. Besides kernel 3.19 it also offers the kernel 3.14 in the standard repo and cuda works just fine in this version. I was just curious if unified memory was already supposed to be working with newer kernels(everything else in cuda already works)…

Yeah but isn’t using an older kernel kind of in violation of everything that Arch Linux stands for?

“everything that Arch Linux stands for?”

being what…?

daredevil-ism?

Pretty much, yeah.

in the matrix, arch linux is cast as a pirate city… arch-tortuga

I personally don’t like using an older kernel… But if it were a violation to Arch’s principles they wouldn’t maintain a long term support kernel in their official repository… And even if it were a violation switching to another distro would only force me to use many other programs in their old versions… I have tried many times in a distant past to use the ones listed as supported and I really can’t stand in my home desktop. I do all kinds of stuff in this machine, not only writing and running cuda codes for my research… Were this not the case I would have switched to a supported distro…

“another distro would only force me to use many other programs in their old versions”

from what i recall, arch’s numbers - users - is against your enthusiasm over arch
if arch is so next-level, why is its consumption so low?

MutantJohn suggested dual booting; perhaps it is indeed the best of both (all) worlds
from a debugging perspective, super booting also has additional benefits - triangulation