Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thread error when finding the nearest station given the lat and lon #73

Open
xushanthu-2014 opened this issue Nov 6, 2023 · 3 comments

Comments

@xushanthu-2014
Copy link

I simply run several codes like below and got an error of Fatal Python error: Aborted, Restarting kernel...

from ismn.interface import ISMN_Interface
data_path= "/Users/xushan/research/TUD/ISMN_westEurope/Data_separate_files_header_20170101_20191231_9078_rEeC_20221101"
ismn_data.collection.get_nearest_station(-5.54427, 41.23923)

The logging information is:

Found existing ismn metadata in /Users/xushan/research/TUD/ISMN_westEurope/Data_separate_files_header_20170101_20191231_9078_rEeC_20221101/python_metadata/Data_separate_files_header_20170101_20191231_9078_rEeC_20221101.csv.

OMP: Error #15: Initializing libomp.dylib, but found libiomp5.dylib already initialized.
OMP: Hint This means that multiple copies of the OpenMP runtime have been linked into the program. That is dangerous, since it can degrade performance or cause incorrect results. The best thing to do is to ensure that only a single OpenMP runtime is linked into the process, e.g. by avoiding static linking of the OpenMP runtime in any library. As an unsafe, unsupported, undocumented workaround you can set the environment variable KMP_DUPLICATE_LIB_OK=TRUE to allow the program to continue to execute, but that may cause crashes or silently produce incorrect results. For more information, please see http://openmp.llvm.org/


Fatal Python error: Aborted


Main thread:
Current thread 0x00007ff857c1ab40 (most recent call first):
  File "/Users/xushan/miniconda3/envs/py310/lib/python3.10/site-packages/pygeogrids/nearest_neighbor.py", line 215 in find_nearest_index
  File "/Users/xushan/miniconda3/envs/py310/lib/python3.10/site-packages/pygeogrids/grids.py", line 456 in find_k_nearest_gpi
  File "/Users/xushan/miniconda3/envs/py310/lib/python3.10/site-packages/pygeogrids/grids.py", line 421 in find_nearest_gpi
  File "/Users/xushan/miniconda3/envs/py310/lib/python3.10/site-packages/ismn/components.py", line 784 in get_nearest_station
  File "/var/folders/sk/q1bd_nkn1z345sbmdty96hpn6_w5dn/T/ipykernel_12129/1796113207.py", line 1 in <module>


Restarting kernel...
 
@xushanthu-2014
Copy link
Author

I am running this code on my Mac OS after my university reinstall everything on my laptop...here is one solution which works for me: https://stackoverflow.com/a/54533223

@wpreimes
Copy link
Member

Thanks. So conda install nomkl fixed the problem for you? It might be an issue with macOS and some other dependency rather than this package. So I would not change the dependency list of the ismn package but add a short note to the installation guide in case someone else runs into this issue.

@wpreimes
Copy link
Member

@nfb2021 maybe you can try to reproduce this issue and let me know if you come up with a better solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants