UTCI Comfort Map Failure on "ComputeSpericalViewFactors"

Hey,
I might be late to the party, but I’m getting similar errors while using AD, PMV and UTCI Comfort Map components, all look like that, only the number of failed tasks and traceback line varies between components. I use the 1.6.0 version.
“”"
Runtime error (PythonException): The recipe failed to run with the following summary:

Scheduled 67 tasks of which:

  • 43 ran successfully:
    • 1 CopyGridInfo(…)
    • 1 CopyRedistInfo(…)
    • 1 CopyResultInfo(…)
    • 1 CreateDirectSky(…)
    • 1 CreateDynamicShadeOctrees(…)
  • 3 failed:
    • 3 ComputeSphericalViewFactors(…)
  • 21 were left pending, among these:
    • 4 were missing external dependencies:
      • 1 RunRadianceSimulation(…)
      • 3 RunRadianceSimulationLoop(…)
    • 3 had failed dependencies:
      • 3 _RadianceMappingEntryPoint_11dd2a9eOrchestrator(…)
    • 10 had missing dependencies:
      • 1 LetUtciComfortMapFly(…)
      • 1 RestructureConditionIntensityResults(…)
      • 1 RestructureConditionResults(…)
      • 1 RestructureCspResults(…)
      • 1 RestructureHspResults(…)
    • 4 was not granted run permission by the scheduler:
      • 1 RunRadianceSimulation(…)
      • 3 RunRadianceSimulationLoop(…)

This progress looks :frowning: because there were failed tasks

Use the report_out attribute of recipe settings to see a full report.

Traceback:
line 224, in script
“”"
Do you have an idea how to fix this?

Hey @ItsaPlant ,

Can you confirm that the units of your Rhino model are set up in a way that make sense for your geometry?

If so, then upload the file from here and this will tell us exactly what failed in your simulation:

C:\Users\[USERNAME]\simulation\[MODEL_NAME]\utci_comfort_map\__logs__\logs.log

Hey @chris thanks so much for a quick reply!
The model is in meters, with a building apx 10m by 15m, 6m in height and the exterior area about three times larger.
As a new user I’m getting a message that I can’t upload files here, but please find the log file on Dropbox: Dropbox - logs.log - Simplify your life

That log is from 1.5.0, 1.6.0 gives the same error though. The log file for 1.6.0 (with slightly bigger model) is here: Dropbox - logs.log - Simplify your life

Hi @ItsaPlant ,

Thanks for the error file and it’s clear that the real error is because Radiance is returning a non-zero return code. Given that some of the Radiance steps are succeeding while others are failing, I would guess that this source of the problem is that you have an old, incompatible installation of Radiance on your system. Make sure that you are following the Compatibility Matrix:

… and you are using a version of Radiance from March 2021 or later. FYI, you can check the currently-installed version of Radiance using the HB Check Versions component like so:

image

Hi @chris ,
I just checked the versions and it looks like all are up to date

I also checked the Rhino version, it’s 7.30

Might there be another reason for the error?

Thanks, @ItsaPlant .

This seems that this might actually be a really rare/weird error. It’s coming from a Radiance function but the return code (255) is not an official one that is used by Radiance:

Can you upload the .gh file that was used to create the issue? If I can recreate it on my end, then I’m sure that I can fix it.

If not, then I have one more thing to try that would help me see the real error. But let’s see if I can recreate it first.

Hi @chris ,
thank you for so much effort! Please find the file attached, though the same error occurs in multiple scripts. May it be that there are multiple versions or Radiance interfering? I’m just guessing…
LB_ENERGY_EXTERIOR.gh (76.0 KB)

Thanks, @ItsaPlant ,

It seems the issue is specific to your machine since I am able to run your sample file successfully on my end:

Everything is set up to run with the version of Radiance that you see in the “HB Check Versions” component. So my initial reaction isn’t to blame multiple Radiance installations. Can you try the following:

  1. Run this version of your Grasshopper file, copy/paste the out report into a text file and upload it:
    LB_ENERGY_EXTERIOR_CWM.gh (73.2 KB)

  2. It would also be helpful if you could try running the following from command line and make sure that you get a response of help text:

"C:\Program Files\ladybug_tools\radiance\bin\rcontrib.exe" -help

If you don’t get a response that looks like this, then it’s possible that your rcontrib executable in Radiance is blocked and you need to unblock it:

Hey @chris ,

  1. this is the report text:
    report.txt (25.6 KB)

  2. I think I’m getting the same response:

I hope the report will be helpful!

Hi @ItsaPlant ,

Thanks for uploading the files and running the test. Unfortunately, it did not give me more information about the real error but I have one last thing to try that’s a little more complicated to pull off but I’m pretty confident it should show us the real error. To do it correctly, you should do the following steps:

  1. Make sure you are on the machine that had the failing UTCI simulation.
  2. Copy this file onto your desktop:
    view_factor.pts (100.2 KB)
  3. Run the following from command line (note that I changed the file paths to be where I think all of the files are on your machine):
"C:\Program Files\ladybug_tools\radiance\bin\rcontrib.exe" -I -M "C:/Users/Krzysztof Michalik/simulation/unnamed/utci_comfort_map/radiance/longwave/resources/scene.mod" -V- -y 2130 "C:/Users/Krzysztof Michalik/simulation/unnamed/utci_comfort_map/radiance/longwave/resources/scene.oct" < "C:/Users/Krzysztof Michalik/Desktop/view_factor.pts" | rmtxop -fa - -c .333 .333 .334  | getinfo - > "C:/Users/Krzysztof Michalik/Desktop/view_factor.mtx"
  1. Send me a screenshot of what you get, which hopefully has the real error. If it somehow does not show me the error, there will be a view_factor.mtx file on your desktop.

