gem / oq-engine

OpenQuake Engine: a software for Seismic Hazard and Risk Analysis
https://github.com/gem/oq-engine/#openquake-engine
GNU Affero General Public License v3.0
375 stars 272 forks source link

BCR Risk demo does not produce BCR output on Windows 11 with OQ Engine 3.16.6 #8937

Open pslh opened 11 months ago

pslh commented 11 months ago

I have installed OQ Engine 3.16.6 LTS on Windows 11 using the Windows installer. Running the BCR hazard demo works correctly. Running the BCR risk demo (via continue button on webui) - the calculation completes without error but does not generate a BCR output: the only output is the Full Report RST. Attempting to download the report results in the following error:


DataStoreExportError: Could not export fullreport in rst
  File "C:\Program Files\OpenQuake Engine\python3\lib\site-packages\openquake\engine\export\core.py", line 64, in export_from_db
    exported = export(output_key, dstore)
  File "C:\Program Files\OpenQuake Engine\python3\lib\site-packages\openquake\baselib\general.py", line 566, in __call__
    return self[key](obj, *args, **kw)
  File "C:\Program Files\OpenQuake Engine\python3\lib\site-packages\openquake\calculators\export\hazard.py", line 610, in export_fullreport
    f.write(view('fullreport', dstore))
  File "C:\Program Files\OpenQuake Engine\python3\lib\site-packages\openquake\baselib\general.py", line 566, in __call__
    return self[key](obj, *args, **kw)
  File "C:\Program Files\OpenQuake Engine\python3\lib\site-packages\openquake\calculators\views.py", line 603, in view_fullreport
    return ReportWriter(dstore).make_report(show_inputs=False)
  File "C:\Program Files\OpenQuake Engine\python3\lib\site-packages\openquake\calculators\reportwriter.py", line 73, in __init__
    len(dstore['sitecol']), oq.imtls.size if oq.imtls else 0, num_rlzs)
  File "C:\Program Files\OpenQuake Engine\python3\lib\site-packages\openquake\commonlib\datastore.py", line 494, in __getitem__
    raise KeyError(
"No 'sitecol' found in <DataStore C:\\Users\\PaulHenshaw\\oqdata/calc_5.hdf5 open> and ancestors"

I also note that the console output is rather short:

2023-08-10T10:16:59.78,INFO,SpawnProcess-5/16784,PaulHenshaw@GEMWin11-PH running C:\Users\PAULHE~1\AppData\Local\Temp\tmp9dkescds\calc_5\ClassicalBCR\job_risk.ini [--hc=4]
2023-08-10T10:16:59.79,INFO,SpawnProcess-5/16784,Using engine version 3.16.6
2023-08-10T10:16:59.94,WARNING,SpawnProcess-5/16784,Using 16 cores on GEMWin11-PH
2023-08-10T10:16:59.97,INFO,SpawnProcess-5/16784,Checksum of the inputs: 4106192978 (total size 11.14 KB)
2023-08-10T10:17:00.00,INFO,SpawnProcess-5/16784,Reusing hazard exposure
2023-08-10T10:17:00.04,INFO,SpawnProcess-5/16784,minimum_asset_loss={'structural': 0}
2023-08-10T10:17:00.06,INFO,SpawnProcess-5/16784,Storing risk model
2023-08-10T10:17:00.07,INFO,SpawnProcess-5/16784,Exposing the outputs to the database
2023-08-10T10:17:00.09,INFO,SpawnProcess-5/16784,Stored 46.49 KB on C:\Users\PaulHenshaw\oqdata/calc_5.hdf5 in 0 seconds

Comparing with a "healthy" console output from OQ Engine 3.17.2 on Windows 10

2023-08-10T12:34:46.98,INFO,SpawnProcess-2/10272,paulh@bowie running C:\Users\paulh\AppData\Local\Temp\tmpctiqvlx8\calc_131\ClassicalBCR\job_risk.ini [--hc=130]
2023-08-10T12:34:47.00,INFO,SpawnProcess-2/10272,Using engine version 3.17.2
2023-08-10T12:34:48.36,WARNING,SpawnProcess-2/10272,Using 4 cores on bowie
2023-08-10T12:34:48.38,INFO,SpawnProcess-2/10272,Checksum of the inputs: 4106192978 (total size 11.14 KB)
2023-08-10T12:34:48.43,INFO,SpawnProcess-2/10272,Reusing hazard exposure
2023-08-10T12:34:48.52,INFO,SpawnProcess-2/10272,minimum_asset_loss={'structural': 0}
2023-08-10T12:34:48.55,INFO,SpawnProcess-2/10272,Storing risk model
2023-08-10T12:34:48.59,INFO,SpawnProcess-2/10272,Building risk inputs from 1 realization(s)
2023-08-10T12:34:52.49,INFO,SpawnProcess-2/10272,Built 9144 risk inputs
2023-08-10T12:34:55.55,INFO,SpawnProcess-2/10272,Sent 8 classical_bcr tasks, 4.42 MB in 2 seconds
2023-08-10T12:35:45.24,INFO,SpawnProcess-2/10272,classical_bcr  12% [8 submitted, 0 queued]
2023-08-10T12:35:45.44,INFO,SpawnProcess-2/10272,classical_bcr  25% [8 submitted, 0 queued]
2023-08-10T12:35:45.71,INFO,SpawnProcess-2/10272,classical_bcr  37% [8 submitted, 0 queued]
2023-08-10T12:35:46.03,INFO,SpawnProcess-2/10272,classical_bcr  50% [8 submitted, 0 queued]
2023-08-10T12:36:13.54,INFO,SpawnProcess-2/10272,classical_bcr  62% [8 submitted, 0 queued]
2023-08-10T12:36:13.87,INFO,SpawnProcess-2/10272,classical_bcr  75% [8 submitted, 0 queued]
2023-08-10T12:36:13.91,INFO,SpawnProcess-2/10272,classical_bcr  87% [8 submitted, 0 queued]
2023-08-10T12:36:14.09,INFO,SpawnProcess-2/10272,classical_bcr 100% [8 submitted, 0 queued]
2023-08-10T12:36:14.10,INFO,SpawnProcess-2/10272,Mean time per core=66s, std=0.4s, min=65s, max=66s
2023-08-10T12:36:14.12,INFO,SpawnProcess-2/10272,Received {'bcr_data': '484.3 KB'} in 78 seconds from classical_bcr
2023-08-10T12:36:14.34,INFO,SpawnProcess-2/10272,Exposing the outputs to the database
2023-08-10T12:36:14.43,INFO,SpawnProcess-2/10272,Stored 242.82 KB on C:\Users\paulh\oqdata/calc_131.hdf5 in 86 seconds

We can see that on Windows 11 we do not have the message "Building risk inputs from 1 realization(s)".

Using Engine 3.17.2 on the same Windows 11 machine, the BCR demo works correctly, it is possible to download both BCR CSV results and Full Report RST.

Testing the BCR Demo with Paolo using the Windows 10 VM, both engine 3.16.6 and 3.17.2 run to completion and generate the BCR outputs correctly.

We note that the github running uses the "windows-latest" image which currently corresponds to Windows Server 2022 which uses a different codebase to both Windows 10 and Windows 11. Github does not currently have runners for Windows 10 or Windows 11, so it is not possible to test these O/S via the standard github runners; it may be possible to test using self-hosted runners.

pslh commented 11 months ago

See also bug https://github.com/gem/oq-engine/issues/8936

micheles commented 11 months ago

It is not reproducible anymore. Keeping the issue open for a while, to see if it will come back or not.

ptormene commented 10 months ago

A user participating to a risk workshop reported that on Windows 11 the same calculation was completed both running it as a simple user and as an administrator, but it produced the expected outputs only after running it as an administrator.