OpenCL error: CL_INVALID_COMMAND_QUEUE (-36) in function clFinish

689 views
Skip to first unread message

Christopher O'Grady

unread,
Dec 17, 2020, 3:13:41 AM12/17/20
to PTGui Support

I've had OpenCL errors for years now. I just updated to the v12 beta and the first pano I stitch has an OpenCL error.

I had errors with my 4790k system and GTX 1080. I reinstalled my OS when I upgraded to an AMD 3700X and still had OpenCL errors with ptgui.

I was told it was Nvidia's fault so I actually bought an RTX 2080 hoping that would solve the problem. More OpenCL errors.

I upgraded to an AMD 3950X and reinstalled the OS again. This is a workstation and I don't install or do silly things with it. I still have OpenCL errors.

I'm thinking about upgrading to an RTX 3080. But if I can't actually use it for ptgui I'm questioning why I would spend the money because ptgui refuses to batch 360s giving me random OpenCL errors all of the time.

I've never had a version of ptgui where I did not get errors. I'm a little lost now. Is there a solution to this? I've been through 3 different processors and 2 different graphics cards on 3 different clean operating systems. I end up just stitching on the CPU which is irritating with a 2080 in the machine.

OpenCL error of the day today is: OpenCL error: CL_INVALID_COMMAND_QUEUE (-36) in function clFinish

Is there a solution to this please?

PTGui Support

unread,
Dec 17, 2020, 3:53:42 AM12/17/20
to pt...@googlegroups.com
Hi Christopher,

The only thing I can suggest is to quit all other applications that
might be using GPU acceleration while running PTGui. This includes
Firefox and Lightroom. My guess is that nvidia's driver doesn't handle
properly multiple applications accessing compute shaders.

If you check the Windows event log, you should see that the GPU driver
has crashed and was restarted by Windows. After this happens, PTGui
continues to try submitting OpenCL commands to the command queue, but
then the driver says 'invalid command queue'. PTGui just passes this
error on to you.

The problem is specific to NVidia, an AMD gpu should work fine. And of
course disabling GPU acceleration will solve the problem.

Kind regards,

Joost Nieuwenhuijse
www.ptgui.com
> --
> You received this message because you are subscribed to the Google
> Groups "PTGui Support" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to ptgui+un...@googlegroups.com
> <mailto:ptgui+un...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ptgui/b3c5a6ee-a809-4a65-891c-e325ecf8abe2n%40googlegroups.com
> <https://groups.google.com/d/msgid/ptgui/b3c5a6ee-a809-4a65-891c-e325ecf8abe2n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Christopher O'Grady

unread,
Dec 17, 2020, 6:18:57 AM12/17/20
to PTGui Support
I will try closing ALL programs and see if I have more OpenCL errors with PTGui. I have alot of work lined up and alot of 360s to stitch over the next 90 days.

I do not have OpenCL errors with any other programs.

This isn't a Nvidia specific problem, it's a PTGui specific problem.

Nvidia has 80% of the desktop GPU market share.

Thanks again.

PTGui Support

unread,
Dec 17, 2020, 1:35:27 PM12/17/20
to pt...@googlegroups.com
Hi Christopher,

Honestly I don't know what PTGui could be doing wrong. PTGui just
submits OpenCL jobs to the GPU. At some point NVidia's driver is
crashing and Windows restarts the driver. You can claim this is PTGui's
fault, but I simply don't know how to fix this.

I have observed it occasionally but only if multiple applications are
using the GPU. In the past you've mentioned to me that it happens when
playing Youtube in Firefox while stitching. Others have said it happens
when using Lightroom with GPU acceleration switched on.

If you have access to an AMD GPU (perhaps borrow one), give it a try.
With a decent power supply your computer can probably accomodate 2 GPUs.
PTGui doesn't require a very powerful GPU.

Kind regards,

Joost Nieuwenhuijse
www.ptgui.com

