Closed crazySyaoran closed 6 years ago
What distribution and version of Linux are you using?
Thanks for your reply The computer is lab's but not mine, I was just told that this one is new and without graphic drivers I know it was stupid ... I've just installed it and I am installing the CUDA and cuDNN Please don't close the issue and I will respond you later
I've successfully installed CUDA9.1 and cudnn8.0, but still failed to run
if I run "./run.sh" then there is ./run.sh: line 30: 21726 Segmentation fault (core dumped) th main.lua -model 2D-FAN-300W.t7 -input ../$INPUT/ -detectFaces true -mode generate -output ../$INPUT/ -device gpu -outputFormat txt ls: cannot access '.txt': No such file or directory /home/syaoran/torch/install/bin/lua: /home/syaoran/torch/install/share/lua/5.2/trepl/init.lua:389: module 'cunn' not found:No LuaRocks module found for cunn no field package.preload['cunn'] no file '/home/syaoran/.luarocks/share/lua/5.2/cunn.lua' no file '/home/syaoran/.luarocks/share/lua/5.2/cunn/init.lua' no file '/home/syaoran/torch/install/share/lua/5.2/cunn.lua' no file '/home/syaoran/torch/install/share/lua/5.2/cunn/init.lua' no file '/home/syaoran/.luarocks/share/lua/5.1/cunn.lua' no file '/home/syaoran/.luarocks/share/lua/5.1/cunn/init.lua' no file '/home/syaoran/torch/install/share/lua/5.1/cunn.lua' no file '/home/syaoran/torch/install/share/lua/5.1/cunn/init.lua' no file '/home/syaoran/usr/local/torch/install/share/lua/5.1/cunn.lua' no file '/home/syaoran/usr/local/torch/install/share/lua/5.1/cunn/init.lua' no file './cunn.lua' no file '/home/syaoran/usr/local/torch/install/share/luajit-2.1.0-beta1/cunn.lua' no file '/usr/local/share/lua/5.1/cunn.lua' no file '/usr/local/share/lua/5.1/cunn/init.lua' no file '/home/syaoran/.luarocks/lib/lua/5.2/cunn.so' no file '/home/syaoran/torch/install/lib/lua/5.2/cunn.so' no file '/home/syaoran/torch/install/lib/cunn.so' no file '/home/syaoran/.luarocks/lib/lua/5.1/cunn.so' no file '/home/syaoran/torch/install/lib/lua/5.1/cunn.so' no file '/home/syaoran/usr/local/torch/install/lib/cunn.so' no file '/home/syaoran/usr/local/torch/install/lib/lua/5.1/cunn.so' no file './cunn.so' no file '/usr/local/lib/lua/5.1/cunn.so' no file '/usr/local/lib/lua/5.1/loadall.so' stack traceback: [C]: in function 'error' /home/syaoran/torch/install/share/lua/5.2/trepl/init.lua:389: in function 'require' process.lua:16: in main chunk [C]: in function 'dofile' ...oran/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk [C]: in ? ls: cannot access '.raw': No such file or directory
If i run "sudo ./run.sh" then there is ./run.sh: line 24: th: command not ls: cannot access '.txt': No such file or directory ./run.sh: line 78: th: command not found ls: cannot access '.raw': No such file or directory
And here is the my distribution and version of Linux
and here is the output of deviceQuery:
CUDA Device Query (Runtime API) version (CUDART static linking)
Detected 1 CUDA Capable device(s)
Device 0: "GeForce GTX 1080" CUDA Driver Version / Runtime Version 9.1 / 9.1 CUDA Capability Major/Minor version number: 6.1 Total amount of global memory: 8111 MBytes (8504868864 bytes) (20) Multiprocessors, (128) CUDA Cores/MP: 2560 CUDA Cores GPU Max Clock rate: 1835 MHz (1.84 GHz) Memory Clock rate: 5005 Mhz Memory Bus Width: 256-bit L2 Cache Size: 2097152 bytes Maximum Texture Dimension Size (x,y,z) 1D=(131072), 2D=(131072, 65536), 3D=(16384, 16384, 16384) Maximum Layered 1D Texture Size, (num) layers 1D=(32768), 2048 layers Maximum Layered 2D Texture Size, (num) layers 2D=(32768, 32768), 2048 layers Total amount of constant memory: 65536 bytes Total amount of shared memory per block: 49152 bytes Total number of registers available per block: 65536 Warp size: 32 Maximum number of threads per multiprocessor: 2048 Maximum number of threads per block: 1024 Max dimension size of a thread block (x,y,z): (1024, 1024, 64) Max dimension size of a grid size (x,y,z): (2147483647, 65535, 65535) Maximum memory pitch: 2147483647 bytes Texture alignment: 512 bytes Concurrent copy and kernel execution: Yes with 2 copy engine(s) Run time limit on kernels: Yes Integrated GPU sharing Host Memory: No Support host page-locked memory mapping: Yes Alignment requirement for Surfaces: Yes Device has ECC support: Disabled Device supports Unified Addressing (UVA): Yes Supports Cooperative Kernel Launch: Yes Supports MultiDevice Co-op Kernel Launch: Yes Device PCI Domain ID / Bus ID / location ID: 0 / 5 / 0 Compute Mode: < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >
deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 9.1, CUDA Runtime Version = 9.1, NumDevs = 1 Result = PASS
As mentioned in the README, CUDA 9 won't work. You need CUDA 7.5 or 8, and CuDNN 5.1.
Oh I'm sorry I'll have a try Thank you
I've made my CUDA back to 8.0 nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2016 NVIDIA Corporation Built on Sun_Sep__4_22:14:01_CDT_2016 Cuda compilation tools, release 8.0, V8.0.44
and cudnn back to 5.1 then redo every steps in Installation Example and make sure there's no error message during that but I still failed to run ./run.sh:
if I run "./run.sh" the error message is syaoran@syaoran:~/Documents/3DMM/vrn$ ./run.sh ./run.sh: line 30: 32001 Segmentation fault (core dumped) th main.lua -model 2D-FAN-300W.t7 -input ../$INPUT/ -detectFaces true -mode generate -output ../$INPUT/ -device gpu -outputFormat txt ls: cannot access '.txt': No such file or directory Found Environment variable CUDNN_PATH = /usr/local/cuda/lib64/libcudnn.so.5/home/syaoran/usr/local/torch/install/bin/luajit: ...ran/usr/local/torch/install/share/lua/5.1/trepl/init.lua:389: ...ran/usr/local/torch/install/share/lua/5.1/trepl/init.lua:389: ...oran/usr/local/torch/install/share/lua/5.1/cudnn/ffi.lua:1592: /usr/local/cuda/lib64/libcudnn.so.5: cannot open shared object file: No such file or directory stack traceback: [C]: in function 'error' ...ran/usr/local/torch/install/share/lua/5.1/trepl/init.lua:389: in function 'require' process.lua:17: in main chunk [C]: in function 'dofile' ...ocal/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk [C]: at 0x00405d50 ls: cannot access '.raw': No such file or directory
if I run it in MATLAB then the error message is device =
gpu
/home/syaoran/usr/local/torch/install/bin/luajit: ...ran/usr/local/torch/install/share/lua/5.1/trepl/init.lua:389: ...ran/usr/local/torch/install/share/lua/5.1/trepl/init.lua:389: ...ran/usr/local/torch/install/share/lua/5.1/trepl/init.lua:389: ...sr/local/torch/install/share/lua/5.1/luarocks/loader.lua:117: error loading module 'fb.python.lib' from file '/home/syaoran/usr/local/torch/install/lib/lua/5.1/fb/python/lib.so': /usr/local/MATLAB/R2016b/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /home/syaoran/usr/local/torch/install/lib/lua/5.1/fb/python/lib.so) stack traceback: [C]: in function 'error' ...ran/usr/local/torch/install/share/lua/5.1/trepl/init.lua:389: in function 'require' main.lua:8: in main chunk [C]: in function 'dofile' ...ocal/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk [C]: at 0x00405d50 Error using run (line 38) Failed to run Torch7 script.
but my touch7 seems no problem: th> torch.Tensor{1,2,3} 1 2 3 [torch.DoubleTensor of size 3]
[0.0003s]
Thank you for always reply, and I wanna say what written in your paper is awesome
The error is saying that it can't find cudnn for some reason (in particular, the file /usr/local/cuda/lib64/libcudnn.so.5
). Are you sure you installed it correctly?
I reinstall the cudnn then copy the file asj.jpg into the scaled folder and there is .raw file in output folder now! (Wow) BUT it seems that the program didn't work correctly cuz the .raw is empty and there is still error message:
./run.sh:
syaoran@syaoran:~/Documents/3DMM/vrn$ ./run.sh
./run.sh: line 30: 26432 Segmentation fault (core dumped) th main.lua -model 2D-FAN-300W.t7 -input ../$INPUT/ -detectFaces true -mode generate -output ../$INPUT/ -device gpu -outputFormat txt
ls: cannot access '.txt': No such file or directory
Found Environment variable CUDNN_PATH = /usr/local/cuda/lib64/libcudnn.so.5Processed asj.
Traceback (most recent call last):
File "../vis.py", line 30, in
click RUN in MATLAB: device =
gpu
/home/syaoran/usr/local/torch/install/bin/luajit: ...ran/usr/local/torch/install/share/lua/5.1/trepl/init.lua:389: ...ran/usr/local/torch/install/share/lua/5.1/trepl/init.lua:389: ...ran/usr/local/torch/install/share/lua/5.1/trepl/init.lua:389: ...sr/local/torch/install/share/lua/5.1/luarocks/loader.lua:117: error loading module 'fb.python.lib' from file '/home/syaoran/usr/local/torch/install/lib/lua/5.1/fb/python/lib.so': /usr/local/MATLAB/R2016b/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /home/syaoran/usr/local/torch/install/lib/lua/5.1/fb/python/lib.so) stack traceback: [C]: in function 'error' ...ran/usr/local/torch/install/share/lua/5.1/trepl/init.lua:389: in function 'require' main.lua:8: in main chunk [C]: in function 'dofile' ...ocal/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk [C]: at 0x00405d50 Error using run (line 38) Failed to run Torch7 script.
You can't just copy the image into the scale folder as it has not yet been scaled. If the face is not scaled the results will look very bad. The raw file should be about 6MB if it did anything at all.
Have a look at main.lua
in the face-alignment code. Try executing each line in a th
session to see where it fails. It's probably these lines in utils.lua
, which you can probably remove.
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
import matplotlib.patches as patches
You are right, there is error message with "local utils = require 'utils'" and "local opts = require 'opts'(arg)" in main.lua:
local utils = require 'utils' th> local utils = require 'utils' ...ran/usr/local/torch/install/share/lua/5.1/trepl/init.lua:389: module 'utils' not found:No LuaRocks module found for utils no field package.preload['utils'] no file '/home/syaoran/.luarocks/share/lua/5.1/utils.lua' no file '/home/syaoran/.luarocks/share/lua/5.1/utils/init.lua' no file '/home/syaoran/usr/local/torch/install/share/lua/5.1/utils.lua' no file '/home/syaoran/usr/local/torch/install/share/lua/5.1/utils/init.lua' no file '/home/syaoran/.luarocks/share/lua/5.2/utils.lua' no file '/home/syaoran/.luarocks/share/lua/5.2/utils/init.lua' no file '/home/syaoran/torch/install/share/lua/5.2/utils.lua' no file '/home/syaoran/torch/install/share/lua/5.2/utils/init.lua' no file '/home/syaoran/torch/install/share/lua/5.1/utils.lua' no file '/home/syaoran/torch/install/share/lua/5.1/utils/init.lua' no file './utils.lua' no file '/home/syaoran/usr/local/torch/install/share/luajit-2.1.0-beta1/utils.lua' no file '/usr/local/share/lua/5.1/utils.lua' no file '/usr/local/share/lua/5.1/utils/init.lua' no file '/home/syaoran/.luarocks/lib/lua/5.1/utils.so' no file '/home/syaoran/usr/local/torch/install/lib/lua/5.1/utils.so' no file '/home/syaoran/usr/local/torch/install/lib/utils.so' no file '/home/syaoran/torch/install/lib/utils.so' no file '/home/syaoran/.luarocks/lib/lua/5.2/utils.so' no file '/home/syaoran/torch/install/lib/lua/5.2/utils.so' no file '/home/syaoran/torch/install/lib/lua/5.1/utils.so' no file './utils.so' no file '/usr/local/lib/lua/5.1/utils.so' no file '/usr/local/lib/lua/5.1/loadall.so' stack traceback: [C]: in function 'error' ...ran/usr/local/torch/install/share/lua/5.1/trepl/init.lua:389: in function 'require' [string "local utils = require 'utils'"]:1: in main chunk [C]: in function 'xpcall' ...ran/usr/local/torch/install/share/lua/5.1/trepl/init.lua:679: in function 'repl' ...ocal/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:204: in main chunk [C]: at 0x00405d50
local opts = require 'opts'(arg) th> local opts = require 'opts'(arg) ...ran/usr/local/torch/install/share/lua/5.1/trepl/init.lua:389: module 'opts' not found:No LuaRocks module found for opts no field package.preload['opts'] no file '/home/syaoran/.luarocks/share/lua/5.1/opts.lua' no file '/home/syaoran/.luarocks/share/lua/5.1/opts/init.lua' no file '/home/syaoran/usr/local/torch/install/share/lua/5.1/opts.lua' no file '/home/syaoran/usr/local/torch/install/share/lua/5.1/opts/init.lua' no file '/home/syaoran/.luarocks/share/lua/5.2/opts.lua' no file '/home/syaoran/.luarocks/share/lua/5.2/opts/init.lua' no file '/home/syaoran/torch/install/share/lua/5.2/opts.lua' no file '/home/syaoran/torch/install/share/lua/5.2/opts/init.lua' no file '/home/syaoran/torch/install/share/lua/5.1/opts.lua' no file '/home/syaoran/torch/install/share/lua/5.1/opts/init.lua' no file './opts.lua' no file '/home/syaoran/usr/local/torch/install/share/luajit-2.1.0-beta1/opts.lua' no file '/usr/local/share/lua/5.1/opts.lua' no file '/usr/local/share/lua/5.1/opts/init.lua' no file '/home/syaoran/.luarocks/lib/lua/5.1/opts.so' no file '/home/syaoran/usr/local/torch/install/lib/lua/5.1/opts.so' no file '/home/syaoran/usr/local/torch/install/lib/opts.so' no file '/home/syaoran/torch/install/lib/opts.so' no file '/home/syaoran/.luarocks/lib/lua/5.2/opts.so' no file '/home/syaoran/torch/install/lib/lua/5.2/opts.so' no file '/home/syaoran/torch/install/lib/lua/5.1/opts.so' no file './opts.so' no file '/usr/local/lib/lua/5.1/opts.so' no file '/usr/local/lib/lua/5.1/loadall.so' stack traceback: [C]: in function 'error' ...ran/usr/local/torch/install/share/lua/5.1/trepl/init.lua:389: in function 'require' [string "local opts = require 'opts'(arg)"]:1: in main chunk [C]: in function 'xpcall' ...ran/usr/local/torch/install/share/lua/5.1/trepl/init.lua:679: in function 'repl' ...ocal/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:204: in main chunk [C]: at 0x00405d50
but I'm sure I have installed lua:
syaoran@syaoran:~/Documents/playground$ vim hello.lua
syaoran@syaoran:~/Documents/playground$ lua hello.lua
HelloLUA
And I make sure I have installed every Lua and Python packages in face-aligment/README.md I've never learn LUA before but I will learn it later, but what do you mean about remove lines in utils.lua?
If it can't find utils.lua
, then you are in the wrong directory. By remove the lines from utils.lua
, I mean just that, remove the lines I listed from the file utils.lua
.
I followed each step in Installation Example but there's still error when I run run.sh
if I click "run" in the MATLAB then the error message is
device =
gpu
/home/syaoran/torch/install/bin/lua: /home/syaoran/torch/install/share/lua/5.2/trepl/init.lua:389: /home/syaoran/torch/install/share/lua/5.2/trepl/init.lua:389: /home/syaoran/torch/install/share/lua/5.2/trepl/init.lua:389: error loading module 'fb.python.lib' from file '/home/syaoran/usr/local/torch/install/lib/lua/5.1/fb/python/lib.so': /usr/local/MATLAB/R2016b/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /home/syaoran/usr/local/torch/install/lib/lua/5.1/fb/python/lib.so) stack traceback: [C]: in function 'error' /home/syaoran/torch/install/share/lua/5.2/trepl/init.lua:389: in function 'require' main.lua:8: in main chunk [C]: in function 'dofile' ...oran/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk [C]: in ? 错误使用 run (line 38) Failed to run Torch7 script.
And if I run "sudo ./run.sh" then the error message is
./run.sh: 行 24: th: 未找到命令 ls: 无法访问'.txt': 没有那个文件或目录 ./run.sh: 行 78: th: 未找到命令 ls: 无法访问'.raw': 没有那个文件或目录
which means
./run.sh: line 24: th: Command not found ls: Unable to access'.txt': No such file or directory ./run.sh: 行 78: th: Command not found ls: Unable to access'.raw': No such file or directory
And after that I make sure I've make torch installed with guide on http://torch.ch/docs/getting-started.html and after I run $th in bash there is the correct information:
__ | Torch7 / / ____/ / | Scientific computing for Lua. / / / \/ / / \ | Type ? for help // _// _//// | https://github.com/torch | http://torch.ch
Any ideas? THANK YOU SO MUCH