Performance of Accelerad

Hi @Nathaniel_Jones,
After the installation, I used the accelerad_rfluxmtx in 5 phase method. The example script is like the following:

vwrays -vf $views/south.vf -x 900 -y 900 -pj 0.7 -c 9 -ff | accelerad_rfluxmtx -v -ffc `vwrays -vf $views/south.vf -x 900 -y 900 -d` \
-o $vmtxhdr/hdr$p-$q/%03d.hdr -ab 10 -ad 65536 -lw 1.52e-5 -c 9 -n 1 - $objects/glazing$p-$q/glazingvmtx.rad -i \
$octrees/glazing$p-$q/room3ph.oct

However, there is not any image generated in the output folder hdr$p-$q after 2 days. I am kind of puzzled about this performance. In contrast, Radiance always generated the rendered images from the beginning. The script is still running without any results.


The first run of Accelerad is slow than Radiance on CPU with 24 processors. And the GPU mempory usage of accelerad_rcontrib is very low like 11%. Is there any way to make full use of GPU for Accelerad?
image
Besides, if I run my script with Accelerad and Radiance simultaneously, will the simulation speed faster than using Accelerad only?

Hi @lee,

Do you mean that the simulation has been running for two days? That is quite unusual for Accelerad, but not knowing anything about the scene you are rendering, I can’t really say why it might happen. However, I do notice that you have a very high -ad setting, which would be carried out in serial by accelerad_rcontrib because the parallelism is on the primary ray.

Low GPU memory usage means that the model geometry does not occupy very much of the GPU’s memory, which is a good thing. I don’t know exactly what GPU-Util field refers to, but GPU utilization generally refers to the fraction of time when a kernel is active on the GPU, which is not something that accelerad_rcontrib can control. It does not include, for example, the time spent moving data back and forth between the GPU and global memory, which could be significant in some cases.

I’m not sure what you mean by running Accelerad and Radiance simultaneously. You can always provide Accelerad the -g- argument, which reverts to normal Radiance behavior without using the GPU.

Hi @Nathaniel_Jones,
Thanks for your patient replys for those questions.

That’s true and I terminated the 3 phase simulation today. Then Accelerad is used in the sun coefficients part of 5 phase method. Its performance is OK and fast with a high ad but a low ab like this:

vwrays -vf $views/south.vf -x 900 -y 900 -pj 0.7 -ff | accelerad_rcontrib -i -ab 1 -ad 10240 -lw 1.0e-4 -dc 1 -dt 0 -dj 0 -ffc -n 1 \
    `vwrays -vf $views/south.vf -x 900 -y 900 -d` -o $hdrIllSpace/hdr$p-$q/%04d.hdr -e MF:6 -f reinhart.cal -b rbin -bn Nrbins \
    -m solar $octrees/glazing$p-$q/sun.oct

Will its abnormal performance in 3 phase part is related to high ab?

In my opinion, Accelerad is based on GPU and Radiance replys on CPU of one workstation. So they can work independently to save the simulation time. For instance, in 5 phase method, Radiance is in the charge of 3 phase part and Accelerad handles the sun coefficients part. Is this thinking reasonable?

Hi @lee,

This is possible, but again, not knowing your model, I can’t say for sure. You could test this.

Yes, in general you can run multiple Radiance instances simultaneously, or Accelerad and Radiance simultaneously. It is inadvisable to run multiple Accelerad instances simultaneously because it will force the GPU to do context switching between them.

Hi @Nathaniel_Jones,

The output images of sun coefficients part are all black again. (The same problem mentioned in a former post: black image)
image
I removed ‘-w’ and there seems no error about the running of Accelerad.


The model is OK cause I once got normal images using Radiance. One image from sun coefficients part of the room model is like this:

What happend in the sun coefficients simulation?

Hi @lee,

What material is the window. Does it accelerad_rconrib give the expected results if you use glass for the window material?

Hi @Nathaniel_Jones,
The material of the window is just glass and the image from Radiance is shown.

The window of the room model consists of plenty of glass strips like this:
image

Hi @lee,

The glazing material in your photograph and Radiance image looks more complicated than just glass. Perhaps I am misunderstanding what you are trying to simulate. I want to know if the issue is with your glazing material definition or with the definition of your sky. So, do you get the expected result from accelerad_rcontrib if you remove the window and leave just a hole in the wall?

Hi @Nathaniel_Jones,

The room model without the window is like this:


The image towards south using Radiance is normal while a all black image from Accelerad.

image

The window system is semi-transparent photovoltaic window where lots of opaque cell strips(2mm width) are in the middle of the glazing. The material of the glazing is just clear glass. The material of cells are the same as the exterior walls. So when there is a window in the room model, the image from Radiance exists many light strips.
image

@lee,

Ok, so it doesn’t seem to be a problem with the window definition. What is your sky definition?

Hi @Nathaniel_Jones
The sky definition is like this:

gendaymtx -5 0.533 -d -m 6 cs.wea > cssun.smx

It doesn’t seem to be a problem with the sky. I compared Radiance and Accelerad using the same model and parameters in simulation. Of course, the values are low to get fast results. Besides, I checked the map image from rpict and accelerad_rpict and they are totally different.

rpict -x 400 -y 400 -ps 1 -av 0.31831 0.31831 0.31831 -ab 0 -vf $views/south.vf $octrees/glazing2-1/Mapsunr.oct \
$cdsmap/glazing2/2-1r.hdr
 accelerad_rpict -x 400 -y 400 -ps 1 -av 0.31831 0.31831 0.31831 -ab 0 -vf $views/south.vf $octrees/glazing2-1/Mapsunr.oct \
> $cdsmap/glazing2/2-1g.hdr


