yandex / faster-rnnlm

Faster Recurrent Neural Network Language Modeling Toolkit with Noise Contrastive Estimation and Hierarchical Softmax
Other
561 stars 138 forks source link

Error building faster-rnnlm #48

Open anavc94 opened 6 years ago

anavc94 commented 6 years ago

Hello,

I am having some issues installing faster-RNNLM in Ubuntu 16.04. As the instrucction suggests, I run the script build.sh but the output says:

Installing Faster RNNLM Already up-to-date. Folder 'eigen3' already exists. Exiting nvcc cuda_softmax.cu -c -Xcompiler "-O3 -march=native -funroll-loops" -o cuda_softmax.o /usr/include/string.h: In function ‘void __mempcpy_inline(void, const void, size_t)’: /usr/include/string.h:652:42: error: ‘memcpy’ was not declared in this scope return (char ) memcpy (dest, src, n) + n; ^ Makefile:60: recipe for target 'cuda_softmax.o' failed make: *** [cuda_softmax.o] Error 1

I've been reading something about the compiler, so my version is:

gcc --version

gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I've installed CUDA toolkit 9.0 (with the deb local option because the .run was giving me a lot of problems). Could you please help me?

Thanks!

Edit: I've tried to compile with gcc-4.8 and g++-4.8 but the same error appears on screen.

akhti commented 6 years ago

Try to add -D_FORCE_INLINES in NVCC_FLAGS in Makefile: https://github.com/yandex/faster-rnnlm/blob/master/faster-rnnlm/Makefile#L7

NVCC_CFLAGS = -D_FORCE_INLINES -O3 -march=native -funroll-loops