Forums

Back

jitter analasis

DF
Dan Fu, modified 2 Years ago.

jitter analasis

Youngling Posts: 46 Join Date: 12/14/16 Recent Posts

Dear SS team,

I have some trouble running Jittering using r4ss (1.43.0) and SSV3.30.17.00.

The input files  and par files (attached) runs work on windows command line but running SS_RunJitter fails:

> jit.likes <- SS_RunJitter(mydir=mydir,model = 'ss_win',Intern = FALSE,Njitter=Njitter)
 reading from STARTER.SS
 reading from data file
Data read sucessful 999

 reading forecast file 
 reading from control file
End of control file successful! 999
 read parm file
Error trying to open parameter input file ss.par
Table of likelihood values:
< table of extent 0 >
Warning message:
In shell(cmd = command, intern = Intern) :
  'ss_win -nohess' execution failed with error code 1

 

Would be please be able to take a look at this and see whether this is an issue with this function or my input files (attached)?

 

Much appreciated,

Dan

 

DF
Dan Fu, modified 2 Years ago.

RE: jitter analasis

Youngling Posts: 46 Join Date: 12/14/16 Recent Posts

OK, the function will work  if I change the parameter "model" from "ss_win" to "ss".  it probably has to do with the naming of the underlying par file.  Anyway, the parameter doesn't seem to work properly and  may need a fix.

Thanks

Dan

KJ
Kelli Faye Johnson, modified 2 Years ago.

RE: jitter analasis

Youngling Posts: 28 Join Date: 6/13/17 Recent Posts

Dan, Thanks for posting and providing your input files. I did not take the time to work through SS_RunJitter() when the model is named something other than ss but I did try to run your model with my executable, which happens to be version #V3.30.16.00 on this machine, and I was not able to run the model without first starting from the control file. After the model converged, I compared the ss.par that you attached to the one from the estimation and they differed at line 104. The new par file has the following two additional lines 

```

# Fcast_impl_error:
 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000
```

 This could also be contributing to SS_RunJitter() failing because it runs successfully on my machine with the new par file.

Best,

Kelli

DF
Dan Fu, modified 2 Years ago.

RE: jitter analasis

Youngling Posts: 46 Join Date: 12/14/16 Recent Posts

Thanks Kelli for checking this so quickly. What you described seems to suggest a difference between 3.16 and 3.17 and In either case  SS_RunJitter() works when the model is named "ss". That will work for me.   

Cheers,

Dan

KD
Kathryn Doering, modified 2 Years ago.

RE: jitter analasis

Youngling Posts: 57 Join Date: 2/19/19 Recent Posts

Hi Dan and Kelli,

 

Dan you are right, there is a difference in par files between 3.30.16 and 3.30.17 in some models. In 3.30.16, some models that did not use implementation error still had implementation error parameters (all 0) created. In 3.30.17, only models that use implementation error have the implementation error parameters. If someone wants to use a 3.30.16 par file with 3.30.17 for a model without implementation error, all that would be needed is to delete the implementation error parameteters from the par file.

 

Dan, thanks for also noting that SS_RunJitter will not work with models named something other than ss.exe. It would be great to make this function more flexible.

 

Thanks,

Kathryn

KD
Kathryn Doering, modified 2 Years ago.

RE: jitter analasis

Youngling Posts: 57 Join Date: 2/19/19 Recent Posts

Hi Dan,

 

Kelli realized it was just a bug in 1 line of code in the SS_RunJitter function that was causing the error when using a different model name. The code assumed changing the model name also changed the par file name, when the par file is always called ss.par regardless of the exe's name.

I just pushed the fix to the main branch of r4ss; when you have the chance, would you mind re-installing r4ss using remotes::install_github("r4ss/r4ss"), restarting the R session, then trying the SS_RunJitter function while using the ss_win.exe  as the model again? 

 

Thanks,

Kathryn

DF
Dan Fu, modified 2 Years ago.

RE: jitter analasis

Youngling Posts: 46 Join Date: 12/14/16 Recent Posts

Hi Kathryn & Kelli,

I reinstalled r4ss and it works fine with other executable names now. 

Thanks for the quick fix.

Cheers,

Dan