Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] failure to build example models #48

Closed
yizhang-yiz opened this issue Dec 30, 2023 · 2 comments
Closed

[BUG] failure to build example models #48

yizhang-yiz opened this issue Dec 30, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@yizhang-yiz
Copy link
Collaborator

From https://discourse.mc-stan.org/t/problem-installing-torsten-0-90/27585/5?u=yizhang
by Casey Davis.

Description

On new macbook pro with M3 chip:

48 warnings and 14 errors generated.
make: *** [src/cmdstan/main.o] Error 1

Is this something going on with a Torsten incompatibility with the M3 chip?

Expected Output

Build success.

Current Version:

v0.90.0

Full error msg

@yizhang-yiz yizhang-yiz added the bug Something isn't working label Dec 30, 2023
@yizhang-yiz yizhang-yiz self-assigned this Dec 30, 2023
@cbdavis33
Copy link

cbdavis33 commented Jan 3, 2024

Thanks for working on it, Yi. I don't have any compilation issues, now. But now I'm running into some bugs, but they're on the Torsten side rather than the Stan side, so I'm going to move the thread here.

In example-models.pk2cpt/pk2cpt.stan, when compiling it as is, I get the error

Compiling Stan program...
Syntax error in '/var/folders/cq/ymsm1rv904b6mwygsq0z0z4w0000gn/T/RtmpYy3ugG/model-1132070f5fc31.stan', line 54, column 17 to column 18, parsing error:
   -------------------------------------------------
    52:  
    53:    cHat = x[2, :] ./ V1; // we're interested in the amount in the second compartment
    54:    cHatObs = cHat'[iObs]; // predictions for observed data recors
                          ^
    55:  
    56:  }
   -------------------------------------------------

Ill-formed phrase. Found L-value "=" expression. There are many ways in which this can be completed to a valid phrase.

This is no big deal, since changing to either cHatObs = cHat[iObs]'; // predictions for observed data recors or

for(i in 1:nObs){
    cHatObs[i] = cHat[iObs[i]];  // predictions for observed data records
  }

as in pk2cpt_linode.stan fixes it.

pk2cpt_linode works with no issues. However, in both pk2cpt and pk2cpt_ode, there is an error evaluating the log probability. I looked into it, and cHat is a zero row vector.

To do some further checking. I fit a couple models I've written, and the analytical solution runs into the same errors as your examples. The linear ODE solutions and the general ODE solutions are fine, though.

I don't have too much time over the next couple of weeks, but I'll look into all this some more (and also to make sure there's nothing wrong with my code).

@yizhang-yiz
Copy link
Collaborator Author

This has been fixed in the latest develop branch. Thanks for reporting still.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants