larroy edited a comment on issue #10856: Failed OpenMP assertion when loading 
MXNet compiled with DEBUG=1
URL: 
https://github.com/apache/incubator-mxnet/issues/10856#issuecomment-505134548
 
 
   I tried with the PR from Anton, and I also get a crash, in that version we 
are only linking with MKL's openmp:
   
   
   ```
   (py3_venv) pllarroy@elite:1: ~/d/GradOptMXNet [autograd_fixes]> ./fc_mx.py
   w odict_values([Parameter sequential0_dense0_weight (shape=(3, 0), 
dtype=float32), Parameter sequential0_dense0_bias (shape=(3,), dtype=float32)])
   OMP: Error #15: Initializing libiomp5.so, but found libiomp5.so 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://www.intel.com/software/products/support/.
   fish: “./fc_mx.py” terminated by signal SIGABRT (Abort)
   (py3_venv) pllarroy@elite:134: ~/d/GradOptMXNet [autograd_fixes]> ldd 
/home/ANT.AMAZON.COM/pllarroy/devel/mxnet/python/mxnet/../../build/libmxnet.so 
| grep -i openmp
   (py3_venv) pllarroy@elite:1: ~/d/GradOptMXNet [autograd_fixes]> ldd 
/home/ANT.AMAZON.COM/pllarroy/devel/mxnet/python/mxnet/../../build/libmxnet.so 
| grep -i omp
        libiomp5.so => 
/home/ANT.AMAZON.COM/pllarroy/devel/mxnet/build/mklml/mklml_lnx_2019.0.5.20190502/lib/libiomp5.so
 (0x00007f60c8446000)
   (py3_venv) pllarroy@elite:0: ~/d/GradOptMXNet [autograd_fixes]> ipython
   Python 3.6.8 (default, Jan 14 2019, 11:02:34) 
   Type 'copyright', 'credits' or 'license' for more information
   IPython 7.5.0 -- An enhanced Interactive Python. Type '?' for help.
   
   In [1]: import mxnet as mx                                                   
                                                                                
                                      
   mx.li
   In [2]: mx.libinfo.find_lib_path()                                           
                                                                                
                                      
   Out[2]: 
['/home/ANT.AMAZON.COM/pllarroy/devel/mxnet/python/mxnet/../../build/libmxnet.so']
   
   In [3]:                                                                      
                                                                                
                                      
   Do you really want to exit ([y]/n)? y
   ```
   
   https://github.com/apache/incubator-mxnet/pull/12160
   
   When compiling without OpenMP the example above doesn't crash.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to