I just tried to install pytorch from source, using the recommended Anaconda environment.
However, I also got segmentation fault error in the middle of compiling. The following piece
of info is where the error comes from:
…
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/chun/Prog/PyTorch/pytorch -I/home/chun/Prog/PyTorch/pytorch/torch/csrc -I/home/chun/Prog/PyTorch/pytorch/torch/lib/tmp_install/include -I/home/chun/Prog/PyTorch/pytorch/torch/lib/tmp_install/include/TH -I/home/chun/Prog/PyTorch/pytorch/torch/lib/tmp_install/include/THPP -I/usr/local/anaconda2/lib/python2.7/site-packages/numpy/core/include -I/usr/local/cuda/include -I/usr/local/cuda/include -I/usr/local/anaconda2/include/python2.7 -c torch/csrc/cudnn/CppWrapper.cpp -o build/temp.linux-x86_64-2.7/torch/csrc/cudnn/CppWrapper.o -D_THP_CORE -std=c++11 -Wno-write-strings -DWITH_NUMPY -DWITH_CUDA -DCUDA_LIB_PATH=/usr/local/cuda/lib64 -DWITH_CUDNN
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
In file included from /home/chun/Prog/PyTorch/pytorch/torch/csrc/generic/Tensor.cpp:702:0,
from torch/csrc/generic/Tensor.cpp:1,
from /home/chun/Prog/PyTorch/pytorch/torch/lib/tmp_install/include/THC/THCGenerateAllTypes.h:19,
from torch/csrc/cuda/Tensor.cpp:15:
/home/chun/Prog/PyTorch/pytorch/torch/csrc/generic/TensorMethods.cpp: In function ‘PyObject* THCPShortTensor_addmm(PyObject*, PyObject*, PyObject*)’:
/home/chun/Prog/PyTorch/pytorch/torch/csrc/generic/TensorMethods.cpp:16607:1: internal compiler error: Segmentation fault
}
^
Please submit a full bug report,
with preprocessed source if appropriate.
See http://gcc.gnu.org/bugs.html 4 for instructions.
error: command ‘gcc’ failed with exit status 1