ERROR: 132
curcioriccardo opened this issue · 15 comments
Configuration :
RDKit version: 2021.9.5.1
OS: Ubuntu 18.04.3 LTS
Python version (if relevant): 3.9
Are you using conda? No
If you are not using conda: how did you install the RDKit? Both via pip install rdkit-pypi and from source code.
Hello, i am having trouble running rdkit in python.
In particular i get ERROR: 132 by running this minimal code from the pip install tutorial, without any explanation : from rdkit import Chem;print(Chem.MolToMolBlock(Chem.MolFromSmiles('C1CCC1')))
I installed rdkit also from git and i get the same error.
Thanks for the support.
Best regards.
Additional context
Creating parametersdistributions-ml_app_run ... done
Python 3.9.2 (default, Feb 28 2021, 17:03:44)
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
from rdkit import Chem; print(Chem.MolToMolBlock(Chem.MolFromSmiles('C1CCC1')))
ERROR: 132
I can't reproduce this, and I don't think this is related to RDKit or the pypi package.
I can't reproduce this, and I don't think this is related to RDKit or the pypi package.
Actually using a specific version (rdkit-pypi==2021.3.1.1) the code works. Do you know what could be the cause? Thanks.
Without having a proper error report, I can only guess what's causing this error on your system. It's also most probably caused by your system and settings because others (and the build system and tests) do not see it. If Python crashes (which I guess from your post does), it should give a segmentation fault with a stacktrace. If you post it and more related info, I might be able to reproduce it and find the issue.
Sorry, I was using docker so the container automatically exited.
Here it is what python reports:
Illegal instruction (core dumped)
Ok. Docker is good. Can you provide the container to me or the Dockerfile to produce this? Also, are you running on aarch64 Linux? (Just wondering because 2021.9.5 had issues on aarch64).
OS: Ubuntu 18.04.3 LTS
The dockerfile is very simple, even with only a python: 3.9 image and pip installing only rdkit-pypi (any version besides 2021.3.1.1) it gives that error.
I'm starting to think that it is a CPU incompatibility.
Hm. It works fine for me.
$ docker run -it python:3.9 bash
Unable to find image 'python:3.9' locally
3.9: Pulling from library/python
5492f66d2700: Pull complete
540ff8c0841d: Pull complete
a0bf850a0df0: Pull complete
d751dc38ae51: Pull complete
9720a112e886: Pull complete
f97b81fbdbd9: Pull complete
8f5bb67e9e73: Pull complete
0ae6cb39a048: Pull complete
f8c61b949cf8: Pull complete
Digest: sha256:7d200191eba9de7ba03d98ced7c16e0512ae745c412b88fab52d76f372279386
Status: Downloaded newer image for python:3.9
root@88f4c77a50dd:/# pip install rdkit-pypi
Collecting rdkit-pypi
Downloading rdkit_pypi-2021.9.5.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (22.5 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 22.5/22.5 MB 56.4 MB/s eta 0:00:00
Collecting Pillow
Downloading Pillow-9.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.3 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.3/4.3 MB 53.2 MB/s eta 0:00:00
Collecting numpy>=1.19
Downloading numpy-1.22.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.8 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 16.8/16.8 MB 65.0 MB/s eta 0:00:00
Installing collected packages: Pillow, numpy, rdkit-pypi
Successfully installed Pillow-9.0.1 numpy-1.22.3 rdkit-pypi-2021.9.5.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
root@88f4c77a50dd:/# python -c "from rdkit import Chem; print(Chem.MolToMolBlock(Chem.MolFromSmiles('C1CCC1')))"
RDKit 2D
4 4 0 0 0 0 0 0 0 0999 V2000
1.0607 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-0.0000 -1.0607 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-1.0607 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
0.0000 1.0607 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
1 2 1 0
2 3 1 0
3 4 1 0
4 1 1 0
M END
Can you run PYTHONFAULTHANDLER=1 python -c "from rdkit import Chem; print(Chem.MolToMolBlock(Chem.MolFromSmiles('C1CCC1')))"
. This should give you a stacktrace.
root@20dc9a2a21e8:/tool# PYTHONFAULTHANDLER=1 python -c "from rdkit import Chem; print(Chem.MolToMolBlock(Chem.MolFromSmiles('C1CCC1')))"
Fatal Python error: Illegal instruction
Current thread 0x00007fa053103740 (most recent call first):
File "", line 1 in
Illegal instruction (core dumped)
Seems like you are working in a modified docker container.
Can you try running RDKit in a fresh container?
docker run -it --rm python:3.9 bash -c "pip install rdkit-pypi; python -c \"from rdkit import Chem; print(Chem.MolToMolBlock(Chem.MolFromSmiles('C1CCC1')))\""
provv$ docker run -it --rm python:3.9 bash
root@d46203ca6d23:/# pip install rdkit-pypi
Collecting rdkit-pypi
Downloading rdkit_pypi-2021.9.5.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (22.5 MB)
|████████████████████████████████| 22.5 MB 151 kB/s
Collecting Pillow
Downloading Pillow-9.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.3 MB)
|████████████████████████████████| 4.3 MB 12.7 MB/s
Collecting numpy>=1.19
Downloading numpy-1.22.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.8 MB)
|████████████████████████████████| 16.8 MB 15.4 MB/s
Installing collected packages: Pillow, numpy, rdkit-pypi
Successfully installed Pillow-9.0.1 numpy-1.22.3 rdkit-pypi-2021.9.5.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
WARNING: You are using pip version 21.2.4; however, version 22.0.4 is available.
You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.
root@d46203ca6d23:/# python
Python 3.9.10 (main, Jan 29 2022, 04:10:57)
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
from rdkit import Chem; print(Chem.MolToMolBlock(Chem.MolFromSmiles('C1CCC1')))
Illegal instruction (core dumped)
Were you able to resolve this problem?
Unfortunately no.
By looking at this other discussion: rdkit/rdkit#3814 i think it is a CPU problem.
What CPU do you use?
Check out the no popcnt branch. This should produce wheels without the popcnt instructions at https://github.com/kuelumbus/rdkit-pypi/actions/runs/2110102013. Can you try the wheels when they are done?
These are the CPU specs:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 8
On-line CPU(s) list: 0-7
Thread(s) per core: 2
Core(s) per socket: 2
Socket(s): 2
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 15
Model: 6
Model name: Intel(R) Xeon(TM) CPU 3.00GHz
Stepping: 4
CPU MHz: 1992.000
CPU max MHz: 2988,0000
CPU min MHz: 1992,0000
BogoMIPS: 5984.98
Virtualization: VT-x
L1d cache: 16K
L2 cache: 2048K
NUMA node0 CPU(s): 0-7
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 lm constant_tsc pebs bts nopl cpuid pni dtes64 monitor ds_cpl vmx est cid cx16 xtpr pdcm lahf_lm pti tpr_shadow
Yes, i will try them.
Hi, i tried the new wheels and still same error ( Illegal instruction (core dumped)).
The only version working is still "2021.3.1.1".