New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
macOS Monterey 12.2 PyTorch-1.7.1 SGD Optimizer Segfaults with libomp.dylib`__kmp_suspend_initialize_thread #72400
Comments
Running a backtrace on lldb gives the following: Seems to be something in the optimizer's autograd.
|
From triage review:
|
@WeightsandBiases it would be helpful if you provide code to reproduce this |
@WeightsandBiases is there a reason why do you have to use PyTorch-1.7.1 when 1.10.2 is already available? |
@malfet It was what my Conda environment solver selected, I can try the latest version if you think that would help. Also, can you please share the entire output of conda list?
And when program crashes, please run image list
|
Hitting this issue when trying to install 1.10 I'll try using a brand new environment and using pip after work. |
confirmed torch 1.10.2 fixes this issue. thank you! |
@WeightsandBiases glad it works for you. It's visible even in the backtrace, that you somehow endup with 2 OpenMP runtimes - For more info, see https://stackoverflow.com/questions/4548880/can-should-libiomp5-and-libgomp-mix |
馃悰 Describe the bug
Using optimizer.step() with optimizer = optim.SGD(self.layers.parameters(), lr=learning_rate) on a fully connected network with nn.Sequential gives the following error on macOS Monterey 12.2 after I updated the OS.
Code confirmed working on Linux and previous version of macOS Big Sur.
Tried reinstalling anaconda and libomp libraries as described here: dmlc/xgboost#1715
Still getting this error:
Logs:
Versions
Collecting environment information...
PyTorch version: 1.7.1
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A
OS: macOS 12.2 (x86_64)
GCC version: Could not collect
Clang version: 12.0.0 (clang-1200.0.32.29)
CMake version: Could not collect
Libc version: N/A
Python version: 3.9.7 (default, Sep 16 2021, 08:50:36) [Clang 10.0.0 ] (64-bit runtime)
Python platform: macOS-10.16-x86_64-i386-64bit
Is CUDA available: False
CUDA runtime version: No CUDA
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A
Versions of relevant libraries:
[pip3] mypy-extensions==0.4.3
[pip3] numpy==1.19.2
[pip3] numpydoc==1.2
[pip3] torch==1.7.1
[conda] _pytorch_select 0.1 cpu_0
[conda] blas 1.0 mkl
[conda] libmklml 2019.0.5 0
[conda] mkl 2019.5 intel_281 intel
[conda] mkl-service 2.3.0 py39h9ed2024_0
[conda] mkl_fft 1.3.0 py39ha059aab_0
[conda] mkl_random 1.0.2 py39h16bde0e_0
[conda] mypy_extensions 0.4.3 py39hecd8cb5_1
[conda] numpy 1.19.2 py39he57783f_0
[conda] numpy-base 1.19.2 py39hde55871_0
[conda] numpydoc 1.2 pyhd3eb1b0_0
[conda] pytorch 1.7.1 cpu_py39h7e2095a_0
cc @ezyang @gchanan @zou3519 @albanD @mruberry @jbschlosser @walterddr @kshitij12345 @vincentqb @malfet
The text was updated successfully, but these errors were encountered: