You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You may encounter one or both of the following errors at runtime:
122
+
123
+
```
124
+
OMP: Error #15: Initializing libomp.dylib, but found libomp.dylib already initialized.
125
+
OMP: Hint This means that multiple copies of the OpenMP runtime have been linked into the program.
126
+
```
127
+
128
+
```
129
+
resource_tracker: There appear to be 1 leaked semaphore objects to clean up at shutdown
130
+
```
131
+
132
+
If setting `OMP_NUM_THREADS=1` prevents the crash, the root cause is **multiple OpenMP runtimes loaded simultaneously**. Each runtime maintains its own thread pool and thread-local storage (TLS). When two runtimes spin up worker threads at the same time, they corrupt each other's memory — causing segfaults at `N > 1` threads.
133
+
134
+
---
135
+
136
+
#### Diagnosis
137
+
138
+
First, find how many copies of `libomp.dylib` exist in your virtual environment:
Repeat for every duplicate found. Because these packages use `@loader_path`-relative references to load `libomp.dylib`, the symlink will be transparently resolved to the single canonical runtime at load time.
172
+
173
+
---
174
+
175
+
#### Verify
176
+
177
+
After applying the fix, confirm only one unique `libomp.dylib` is being referenced:
0 commit comments