question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ImportError: undefined symbol: GOMP_critical_end

See original GitHub issue

The following ImportError is seen when I try importing chainer. After some offline discussions with @asi1024 , I understand that this ImportError is probably caused after the changes made to CMakeLists in PR #7474 .

>>> import chainer
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/akshay/chainer/chainer/__init__.py", line 10, in <module>
    from chainer import backends  # NOQA
  File "/home/akshay/chainer/chainer/backends/__init__.py", line 1, in <module>
    from chainer.backends import cuda  # NOQA
  File "/home/akshay/chainer/chainer/backends/cuda.py", line 45, in <module>
    from chainer.backends import _cpu
  File "/home/akshay/chainer/chainer/backends/_cpu.py", line 8, in <module>
    import chainerx
  File "/home/akshay/chainer/chainerx/__init__.py", line 8, in <module>
    from chainerx import _core
ImportError: /usr/local/cuda-9.0/lib64/libcusolver.so.9.0: undefined symbol: GOMP_critical_end

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
kmaehashicommented, Jul 30, 2019
0reactions
toslunarcommented, Jul 30, 2019

The following fixed the problem. Could you rewrite it to add the flag only when it’s needed?

diff --git a/chainerx_cc/CMakeLists.txt b/chainerx_cc/CMakeLists.txt
index 82d4b5c..af19fbc 100644
--- a/chainerx_cc/CMakeLists.txt
+++ b/chainerx_cc/CMakeLists.txt
@@ -92,7 +92,7 @@ if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU|Clang|Intel")
         add_definitions(-D_CRT_SECURE_NO_WARNINGS)
     else()
         set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pthread")
-        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wall -Wextra -fPIC -pthread")
+        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wall -Wextra -fPIC -pthread -fopenmp")
     endif()
     set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG")  # cmake -DCMAKE_BUILD_TYPE=Release
     set(CMAKE_CXX_FLAGS_DEBUG "-O0")  # cmake -DCMAKE_BUILD_TYPE=Debug
Read more comments on GitHub >

github_iconTop Results From Across the Web

Python, ImportError: undefined symbol: g_utf8_skip
When I ran this thing, everything worked fine (I could import the library and do stuff with it). Here, as you can see,...
Read more >
ImportError of 'undefined symbol' - Support
Hi, I installed the hscPipe 7.9.1 with binary distribution (by setup EUPS_PKGROOT ) at Fedora30. It start from scratch.
Read more >
ImportError : undefined symbol - Google Groups
hi cython users: i am new to cython.today i want to use cython to wapper the localmemcache project. i wapper one and successfuly...
Read more >
undefined symbol: _ZN3tbb8internal13numa_topology4fillEPi
Hi, I've just installed openvino toolkit. ubuntu 18.04 Python 3.7.3 openvino_2020.2.120 During installation verification scripts run successfully.
Read more >
Import error undefined symbol and Anaconda python
I have a few questions regarding Pyrosetta 4: First I have Anaconda2 which comes with python installed at ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found