Comments (6)
pytorch requires MKL which requires Intel/LLVM openmp and we force one environment to have only one OpenMP implementation only.
from ctng-compilers-feedstock.
@isuruf, notice that the current behaviour leads to
$ python -c 'import torch'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/pearu/git/v0dro/pytorch/torch/__init__.py", line 192, in <module>
from torch._C import *
ImportError: /home/pearu/miniconda3/envs/pytorch-cuda-dev/lib/libgomp.so.1: version `OACC_2.0' not found (required by /home/pearu/git/v0dro/pytorch/torch/lib/libtorch_cpu.so)
$ nm /home/pearu/git/v0dro/pytorch/torch/lib/libtorch_cpu.so | grep OACC
w acc_get_device_type@@OACC_2.0
This used to work at least a month ago.. and, IIUC, the issue is related to conda environment rather than to a pytorch build.
from ctng-compilers-feedstock.
pytorch wants both GNU and Intel OpenMP?
from ctng-compilers-feedstock.
good question, I have not found yet where acc_get_device_type
sneaks in..
from ctng-compilers-feedstock.
It turns out to be a pytorch/cuda issue: one of its components links against libcupti_static.a
which references acc_get_device_type@@OACC_2.0
. A fix is to build pytorch with USE_KINETO=0
.
from ctng-compilers-feedstock.
@isuruf, the following script
# main.sh
export PACKAGES="compilers" # TEST 1 SUCCEEDS
export PACKAGES="compilers mkl" # TEST 1 FAILS
export TESTENV=gomp-test
CONDA_BASE=$(conda info --base)
rm -rf $CONDA_BASE/envs/$TESTENV
source $CONDA_BASE/etc/profile.d/conda.sh
conda create -y -c conda-forge -n $TESTENV $PACKAGES
conda activate $TESTENV
echo "TEST 1"
printf "#include <openacc.h>\nint main() { acc_device_t dev_type = acc_get_device_type(); return acc_get_num_devices(dev_type)+90; }"|gcc -x c - -Wl,--trace-symbol='acc_get_device_type' -lgomp -o ./test1 ; readelf -s -W ./test1 | grep acc_get
./test1
echo "-> $?"
illustrates that having the mkl
package in conda environment breaks any program using GNU OpenMP, IIUC.
The output is
TEST 1
/home/pearu/miniconda3/envs/gomp-test/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: /tmp/ccjry9ti.o: reference to acc_get_device_type
/home/pearu/miniconda3/envs/gomp-test/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: /home/pearu/miniconda3/envs/gomp-test/bin/../x86_64-conda-linux-gnu/sysroot/lib/../lib/libgomp.so: definition of acc_get_device_type
5: 0000000000000000 0 FUNC GLOBAL DEFAULT UND acc_get_num_devices@OACC_2.0 (3)
6: 0000000000000000 0 FUNC GLOBAL DEFAULT UND acc_get_device_type@OACC_2.0 (3)
67: 0000000000000000 0 FUNC GLOBAL DEFAULT UND acc_get_num_devices@@OACC_2.0
68: 0000000000000000 0 FUNC GLOBAL DEFAULT UND acc_get_device_type@@OACC_2.0
./test1: /home/pearu/miniconda3/envs/gomp-test/lib/libgomp.so.1: version `OACC_2.0' not found (required by ./test1)
-> 1
I am uncertain which component of the conda world is causing this.
from ctng-compilers-feedstock.
Related Issues (20)
- Update to 9.5.0 HOT 1
- @conda-forge-admin rerender HOT 1
- [Bug] `gxx` 11.2.0 is not compatible with `nvidia::cuda-nvcc`
- libstdc++ is missing `gdb` pretty-printer integration HOT 6
- old glibc forcing syscall HOT 5
- ldd wrapper? HOT 1
- dlopen of libgomp 13.1.0 and 13.2.0 with RTLD_DEEPBIND on Python fail with segmentation fault on Ubuntu 22.04 HOT 15
- @conda-forge-admin, rerender HOT 1
- libgccjit support HOT 2
- Fortran compiler lacks ISO_Fortran_binding.h HOT 1
- Debug symbols for libstdc++ in gxx_impl_linux-64 HOT 1
- tzdb support in libstdcxx 14
- Conda Error during Conda update.
- Where does GCC_CONFIGURE_OPTIONS come from in build.sh?
- Let's configure GCC to work straight from the box HOT 12
- @conda-forge-admin, please add user @timsnyder HOT 1
- Debug build of libgomp?
- libGL Error with Ubuntu 22.04 HOT 60
- latest gcc / gxx 7.5.0 builds have `GLIBC_2.14` symbols HOT 1
- Assembly error (on Linux ARM): Error: unknown pseudo-op: `.alig' HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ctng-compilers-feedstock.