ProjectPhysX / FluidX3D

The fastest and most memory efficient lattice Boltzmann CFD software, running on all GPUs via OpenCL. Free for non-commercial use.
https://youtube.com/@ProjectPhysX
Other
3.77k stars 300 forks source link

Basic Tutorial - error when debug initiates #80

Closed AdamOranchak closed 1 year ago

AdamOranchak commented 1 year ago

C++ isn't my first language (Jupyter/Python) so this may be a NOOB issue.

I'm getting: "Unhandled exception at 0x0000000000000000 in FluidX3D.exe: 0xC0000005: Access violation executing location " from "cl_int getDevices" Any ideas?

Tutorial Error 2023-05-16 165424

ProjectPhysX commented 1 year ago

Hi @AdamOranchak,

try setting the compiler from Debug to Release. Please let me know if this fixes the problem!

Regards, Moritz

image

AdamOranchak commented 1 year ago

Thank you for your timely response. Unfortunately, your suggestion didn't work for me. I've been digging into this but have found a solution yet.

What I know so far:

I found an excellent lecture series by Professor Jan Verschelde that provides a "sanity check" Python script that utilizes PyOpenCL. So far I haven't been able to get it running properly.

Clearly, something is preventing OpenCL from running properly. I don't think that this is a problem with your code.

ProjectPhysX commented 1 year ago

Can you run the FluidX3D benchmark from here? This will show you if the OpenCL devices are detected correctly.

AdamOranchak commented 1 year ago

Negative, Dr. I get the following splash screen for a second or 2 and then nothing. I checked the running processes and I'm confident that it is no longer in memory, vlcsnap-2023-05-20-18h31m51s895

ProjectPhysX commented 1 year ago

This is a problem with your driver installation. Can you re-install the latest Nvidia drivers?

AdamOranchak commented 1 year ago

SOLVED! I posted an inquiry on NVidia's Developer Forum and received a suggestion to disable the Intel Graphic Adapter from the display adapter section of Windows Device Manager. This worked. Here are the results from the FluidX3D Benchmark: SOLVED - FluidX3D Benchmark -  2023-05-21

Here are some additional notes that may prove useful:

Prior to arriving at the solution, updated NVidia's CUDA Tool Kit. Initially, the installation reported that there wasn't a compatible version of Visual Studio on my machine. I performed a clean installation of Visual Studio Community 2022 and re-ran the tool kit installation successfully. I followed the CUDA Installation Guide for Windows to the letter with one minor deviation. I was able to compile and run deviceQuery, bandwidthTest, and Smoke Particles. (particles code is no longer on their repository)

However, even after those successes, FluidX3D benchmark didn't run and FluidX3D code wouldn't compile. Disabling the Intel driver fixed everything.

Thank you so very much for writing, sharing, and helping with your code which is an absolute thing of beauty!

ProjectPhysX commented 1 year ago

Awesome! Have fun with the software!