I get the following error when I try to build pytorch from source. Any help is appreciated. The detailed log file is provided in the link.
Traceback (most recent call last):
File “setup.py”, line 737, in
build_deps()
File “setup.py”, line 316, in build_deps
cmake=cmake)
File “/home/z840/pytorch/tools/build_pytorch_libs.py”, line 62, in build_caffe2
cmake.build(my_env)
File “/home/z840/pytorch/tools/setup_helpers/cmake.py”, line 339, in build
self.run(build_args, my_env)
File “/home/z840/pytorch/tools/setup_helpers/cmake.py”, line 141, in run
check_call(command, cwd=self.build_dir, env=env)
File “/home/z840/miniconda3/envs/p37_build/lib/python3.7/subprocess.py”, line 363, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘cmake’, ‘–build’, ‘.’, ‘–target’, ‘install’, ‘–config’, ‘Release’, ‘–’, ‘-j’, ‘40’]’ returned non-zero exit status 1.
------------- MY SYSTEM AND CONFIGURATIONS -------
uname -a
Linux z840-HP-Z840-Workstation 5.3.0-40-generic #32~18.04.1-Ubuntu SMP Mon Feb 3 14:05:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
nvidia-smi
Thu Mar 5 20:42:56 2020
±----------------------------------------------------------------------------+
| NVIDIA-SMI 435.21 Driver Version: 435.21 CUDA Version: 10.1 |
|-------------------------------±---------------------±---------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 Quadro K4200 Off | 00000000:04:00.0 On | N/A |
| 37% 73C P0 44W / 110W | 321MiB / 4034MiB | 6% Default |
±------------------------------±---------------------±---------------------+
±----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 1480 G /usr/lib/xorg/Xorg 141MiB |
| 0 1732 G /usr/bin/gnome-shell 104MiB |
| 0 2229 C /usr/NX/bin/nxnode.bin 61MiB |
±----------------------------------------------------------------------------+
The commands I used are:
conda create --name p37_build python=3.7
conda activate p37_build
conda install numpy pyyaml mkl mkl-include setuptools cmake cffi typing
git clone --recursive https://github.com/pytorch/pytorch
export CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which conda))/…/"}
export USE_CUDA=1 USE_CUDNN=1 USE_MKLDNN=1
cd pytorch/
python setup.py install 2>&1 > build.log