-
Notifications
You must be signed in to change notification settings - Fork 56
Description
So I've recently finished my own master's thesis on validating Accelerad against Radiance for PV modeling in bifacial_radiance, which kinda showed great results in accuracy and speedup until I realized I had the erronous impression that Radiance ran in parallel (an early test I made didn't show any one large single-core load). I'm hopefully going to learn how to do pull requests, and open other issues related to general improvements and Accelerad support scripts I made, but right now what bugs me the most is:
Why isn't parallelization on the CPU made standard?
Since the irradiance cache can be shared between the processors, the number of calculations that are needed per core will be reduced as the number of cores increases. What I've observed is that the total ray tracing time per module decreases as the number of analyzed modules is increased (by not using the analyzeRow function, but combining all the _linePtsMakeDict), so the irradiance cache certainly helps on time reduction. Since all modern CPU's are multi-core, basically all large simulations with bifacial_radiance should see a significant speedup when running Radiance rtrace in parallel.
Just to point out the speedup one can get, I'm including a figure from the thesis. The thesis isn't going to be available until like in three months, but its name is "GPU-accelerated ray tracing for PV modeling", and the appendix can be found on my GitHub page (a huge mess of files).
Anyway, back to the figure. I wanted to test the speed of Radiance and Accelerad in simple and complex scenes, as well as combining _linePtsMakeDict and throwing it all into one rtrace run instead of using analyzeRow. Systems are made of 5 rows of X modules, with X going from 3 to 21 in steps of two. The simple representation only uses the generated geometry from bifacial_radiance, while the complex ones use a Blender-made 3D model that is massively unoptimized by purpose. Each module is analyzed with a grid of 24*48 sensor points per side. Only the middle row is analyzed, and it is analyzed at 38 different timestamps. The figure then shows:
- Radiance complex: Running Radiance with a single rtrace call for all analyzed modules by combining _linePtsMakeDict's, using complex representation.
- Radiance old script: Running Radiance by calling analyzeRow in simple represenation
- Accelerad old script: Same as Radiance old script, but running Accelerad
- Radiance new script: Same as Radiance complex, but with simple representation
- Accelerad complex: Same as Radiance complex but with Accelerad
- Accelerad new script: Same as Radiance new script but with Accelerad
CPU: Intel i7-14700
GPU: Nvidia RTX4070 Ti Super (overloads on 21 complex modules)
Now, these Radiance runs are not run in parallel, but if they were, they have potential to be just as good or maybe even better than the Accelerad times shown here. The major advantage that bifacial_radiance has over other modeling methods such as viewfactor is its spatial awareness and resolution in per-cell irradiance, which requires a lot of sensors and scene objects, so it's safe to say that this kind of modeling would massively benefit from multi-core computing. Doesn't matter if it's on a single CPU, a GPU, or a supercomputer, parallelization helps in ray tracing.
