sinantie / NeuralAmr

Sequence-to-sequence models for AMR parsing and generation
http://www.ikonstas.net/code
69 stars 17 forks source link

THCudaCheck FAIL while parsing #14

Closed ritwikmishra closed 4 years ago

ritwikmishra commented 5 years ago

This is what I get when I try to parse a file with 6 sentences (input_file2)

$ ./parse_amr.sh text input_file2
Adding annotator tokenize
Adding annotator ssplit
Adding annotator pos
Loading POS tagger from lib/models/pos-tagger/english-left3words-distsim.tagger ... done [0.6 sec].
Adding annotator lemma
Adding annotator ner
THCudaCheck FAIL file=/tmp/luarocks_cutorch-scm-1-8018/cutorch/init.c line=734 error=10 : invalid device ordinal
/home/student/torch/install/bin/luajit: ./s2sa/beam.lua:688: cuda runtime error (10) : invalid device ordinal at /tmp/luarocks_cutorch-scm-1-8018/cutorch/init.c:734
stack traceback:
    [C]: in function 'setDevice'
    ./s2sa/beam.lua:688: in function 'init'
    evaluate.lua:4: in function 'main'
    evaluate.lua:208: in main chunk
    [C]: in function 'dofile'
    ...dent/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
    [C]: at 0x00405d50

The same error is encountered when I run $ ./parse_amr.sh input_file2 text or $ ./parse_amr.sh text input_file2 It is followed by this

$ Loading classifier from lib/models/ner/english.all.3class.distsim.crf.ser.gz ... done [1.9 sec].
Could not listen on port: 4444

then it waits indefinitely

Proof that all requirements are satisfied

$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2016 NVIDIA Corporation
Built on Tue_Jan_10_13:22:03_CST_2017
Cuda compilation tools, release 8.0, V8.0.61

I verfied the cuDNN installation from here. All tests passed.

reinstalled all the luarocks packages

How to proceed?

KaiQiangSong commented 4 years ago

I got the same issue here.

KaiQiangSong commented 4 years ago

hi! Check this issue. I solved it by change GPU_ID = 3 to GPU_ID=1. https://github.com/sinantie/NeuralAmr/issues/18