Thanks. It's very helpful to see this huge models
and get reports on performance (especially vs. JAGS).
And to get a user perspective.
We really need to do a better job on that warning
message. The rejections are just for single states
on the Hamiltonian path, not of the whole proposal
(which is slice sampled along the path). Just think
of this as producing an example way below the slice.
Now if it happens on the first step of the leapfrog algorithm,
you will get a rejection.
Over the next few months, we'll speed up the multivariate
models by at least an order of magnitude. Right now,
we're doing all the derivatives by brute-force auto-dif,
but we can be more clever about this and do all the computations
and gradients using double values and then propagate.
We'll also vectorize them, but I doubt that's your issue.
But even so, we're not going to be able to speed up things like
your rescaling in the transformed parameters block, which
explicitly calls a cholesky decomposition. There may be a better
way to factor that in terms of algebraic operations that have
better auto-dif behavior.
Nothing else jumps out at me that's going to be a huge gain,
but I'm guessing all those Cholesky factorizations are a killer.
- Bob
> goodrich@CYBERPOWERPC:/tmp/SU/__tds$ ./ordMultiProt_E_norm --data=datstan_mp.Rdump
>
> Exception: INDEX OPERATOR [] OUT OF BOUNDS; index=3; lower bound=1; upper bound=2; index position=1; z1
>
> Diagnostic information:
> Dynamic exception type: std::out_of_range
> std::exception::what: INDEX OPERATOR [] OUT OF BOUNDS; index=3; lower bound=1; upper bound=2; index
> position=1; z1
>
> goodrich@CYBERPOWERPC:/tmp/SU/__tds$ grep -n z1 ordMultiProt_E_norm.stan
> 58: matrix[D1,ncut1] z1[beta];
> 81: corr_matrix[D1] R_z1;
> 88: vector<lower=0>[D1] s_z1;
> 131: Zeta1 <- Zeta1_norm * transpose(cholesky_decompose(__R_z1)) * diag_matrix(s_z1);
> 146: /* generate simplex, gamma1[d,1:(ncut1-1)] from standard normals, z1[d,1:(ncut2-1),1:beta] */
> 147: for( c in 1:ncut1 ) gamma1_u[d,c] <- dot_self(z1[d,c]); /* each z1[d,c] is of length beta */
> 229: for( d in 1:D1) for( c in 1:ncut1 ) z1[d,c] ~ normal(0,1);
>
> |
>
> And, FYI, although it is unrelated to the problems you are having, as from v1.1.0, you can put pretty much
> anything
> to the left of a ~ if only scalars are passed to the distribution. So, for example
>
> |
> for( d in 1:Ds ) col(Phi_norm,d) ~ normal(0,1);
> |
>
> can just become the somewhat faster and simpler
>
> |
> Phi_norm ~ normal(0,1);
> |
>
> and so forth.
>
> Ben
>
>
> On Friday, December 28, 2012 9:39:12 PM UTC-5, tds151 wrote:
>
>
>
>
> 1. Sorry that I didn't earlier employ set_cppo("debug"). I assumed I was successfully compiling and
> linking,
> but encountering a runtime problem. Anyway, I receive an odd error message about failure to compile due to
> insufficient memory. There is a warning statement regarding the free_memory() function of agrad. If I
> run the
> script under fast compile O3 mode, R crashes. The error response is odd b/c it occurs during the
> compile phase
> and I'm running the script on a machine with 80GB of unused RAM. During the compilation step, a maximum of
> 1.2GB is used. That said, the processor on the machine is nearly maxed out.
>
> Error in compileCode(f, code, language = language, verbose = verbose) :
> Compilation ERROR, function(s)/method(s) not created! cygwin warning:
> MS-DOS style path detected: C:/PROGRA~1/R/R-215~1.1/etc/____x64/Makeconf
> Preferred POSIX equivalent is: /cygdrive/c/PROGRA~1/R/R-215~____1.1/etc/x64/Makeconf
>
> CYGWIN environment variable option "nodosfilewarning" turns off this warning.
> Consult the user's guide for more details about POSIX paths:
>
http://cygwin.com/cygwin-ug-____net/using.html#using-pathnames
> <
http://cygwin.com/cygwin-ug-__net/using.html#using-pathnames>
> <
http://cygwin.com/cygwin-ug-__net/using.html#using-pathnames
> <
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames>__>
>
> D:/Users/savitsky/Documents/R/____win-library/2.15/rstan/____include//stansrc/stan/agrad/____agrad.hpp:2171:17:
>
> warning: 'void stan::agrad::free_memory()' defined but not used [-Wunused-function]
>
> c:/rtools/gcc-4.6.3/bin/../____lib/gcc/i686-w64-mingw32/4.6.____3/../../../../i686-w64-____mingw32/bin/as.exe:
>
> file2d646a386305.o: too many sections (39205)
> D:\Users\savitsky\AppData\____Local\Temp\20\ccZoO8Jj.s: Assembler messages:
> D:\Users\savitsky\AppData\____Local\Temp\20\ccZoO8Jj.s: Fatal error: can't write file2d646a386305.o:
> File too big
> c:/rtools/gcc-4.6.3/bin/../____lib/gcc/i686-w64-mingw
> On Wed, Dec 26, 2012 at 5:23 PM, terrance savitsky <
tds...@gmail.com <mailto:
tds...@gmail.com>>
> --
>
>