Issues with driver 497.29

Hi,

unfortunately I see the same issues with this driver as I see with 510.06 if I try to run under WSL2 the call to cuInit() returns CUDA_ERROR_OUT_OF_MEMORY. Running the same app under windows 11 I have no issues. The system have 32GB of ram.

Any idea about this problem?
Thanks,
Daniel

1 Like

Hello everyone,

I’m also getting the same issue with driver 497.29 as I stated here even after I followed this advice i.e. to download and install the driver from this link. Namely, the following hello world CUDA code compiles but does not print from the kernel if on WSL:

#include "cuda_runtime.h"
#include "device_launch_parameters.h"

#include <cstdio>

__global__
void hello_kernel()
{
    printf("Hello world!\n");
}

int main()
{
    printf("Hello world!\n");

    hello_kernel<<<1, 32>>>();

    return 0;
}

Help/info would be welcome, thanks.

Hi,
I just tried CUDA 11.6 with the new driver it comes with on wsl2. But unfortunately I still get the same error on cuInit(0). At the time I run this test there were more than 10GB ram available - I hope this would be OK?

Any idea why I get this Out Of Memory error???

Thanks.

Hi Trailing Stop

Could you share your installation process?
The driver that comes with CUDA 11.6 toolkit for linux should not be installed.
Please install the latest GeForce Windows driver from

https://www.nvidia.com/Download/driverResults.aspx/185109/en-us

And, only install the CUDA 11.6 Linux toolkit inside WSL2.
Please report the results. Thank you !

Hi,
I run Windows 11 and VS2022 with all updates. I have WSL2 - Ubuntu 18.04LTS. I installed cuda 11.6 for windows with the driver that comes with the package. Then I installed cuda for linux ( CUDA Toolkit 11.6 Downloads | NVIDIA Developer) - following the guides step-by-step. No issues during install - neither on windows nor on linux. All went fine.

Anything else I can provide?

We could not reproduce the issue at our end. The cuda samples run to completion on WSL2.

May be you are already doing this, but to be sure -specifically, please pick up the CUDA 11.6 toolkit installation provided for WSL2. As stated in the guide, by default the toolkit will override the underlying windows driver which is exported into WSL2 environment, hence clobbering your setup.

Download this exact toolkit
https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&Distribution=WSL-Ubuntu&target_version=2.0&target_type=deb_local

Could you please do a fresh install of WSL2 ?

User guide is here:
https://docs.nvidia.com/cuda/wsl-user-guide/index.html#getting-started-with-cuda-on-wsl

Hi,

after a year I want to address this again and check if I can use WSL for development. I have an up to date Windows 11 with all updates, installed cuda 12, got latest nvidia driver (528.02). I reinstalled all WSL components and recompiled my app. Again I get the out-of-memory return error on the first call cuInit(0);

I moved the call to the driver to the first position in main() since the out-of-memory error-message must be a return from a different call in the driver because it is not documented as a valid return-code from cuInit ( CUDA Driver API :: CUDA Toolkit Documentation (nvidia.com)). But again - same result.

Others seem to have similar problems, but I could not find any solution for my system.

Is there already some information @ nvidia that could help me to get this working?

Thanks,
Daniel

Some more information:

After installing cuda 12 I tried to execute ‘nvcc -version’ to verify the installation. But the command was not found (maybe this is by design)? Anyway that is not that important since I use nvRTC anyway.

I also noticed a crash in the installation of cuda 12. If I activate ‘options’ on twe first screen and the ‘driver options’ I see a blank screen. Hitting any key now will crash the cuda 12 installer with a segmentation fault.

Calling ‘nvmlInit_v2()’ in my application works without any issue. All nvml functions works as expected. Just the cu… functions do not.

Maybe that can help?

For those who also run into this problem - here is a workaround:

just call nvmlInit_v2() BEFOR you call cuInit()! That fixes the problem for me. If I change the order I again get the out of memory error.

	m_nvmlInitError = nvmlInit_v2();
	if( NVML_SUCCESS != m_nvmlInitError )
	{
		g_pManagerLogging->LogPrintf( ESBC_RED, "Error during initializations of the nvml subsystem:" );
		g_pManagerLogging->LogPrintf( ESBC_RED, "Error(%d): NVML_ERROR_UNINITIALIZED", m_nvmlInitError );
		return DDT_ERROR;
	}
	m_cuInitError = cuInit( 0 );
1 Like