[RESOLVED] Sometimes, CUDA context cannot be initialized
- MeteorRain
- Posts: 130
- Joined: Fri Jul 25, 2014 4:04 pm
- Location: New Jersey
[RESOLVED] Sometimes, CUDA context cannot be initialized
---------------------------
Warning
---------------------------
ERROR: Failed to create CUDA context on device 0
Hit Yes to continue notifying this specific error type; hit No to disable it.
Hit Cancel to suppress all further errors.
---------------------------
Occasionally happens. The only thing you need to do is to try again.
I'm calling from command line using "dgindexnv -i 20.m2ts -o 20.dgi -h -e", etc.
Any chance for an auto reattempt?
Warning
---------------------------
ERROR: Failed to create CUDA context on device 0
Hit Yes to continue notifying this specific error type; hit No to disable it.
Hit Cancel to suppress all further errors.
---------------------------
Occasionally happens. The only thing you need to do is to try again.
I'm calling from command line using "dgindexnv -i 20.m2ts -o 20.dgi -h -e", etc.
Any chance for an auto reattempt?
Re: Sometimes, CUDA context cannot be initialized
I have such issues some versions back. With newest version I had no problem. I think Don could make for you debug build to see in what stage it is happened.
Re: Sometimes, CUDA context cannot be initialized
@MeteorRain
We could try something like that but obviously I am averse to band-aid fixes. First, let me ask you some things.
Do you have multiple cards installed? If not, why are you forcing the device number in the INI file?
What are the cards you have installed? What nVidia driver version? Latest DGIndexNV being used (fresh downloaded)?
Is anything else going on in the background? Playing videos? Running any other scripts?
We could try something like that but obviously I am averse to band-aid fixes. First, let me ask you some things.
Do you have multiple cards installed? If not, why are you forcing the device number in the INI file?
What are the cards you have installed? What nVidia driver version? Latest DGIndexNV being used (fresh downloaded)?
Is anything else going on in the background? Playing videos? Running any other scripts?
- MeteorRain
- Posts: 130
- Joined: Fri Jul 25, 2014 4:04 pm
- Location: New Jersey
Re: Sometimes, CUDA context cannot be initialized
Code: Select all
Version=DGIndexNV 2051
Window_Position=16,254
Info_Window_Position=11,100
Process_Priority=2
Playback_Speed=3
AVS_Template_Folder=
AVS_Template_File=template.avs
AVS_Enable_Template=0
AVS_Overwrite=0
Full_Path_In_Files=1
MRUList[0]=L:\xxx
MRUList[1]=L:\xxx
MRUList[2]=L:\xxx
MRUList[3]=L:\xxx
Enable_Info_Log=1
Loop_Playback=0
AVC_Extension=264
MPG_Extension=m2v
VC1_Extension=vc1
HEVC_Extension=hevc
Deinterlace=0
UsePF=0
AlwaysCrop=0
UseD3D=0
Snapped=0
ResponseOnAudioMismatch=0
Enable_Audio_Demux=0
CUDA_Device=0
Decode_Modes=0,0,0,0
Full_Info=0
Bare_Demux=0
Disable_Encrypted_Audio_Warning=1
Fine_Cropping=0
Re: Sometimes, CUDA context cannot be initialized
You answered a question I didn't ask and none of the ones I did ask. I waited many seconds.
- MeteorRain
- Posts: 130
- Joined: Fri Jul 25, 2014 4:04 pm
- Location: New Jersey
Re: Sometimes, CUDA context cannot be initialized
Sorry I was on my way to office, so post my local config first just in case you need it later -- You know, TeamViewer got hacked and I dare not to leave it running for long.
Following are the answers to your questions.
Yes I have multiple cards, one discrete GTX 950 one integrated from 4th gen i7.
nVidia driver I need to go home to get the number.
I'm using the version (fresh downloaded) about a month ago.
I have tons of programs running and I haven't reboot my computer for 3 months. Windows 10 stable channel.
No video playing at the moment.
Let me clarify: It only happens every couple days, randomly, no matter if I'm using the computer or I'm sleeping, no matter day or night, etc. Almost impossible to reproduce. Run the command again and it works perfectly.
Following are the answers to your questions.
Yes I have multiple cards, one discrete GTX 950 one integrated from 4th gen i7.
nVidia driver I need to go home to get the number.
I'm using the version (fresh downloaded) about a month ago.
I have tons of programs running and I haven't reboot my computer for 3 months. Windows 10 stable channel.
No video playing at the moment.
Let me clarify: It only happens every couple days, randomly, no matter if I'm using the computer or I'm sleeping, no matter day or night, etc. Almost impossible to reproduce. Run the command again and it works perfectly.
Re: Sometimes, CUDA context cannot be initialized
You have "tons of programs running"?
Can you not reboot and try it with nothing else running?
And how do you run this when you are sleeping? A batch file or something?
Can you not reboot and try it with nothing else running?
And how do you run this when you are sleeping? A batch file or something?
- MeteorRain
- Posts: 130
- Joined: Fri Jul 25, 2014 4:04 pm
- Location: New Jersey
Re: Sometimes, CUDA context cannot be initialized
So basically I have bunch of windows explorer running, sometimes M$ Office running, FTP client running, Sublime Text, couple consoles, etc.
It happens every couple days, and it's not that possible to have nothing else running for couple days.
Yes I'm doing batch encoding using bash and rakefile.
Since I found it stuck in the morning I now always pre-create index beforehand -- and still occasionally hit the issue when creating index in a batch.
It happens every couple days, and it's not that possible to have nothing else running for couple days.
Yes I'm doing batch encoding using bash and rakefile.
Since I found it stuck in the morning I now always pre-create index beforehand -- and still occasionally hit the issue when creating index in a batch.
Re: Sometimes, CUDA context cannot be initialized
Are you running anything else that consumes GPU memory?
I'll make a test build for you tomorrow that tries several times.
I'll make a test build for you tomorrow that tries several times.
- MeteorRain
- Posts: 130
- Joined: Fri Jul 25, 2014 4:04 pm
- Location: New Jersey
Re: Sometimes, CUDA context cannot be initialized
Not as I'm aware of, except the desktop itself.
nVidia, afaik, is on 358.91. (If I'm reading the correct version number.)
Just notice that dgindexnv.exe has the last modified date of 1/12.
Should I just update to the latest version first and see how it works?
nVidia, afaik, is on 358.91. (If I'm reading the correct version number.)
Just notice that dgindexnv.exe has the last modified date of 1/12.
Should I just update to the latest version first and see how it works?
Re: Sometimes, CUDA context cannot be initialized
Yes, please do a fresh download and test it. I will await your results before making a test build for you.
Re: Sometimes, CUDA context cannot be initialized
Do you have any further test results for us, MeteorRain? One of the recent updates fixed a race condition that could cause problems like yours.
- MeteorRain
- Posts: 130
- Joined: Fri Jul 25, 2014 4:04 pm
- Location: New Jersey
Re: Sometimes, CUDA context cannot be initialized
So far so good, tried encoding like 30 files and haven't hit the issue yet.admin wrote:Do you have any further test results for us, MeteorRain? One of the recent updates fixed a race condition that could cause problems like yours.
Re: Sometimes, CUDA context cannot be initialized
OK, thanks. Let me know if anything untoward occurs, please.
- MeteorRain
- Posts: 130
- Joined: Fri Jul 25, 2014 4:04 pm
- Location: New Jersey
Re: [RESOLVED] Sometimes, CUDA context cannot be initialized
Not too bad one time per month but still happens.
Was playing a video when the task started.
Was playing a video when the task started.
- MeteorRain
- Posts: 130
- Joined: Fri Jul 25, 2014 4:04 pm
- Location: New Jersey
Re: [RESOLVED] Sometimes, CUDA context cannot be initialized
One more hit right now. Almost doing nothing just have about 40 windows on the desktop.
Ctrl-C and retry worked.
Ctrl-C and retry worked.
Re: [RESOLVED] Sometimes, CUDA context cannot be initialized
Maybe you ran out of memory.
- MeteorRain
- Posts: 130
- Joined: Fri Jul 25, 2014 4:04 pm
- Location: New Jersey
Re: [RESOLVED] Sometimes, CUDA context cannot be initialized
I don't think so, as it sometimes happens right after an encode, so at least 3-4GB of memory is freed right before running dgnv.admin wrote:Maybe you ran out of memory.
And I do have 16GB of memory, not that much but not easy to be used up as well