jcmgray / cotengra

Hyper optimized contraction trees for large tensor networks and einsums
https://cotengra.readthedocs.io
Apache License 2.0
178 stars 32 forks source link

Adding fallback for kahypar version number check #25

Closed emprice closed 1 year ago

emprice commented 1 year ago

When kahypar is built from source, the version number apparently defaults to dev, which throws an exception when parsed through int. It's a minor problem, but the error message is particularly mysterious if searching in parallel. My suggested fix is using a regex to parse the version number, falling back on the default profile directory if it doesn't match the typical <major>.<minor>.<patch> format.

jcmgray commented 1 year ago

LGTM, thanks for the PR!