peclayson / ERA_Toolbox

Matlab toolbox for obtaining dependability estimates for ERP measurements
6 stars 1 forks source link

"having a problem getting stan version" #20

Closed HashemiScience closed 4 years ago

HashemiScience commented 4 years ago

Hi Peter,

First, thanks for the toolbox -- we're excited to use it! I have tried running the toolbox and recieved the error below.

It's likely that it is simply a version issue since my cmdstan is higher than what you've tested on according to your documentation, but I am wondering if you have tested it on cmdstan 2.21.0 and recieve a similar error. I have to get our IT department to downgrade our cmdstan, so before I do that, I am wondering if you've already tested newer cmdstan's.

I get this bug when I try to analyze any dataset:

>> era_start
Ensuring dependents are found in the Matlab path
ERA Toolbox files found
CmdStan, MatlabProcessManager, and MatlabStan files found
Warning: Installed CmdStan version is newer than the version tested for the Toolbox. Toolbox may not work properly as a result 
> In era_start (line 209)
  In era_startproc>bb_call (line 417) 
Warning: Installed MatlabProcessManager version is newer than the version tested for the Toolbox. Toolbox may not work properly as a result 
> In era_start (line 220)
  In era_startproc>bb_call (line 417) 
Checking the installed version of MatlabStan is not currently supported

ERP Reliability Analysis Toolbox Version 0.4.8

Unable to connect to Github to check for new releases

Loading Data...
This may take awhile depending on the amount of data...

Preparing data for analysis...

Model is being run in cmdstan

This may take a while depending on the amount of data
Having a problem getting stan version.
This is likely a problem with Java running out of file descriptors
Trying again.
Trying again.
Trying again.
Trying again.
Trying again.
Trying again.
Giving up.
Error using cellfun
Non-scalar in Uniform output, at index 1, output 1.
Set 'UniformOutput' to false.

Error in StanModel/stan_version (line 850)
            ver = cellfun(@str2num,regexp(str{3},'\.','split'));

Error in StanModel (line 196)
               ver = self.stan_version();

Error in stan (line 108)
   model = StanModel();

Error in era_computerel (line 809)
        fit = stan('model_code', stan_in, 'model_name', modelname,...

Error in era_computerelwrap (line 168)
    REL = era_computerel('data',era_data.proc.data,...

Error in era_startproc>era_exec (line 1184)
era_data = era_computerelwrap('era_prefs',era_prefs,'era_data',era_data);

Error while evaluating DestroyedObject Callback.

I am using:

peclayson commented 4 years ago

Good morning!

Let's see. This looks like it is could be an issue with possible spaces in your paths, see https://github.com/brian-lau/MatlabStan/issues/17. Cmdstan and all other dependents need to be a location where there are no spaces in the path. Can you double check that is the case?

Good luck! Peter

HashemiScience commented 4 years ago

Thanks for the quick reply, Peter. There are no spaces, and cmdstan works fine in the command line. I am following all the different leads in those threads, hopefully there's an answer in there. I'll report back if I've exhausted them all and it's still not fixed.

Ali

HashemiScience commented 4 years ago

OK -- I followed the bug and it seems to be a problem with StanModel in the MatlabStan code not pulling the proper stanc version.

line 849-850 in StanModel.m: str = regexp(p.stdout{1},'\ ','split'); ver = cellfun(@str2num,regexp(str{3},'\.','split')); was not behaving since str{3} was {'(Unix)'} when it should have been a numeric version (i.e., 2.21.0). As a quick fix, I've hard coded that version in and everything works well.

Thank you for your help and fuiding me to a solution!

Cheers, Ali

peclayson commented 4 years ago

Great! I'm glad it worked out. Let me know if you have any other questions 👍

Peter