xgfs / verse

Reference implementation of the paper VERSE: Versatile Graph Embeddings from Similarity Measures
http://tsitsul.in/publications/verse/
MIT License
128 stars 22 forks source link

Issue while using the make command!! #13

Open aj280192 opened 4 years ago

aj280192 commented 4 years ago

Hi Author,

I am getting the below error while using the make command.

verse.cpp: In function 'void* aligned_malloc(size_t, size_t)': verse.cpp:80:5: error: 'posix_memalign' was not declared in this scope 80 | if (posix_memalign(&result, align, size)) result = 0; | ^~~~~~ make: *** [makefile:22: verse] Error 1

How can I fix this issue??

xgfs commented 4 years ago

Hey, which compiler are you using?

aj280192 commented 4 years ago

I am using g++ compiler on windows!! Also, I have dropped a mail can you confirm if you have received it.

xgfs commented 4 years ago

Are you using WSL? It seems that Windows version does not come with OpenMP, you'd probably need visual studio to compile the thing, or search for ways to use OpenMP within Windows WSL gcc.

My bandwith on answering things is currently limited, I'm trying to process things FIFO.

aj280192 commented 4 years ago

Ya you are right.. when I complied just verse.cpp using -fopenmp... maybe I need to make changes to the make file to use -fopenmp?

xgfs commented 4 years ago

It doesn't seem to be an OpenMP issue. GCC on Windows doesn't seem to support the memory alignment. You can replace

void *result; if (posix_memalign(&result, align, size)) result = 0;

with something like results = malloc(size);