sriniiyer/codenn

An error when I run './run.sh csharp'

Closed this issue · 8 comments

What should I do?
Total Tokens: 31667
Total Words: 7470
THCudaCheck FAIL file=/tmp/luarocks_cutorch-scm-1-4410/cutorch/lib/THC/generic/THCTensorMath.cu line=35 error=48 : no kernel image is available for execution on the device /home/jinyuliu/torch/install/bin/luajit: ./encoder.lua:13: cuda runtime error (48) : no kernel image is available for execution on the device at /tmp/luarocks_cutorch-scm-1-4410/cutorch/lib/THC/generic/THCTensorMath.cu:35
stack traceback:
[C]: in function 'zero'
./encoder.lua:13: in function '__init'
/home/jinyuliu/torch/install/share/lua/5.1/torch/init.lua:91: in function </home/jinyuliu/torch/install/share/lua/5.1/torch/init.lua:87>
[C]: in function 'Encoder'
main.lua:8: in function 'setup'
main.lua:118: in function 'main'
main.lua:215: in main chunk
[C]: in function 'dofile'
...uliu/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
[C]: at 0x00405d50
{
beam_size : 10
batch_size : 100
max_code_length : 100
max_nl_length : 100
layers : 1
max_length : 20
rnn_size : 400
}
/home/jinyuliu/torch/install/bin/luajit: cannot open <csharp.encoder> in mode r at /home/jinyuliu/torch/pkg/torch/lib/TH/THDiskFile.c:673
stack traceback:
[C]: at 0x7f3ed7c9a460
[C]: in function 'DiskFile'
/home/jinyuliu/torch/install/share/lua/5.1/torch/File.lua:405: in function 'load'
predict.lua:215: in function 'main'
predict.lua:251: in main chunk
[C]: in function 'dofile'
...uliu/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
[C]: at 0x00405d50

Do you have a GPU + cuda drivers?

Yes, my gpu is 1080 and I installed cuda drivers

Will need more details to debug. Are you able to run other torch7 lua cuda programs? Are the nvidia test scripts working?

I installed CUDA 9.0 and Torch 7. What's your CUDA version and torch version?

I used it with cuda 8 but are you able to run simple lua programs using cuda?

I installed CUDA 8, cudnn 5.1, cunn, cutorch, and I think I have solved this problem. It's training now...
predicting
python ../utils/bleu.py /home/jinyuliu/codenn//data/stackoverflow/csharp/dev/ref.txt < /tmp/lua_UFnxol

Total: 100
BLEU: 15.0768646709

epoch=1, training acc.=22.25%, validation acc.=25.77%, nil acc.=0.00%, examples per sec.=422, examples=46200, learning rate=0.500, gpu=1
saving models
predicting
python ../utils/bleu.py /home/jinyuliu/codenn//data/stackoverflow/csharp/dev/ref.txt < /tmp/lua_oWPYzw

Total: 100
BLEU: 16.0394261249

I still have some questions.

  1. how to finish training process, just quit the process directly?
  2. how do I use the model to summary a code snippet? I want to see the summary.
  1. It should finish after the required number of epochs are completed.
  2. There is a predict script, you can add your new snippet to the testing set and run the predict script.