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
I've encountered segmentation fault error when using chainerrl with GPU in Docker. The error occurs if I import chainerrl first, then perform a cuda.get_device(args).use(). The quick fix my colleague and I found is to do cuda.get_device(args).use()first, then import chainerrl. Both scenarios are shown below.
root@9d606b33d95a:/home# python3
Python 3.7.6 (default, Dec 19 2019, 23:50:13)
[GCC 7.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from chainer import cuda
>>> import chainerrl
>>> cuda.get_device(1).use()
Segmentation fault (core dumped)
root@9d606b33d95a:/home# python3
Python 3.7.6 (default, Dec 19 2019, 23:50:13)
[GCC 7.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from chainer import cuda
>>> cuda.get_device(1).use()
>>> import chainerrl
>>>
root@9d606b33d95a:/home# nvidia-smi
Thu Jan 16 21:07:09 2020
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.33.01 Driver Version: 440.33.01 CUDA Version: 10.2 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 TITAN RTX On | 00000000:3B:00.0 Off | N/A |
| 63% 81C P2 246W / 280W | 5777MiB / 24220MiB | 99% Default |
+-------------------------------+----------------------+----------------------+
| 1 TITAN RTX On | 00000000:AF:00.0 On | N/A |
| 41% 59C P8 30W / 280W | 1422MiB / 24217MiB | 9% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
+-----------------------------------------------------------------------------+
root@9d606b33d95a:/home# nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Sun_Jul_28_19:07:16_PDT_2019
Cuda compilation tools, release 10.1, V10.1.243
root@9d606b33d95a:/home/DRL_Traffic_Corridor#
root@9d606b33d95a:/home# lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 32
On-line CPU(s) list: 0-31
Thread(s) per core: 2
Core(s) per socket: 8
Socket(s): 2
NUMA node(s): 2
Vendor ID: GenuineIntel
CPU family: 6
Model: 85
Model name: Intel(R) Xeon(R) Silver 4110 CPU @ 2.10GHz
Stepping: 4
CPU MHz: 800.012
CPU max MHz: 3000.0000
CPU min MHz: 800.0000
BogoMIPS: 4200.00
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 1024K
L3 cache: 11264K
NUMA node0 CPU(s): 0-7,16-23
NUMA node1 CPU(s): 8-15,24-31
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cdp_l3 invpcid_single pti ssbd mba ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm mpx rdt_a avx512f avx512dq rdseed adx smap clflushopt clwb intel_pt avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts pku ospke md_clear flush_l1d
root@9d606b33d95a:/home# uname -a
Linux 9d606b33d95a 5.0.0-37-generic #40~18.04.1-Ubuntu SMP Thu Nov 14 12:06:39 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
This is the furthest we could debug this issue. This was initially quite an issue until we found out about the import fix. We are just curious why does importing chainerrl throws a segmentation fault.
The text was updated successfully, but these errors were encountered:
Hm, very strange. I cannot reproduce it on my Ubuntu 16.04 machine with CUDA 9.1.
$ ipython
Python 3.5.2 (default, Nov 23 2017, 16:37:01)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.2.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: from chainer import cuda
In [2]: import chainerrl
In [3]: cuda.get_device(1).use()
In [4]:
I've encountered segmentation fault error when using chainerrl with GPU in Docker. The error occurs if I
import chainerrl
first, then perform acuda.get_device(args).use()
. The quick fix my colleague and I found is to docuda.get_device(args).use()
first, thenimport chainerrl
. Both scenarios are shown below.Dockerfile
My current computer configurations:
This is the furthest we could debug this issue. This was initially quite an issue until we found out about the import fix. We are just curious why does importing chainerrl throws a segmentation fault.
The text was updated successfully, but these errors were encountered: