ESHM20 areaSource “polygon perimeter intersects itself” error after v3.16.7

91 views
Skip to first unread message

Ozan Bilal

unread,
May 7, 2025, 3:02:27 PMMay 7
to OpenQuake Users

Hello,

I’m running the ESHM20 in OpenQuake and get:

ValueError: polygon perimeter intersects itself

on every version after 3.16.7, while 3.16.7 processes the same NRML without error. Any change to polygon validation I should know about?

Thanks,


Detailed error:

2025-05-07T19:01:34.74,INFO,SpawnProcess-2/17220,PC@Geoproje2024 running C:\Users\PC\AppData\Local\Temp\PC\calc_229\job.ini [--hc=None]
2025-05-07T19:01:34.74,INFO,SpawnProcess-2/17220,Using engine version 3.23.2
2025-05-07T19:01:35.27,WARNING,SpawnProcess-2/17220,Using 16 processpool workers
2025-05-07T19:01:35.60,INFO,SpawnProcess-2/17220,Checksum of the inputs: 550438536 (total size 35.12 MB)
2025-05-07T19:01:35.61,INFO,SpawnProcess-2/17220,Running PreClassicalCalculator with concurrent_tasks = 32
2025-05-07T19:01:35.62,INFO,SpawnProcess-2/17220,Extracting the hazard sites from the site model
2025-05-07T19:01:35.63,INFO,SpawnProcess-2/17220,Read N=1 hazard sites and L=525 hazard levels
2025-05-07T19:01:35.63,INFO,SpawnProcess-2/17220,Reading C:\Users\PC\AppData\Local\Temp\PC\calc_229\formatted_source_model.xml
2025-05-07T19:01:36.29,INFO,SpawnProcess-2/17220,Building 84 realizations
2025-05-07T19:01:36.30,INFO,SpawnProcess-2/17220,Reading the source model(s) in parallel
2025-05-07T19:01:36.37,WARNING,SpawnProcess-2/17220,Sent 23 read_source_model tasks, 12.49 KB
2025-05-07T19:01:38.93,INFO,SpawnProcess-2/17220,Received 1 * 80 B in 2 seconds [unpik=0.00s] from read_source_model
{'tot': '80 B'}
2025-05-07T19:01:38.94,ERROR,SpawnProcess-2/17220,Traceback (most recent call last):
  File "C:\Users\PC\AppData\Local\Programs\OpenQuake Engine\python3\Lib\site-packages\openquake\engine\engine.py", line 208, in run_calc
    calc.run(shutdown=True)
  File "C:\Users\PC\AppData\Local\Programs\OpenQuake Engine\python3\Lib\site-packages\openquake\calculators\base.py", line 339, in run
    raise exc from None
  File "C:\Users\PC\AppData\Local\Programs\OpenQuake Engine\python3\Lib\site-packages\openquake\calculators\base.py", line 325, in run
    self.pre_execute()
  File "C:\Users\PC\AppData\Local\Programs\OpenQuake Engine\python3\Lib\site-packages\openquake\calculators\base.py", line 719, in pre_execute
    calc.run(remove=False)
  File "C:\Users\PC\AppData\Local\Programs\OpenQuake Engine\python3\Lib\site-packages\openquake\calculators\base.py", line 339, in run
    raise exc from None
  File "C:\Users\PC\AppData\Local\Programs\OpenQuake Engine\python3\Lib\site-packages\openquake\calculators\base.py", line 325, in run
    self.pre_execute()
  File "C:\Users\PC\AppData\Local\Programs\OpenQuake Engine\python3\Lib\site-packages\openquake\calculators\base.py", line 729, in pre_execute
    self.read_inputs()
  File "C:\Users\PC\AppData\Local\Programs\OpenQuake Engine\python3\Lib\site-packages\openquake\calculators\base.py", line 608, in read_inputs
    self.csm = csm = readinput.get_composite_source_model(
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\PC\AppData\Local\Programs\OpenQuake Engine\python3\Lib\site-packages\openquake\commonlib\readinput.py", line 1000, in get_composite_source_model
    csm = source_reader.get_csm(oqparam, full_lt, dstore)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\PC\AppData\Local\Programs\OpenQuake Engine\python3\Lib\site-packages\openquake\hazardlib\source_reader.py", line 277, in get_csm
    h5=dstore if dstore else None).reduce()
                                   ^^^^^^^^
  File "C:\Users\PC\AppData\Local\Programs\OpenQuake Engine\python3\Lib\site-packages\openquake\baselib\parallel.py", line 924, in reduce
    return self.submit_all().reduce(agg, acc)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\PC\AppData\Local\Programs\OpenQuake Engine\python3\Lib\site-packages\openquake\baselib\parallel.py", line 608, in reduce
    for result in self:
  File "C:\Users\PC\AppData\Local\Programs\OpenQuake Engine\python3\Lib\site-packages\openquake\baselib\parallel.py", line 594, in __iter__
    yield from self._iter()
  File "C:\Users\PC\AppData\Local\Programs\OpenQuake Engine\python3\Lib\site-packages\openquake\baselib\parallel.py", line 584, in _iter
    out = result.get()
          ^^^^^^^^^^^^
  File "C:\Users\PC\AppData\Local\Programs\OpenQuake Engine\python3\Lib\site-packages\openquake\baselib\parallel.py", line 414, in get
    raise etype(msg)