Then I replaced ‘2-1g.hdr’ with ‘2-1r.hdr’ in Accelerad but the images are still black. So it is clear that images from accelerad_rcontrib in $hdrIllSpace and $hdrLumFacade folders are abnormal.

for i in {000..145}
do
    pcomb -h -e 'ro=ri(1)*ri(2)+ri(3);go=gi(1)*gi(2)+gi(3);bo=bi(1)*bi(2)+bi(3)' -o $cdsmap/glazing2/2-1r.hdr -o \
    $hdrIllSpace/hdr2-1g/$i.hdr -o $hdrLumFacade/hdr2-1g/$i.hdr > $mcdshdr/hdr2-1gr/$i.hdr
done

Hi @lee,

So this is actually a problem with accelerad_rpict? I had thought that your issue was only with accelerad_rcontrib.

Are you using su2rad to create your model? There is a known bug in su2rad that prevents it from exporting holes in surfaces to Accelerad. This would explain why the window does not seem to be present in the accelerad_rpict renderings. If that’s the case, the solution is to remodel the wall containing the window such that none of the polygons have holes.

Hi @Nathaniel_Jones,

I guess the problem is related to both accelerad_rcontrib and accelerad_rpict.

Cause I tried to use accelerad_rcontib and rpict together but I still got black images.

Yes, I always used su2rad. Does the bug of su2rad only influence Accelerad? Since the result image with a hole from Radiance is normal.

What deos this mean? When there is a window, my solution is to transform the normal vector of the window polygon and make it towards inside. So the image from Radiance is correct.

Hi @lee,

This is your problem. The bug influences any program that relies on triangulation to represent polygons. Accelerad is one such program. rfluxmtx is another.

In your model, you have created a hole in the wall for the window to occupy. You need to split the wall into multiple polygons in such a way that none of the polygons have holes. The normal vector of the window is not relevant.

Hi @Nathaniel_Jones,

I corrected the room model with window and it is like this:
image
Then I still used su2rad to export the coordinates to Radiance. In sun coefficients part, it is happy to find identical result images from Accelerad and Radiance.
image
image
However, as for the 3 phase part simulation, Accelerad still didn’t output any images but worked well in the ternimal.

vwrays -vf $views/south.vf -x 400 -y 400 -pj 0.7 -c 9 -ff | accelerad_rfluxmtx -v -ffc -i `vwrays -vf $views/south.vf -x 400 -y 400 -d` -o \
$hdrIllum/1-1/%03d.hdr -ab 1 -ad 256 -lw 1.0e-3 -c 9 -n 1 - $objects/1-1/glazingvmtx.rad -i \
$octrees/1-1/room3phd.oct

I tested the same model and parameters using Radiance and its results are as follows.
image
I guess the problem is related to accelerad_rfluxmtx. What is the relationship and difference between accelerad_rfluxmtx and accelerad_rcontrib?

Hi @lee,

Can you provide the complete terminal output from Accelerad? The portion you show doesn’t list any errors, but it is not the complete output.

The relationship is that accelerad_rfluxmtx calls accelerad_rcontrib. It is the same as the relationship between rfluxmtx and rcontrib.

Hi @Nathaniel_Jones,

The portion I showed is just before I terminated the process.The terminal was in the process of accelerad_rcontrib for a long time without any output images and it didn’t list any errors.


The following terminal output is after I killed the process:

Besides, I tried to generate the view matrix with rfluxmtx and daylight matrix with accelerad_rfluxmtx and this method worked normally.

oconv -f $materials $objects/1-1/room.rad > $octrees/1-1/room3ph.oct
vwrays -vf $views/south.vf -x 400 -y 400 -pj 0.7 -c 9 -ff | rfluxmtx -v -ffc `vwrays -vf $views/south.vf -x 400 -y 400 -d` \
-o $vmtxhdr/1-1/%03d.hdr -ab 1 -ad 256 -lw 1.0e-3 -c 9 -n 24 - $objects/1-1/glazingvmtx.rad -i \
$octrees/1-1/room3ph.oct
accelerad_rfluxmtx -v -ff -ab 1 -ad 256 -lw 1.0e-3 -c 1000 -n 1 $objects/1-1/glazingvmtx.rad $skyDomes/skyglowR1.rad -i \
$octrees/1-1/room3ph.oct > $dmtx/1-1/1-1.dmx
dctimestep -o $ph3hdr/1-1/%01d.hdr $vmtxhdr/1-1/%03d.hdr $tmtx/STPV.xml $dmtx/1-1/1-1.dmx $skyVectors/images/$n.smx

Hi @lee,

To make sure I understand, everything is working normally except for the process that you killed. The process that you killed did not generate output because you killed it before it could do that. Accelerad computes the whole image before saving it, so you should not expect to see an output file created until the program finishes running.

As to why the simulation takes so long, I don’t have enough information to guess at that.

Hi @Nathaniel_Jones,

Actually, the only problem is that accelerad_rfluxmtx can’t work normally when generating the view matrix in 3 phase part and direct solar part of 3 phase.

The parameters like ab and ad is very low and Accelerad should not work so slow. In contrast, Radiance created images much quicker. I tried Accelerad again and waited for 637 minutes before I killed the process. However, it still didn’t generate any images. Will this problem related to the pipe input and output? I tried to seperate the work of vwrays and accelerad_rfluxmtx but accelerad_rfluxmtx still work for a long time without any output.

Hi @lee,

It would be helpful if you could open a separate discussion thread for each issue you encounter. Because you keep mentioning different problems in the same discussion thread, it’s difficult to keep track of what is solved and what is not.

Right, if you kill the process, then it will not generate images. However, you haven’t given me any information that would allow me to replicate your issue, so I can’t tell you why Accelerad is taking so long for your model.