luoyunan / DTINet

A Network Integration Approach for Drug-Target Interaction Prediction
GNU General Public License v3.0
172 stars 60 forks source link

Confused about the command line ''make matlab'' #3

Closed kun931213 closed 4 years ago

kun931213 commented 6 years ago

Hi~ i checked again to confirm that i do have matlab. However, sadly, it went wrong on my mac agian and again. The "make matlab" code just can't work!

What do u mean the directory of MATLAB hasn't been set properly in the PATH environment variable? i use the [terminal] to execute all the command lines, i did not choose Path environment at all and i do not know how to choose the Path environment.

Thank u for ur reply!

kun931213 commented 6 years ago

Are u still in THU? U know, Im a Phd candidate in THU (School of basic medical sciences). We may meet and take a few minutes to solve the problem. That will be really nice and helpful of u! Thank u again~! My wechat number is : kun931213, please add me if u want.

kun931213 commented 6 years ago

我检查了一下Makefile文件,发现里面只有matlab2015a和matlab2014a两种,而我的matlab是2018a,会不会因为这个原因导致一直以来的安装失败呢!QAQ

以下为Makefile文件内容:

TACC

ifdef MKLROOT MATLAB = /work/apps/matlab/2015a CC = icpc INC = -I$(MATLAB)/extern/include -I$(MATLAB)/simulink/include -I$(MKLROOT)/include

MKLLIB += $(MKLROOT)/lib/intel64/libmkl_intel_lp64.a $(MKLROOT)/lib/intel64/libmkl_intel_thread.a $(MKLROOT)/lib/intel64/libmkl_core.a

OPTS += -D_GNU_SOURCE -DMATLAB_MEX_FILE -ansi -fexceptions -fPIC -fno-omit-frame-pointer -pthread -openmp -O3 -DNDEBUG -std=c++11 -xHost

-ipo

我的版本却为Matlab2018a

kun931213 commented 6 years ago

不知道是否因为我是mac系统而不是linux系统的问题。

我最终定位到错误的代码为Makefile中的:【matlab -nodisplay -nosplash -nojvm -r "make; exit"】这行代码。

Mac terminal里面会显示:matlab: command not found

matlab本身不是一个mac系统命令。请问Linux能直接运行这行代码么?

luoyunan commented 6 years ago

I think the main reason is that the installation directory of MATLAB hasn't been added to the PATH variable on your Mac, so you are not able to enter MATLAB in the command line mode.

Therefore, the first thing we need to add the path to the executable file of MATLAB into your environment variable PATH. The MATLAB version may be a factor, but let's first address the "matlab: command not found" issue.

Please first locate the directory where you installed MATLAB and double check the MATLAB executable file is in that directory (or its subdirectory). Then you need to add the path that contians the MATLAB executable file to your PATH variable: export PATH=/path/to/your/MATLAB/executable/file:$PATH

After this you can try which matlab. This should give you the above path of the MATLAB executable file. Then try matlab -nodesktop -nojvm -nosplash, which should start MATLAB in command line mode. If both are OK, you can try to install IMC again using the provided script.

luoyunan commented 6 years ago

Hi @kun931213 Are you able to run MATLAB based on the above information?