Centering a snapshot: OMP: Error #15: Initializing libomp.dylib,

34 views
Skip to first unread message

Stuart Anderson

unread,
Nov 10, 2023, 1:47:40 AM11/10/23
to pynbody-users
Hello,

I recently reloaded Anaconda and pynbody and since then am unable to centre snapshots.

The error is pasted below. The command which triggers this is (f is the snapshot):

pynbody.analysis.halo.center(f.s, mode='hyb')

The same happens with other snapshots. pynbody 1.4.2, Spyder 5.4.3. MacOS Big Slur 11.2.3.

I have tried reinstalling everything - no luck.

Any ideas?

Thanks.



OMP: Error #15: Initializing libomp.dylib, but found libomp.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 0x000000011b14be00 (most recent call first):
  File "/Users/stuartanderson/anaconda3/lib/python3.11/site-packages/pynbody/filt.py", line 168 in __call__
  File "/Users/stuartanderson/anaconda3/lib/python3.11/site-packages/pynbody/filt.py", line 30 in where
  File "/Users/stuartanderson/anaconda3/lib/python3.11/site-packages/pynbody/snapshot/__init__.py", line 1821 in __init__
  File "/Users/stuartanderson/anaconda3/lib/python3.11/site-packages/pynbody/snapshot/__init__.py", line 266 in __getitem__
  File "/Users/stuartanderson/anaconda3/lib/python3.11/site-packages/pynbody/analysis/halo.py", line 198 in hybrid_center
  File "/Users/stuartanderson/anaconda3/lib/python3.11/site-packages/pynbody/analysis/halo.py", line 330 in center
  File "/Users/stuartanderson/Documents/Astronomy/Projects/Gaia_DR3/Karl_project/Code/max_likelihood_models_v1.0.py", line 359 in <module>
  File "/Users/stuartanderson/anaconda3/lib/python3.11/bdb.py", line 600 in run
  File "/Users/stuartanderson/anaconda3/lib/python3.11/site-packages/spyder_kernels/customize/spyderpdb.py", line 900 in run
  File "/Users/stuartanderson/anaconda3/lib/python3.11/site-packages/spyder_kernels/customize/spydercustomize.py", line 473 in exec_code
  File "/Users/stuartanderson/anaconda3/lib/python3.11/site-packages/spyder_kernels/customize/spydercustomize.py", line 615 in _exec_file
  File "/Users/stuartanderson/anaconda3/lib/python3.11/site-packages/spyder_kernels/customize/spydercustomize.py", line 660 in debugfile
  File "/var/folders/vw/y2p_zs9x235dn4tp6n2xbv4w0000gn/T/ipykernel_35125/2655388733.py", line 1 in <module>

Andrew Pontzen

unread,
Nov 10, 2023, 2:00:01 AM11/10/23
to Stuart Anderson, pynbody-users
Strange. Have you tried running it outside spyder? It sounds like some sort of conflict between different loaded modules, though I’m unclear what exactly. It’s worth trying to run it in as plain an environment as possible to track down where the problem might be.

 You might also like to try following the advice in the message itself, setting the environment variable it mentions… although obviously that doesn’t sound like an ideal solution.

All the best, Andrew 


--
You received this message because you are subscribed to the Google Groups "pynbody-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pynbody-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pynbody-users/0c1fadda-f35f-4936-bd55-d090ffe91bb2n%40googlegroups.com.

Stuart Anderson

unread,
Nov 10, 2023, 6:19:10 AM11/10/23
to pynbody-users
OK I tried the environment thing and it didn't work. 

In the end I did a 'clean' uninstall and re-install of Anaconda following the advice here (it seems to be a start-from-scratch install): https://community.anaconda.cloud/t/problem-launching-jupyter-lab-application-launch-error/55577/2

This did the trick. There must have been something wrong in my Anaconda install deep in its bowels.

Rgds,
Stuart

Reply all
Reply to author
Forward
0 new messages