stanfordnlp / GloVe

Software in C and data files for the popular GloVe model for distributed word representations, a.k.a. word vectors or embeddings
Apache License 2.0
6.86k stars 1.51k forks source link

current codebase is not compilable #131

Closed sigirisetti closed 6 years ago

sigirisetti commented 6 years ago

Seems great work. I guess warnings are ok.

Python eval code is hitting error in GloVe-1.2 but okay in latest code

Thanks for your contribution

Cheers

mkdir -p build gcc src/glove.c -o build/glove -lm -pthread -Ofast -march=native -funroll-loops -Wall -Wextra -Wpedantic src/glove.c: In function ‘glove_thread’: src/glove.c:117:9: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result] fread(&cr, sizeof(CREC), 1, fin); ^ gcc src/shuffle.c -o build/shuffle -lm -pthread -Ofast -march=native -funroll-loops -Wall -Wextra -Wpedantic src/shuffle.c: In function ‘shuffle_merge’: src/shuffle.c:106:17: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result] fread(&array[i], sizeof(CREC), 1, fid[j]); ^ src/shuffle.c: In function ‘shuffle_by_chunks’: src/shuffle.c:163:9: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result] fread(&array[i], sizeof(CREC), 1, fin); ^ gcc src/cooccur.c -o build/cooccur -lm -pthread -Ofast -march=native -funroll-loops -Wall -Wextra -Wpedantic src/cooccur.c: In function ‘merge_files’: src/cooccur.c:267:9: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result] fread(&new, sizeof(CREC), 1, fid[i]); ^ src/cooccur.c:277:5: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result] fread(&new, sizeof(CREC), 1, fid[i]); ^ src/cooccur.c:290:9: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result] fread(&new, sizeof(CREC), 1, fid[i]); ^ gcc src/vocab_count.c -o build/vocab_count -lm -pthread -Ofast -march=native -funroll-loops -Wall -Wextra -Wpedantic

g-jing commented 5 years ago

Hi, I got the same problem but have no idea how to solve it. It's kind of urgent right now, and any suggestion will be appreciated. Thanks!