On 17/12/2020 12:18, Christopher O'Grady wrote:
> I will try closing ALL programs and see if I have more OpenCL errors
> with PTGui. I have alot of work lined up and alot of 360s to stitch over
> the next 90 days.
>
> I do not have OpenCL errors with any other programs.
>
> This isn't a Nvidia specific problem, it's a PTGui specific problem.
>
> Nvidia has 80% of the desktop GPU market share.
>
> Thanks again.
> On Thursday, December 17, 2020 at 4:53:42 PM UTC+8 PTGui Support wrote:
>
> Hi Christopher,
>
> The only thing I can suggest is to quit all other applications that
> might be using GPU acceleration while running PTGui. This includes
> Firefox and Lightroom. My guess is that nvidia's driver doesn't handle
> properly multiple applications accessing compute shaders.
>
> If you check the Windows event log, you should see that the GPU driver
> has crashed and was restarted by Windows. After this happens, PTGui
> continues to try submitting OpenCL commands to the command queue, but
> then the driver says 'invalid command queue'. PTGui just passes this
> error on to you.
>
> The problem is specific to NVidia, an AMD gpu should work fine. And of
> course disabling GPU acceleration will solve the problem.
>
> Kind regards,
>
> Joost Nieuwenhuijse
> www.ptgui.com <http://www.ptgui.com>
> <https://groups.google.com/d/msgid/ptgui/b3c5a6ee-a809-4a65-891c-e325ecf8abe2n%40googlegroups.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/ptgui/b3c5a6ee-a809-4a65-891c-e325ecf8abe2n%40googlegroups.com?utm_medium=email&utm_source=footer>>.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "PTGui Support" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to ptgui+un...@googlegroups.com
> <mailto:ptgui+un...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ptgui/11fcb756-7dff-4842-9b5b-f9254ae6b382n%40googlegroups.com
> <https://groups.google.com/d/msgid/ptgui/11fcb756-7dff-4842-9b5b-f9254ae6b382n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Christopher O'Grady

unread,
Dec 17, 2020, 7:47:39 PM12/17/20
to PTGui Support
I have a 3 monitor setup on my RTX 2080.

My workflow involves:

1.) Pre-processing files in Capture One.
2.) Stitching in PTGui.
3.) Post processing in Photoshop.
4.) Maybe watching a YouTube video during boring exporting and stitching when there isn't anything else immediate to do.

Closing down everything so PTGui does not crash the graphics driver is the opposite of a workflow.

Unfortunately I do not have access to an AMD GPU. The new RTX 3080 really crushes it as well. I was planning on upgrading to that or the 3080 Ti next. (I play flight sims in VR in my spare time).

Have you reached out to Nvidia as a software developer asking for assistance? 


I would absolutely love to see this issue finally resolved with Nvidia GPUs and PTGui. 

PTGui Support

unread,
Dec 18, 2020, 3:20:09 AM12/18/20
to pt...@googlegroups.com
Actually I've made several attempts to prepare a bug report but couldn't
get this to reproduce on my system. Believe me, I've spent hours trying.

I've just given it a quick try again, playing youtube fullscreen in
Firefox on one monitor, opening lightroom and scrolling through photos,
while running the speedtest panorama 10x in the batch stitcher. I didn't
observe any problem. Win10, GTX1070, dual monitor, 3950X, 800W power supply.

I'm not saying there is no problem, and I did see a GPU driver restart
myself maybe 2 times in the past year (resulting in the
CL_INVALID_COMMAND_QUEUE error in PTGui). Also it's been reported (very
occasionally) by others. So I'm sure there is some problem. If you
google for 'nvidia TDR' you'll also see PTGui is not the only
application affected. Often it's suggested this is due to hardware
problems but you seem to have replaced all hardware already.

Anyway I'll give it a new try, it's on my list.

Kind regards,

Joost Nieuwenhuijse
www.ptgui.com

> www.ptgui.com <http://www.ptgui.com>
> > www.ptgui.com <http://www.ptgui.com> <http://www.ptgui.com
> <https://groups.google.com/d/msgid/ptgui/11fcb756-7dff-4842-9b5b-f9254ae6b382n%40googlegroups.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/ptgui/11fcb756-7dff-4842-9b5b-f9254ae6b382n%40googlegroups.com?utm_medium=email&utm_source=footer>>.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "PTGui Support" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to ptgui+un...@googlegroups.com
> <mailto:ptgui+un...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ptgui/20d00e45-6c93-446d-9d09-e675c4ac7e30n%40googlegroups.com
> <https://groups.google.com/d/msgid/ptgui/20d00e45-6c93-446d-9d09-e675c4ac7e30n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Christopher O'Grady

unread,
Dec 18, 2020, 4:46:27 AM12/18/20
to PTGui Support
This error happened with only PTGui and Capture One open. Browser was not open.

I was preparing another 360 for stitching in C1 and I checked the progress of PTGui and had the error.

