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

Voxelization failed to run on CPU #101

Closed xx005fs closed 4 months ago

xx005fs commented 1 year ago

I'm currently on Windows 10 using Visual Studio 2019 trying to run some of the default setups with my Ryzen 9 7950X3D CPU, and it seems to work fine with the benchmark runs and simulation runs without loading in an STL file, but once I tried running one that needs to load in an STL file, it throws this error in Visual Studio. Any clues on how to fix it?

Exception thrown at 0x000002B4E5944539 in FluidX3D.exe: 0xC0000005: Access violation reading location 0x000002B4F875A0C0.

ProjectPhysX commented 1 year ago

Hi @xx005fs,

apologies for the bug. Access violation means it's trying to read memory from an array index that is out-of-bounds.

Kind regards, Moritz

xx005fs commented 1 year ago

The stl file is in the correct directory and runs perfectly fine on my GPU. I wanted to run on my CPU due to the limited VRAM I have compared to my system ram. The bug seems to still be there even after commenting out the voxelize line, and I'm just using the aerodynamics of a cow sample setup with the STL downloaded from thingiverse.

ProjectPhysX commented 1 year ago

Are you using Intel's OpenCL CPU runtime, and which version? I can replicate: There seems to be a bug in the OpenCL CPU Runtime with the voxelize_mesh kernel. I'm trying to get to the bottom of it.

xx005fs commented 1 year ago

Sorry I accidentally closed the issue. But in anycase, I'm using the newest intel oneAPI opencl on the github link provided.

ProjectPhysX commented 4 months ago

Hi @xx005fs,

I found the root cause and have fixed this bug! Thanks again for reporting and thanks for the patience!

Kind regards, Moritz