Segmentation fault (core dumped)

When I run th code to run an CNN model, there is Segmentation fault (core dumped)
how to deal with this problem?

cuda-check

The problem happen in th code:
local tds = require ‘tds’

I can require ‘tds’ in the enviorment of th like below
nvidia@tegra-ubuntu:~/torch/tooth_keypoint$

th

______ __ | Torch7
/_ / ________/ / | Scientific computing for Lua.
/ / / _ / __/ / _ \ | Type ? for help
/_/ _
// _//// | https://github.com/torch
| http://torch.ch

th> require 'tds'

{
Hash : {…}
Vec : {…}
C : userdata: 0x7fa3e78c40
vec : {…}
AtomicCounter : {…}
atomic_counter : {…}
hash : {…}
}

[b]but when I use th command, there is the segmentation fault: local tds = require ‘tds’

[/b]

nvidia@tegra-ubuntu:~/torch/tooth_keypoint$ th teeth_crop2.lua -model output/m509/best_model.net -modelDef model/model_509.lua -testFile data_new/PICT0074.JPG -outFile PICT0074/cropped.jpg -outCoordFile PICT0074/coord.txt
Segmentation fault (core dumped)