My system is a workhorse:
AMD 3950X
X570 Master mobo
Gigabyte Gaming OC RTX 2080
64gb Trident Z Neo 3600mhz RAM
Samsung EVO 850 1TB System drive
Gigabyte AORUS Gen4 SSD 1TB work drive
850W power supply

I'm probably buying an ASUS RTX 3090 the moment I can actually find one in stock. The OpenCL performance of that card is incredible. If PTGui can handle it.

I'm sorry, I was expecting these random OpenCL errors to be fixed when I bought the v12 update.

It was disappointing that the first pano I stitched with it crashed the graphics driver.

Just tried it again and now I have two errors:

CL_INVALID_COMMAND_QUEUE (-36) in function clFinish
CL_UNKNOWN_ERROR (-9999) in function clFlush

PTGui Support

unread,
Dec 18, 2020, 9:57:22 AM12/18/20
to pt...@googlegroups.com
Have you checked Windows Event Viewer for any messages from the nvidia
driver? I think there should be one.

Coincidentally I just heard from another user who had the same problem.
He says installing the nvidia Studio driver (not the game driver)
improved or solved the problem. Perhaps that's worth a try.

Kind regards,

Joost Nieuwenhuijse
www.ptgui.com

> www.ptgui.com <http://www.ptgui.com>
> <http://www.ptgui.com>> <http://www.ptgui.com <http://www.ptgui.com>
> <https://groups.google.com/d/msgid/ptgui/20d00e45-6c93-446d-9d09-e675c4ac7e30n%40googlegroups.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/ptgui/20d00e45-6c93-446d-9d09-e675c4ac7e30n%40googlegroups.com?utm_medium=email&utm_source=footer>>.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "PTGui Support" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to ptgui+un...@googlegroups.com
> <mailto:ptgui+un...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ptgui/b648d856-502b-4459-9024-7e3d5c2c6788n%40googlegroups.com
> <https://groups.google.com/d/msgid/ptgui/b648d856-502b-4459-9024-7e3d5c2c6788n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Christopher O'Grady

unread,
Dec 19, 2020, 2:38:01 AM12/19/20
to PTGui Support
I installed the studio driver and it stitched 2 panos without any problems.

So I had 5 x rather large 360s open in Photoshop editing as I usually do and I exported some pre-processed images from C1 to be stitched.

I save and edit and run filters all day long and my 16 core AMD 3950X simply obeys. I have 64GB of ram so I can have quite a bit open without any issues.

I thought I had finally solved the PTGui problem so I decided to batch stitch some 360s with PTGui in the background while I continued to work in Photoshop.

Catastrophic freeze. My entire system locked up. I needed to do a hard reset. I lost all of the work I had done in those 5 x 360s in Photoshop.

THIS CAN NEVER EVER EVER HAPPEN! I can't have one bit of software in my workflow that threatens to freeze my system. My system is 110% stable. I never EVER have system lockups, especially not when I'm working.

You keep saying it's a problem with Nvidia.

I see it as a problem with PTGui.

PTGui Support

unread,
Dec 19, 2020, 4:03:28 AM12/19/20
to pt...@googlegroups.com
And you keep saying it's a problem with PTGui! You were using Photoshop,
PTGui, Windows and NVidia's driver at the same time when your PC hung.
So why?

Did the mouse pointer still respond? If not, it's certainly a hardware
or driver problem. A regular application like Photoshop or PTGui cannot
cause this. A misbehaving application will simply be closed by the OS.

Perhaps the only thing to consider could be memory overruns. If all
applications are using more RAM than is available, the system will start
swapping. This can bring the system to a crawl, but it will usually not
hang completely. But especially with modern NVME SSDs this is hardly an
issue anymore.

The same can happen with GPU RAM: if both Photoshop and PTGui are trying
to use all of your 8GB (or so?) of GPU Ram at the same time, they will
fight each other for memory and GPU acceleration turns into
deceleration. In PTGui you can configure the maximum amount of GPU
memory to be used, and I assume in Photoshop you can too. Set both to
40% of available GPU memory. Same with system RAM, don't let PTGui and
Photoshop both use 64GB ram at the same time but configure both to use
25 GB.

Let me know if you still see any CL_INVALID_COMMAND_QUEUE errors in
PTGui with the NVIDIA studio driver. This sounds promising.

Kind regards,

Joost Nieuwenhuijse
www.ptgui.com