Actually, if the command succeeds, then I’m pretty sure that I know what the error is and it may be related to the fact that there’s a space in your username. You can try specifying a _folder_ for the simulation that does not have spaces in the path with the HB Recipe Settings component and see if it succeeds. If so, I’ll push a fix.

Hey @chris ,
Thank you so much for replying in the middle of the night, you’re a hero:)
The command doesn’t run, there’s some Radiance related problem here:

I managed to run only the console part before leaving for an airport - for some time now I won’t have access to the problematic machine…
Once I’m back, I’ll try the specified folder too and let you know about the results!

Hey @ItsaPlant ,

I am happy to say that I was finally able to recreate the issue on my end and identify the error. It is, indeed, related to the white space in your username. It’s going to take me a little bit of time to implement the fix but I think I should be able to make it available by the end of today.

And we all owe a great deal of thanks to you for running so many tests and responding to all of the instructions I listed here. This bug has likely existed in this recipe for a very long time and the only reason why we did not catch it until now is that the other users with white spaces in their usernames who encountered the bug either didn’t report it here or weren’t able to run through this gauntlet of tests for us to finally be able to diagnose the issue.

I’ll let you know once the fix is merged and is available via the “LB Versioner” component. Thanks again for all of the help and have a good flight!

Hi @ItsaPlant ,

I’m just letting you know that I have merged a fix:

… and it is now available with the LB Versioner component if you want to get it on your end. It will also be in the next Pollination Grasshopper single-click installer, which should be released at some point in the next week or so.

Thanks again for reporting this issue and sticking it through all of the tests. Really happy that we got this one solved!

1 Like

Hi,
facing a similar problem.I tried the fix. But it’s not working. Probably I am doing something wrong.
Receive the following error:
"{0;0;0}
0. Runtime error (PythonException):
The recipe failed to run with the following error(s):
2023-07-08 22:53:55 ERROR: “ComputeSphericalViewFactors” failed. See below for more information:
Bad header!
Execution Summary
Scheduled 45 tasks of which:

  • 29 ran successfully:
    • 1 CopyGridInfo(…)
    • 1 CopyRedistInfo(…)
    • 1 CopyResultInfo(…)
    • 1 CreateDirectSky(…)
    • 1 CreateDynamicShadeOctrees(…)
  • 1 failed:
    • 1 ComputeSphericalViewFactors(…)
  • 15 were left pending, among these:
    • 2 were missing external dependencies:
      • 1 RunRadianceSimulation(…)
      • 1 RunRadianceSimulationLoop(…)
    • 1 had failed dependencies:
      • 1 _RadianceMappingEntryPoint_11dd2a9eOrchestrator(…)
    • 10 had missing dependencies:
      • 1 LetUtciComfortMapFly(…)
      • 1 RestructureConditionIntensityResults(…)
      • 1 RestructureConditionResults(…)
      • 1 RestructureCspResults(…)
      • 1 RestructureHspResults(…)
    • 2 was not granted run permission by the scheduler:
      • 1 RunRadianceSimulation(…)
      • 1 RunRadianceSimulationLoop(…)
        This progress looks :frowning: because there were failed tasks
        Traceback:
        line 224, in script "

I am using macOS Ventura Version 13.4.1 (22F82)
Update all Ladybug tools using LB Versioner.

Thanks, @SuNa ,

It appears that your issue is related to this original topic but it is slightly different. Can you confirm the version of lbt_gh that you have installed is 1.6.49? The HB Check Version would tell you this. You just did not connect a panel to this in your screenshot.

If you have LBT 1.6.49 installed, then I am pretty sure that I know what the issue is and I’ll investigate.

If you do not have LBT 1.6.49 installed, please run the LB Versioner and make sure that the issue still exists after that.

Also, @SuNa ,

Assuming that you have LBT 1.6.49 installed, can you upload the log file that is here so that we can see the full error:

Users/sn/simulation/[MODEL_NAME]/utci_comfort_map/__logs__/logs.log

Dear Chris,
I used the LB versioner which updated the lbt_gh to 1.6.51 but the error remains. Attached is the screenshot and the log file.
logs.log (257.4 KB)

Hi @SuNa ,

Thanks for uploading the log file. Your issue is very different from the one at the top of this post, even through the same step of the recipe is failing. You can see here from your log file that the error results from the fact that the IDs of your Honeybee model geometries are not unique:

My guess is that your Honeybee Model is not valid and, if you passed it through the HB Validate Model component, it would give you a full list of all the duplicated IDs in your model, which you should change the name/ID of.

If I am wrong and the “Validate Model” component tells you that your Model is valid, please upload either the Grasshopper definition that you used to create it or the HBJSON file of the Model and I will try to recreate the issue on my end.

Hi @chris

You are right, HB Validate Model shows many errors. It validates a simpler version of the model with uniform building heights (see attached) and UTCI also works.


However, when I try to use actual heights, I receive the “duplicate shade identifier error” with HB Validate component: The following duplicated Shade identifiers were found:
29_Floor1_2
29_Floor1_4
29_Floor1_0
29_Floor1_1
29_Floor1_3

Now I am trying to figure out what is going wrong.

It looks like that _name_ that you’re plugging in for your Dragonfly buildings is not unique for each building. I would either disconnect the _name_ since the default auto-generated names are always unique. Or you could just do a better job ensuring each building has a unique name.