Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

gpmetis error

domagojp

New member
I am getting this error running "gpmetis -minconn -contig -niter=200 region.graph.info 36" command:
------------------------------------------------------------------------------
*** I detected an error in your input file ***

In the first line of the file, you specified that the graph contained
5980 edges. However, I only found 0 edges in the file.
Please specify the correct number of edges in the first line of the file.
------------------------------------------------------------------------------
I am using the latest MPAS-Limited-Area tool and I tried several different mesh files and gpmetis versions but I always get this error. The program always reads edges from the first line fine but cannot find edges in the file itself (reports zero edges). Region.graph.info file looks like this:

2047 5980

np.int32(512) np.int32(513) np.int32(514) np.int32(509) np.int32(510) np.int32(511)

np.int32(515) np.int32(516) np.int32(517) np.int32(518) np.int32(519) np.int32(520)
...


Thanks..
 
Last edited:
It looks like the MPAS-Limited-Area tool isn't writing the connectivity to the graph.info file in the correct format. For example, the second line
np.int32(512) np.int32(513) np.int32(514) np.int32(509) np.int32(510) np.int32(511)
should probably look like
512 513 514 509 510 511
Here's the part of the MPAS-Limited-Area tool that should be writing this connectivity info: MPAS-Limited-Area/limited_area/mesh.py at v2.1 · MPAS-Dev/MPAS-Limited-Area .

Which versions of Python, numpy, and netCDF4 (the Python module) are you using?
 
python is 3.11.4 and modules are:

Package Version
----------------------- -----------
boltons 23.0.0
brotlipy 0.7.0
certifi 2023.5.7
cffi 1.15.1
cftime 1.6.4.post1
charset-normalizer 2.0.4
conda 23.5.2
conda-content-trust 0.1.3
conda-libmamba-solver 23.5.0
conda-package-handling 2.1.0
conda_package_streaming 0.8.0
cryptography 39.0.1
idna 3.4
jsonpatch 1.32
jsonpointer 2.1
libmambapy 1.4.1
netCDF4 1.7.2
numpy 2.1.2
packaging 23.0
pip 23.1.2
pluggy 1.0.0
pycosat 0.6.4
pycparser 2.21
pyOpenSSL 23.0.0
PySocks 1.7.1
requests 2.29.0
ruamel.yaml 0.17.21
setuptools 67.8.0
six 1.16.0
toolz 0.12.0
tqdm 4.65.0
urllib3 1.26.16
wheel 0.38.4
zstandard 0.19.0
 
It looks like the MPAS-Limited-Area tool isn't writing the connectivity to the graph.info file in the correct format. For example, the second line

should probably look like

Here's the part of the MPAS-Limited-Area tool that should be writing this connectivity info: MPAS-Limited-Area/limited_area/mesh.py at v2.1 · MPAS-Dev/MPAS-Limited-Area .

Which versions of Python, numpy, and netCDF4 (the Python module) are you using?
OK, I tried python 3.11.10 with numpy version 1.26.4 and it works fine now. Thanks for the tip!
 
It does appear that there's a compatibility issue with numpy 2.x. However, with some minor code changes, I think it should be easy for us to make the MPAS-Limited-Area tool work with either version of numpy (1.x or 2.x). We'll try to open a pull request for these changes later this week. Thanks for finding this issue and for following up with a test using numpy 1.26.4!
 
We've merge changes to support NumPy 2.x into the MPAS-Limited-Area main branch through MPAS-Dev/MPAS-Limited-Area PR #47. Thanks again for finding this issue!
 
We've merge changes to support NumPy 2.x into the MPAS-Limited-Area main branch through MPAS-Dev/MPAS-Limited-Area PR #47. Thanks again for finding this issue!
Great! Thank you for the quick response and the tip that helped me fix the problem quickly.
 
Top