> www.ptgui.com <http://www.ptgui.com>
> <https://groups.google.com/d/msgid/ptgui/b648d856-502b-4459-9024-7e3d5c2c6788n%40googlegroups.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/ptgui/b648d856-502b-4459-9024-7e3d5c2c6788n%40googlegroups.com?utm_medium=email&utm_source=footer>>.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "PTGui Support" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to ptgui+un...@googlegroups.com
> <mailto:ptgui+un...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ptgui/acd09e8e-be68-4c6e-b837-47c01e433996n%40googlegroups.com
> <https://groups.google.com/d/msgid/ptgui/acd09e8e-be68-4c6e-b837-47c01e433996n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Christopher O'Grady

unread,
Dec 19, 2020, 5:00:55 AM12/19/20
to PTGui Support
This is a 16 core workstation with 64GB of system ram and 8GB of video ram. It's built to run multiple programs at the same time for a photography editing workflow.

It's 2020. If two programs require system resources they should not crash the system over it.

After installing the studio driver PTGui was the only program that has ever crashed my system.

This is not a win for the Nvidia studio driver if it crashed my system.

Can you please just get in contact with Nvidia and fix this? I'm sure they will be able to help you figure out why your program crashes your users systems and causes OpenCL errors.

I've wasted a huge amount of time and energy dancing around with you here. I'm tired of this.

PTGui Support

unread,
Dec 19, 2020, 7:13:47 AM12/19/20
to pt...@googlegroups.com
A blue screen or hard lockup is caused by problems in hardware, driver
or OS. An unprivileged application like PTGui cannot by itself crash the OS.

Of course any application can trigger an underlying problem because it
stresses the system, or uses specific functionality (OpenCL!) not
commonly used.

The CL_INVALID_COMMAND_QUEUE happens after the driver has already
crashed. The error is reported by the driver to PTGui. So it's a
symptom, not the cause. It's not supposed to happen in an ideal world,
but you can blame me for not catching this error and giving a more
descriptive message.

And even in 2020, 8GB of RAM is still 2x4GB, not 2x8. If you have to use
multiple resource-heavy applications, you may have to configure them to
use fewer resources. Still, overtaxing a system may bring it to a crawl,
but it should not cause the computer to crash or lockup. The OS will
arbitrate and perform swapping when necessary.

If I am able to reproduce a driver problem somewhat consistently, I will
file a bug at nvidia. I've done this in the past, and Apple, AMD and
nvidia have all fixed OpenCL related bugs. But I'm having a very hard
time triggering any kind of problem.

I understand your frustration, believe me I've been there too. But I'm
afraid I can only help you diagnose it and offer workarounds.

Also, I'm reluctant to mention it because it's the easy way out, but if
you're unhappy with PTGui you can always contact me to cancel your
license for a refund. I only want happy users.

Kind regards,

Joost Nieuwenhuijse
www.ptgui.com

> www.ptgui.com <http://www.ptgui.com>
> <https://groups.google.com/d/msgid/ptgui/acd09e8e-be68-4c6e-b837-47c01e433996n%40googlegroups.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/ptgui/acd09e8e-be68-4c6e-b837-47c01e433996n%40googlegroups.com?utm_medium=email&utm_source=footer>>.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "PTGui Support" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to ptgui+un...@googlegroups.com
> <mailto:ptgui+un...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ptgui/6a86f7a1-3c58-46cd-a3df-a4ee915eb593n%40googlegroups.com
> <https://groups.google.com/d/msgid/ptgui/6a86f7a1-3c58-46cd-a3df-a4ee915eb593n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Christopher O'Grady

unread,
Dec 21, 2020, 1:07:10 AM12/21/20
to PTGui Support
I was working on a file in PS and I also had C1 open.

I stitched a file in PTGui and went back to PS to continue editing and my system locked up and I had to do a hard reboot. I've never had that happen before.

I've been through 3 different CPUs, 2 different mobos, 2 different PSUs and 2 different GPUs on 3 different operating systems and I still have OpenCL errors with PTGui. I'm just going to completely forget about using the GPU to stitch with PTGui and just use the CPU.

My AMD 3950X does it in a reasonable amount of time and I have no risk of catastrophic system lock-ups.

Christopher O'Grady

unread,
Feb 16, 2021, 8:52:03 PM2/16/21
to PTGui Support
Problem solved... I bought a AMD 6900 XT Red Devil with 16 GB of VRAM.

No more OpenCL errors

It gobbles up panos with all that VRAM.

Nom nom nom...

PTGui Support

unread,
Feb 17, 2021, 2:03:11 AM2/17/21
to pt...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages