[ADMB Users] "xxglobal.tmp" error with tpl2rem

Bolker,Benjamin Michael bolker at ufl.edu
Tue Aug 4 08:58:45 PDT 2009


  thanks for the quick reply.

  no luck, though:

ben at bolker-lap2:~/downloads$ ./admb -r ~/students/mccoy/mccoypred3

*** tpl2rem   /home/ben/students/mccoy/mccoypred3
cat: xxalloc4.tmp: No such file or directory
Error executing command cat xxglobal.tmp   xxhtop.tmp   header.tmp   xxalloc1.tmp   xxalloc2.tmp   xxalloc3.tmp   xxalloc4.tmp    xxalloc5.tmp    xxtopm.tmp    xxalloc6.tmp > /home/ben/students/mccoy/mccoypred3.cpp

  is there something boneheaded/obviously wrong with the TPL file?
it takes me a long time to recognize such things, being so new to ADMB.

I did find that the simple2.tpl example posted on the google code site, which is
basically a translation of the example in the ADMB-RE manual (taking
"simple.tpl" and adding some measurement error) provokes the same
response.  The union.tpl example distributed with ADMB-RE works, but I can provoke the same error
by deleting the following lines from union.tpl:

< PRELIMINARY_CALCS_SECTION
<   cout << setprecision(4);
< 
< GLOBALS_SECTION
< 

Here's simple2.tpl:

DATA_SECTION
  init_int nobs
  init_vector Y(1,nobs)
  init_vector X(1,nobs)
PARAMETER_SECTION
  init_number a
  init_number b
  init_number mu
  vector pred_Y(1,nobs)
  init_bounded_number sigma_Y(0.000001,10)
  init_bounded_number sigma_x(0.000001,10)
  random_effects_vector x(1,nobs)
  objective_function_value f
PROCEDURE_SECTION // This section is pure C++
  f = 0;
  pred_Y=a*x+b; // Vectorized operations
  // Prior part for random effects x
  f += -nobs*log(sigma_x) - 0.5*norm2((x-mu)/sigma_x);
  // Likelihood part
  f += -nobs*log(sigma_Y) - 0.5*norm2((pred_Y-Y)/sigma_Y);
  f += -0.5*norm2((X-x)/0.5);
  f *= -1; // ADMB does minimization!


________________________________________
From: Steve Martell [s.martell at fisheries.ubc.ca]
Sent: Tuesday, August 04, 2009 11:35 AM
To: Bolker,Benjamin Michael
Cc: users at admb-project.org
Subject: Re: [ADMB Users] "xxglobal.tmp" error with tpl2rem

Ben,

Try using the scripts that Arni posted at:

http://admb-project.org/community/editing-tools/admb-ide/scripts-linux.zip/view?searchterm=Scripts

Steve

On 3-Aug-09, at 10:09 PM, Bolker,Benjamin Michael wrote:

>
>   I'm just beginning to use AD Model Builder.
>  I have successfully (after some struggles) created a few different
> likelihood models, with results matching previous model fits in R.
> Now I'm trying to add a random effect.  Versions of the TPL file
> below compiled OK with tpl2cpp before I added the random effect;
> now, with tpl2rem, I'm getting
>
> cat: xxalloc4.tmp: No such file or directory
> cat: xxalloc5.tmp: No such file or directory
> Error executing command cat xxglobal.tmp   xxhtop.tmp   header.tmp
> xxalloc1.tmp   xxalloc2.tmp   xxalloc3.tmp   xxalloc4.tmp
> xxalloc5.tmp    xxtopm.tmp    xxalloc6.tmp > mccoypred4.cpp
>
>   There was an issue with similar keywords listed on the ADMB site,
> but it
> was listed as "resolved".
>
>  I'm running on Ubuntu Linux 9.04, with a recent (?? can't find
> version number ??)
> version of ADMB. (Maybe 9.0.202 from the google code page?)
>
>  I'd be happy to provide any other diagnostics/information if that
> will
> help solve / diagnose ...
>
>  sincerely
>    Ben Bolker
>
>
>
> -------------------------------------
> DATA_SECTION
>
>  init_int nobs               // # of observations
>  init_int nblock             // # of blocks
>  init_vector killed(1,nobs)  // # killed per trial
>  init_vector size(1,nobs)    // size of individuals
>  init_vector initial(1,nobs) // starting density (# individuals)
>  init_matrix Z(1,nobs,1,nblock) // random-effects model matrix
>
> PARAMETER_SECTION
>
>  init_number c    // *mean* c value
>  init_number d
>  init_bounded_number h(0.0,1.0,1)
>  init_number g
>  init_bounded_number sigma_c(0.00001,1.0,1)
>  random_effects_vector u(1,nblock)
>  vector prob(1,nobs)
>  vector cvec(1,nobs)
>  objective_function_value f
>
> PROCEDURE_SECTION
>  // compute vector of c values
>  cvec = c + sigma_c*(Z*u)
>  // power-Ricker
>  prob = 1/(1/(elem_prod(cvec,elem_prod(pow(size/d,g),exp(-size/d))))
> +h*initial);
>  // binomial negative log-likelihood
>  f -= sum( log_comb(initial,killed)+
>            elem_prod(killed,log(prob))+
>            elem_prod(initial-killed,log(1-prob)));
> _______________________________________________
> Users mailing list
> Users at admb-project.org
> http://lists.admb-project.org/mailman/listinfo/users

Steve Martell
s.martell at fisheries.ubc.ca






More information about the Users mailing list