fluidx3d is a relatively new lattis boltzmann fluid dynamics solver. I downloaded code from the website: see below. It is reported to be blazingly fast compared to others solving NS eqns. The breakthrough is in improved cutstomized cpu and gpu memory logic using openCL on a microscopic scale.
The code gets recompiled for each run. The first run is speed “benchmarks” which I completed but that was in text mode. The next run is to run a sample problem with x11 graphics display.
https://fluidx3d.com
Compiling for the test run gives error related to graphics. See below:
tom@mydesktop: ~/Cfd/FluidX3D $ ./make.sh
Info: Detected Operating System: Linux-X11
Info: Compiling with 12 CPU cores.
g++ -c src/graphics.cpp -o temp/graphics.o -std=c++17 -pthread -O -Wno-comment -I./src/X11/include
g++ -c src/info.cpp -o temp/info.o -std=c++17 -pthread -O -Wno-comment -I./src/OpenCL/include
g++ -c src/kernel.cpp -o temp/kernel.o -std=c++17 -pthread -O -Wno-comment
g++ -c src/lbm.cpp -o temp/lbm.o -std=c++17 -pthread -O -Wno-comment -I./src/OpenCL/include
g++ -c src/lodepng.cpp -o temp/lodepng.o -std=c++17 -pthread -O -Wno-comment
g++ -c src/main.cpp -o temp/main.o -std=c++17 -pthread -O -Wno-comment -I./src/OpenCL/include
g++ -c src/setup.cpp -o temp/setup.o -std=c++17 -pthread -O -Wno-comment -I./src/OpenCL/include
g++ -c src/shapes.cpp -o temp/shapes.o -std=c++17 -pthread -O -Wno-comment -I./src/OpenCL/include
g++ temp/*.o -o bin/FluidX3D -std=c++17 -pthread -O -Wno-comment -I./src/OpenCL/include -L./src/OpenCL/lib -lOpenCL -I./src/X11/include -L./src/X11/lib -lX11 -lXrandr
X Error of failed request: BadRRCrtc (invalid Crtc parameter)
Major opcode of failed request: 140 (RANDR)
Minor opcode of failed request: 20 (RRGetCrtcInfo)
Crtc id in failed request: 0x0
Serial number of failed request: 14
Current serial number in output stream: 14
xrandr shows:
tom@mydesktop: ~/Cfd/FluidX3D $ xrandr
Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767
DVI-D-0 disconnected primary (normal left inverted right x axis y axis)
HDMI-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 527mm x 296mm
1920x1080 60.00*+ 59.94 50.00 60.05 60.00 50.04
1600x900 60.00
1280x1024 75.02 60.02
1280x720 60.00 59.94 50.00
1152x864 75.00
1024x768 75.03 60.00
800x600 75.00 60.32
720x576 50.00
720x480 59.94
640x480 75.00 59.94 59.93
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
tom@mydesktop: ~/Cfd/FluidX3D $
Anyone gotten fluidx3d running? Anyone have idea of how to solve graphics issue? I think some xrandr load options might be the key.
I don’t see the error, built as Linux and Linux-X11 and they compiled fine and ran the benchmark on both Nvidia and Intel ARC (way slower… that’s because I have no rebar and PCIe 3.0).
I ran the benchmark as you did. That is a text process. You beat me by a mile. My 7 y/o thing only got 1200.
To run a real graphical cfd problem, you need to edit files in /src directory. Edit defines.hpp to disable Benchmark and enable Interactive Graphics by commenting out first and uncommenting in the second. Then you then edit setup.cpp to enable one problem code sequence. Then run make.sh again to run problem.
That is where the problem occurred. Docs are in the git and kind of cryptical. If you do that let me know if you see same thing.
Please, please, please Can we keep this a place where humans interact with each other instead of throwing YaAIR ( Yet another AI Result )at one another?
The deep AI found my problem – graphics now starts. Solution is below. Code needed display labeled as primary which apparently I did not have.
xrandr --output HDMI-0 --primary
Before change:
tom@mydesktop: ~/Cfd/FluidX3D/src $ xrandr --query
Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767
DVI-D-0 disconnected primary (normal left inverted right x axis y axis)
HDMI-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 527mm x 296mm
1920x1080 60.00*+ 59.94 50.00 60.05 60.00 50.04
1600x900 60.00
1280x1024 75.02 60.02
1280x720 60.00 59.94 50.00
1152x864 75.00
1024x768 75.03 60.00
800x600 75.00 60.32
720x576 50.00
720x480 59.94
640x480 75.00 59.94 59.93
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
After change.
tom@mydesktop: ~/Cfd/FluidX3D $ xrandr
Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767
DVI-D-0 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 527mm x 296mm
1920x1080 60.00*+ 59.94 50.00 60.05 60.00 50.04
1600x900 60.00
1280x1024 75.02 60.02
1280x720 60.00 59.94 50.00
1152x864 75.00
1024x768 75.03 60.00
800x600 75.00 60.32
720x576 50.00
720x480 59.94
640x480 75.00 59.94 59.93
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
tom@mydesktop: ~/Cfd/FluidX3D $
I created the following file:
/etc/X11/Xsession.d/45custom_xrandr-settings and placed this line into it:
xrandr --output DFP6 --primary
This had the effect of making the correct monitor the primary one, and it launches on login.
I only brought up the reference that was removed because it solved the problem and I verified that it did. i thought we were to post solutions to whatever problem someone is encountering and has posted. Now there is a solution to the graphics issue with no reference to where it came from. I thought documentation of info was an important part of this forum.