ValueError:
  File "C:\Users\PC\AppData\Local\Programs\OpenQuake Engine\python3\Lib\site-packages\openquake\baselib\parallel.py", line 437, in new
    val = func(*args)
          ^^^^^^^^^^^
  File "C:\Users\PC\AppData\Local\Programs\OpenQuake Engine\python3\Lib\site-packages\openquake\hazardlib\source_reader.py", line 164, in read_source_model
    [sm] = nrml.read_source_models([fname], converter)
    ^^^^
  File "C:\Users\PC\AppData\Local\Programs\OpenQuake Engine\python3\Lib\site-packages\openquake\hazardlib\nrml.py", line 336, in read_source_models
    sm = to_python(fname, converter)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\PC\AppData\Local\Programs\OpenQuake Engine\python3\Lib\site-packages\openquake\hazardlib\nrml.py", line 175, in to_python
    return node_to_obj(node, fname, *args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\PC\AppData\Local\Programs\OpenQuake Engine\python3\Lib\site-packages\openquake\baselib\general.py", line 690, in __call__
    return self[key](obj, *args, **kw)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\PC\AppData\Local\Programs\OpenQuake Engine\python3\Lib\site-packages\openquake\hazardlib\nrml.py", line 200, in get_source_model_04
    src = converter.convert_node(src_node)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\PC\AppData\Local\Programs\OpenQuake Engine\python3\Lib\site-packages\openquake\hazardlib\sourceconverter.py", line 757, in convert_node
    obj = getattr(self, 'convert_' + name)(node)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\PC\AppData\Local\Programs\OpenQuake Engine\python3\Lib\site-packages\openquake\hazardlib\sourceconverter.py", line 910, in convert_areaSource
    polygon = geo.Polygon([geo.Point(*xy) for xy in coords])
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\PC\AppData\Local\Programs\OpenQuake Engine\python3\Lib\site-packages\openquake\hazardlib\geo\polygon.py", line 58, in __init__
    raise ValueError('polygon perimeter intersects itself')
ValueError: polygon perimeter intersects itself

Michele Simionato

unread,
May 13, 2025, 1:48:32 AMMay 13
to OpenQuake Users
I don't know, I can run the ESHM20 just fine. I see two possibilities:

1. you are using a version of the ESHM20 which is not the one GEM uses
2. you are using a wrong version of the geospatial libraries

I don't know how to help. Try to install the latest engine on a different machine, preferably a linux server and see if you can reproduce the error.

             Michele

Victoria Minkovska

unread,
Jun 16, 2025, 10:42:10 AMJun 16
to OpenQuake Users
Hello,
I am getting the same ValueError when using the ESHM20 with OQ 3.23.2.

~~~~
File "C:\Users\Victoria\AppData\Local\Programs\OpenQuake Engine\python3\Lib\site-packages\openquake\hazardlib\geo\polygon.py", line 58, in __init__

    raise ValueError('polygon perimeter intersects itself')
ValueError: polygon perimeter intersects itself
~~~~

Please, any advices how it could be fixed?

Soumitra Chatterji

unread,
Jul 4, 2025, 9:54:15 AMJul 4
to OpenQuake Users
Hi, Untill yesterday (04.07.25), it ESHM20 was running just find in Windows OQ version 3.20.1. 
Today, I am getting the same error as Ozan Bilal and Victoria Minkovska. 
I also cleaned up the space and created space. 
I think it mostly the error has to do with python or Windows as it is running in LiNux or  due to and not polygon: 

2025-05-07T19:01:38.94,ERROR,SpawnProcess-2/17220,Traceback (most recent call last):
  File "C:\Users\PC\AppData\Local\Programs\OpenQuake Engine\python3\Lib\site-packages\openquake\engine\engine.py", line 208, in run_calc
    calc.run(shutdown=True)
  File "C:\Users\PC\AppData\Local\Programs\OpenQuake Engine\python3\Lib\site-packages\openquake\calculators\base.py", line 339, in run
    raise exc from None
  File "C:\Users\PC\AppData\Local\Programs\OpenQuake Engine\python3\Lib\site-packages\openquake\calculators\base.py", line 325, in run
    self.pre_execute()

Anirudh Rao

unread,
Jul 4, 2025, 12:16:59 PMJul 4
to OpenQuake Users
What did you change since yesterday?

Soumitra Chatterji

unread,
Jul 4, 2025, 12:50:02 PMJul 4
to OpenQuake Users
Hi Arinudh,
So, in Windows, with different versions I am still acounting the error. I did not change anything. Even my previous 400 disaggregations that succesfuly ran in my local PC, now the same scripts does not run anymore. So I assume it has to do something with the memory or Python usage. 

The script that I used before which I am using also now are running perfectly fine in Linux currently as well with version OQ 3.20.1
But again, the same script does not run in Windows locally. 

I am getting exatly the same error as others: 

Ozan Bilal

unread,
Jul 7, 2025, 8:31:17 AMJul 7
to openqua...@googlegroups.com

Update: I tested the same ESHM20 areaSource on 4 different machines without success—then I installed a brand-new PC that uses Python 3.12.10, and it ran perfectly. No other changes to the model or workflow.

It seems the Python version in the bundled OpenQuake engine may matter. You might try updating your Python runtime to 3.12.10 (or later) and see if that resolves the “polygon perimeter intersects itself” error.

Best Regards,


 

Ozan Bilal 

CE, Ph.D.

www.geoproje.com.tr

 

Newada Residence, K:23, D:165,

Altayçeşme, Maltepe, İstanbul

Tel: +90 216 450 54 36

 



Soumitra Chatterji <jyotsana.ch...@gmail.com>, 4 Tem 2025 Cum, 19:50 tarihinde şunu yazdı:
--
You received this message because you are subscribed to the Google Groups "OpenQuake Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openquake-use...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/openquake-users/828e9af4-039e-41d3-b5a8-24681cc2dce2n%40googlegroups.com.

Antonio Ettorre

unread,
Jul 8, 2025, 2:53:52 AMJul 8
to OpenQuake Users
Hi,
 please can you share the hardware and software details of this  brand-new PC?
And how do you install OpenQuake ?

Antonio

Ozan Bilal

unread,
Jul 8, 2025, 8:12:49 AMJul 8
to openqua...@googlegroups.com
Hi,

I downloaded the latest version and installed it:

https://downloads.openquake.org/pkgs/windows/oq-engine/

Component
Specification
Operating System Microsoft Windows 11 Pro for Workstations
OS Version (Build) 10.0.26100 (Build 26100)
System Architecture x64-based PC
Processor Intel Core i9-14900KF @ 3.20 GHz (24 cores, 32 threads)
Installed Memory (RAM) 64 GB
Graphics Card NVIDIA GeForce RTX 5060 Ti
Motherboard MSI MAG Z790 TOMAHAWK MAX WIFI (MS-7E25)
BIOS American Megatrends A.A1 (16 May 2025)

Best Regards,


 

Ozan Bilal 

CE, Ph.D.

www.geoproje.com.tr

 

Newada Residence, K:23, D:165,

Altayçeşme, Maltepe, İstanbul

Tel: +90 216 450 54 36

 



Antonio Ettorre <ant...@openquake.org>, 8 Tem 2025 Sal, 09:53 tarihinde şunu yazdı:
Reply all
Reply to author
Forward
0 new messages