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.81k stars 1.51k forks source link

Shuffle.c segmentation fault Windows #184

Open FastCognition opened 3 years ago

FastCognition commented 3 years ago

Hi, I'm a Windows-user and I installed MinGW to train GloVe vectors. I solved some issues I had due to missing packages or functions not working:

  1. Replaced fseeko() and ftello() by fseek() and ftell()
  2. Posix_memalign() --> aligned_malloc()

However, I can't seem to solve the issue below (Segmentation fault), even after checking previous posts. Older posts usually mention a lack of memory. If this is the case, how do I fix it and if this is not the case, how would I be able to get the actual logs? I have tried applying gdb, but for some reason it does not seem to work either. I will try using Cygwin & pip now, but in the meantime I'll leave this post here.

image

AngledLuffa commented 3 years ago

Ultimately the effort needed to make this work on Windows in C, as opposed to any more user-friendly pairing of OS and language, is high enough that it honestly will probably never happen. I hear what you're saying that MinGW allows for building it, but that requires me installing MinGW and figuring it out, then supporting it when other people ask for it...

You could try running the command line printed in the script, but it looks like shuffle.c has very little logging. There is also no checking of the return value of the malloc in lines 76 or 131. There should be at least one fprintf of the random seed, though, in line 124. It's weird that you didn't see that log line. Did you use the current git code?