Pytorch_geometric: Segmentation fault when running test/nn/conv/test_agnn_conv.py

Created on 17 Mar 2019  路  2Comments  路  Source: rusty1s/pytorch_geometric

Hi,

I encountered Segmentation fault (core dumped) when running test/nn/conv/test_agnn_conv.py.

I used conda virtual environment, and installed cudatoolkit-dev. The pytorch version is 1.0, and the cuda version is 10.0.
I've checked cuda nvcc and pytorch version. They are matched.

Thank you!

Most helpful comment

I was getting segfaults as well and conda installing a new version of gcc and then updating my LD_LIBRARY_PATH to include my conda environment's x86_64-conda_cos6-linux-gnu/lib folder solved the problem. However, when you install gcc with anaconda, it sets various environment variables for you (CXX, GCC, etc.), so you shouldn't need to change the symbolic links for gcc or g++. In fact, changing these links is probably a bad idea because it means you'll end up using your conda environment's compiler instead of your system compiler when you use gcc in other contexts.

All 2 comments

It has been solved.
I would like to record how to install these extensions in a conda virtual environment. It is a little bit more complex than common installation.

create a enviroment: conda create -n my_env python=3; and enter it source activate my_env
install gcc compiling tools with conda: conda install gcc_linux-64 gxx_linux-64
then the gcc is in ~/miniconda3/envs/my_env/bin/x86_64-conda_cos6-linux-gnu-gcc. add a soft symbol in the dir:
ln -s x86_64-conda_cos6-linux-gnu-gcc gcc
ln -s x86_64-conda_cos6-linux-gnu-g++ g++
install cuda development toolkit: conda install cudatoolkit-dev
install pytorch: conda install pytorch
install the extensions with source code:
python setup.py build;
python setup.py install
python setup.py test

I was getting segfaults as well and conda installing a new version of gcc and then updating my LD_LIBRARY_PATH to include my conda environment's x86_64-conda_cos6-linux-gnu/lib folder solved the problem. However, when you install gcc with anaconda, it sets various environment variables for you (CXX, GCC, etc.), so you shouldn't need to change the symbolic links for gcc or g++. In fact, changing these links is probably a bad idea because it means you'll end up using your conda environment's compiler instead of your system compiler when you use gcc in other contexts.

Was this page helpful?
0 / 5 - 0 ratings