muhanzhang / LinkPrediction

Code for "M. Zhang, Y. Chen, Weisfeiler-Lehman Neural Machine for Link Prediction, KDD 2017 oral"
MIT License
56 stars 12 forks source link

Installation error #1

Closed sagihaider closed 6 years ago

sagihaider commented 6 years ago

Dear, I am following your instructions and I am getting the following error,

mex -setup c MEX configured to use 'MinGW64 Compiler (C)' for C language compilation. Warning: The MATLAB C and Fortran API has changed to support MATLAB variables with more than 2^32-1 elements. You will be required to update your code to utilize the new API. You can find more information about this at: http://www.mathworks.com/help/matlab/matlab_external/upgrading-mex-files-to-use-64-bit-api.html. make Building with 'MinGW64 Compiler (C)'. Error: E:\Research\Supervision\JNU\Jaya Chitra\Downloaded Codes\LinkPrediction-master\software\liblinear-2.1\matlab\make.m failed (line 13) gcc: error: -fexceptions: No such file or directory

=> Please check README for detailed instructions.

muhanzhang commented 6 years ago

Hi. I assume you are using Windows OS. Then, instead of "make", please consult the section "Building Windows Binaries" in liblinear's README: https://github.com/muhanzhang/LinkPrediction/tree/master/software/liblinear-2.1

sagihaider commented 6 years ago

Dear, I am running the main file and under WLNM.m function line 25 it has a function graph2vector and under it has a function order = g_label(subgraph, p_mo) at line 94 and under that we have cannon.m.

While running the code it is throwing an error at line 46 of cannon.m, which is given as follows: MEX completed successfully. 'cp' is not recognized as an internal or external command, operable program or batch file.

Attempt to execute SCRIPT canonical as a function:

E:\Research\Downloaded Codes\LinkPrediction-master\canonical.m

Error in canon (line 46) clabels = canonical(subgraph1, num_edges, degrees, colors_nauty);

Error in graph2vector>g_label (line 174) order = canon(full(subgraph), classes)';

Error in graph2vector>subgraph2vector (line 94) order = g_label(subgraph);

Error in graph2vector (line 32) sample = subgraph2vector(ind, A, K);

Error in WLNM (line 25) [train_data, train_label] = graph2vector(train_pos, train_neg, train, K);

Error in Main (line 50) tempauc = WLNM(train, test, 10, ith_experiment); % WLNM

Can you please look into this. Many thanks

muhanzhang commented 6 years ago

Hi, the problem you encountered was because "cp" is the copy command for linux system. For windows, you need to use "copy" instead. You may also need to change path separators "/" to "\" in windows. Another way is to manually copy "canonical.c" to "software/nauty26r7", and run "mex canonical.c nauty.c nautil.c naugraph.c schreier.c naurng.c nausparse.c;" in matlab, then manually copy the generated "canonical.mexw64" to the main folder, and finally comment out line 30-40 in "canon.m".

Sorry I don't have a windows configuration to test it for you. Hope the above helps!