Closed diegobenedicto closed 3 years ago
Hi Diego,
I've seen the Illegal instruction problem several times recently while testing the latest Docker images. Every time the problem was that EDDL was being compiled with the new BUILD_HPC
CMake flag, which is ON by default. That enables extra compiler flags like -march=native -mtune=native
, which break the library if it's compiled on a machine and run on another. That's typically the case with Docker, where you build the image once and then run it somewhere else.
To avoid this problem, compile EDDL with -D BUILD_HPC=OFF
.
This worked for me and hopefully should fix your issue as well.
I have compiled EDDL 0.8a with -D BUILD_HPC=OFF and now it works. Thanks Simone!
Thanks Diego and Simone,
I understand it is not necessary yet I check it with C++.
Anyway, do not hesitate to ask Roberto, Salva or me any other problem you find.
Thanks and regards,
Jon
Since the EDDL is intended for C++ users, we've set the -D BUILD_HPC
flag to ON
by default (this is due to the substantial increase in performance we get). Nevertheless, if you intend to compile the library for a different CPU or docker, you should disable it. To aid with the troubleshooting I've added a warning:
[WARNING] The 'BUILD_HPC' flag is enabled and might not work on a different
CPU.
If you intend to compile the library for different CPUs (or for a docker
image), you should disable it: '-D BUILD_HPC=OFF'. This happens because it
makes use of native compiling flags.
Ps.: If it gives users a lot of headaches, we'll disable it by default
Describe the bug When I execute the python code attached (based on https://github.com/deephealthproject/use_case_pipeline/tree/3rd_hackathon/python) I get a core dump
To Reproduce DeepHealth libraries
Use the file: code.zip
conda env create -f environment.yml
Execute the python file attached using the conda environment:
A core dump happens: (p138-dh2-env-kdheddl08a) jovyan@jupyter-dhgpu3:~/projects/p138-dh2$ python msseg08a.py Illegal instruction (core dumped)
If I execute the python code using gdb (https://wiki.python.org/moin/DebuggingWithGdb) the error is:
gdb -ex r --args python msseg08a.py
Thread 1 "python" received signal SIGILL, Illegal instruction. 0x00007fffd93d07a0 in Tensor::updateData(float, void, bool) () from /usr/local/lib/libeddl.so
This error comes from line in python code:
in_ = eddl.Input([n_channels, size[0], size[1]])
Screenshots