BatzoglouLabSU / SIMLR

Implementations in both Matlab and R of the SIMLR method. The manuscript of the method is available at: https://www.nature.com/articles/nmeth.4207
https://batzogloulabsu.github.io/SIMLR/
GNU General Public License v3.0
109 stars 60 forks source link

Error in SIMLR_Large_Scale (line 42) Unrecognized function or variable 'mex_KNN_Annoy'. #67

Closed wzhangwhu closed 11 months ago

wzhangwhu commented 11 months ago

When running the code with large scale datasets, returns error as follows:

mex -setup C++ MEX configured to use 'MinGW64 Compiler (C++)' for C++ language compilation.

Matlab_main_demo_SIMLR_Large_Scale Elapsed time is 2.045427 seconds. Unrecognized function or variable 'mex_KNN_Annoy'.

Error in SIMLR_Large_Scale (line 42) [ind, val] = mex_KNN_Annoy(X,2*k);

Error in Matlab_main_demo_SIMLR_Large_Scale (line 18) [S,F] = SIMLR_Large_Scale(in_X,C,30);

What is the reason for this?how to handle this error?

danro9685 commented 11 months ago

Dear @wzhangwhu,

The error refers to the fact that when compiling, the script mex_KNN_Annoy is not found. Please consider these instructions https://github.com/BatzoglouLabSU/SIMLR/blob/SIMLR/MATLAB/README.txt and specifically the code provided here: https://github.com/BatzoglouLabSU/SIMLR/blob/SIMLR/MATLAB/SETUP.m

All the best, Daniele

wzhangwhu commented 11 months ago

Thanks for response, but it still report error as following:

SETUP Building with 'MinGW64 Compiler (C)'. MEX completed successfully. Building with 'MinGW64 Compiler (C++)'. MEX completed successfully. Building with 'MinGW64 Compiler (C)'. MEX completed successfully. Building with 'MinGW64 Compiler (C++)'. MEX completed successfully. Building with 'MinGW64 Compiler (C++)'. Error using mex g++: error: -fexceptions: No such file or directory

Error in SETUP (line 15) mex CXXFLAGS="\$CXXFLAGS -std=c++11 -lm -lgsl -lgslcblas -O3 -ffast-math" mex_KNN_Annoy.cpp -largeArrayDims -I../External/

use an alternative comment as follows, it still gives error

mex mex_KNN_Annoy.cpp -largeArrayDims -I../External/ Building with 'MinGW64 Compiler (C++)'. Error using mex In file included from F:\SIMLR-SIMLR-2023-12-13\MATLAB\src\mex_KNN_Annoy.cpp:12:0: ..\External/annoylib.h:30:18: fatal error: mman.h: No such file or directory

include "mman.h"

^ compilation terminated.

danro9685 commented 11 months ago

Please make sure you have installed the compiler and all the required libraries (-lm -lgsl -lgslcblas)

guoshijie1 commented 9 months ago

how installed the compiler and all the required libraries (-lm -lgsl -lgslcblas)?