trentool / TRENTOOL3

Open-Source MATLAB toolbox for transfer entropy estimation
http://trentool.github.io/TRENTOOL3/
GNU General Public License v3.0
56 stars 26 forks source link

Problem in executing the example script (with nn_prepare) #20

Closed dheerajrathee closed 7 years ago

dheerajrathee commented 7 years ago

I tried to run the example script but I got this error:

  -Attempt to execute SCRIPT nn_prepare as a function:

U:\Softwares\TRENTOOL3-master\tstool_functions\nn_prepare.m Error in TEragwitz (line 75)

may be some issue with mex file...

pwollstadt commented 7 years ago

Hi @dheerajrathee, which example script did you run? This sounds like you were trying to use the GPU functions without first compiling the mex files. If you want to use the GPU functions, you need to run intall.m first.

dheerajrathee commented 7 years ago

Hi Patricia,

Thanks for your reply. I tried to run 'example_script_CPUmethod' script. Kindly see the attached screenshot with the error (I use two screens).

Best, Dheeraj trentool_error

pwollstadt commented 7 years ago

Hi Dheeraj, could you try to calling nn_prepare directly to make sure you can execute the pre-compiled mex-files? Just go into the subfolder TRENTOOL3/tstool_functions/mex_win/mex64 (assuming your you are on a 64bit architecture, otherwise its the folder mex32) and check if you can execute nn_prepare (e.g., do nn_prepare(ones(100, 10))). Thanks, Patricia

SooryaG-2612 commented 7 years ago

I have exactly the same error as Dheeraj too. I tried your solution Patricia, the nn_prepare (ones(100,10)) was working fine but the example script has the same error still. I am on Ubuntu 14.04

dheerajrathee commented 7 years ago

Hi Soorya, I resolved the above issue by simple copy and pasting the mex file for nn_prepare, nn_search, and range_search from the folder location '\Trentool3\tstool_functions\mex_win\mex64' to the main folder i.e., '\Trentool3'. In tstool_functions folder you have options for mac, windows, and linux.

Best, Dheeraj

SooryaG-2612 commented 7 years ago

Thanks Dheeraj, I figured a way around it yesterday. I renamed the ones in the main folders and its working fine. Cheers, Soorya

iburunat commented 1 year ago

Thanks Dheeraj, I figured a way around it yesterday. I renamed the ones in the main folders and its working fine. Cheers, Soorya

I'm having the same problem reported in this issue. How did you rename them? I'm on a Mac (Catalina) and Matlab 2019. when I go to the MEX folder and try to run the function, I get:

Invalid MEX-file '/Users/iuser/Dropbox/MATLAB/path/TRENTOOL3-master/nn_prepare.mexmaci64':
dlopen(/Users/user/Dropbox/MATLAB/path/TRENTOOL3-master/nn_prepare.mexmaci64, 6): Library not loaded: @loader_path/libmex.dylib
  Referenced from: /Users/user/Dropbox/MATLAB/path/TRENTOOL3-master/nn_prepare.mexmaci64
  Reason: image not found