cmdstanpy icon indicating copy to clipboard operation
cmdstanpy copied to clipboard

Unable to build Stan model

Open azespinoza opened this issue 2 years ago • 39 comments

Summary:

Please provide a short couple sentence summary.

Hi,

I have been attempting to build a Stan model on an M1 Mac. Unfortunately, every time I try to build I get a message asking to rebuild cmdstan. Rebuilding is successful and results in the same error upon trying to build the Stan model again.

Description:

Describe the issue as clearly as possible.

Previously, I encountered errors such as mentioned in this ticket. I was able to successfully install cmdstanpy via conda and rebuild cmdstan:

>>> cmdstanpy.rebuild_cmdstan()
Done:  (01:14) | ███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████ | --- CmdStan v2.29.2 built ---
>>> exit()
INFO:cmdstanpy:deleting tmpfiles dir: /var/folders/20/d05_tk914m3ft933jzk_rmnw81m0nb/T/tmpoq35v7ht
INFO:cmdstanpy:done

And now, I am still getting the PCH file warning when trying to build my Stan model.

python 02_CmdStan_Fit.py
INFO:cmdstanpy:compiling stan file /Users/espinoal/Documents/aims_repos/daily-dose-stan-modeling/ohsu_simulator.stan to exe file /Users/espinoal/Documents/aims_repos/daily-dose-stan-modeling/ohsu_simulator
WARNING:cmdstanpy:CmdStan's precompiled header (PCH) files may need to be rebuilt.If your model failed to compile please run cmdstanpy.rebuild_cmdstan().
If the issue persists please open a bug report
Traceback (most recent call last):
  File "/Users/espinoal/Documents/aims_repos/daily-dose-stan-modeling/02_CmdStan_Fit.py", line 26, in <module>
    model = CmdStanModel(stan_file=stan_file)# compile='Force')
  File "/Users/espinoal/opt/anaconda3/envs/cmdstan/lib/python3.10/site-packages/cmdstanpy/model.py", line 210, in __init__
    raise ValueError(
ValueError: Unable to compile Stan model file: /Users/espinoal/Documents/aims_repos/daily-dose-stan-modeling/ohsu_simulator.stan.
INFO:cmdstanpy:deleting tmpfiles dir: /var/folders/20/d05_tk914m3ft933jzk_rmnw81m0nb/T/tmpdcz0aelt
INFO:cmdstanpy:done

The Stan model does build through pystan. Unfortunately with pystan, I get a vague initialization failed error when I try to sample, but I think that's an unrelated issue.

Additional Information:

Here is the output from conda info if it is useful:

(cmdstan) MacBook-Pro:daily-dose-stan-modeling espinoal$ conda info

     active environment : cmdstan
    active env location : /Users/espinoal/opt/anaconda3/envs/cmdstan
            shell level : 2
       user config file : /Users/espinoal/.condarc
 populated config files : /Users/espinoal/.condarc
                          /Users/espinoal/opt/anaconda3/envs/cmdstan/.condarc
          conda version : 4.12.0
    conda-build version : 3.21.4
         python version : 3.8.8.final.0
       virtual packages : __osx=10.16=0
                          __unix=0=0
                          __archspec=1=arm64
       base environment : /Users/espinoal/opt/anaconda3  (writable)
      conda av data dir : /Users/espinoal/opt/anaconda3/etc/conda
  conda av metadata url : None
           channel URLs : https://repo.anaconda.com/pkgs/main/osx-arm64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/osx-arm64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /Users/espinoal/opt/anaconda3/pkgs
                          /Users/espinoal/.conda/pkgs
       envs directories : /Users/espinoal/opt/anaconda3/envs
                          /Users/espinoal/.conda/envs
               platform : osx-arm64
             user-agent : conda/4.12.0 requests/2.25.1 CPython/3.8.8 Darwin/21.4.0 OSX/10.16
                UID:GID : 270140075:1971611142
             netrc file : /Users/espinoal/.netrc
           offline mode : False

Current Version:

CmdStan v2.29.2

Please let me know if I can provide additional info. Thank you!

azespinoza avatar Apr 26 '22 20:04 azespinoza

Did you install cmdstan and cmdstanpy via conda or pip?

These kinds of errors have been cropping up when a user mixes and matches between the x86 and arm64 versions of things like clang.

Can you also show the output of cmdstanpy.cmdstan_path()?

WardBrian avatar Apr 26 '22 20:04 WardBrian

I installed cmdstand and cmdstanpy with conda using this command:

conda install -c conda-forge cmdstanpy

in a new environment cmdstan. I also set the config for the osx-arm64 architecture via conda config --env --set subdir osx-arm64.

Here's the output of cmdstan_path():

>>> cmdstanpy.cmdstan_path()
'/Users/espinoal/opt/anaconda3/envs/cmdstan/bin/cmdstan'

This is my clang version, I'm not sure how to tell if I've mixed it elsewhere though?

(cmdstan) MacBook-Pro:daily-dose-stan-modeling espinoal$ clang --version
clang version 12.0.0
Target: arm64-apple-darwin21.4.0
Thread model: posix

Thanks for the help!

azespinoza avatar Apr 26 '22 20:04 azespinoza

Inside the conda environment, if you run echo $CXX it should tell you what conda may be setting as the compiler name. For me (Ubuntu), this is x86_64-conda-linux-gnu-c++, which is different from when I type gcc

WardBrian avatar Apr 26 '22 20:04 WardBrian

Ok. This is what I get:

(cmdstan) MacBook-Pro:daily-dose-stan-modeling espinoal$ echo $CXX
arm64-apple-darwin20.0.0-clang++

azespinoza avatar Apr 26 '22 20:04 azespinoza

Great, can you run cmdstanpy.rebuild_cmdstan(verbose=True)? This should let us see which compiler the rebuild command is using, at least.

Additionally, it is possible to use cmdstan purely from the command line. It's worth checking if that works, so you can go to the folder which has your .stan file and run cmdstan_model filename.stan. The output of this will also be helpful

WardBrian avatar Apr 26 '22 20:04 WardBrian

Here's the output from the first command (sorry, it's pretty long)

>>> cmdstanpy.rebuild_cmdstan(verbose=True)
rm -f -r test
rm -f 
rm -f 
rm -f 
rm -f 
  removing dependency files
rm -f src/cmdstan/main.d   stan//src/stan/model/model_header.d
rm -f   
rm -f   
  cleaning sundials targets
rm -f stan/lib/stan_math/lib/sundials_6.0.0/lib/libsundials_cvodes.a stan/lib/stan_math/lib/sundials_6.0.0/lib/libsundials_idas.a stan/lib/stan_math/lib/sundials_6.0.0/lib/libsundials_kinsol.a stan/lib/stan_math/lib/sundials_6.0.0/lib/libsundials_nvecserial.a stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodea.o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodea_io.o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes.o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_bandpre.o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_bbdpre.o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_diag.o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_direct.o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_io.o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_ls.o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_nls.o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_nls_sim.o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_nls_stg.o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_nls_stg1.o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_spils.o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idaa.o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idaa_io.o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas.o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_bbdpre.o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_direct.o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_ic.o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_io.o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_ls.o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_nls.o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_nls_sim.o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_nls_stg.o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_spils.o stan/lib/stan_math/lib/sundials_6.0.0/src/kinsol/kinsol.o stan/lib/stan_math/lib/sundials_6.0.0/src/kinsol/kinsol_bbdpre.o stan/lib/stan_math/lib/sundials_6.0.0/src/kinsol/kinsol_direct.o stan/lib/stan_math/lib/sundials_6.0.0/src/kinsol/kinsol_io.o stan/lib/stan_math/lib/sundials_6.0.0/src/kinsol/kinsol_ls.o stan/lib/stan_math/lib/sundials_6.0.0/src/kinsol/kinsol_spils.o stan/lib/stan_math/lib/sundials_6.0.0/src/nvector/serial/nvector_serial.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_band.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_context.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_dense.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_direct.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_futils.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_iterative.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_linearsolver.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_math.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_matrix.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_memory.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_nonlinearsolver.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_nvector.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_nvector_senswrapper.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_version.o stan/lib/stan_math/lib/sundials_6.0.0/src/sunlinsol/band/sunlinsol_band.o stan/lib/stan_math/lib/sundials_6.0.0/src/sunlinsol/dense/sunlinsol_dense.o stan/lib/stan_math/lib/sundials_6.0.0/src/sunmatrix/band/sunmatrix_band.o stan/lib/stan_math/lib/sundials_6.0.0/src/sunmatrix/dense/sunmatrix_dense.o stan/lib/stan_math/lib/sundials_6.0.0/src/sunnonlinsol/fixedpoint/sunnonlinsol_fixedpoint.o stan/lib/stan_math/lib/sundials_6.0.0/src/sunnonlinsol/newton/sunnonlinsol_newton.o
rm -f bin/stanc bin/stansummary bin/print bin/diagnose
rm -f -r src/cmdstan/main*.o bin/cmdstan
rm -f stan/src/stan/model/model_header.hpp.gch
rm -f examples/bernoulli/bernoulli examples/bernoulli/bernoulli.o examples/bernoulli/bernoulli.d examples/bernoulli/bernoulli.hpp
rm -f -r 
cp bin/mac-stanc bin/stanc
chmod +x bin/stanc
arm64-apple-darwin20.0.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/nvector/serial/nvector_serial.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/nvector/serial/nvector_serial.o
arm64-apple-darwin20.0.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_math.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_math.o
arm64-apple-darwin20.0.0-ar -rs stan/lib/stan_math/lib/sundials_6.0.0/lib/libsundials_nvecserial.a stan/lib/stan_math/lib/sundials_6.0.0/src/nvector/serial/nvector_serial.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_math.o
arm64-apple-darwin20.0.0-ar: creating archive stan/lib/stan_math/lib/sundials_6.0.0/lib/libsundials_nvecserial.a
arm64-apple-darwin20.0.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodea.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodea.o
arm64-apple-darwin20.0.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodea_io.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodea_io.o
arm64-apple-darwin20.0.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes.o
arm64-apple-darwin20.0.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_bandpre.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_bandpre.o
arm64-apple-darwin20.0.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_bbdpre.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_bbdpre.o
arm64-apple-darwin20.0.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_diag.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_diag.o
arm64-apple-darwin20.0.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_direct.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_direct.o
arm64-apple-darwin20.0.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_io.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_io.o
arm64-apple-darwin20.0.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_ls.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_ls.o
arm64-apple-darwin20.0.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_nls.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_nls.o
arm64-apple-darwin20.0.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_nls_sim.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_nls_sim.o
arm64-apple-darwin20.0.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_nls_stg.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_nls_stg.o
arm64-apple-darwin20.0.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_nls_stg1.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_nls_stg1.o
arm64-apple-darwin20.0.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_spils.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_spils.o
arm64-apple-darwin20.0.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_band.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_band.o
arm64-apple-darwin20.0.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_context.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_context.o
arm64-apple-darwin20.0.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_dense.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_dense.o
arm64-apple-darwin20.0.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_direct.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_direct.o
arm64-apple-darwin20.0.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_futils.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_futils.o
arm64-apple-darwin20.0.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_iterative.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_iterative.o
arm64-apple-darwin20.0.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_linearsolver.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_linearsolver.o
arm64-apple-darwin20.0.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_matrix.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_matrix.o
arm64-apple-darwin20.0.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_memory.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_memory.o
arm64-apple-darwin20.0.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_nonlinearsolver.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_nonlinearsolver.o
arm64-apple-darwin20.0.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_nvector.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_nvector.o
arm64-apple-darwin20.0.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_nvector_senswrapper.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_nvector_senswrapper.o
arm64-apple-darwin20.0.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_version.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_version.o
arm64-apple-darwin20.0.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/sunmatrix/band/sunmatrix_band.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/sunmatrix/band/sunmatrix_band.o
arm64-apple-darwin20.0.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/sunmatrix/dense/sunmatrix_dense.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/sunmatrix/dense/sunmatrix_dense.o
arm64-apple-darwin20.0.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/sunlinsol/band/sunlinsol_band.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/sunlinsol/band/sunlinsol_band.o
arm64-apple-darwin20.0.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/sunlinsol/dense/sunlinsol_dense.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/sunlinsol/dense/sunlinsol_dense.o
arm64-apple-darwin20.0.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/sunnonlinsol/newton/sunnonlinsol_newton.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/sunnonlinsol/newton/sunnonlinsol_newton.o
arm64-apple-darwin20.0.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/sunnonlinsol/fixedpoint/sunnonlinsol_fixedpoint.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/sunnonlinsol/fixedpoint/sunnonlinsol_fixedpoint.o
arm64-apple-darwin20.0.0-ar -rs stan/lib/stan_math/lib/sundials_6.0.0/lib/libsundials_cvodes.a stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodea.o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodea_io.o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes.o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_bandpre.o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_bbdpre.o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_diag.o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_direct.o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_io.o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_ls.o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_nls.o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_nls_sim.o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_nls_stg.o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_nls_stg1.o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_spils.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_band.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_context.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_dense.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_direct.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_futils.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_iterative.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_linearsolver.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_math.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_matrix.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_memory.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_nonlinearsolver.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_nvector.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_nvector_senswrapper.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_version.o stan/lib/stan_math/lib/sundials_6.0.0/src/sunmatrix/band/sunmatrix_band.o stan/lib/stan_math/lib/sundials_6.0.0/src/sunmatrix/dense/sunmatrix_dense.o stan/lib/stan_math/lib/sundials_6.0.0/src/sunlinsol/band/sunlinsol_band.o stan/lib/stan_math/lib/sundials_6.0.0/src/sunlinsol/dense/sunlinsol_dense.o stan/lib/stan_math/lib/sundials_6.0.0/src/sunnonlinsol/newton/sunnonlinsol_newton.o stan/lib/stan_math/lib/sundials_6.0.0/src/sunnonlinsol/fixedpoint/sunnonlinsol_fixedpoint.o
arm64-apple-darwin20.0.0-ar: creating archive stan/lib/stan_math/lib/sundials_6.0.0/lib/libsundials_cvodes.a
arm64-apple-darwin20.0.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idaa.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idaa.o
arm64-apple-darwin20.0.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idaa_io.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idaa_io.o
arm64-apple-darwin20.0.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas.o
arm64-apple-darwin20.0.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_bbdpre.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_bbdpre.o
arm64-apple-darwin20.0.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_direct.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_direct.o
arm64-apple-darwin20.0.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_ic.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_ic.o
arm64-apple-darwin20.0.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_io.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_io.o
arm64-apple-darwin20.0.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_ls.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_ls.o
arm64-apple-darwin20.0.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_nls.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_nls.o
arm64-apple-darwin20.0.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_nls_sim.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_nls_sim.o
arm64-apple-darwin20.0.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_nls_stg.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_nls_stg.o
arm64-apple-darwin20.0.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_spils.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_spils.o
arm64-apple-darwin20.0.0-ar -rs stan/lib/stan_math/lib/sundials_6.0.0/lib/libsundials_idas.a stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idaa.o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idaa_io.o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas.o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_bbdpre.o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_direct.o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_ic.o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_io.o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_ls.o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_nls.o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_nls_sim.o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_nls_stg.o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_spils.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_band.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_context.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_dense.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_direct.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_futils.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_iterative.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_linearsolver.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_math.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_matrix.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_memory.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_nonlinearsolver.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_nvector.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_nvector_senswrapper.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_version.o stan/lib/stan_math/lib/sundials_6.0.0/src/sunmatrix/band/sunmatrix_band.o stan/lib/stan_math/lib/sundials_6.0.0/src/sunmatrix/dense/sunmatrix_dense.o stan/lib/stan_math/lib/sundials_6.0.0/src/sunlinsol/band/sunlinsol_band.o stan/lib/stan_math/lib/sundials_6.0.0/src/sunlinsol/dense/sunlinsol_dense.o stan/lib/stan_math/lib/sundials_6.0.0/src/sunnonlinsol/newton/sunnonlinsol_newton.o stan/lib/stan_math/lib/sundials_6.0.0/src/sunnonlinsol/fixedpoint/sunnonlinsol_fixedpoint.o
arm64-apple-darwin20.0.0-ar: creating archive stan/lib/stan_math/lib/sundials_6.0.0/lib/libsundials_idas.a
arm64-apple-darwin20.0.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/kinsol/kinsol.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/kinsol/kinsol.o
arm64-apple-darwin20.0.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/kinsol/kinsol_bbdpre.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/kinsol/kinsol_bbdpre.o
arm64-apple-darwin20.0.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/kinsol/kinsol_direct.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/kinsol/kinsol_direct.o
arm64-apple-darwin20.0.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/kinsol/kinsol_io.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/kinsol/kinsol_io.o
arm64-apple-darwin20.0.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/kinsol/kinsol_ls.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/kinsol/kinsol_ls.o
arm64-apple-darwin20.0.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/kinsol/kinsol_spils.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/kinsol/kinsol_spils.o
arm64-apple-darwin20.0.0-ar -rs stan/lib/stan_math/lib/sundials_6.0.0/lib/libsundials_kinsol.a stan/lib/stan_math/lib/sundials_6.0.0/src/kinsol/kinsol.o stan/lib/stan_math/lib/sundials_6.0.0/src/kinsol/kinsol_bbdpre.o stan/lib/stan_math/lib/sundials_6.0.0/src/kinsol/kinsol_direct.o stan/lib/stan_math/lib/sundials_6.0.0/src/kinsol/kinsol_io.o stan/lib/stan_math/lib/sundials_6.0.0/src/kinsol/kinsol_ls.o stan/lib/stan_math/lib/sundials_6.0.0/src/kinsol/kinsol_spils.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_band.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_context.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_dense.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_direct.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_futils.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_iterative.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_linearsolver.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_math.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_matrix.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_memory.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_nonlinearsolver.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_nvector.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_nvector_senswrapper.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_version.o stan/lib/stan_math/lib/sundials_6.0.0/src/sunmatrix/band/sunmatrix_band.o stan/lib/stan_math/lib/sundials_6.0.0/src/sunmatrix/dense/sunmatrix_dense.o stan/lib/stan_math/lib/sundials_6.0.0/src/sunlinsol/band/sunlinsol_band.o stan/lib/stan_math/lib/sundials_6.0.0/src/sunlinsol/dense/sunlinsol_dense.o stan/lib/stan_math/lib/sundials_6.0.0/src/sunnonlinsol/newton/sunnonlinsol_newton.o stan/lib/stan_math/lib/sundials_6.0.0/src/sunnonlinsol/fixedpoint/sunnonlinsol_fixedpoint.o
arm64-apple-darwin20.0.0-ar: creating archive stan/lib/stan_math/lib/sundials_6.0.0/lib/libsundials_kinsol.a

--- Compiling the main object file. This might take up to a minute. ---
arm64-apple-darwin20.0.0-clang++ -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -std=c++14 -fmessage-length=0 -isystem /Users/espinoal/opt/anaconda3/envs/cmdstan/include -std=c++1y -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT -Wno-ignored-attributes      -I /Users/espinoal/opt/anaconda3/envs/cmdstan/include/    -O3 -I src -I stan/src -I lib/rapidjson_1.1.0/ -I lib/CLI11-1.9.1/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.3.9 -I stan/lib/stan_math/lib/boost_1.75.0 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -D_FORTIFY_SOURCE=2 -isystem /Users/espinoal/opt/anaconda3/envs/cmdstan/include    -DBOOST_DISABLE_ASSERTS   -DTBB_INTERFACE_NEW  -DTBB_INTERFACE_NEW     -c -o src/cmdstan/main.o src/cmdstan/main.cpp

--- Compiling pre-compiled header. This might take a few seconds. ---
arm64-apple-darwin20.0.0-clang++ -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -std=c++14 -fmessage-length=0 -isystem /Users/espinoal/opt/anaconda3/envs/cmdstan/include -std=c++1y -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT -Wno-ignored-attributes      -I /Users/espinoal/opt/anaconda3/envs/cmdstan/include/    -O3 -I src -I stan/src -I lib/rapidjson_1.1.0/ -I lib/CLI11-1.9.1/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.3.9 -I stan/lib/stan_math/lib/boost_1.75.0 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -D_FORTIFY_SOURCE=2 -isystem /Users/espinoal/opt/anaconda3/envs/cmdstan/include    -DBOOST_DISABLE_ASSERTS   -DTBB_INTERFACE_NEW  -DTBB_INTERFACE_NEW     -c stan/src/stan/model/model_header.hpp -o stan/src/stan/model/model_header.hpp.gch
arm64-apple-darwin20.0.0-clang++ -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -std=c++14 -fmessage-length=0 -isystem /Users/espinoal/opt/anaconda3/envs/cmdstan/include -std=c++1y -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT -Wno-ignored-attributes      -I /Users/espinoal/opt/anaconda3/envs/cmdstan/include/    -O3 -I src -I stan/src -I lib/rapidjson_1.1.0/ -I lib/CLI11-1.9.1/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.3.9 -I stan/lib/stan_math/lib/boost_1.75.0 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -D_FORTIFY_SOURCE=2 -isystem /Users/espinoal/opt/anaconda3/envs/cmdstan/include    -DBOOST_DISABLE_ASSERTS   -DTBB_INTERFACE_NEW  -DTBB_INTERFACE_NEW     -c -fvisibility=hidden -o bin/cmdstan/stansummary.o        -Wl,-L,"/Users/espinoal/opt/anaconda3/envs/cmdstan/lib/" -Wl,-rpath,"/Users/espinoal/opt/anaconda3/envs/cmdstan/lib/" -ltbb src/cmdstan/stansummary.cpp
clang-12: warning: -Wl,-L,/Users/espinoal/opt/anaconda3/envs/cmdstan/lib/: 'linker' input unused [-Wunused-command-line-argument]
clang-12: warning: -Wl,-rpath,/Users/espinoal/opt/anaconda3/envs/cmdstan/lib/: 'linker' input unused [-Wunused-command-line-argument]
clang-12: warning: -ltbb: 'linker' input unused [-Wunused-command-line-argument]
arm64-apple-darwin20.0.0-clang++ -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -std=c++14 -fmessage-length=0 -isystem /Users/espinoal/opt/anaconda3/envs/cmdstan/include -std=c++1y -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT -Wno-ignored-attributes      -I /Users/espinoal/opt/anaconda3/envs/cmdstan/include/    -O3 -I src -I stan/src -I lib/rapidjson_1.1.0/ -I lib/CLI11-1.9.1/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.3.9 -I stan/lib/stan_math/lib/boost_1.75.0 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -D_FORTIFY_SOURCE=2 -isystem /Users/espinoal/opt/anaconda3/envs/cmdstan/include    -DBOOST_DISABLE_ASSERTS   -DTBB_INTERFACE_NEW  -DTBB_INTERFACE_NEW    -Wl,-pie -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs -Wl,-rpath,/Users/espinoal/opt/anaconda3/envs/cmdstan/lib -L/Users/espinoal/opt/anaconda3/envs/cmdstan/lib        -Wl,-L,"/Users/espinoal/opt/anaconda3/envs/cmdstan/lib/" -Wl,-rpath,"/Users/espinoal/opt/anaconda3/envs/cmdstan/lib/" -ltbb    bin/cmdstan/stansummary.o        -Wl,-L,"/Users/espinoal/opt/anaconda3/envs/cmdstan/lib/" -Wl,-rpath,"/Users/espinoal/opt/anaconda3/envs/cmdstan/lib/" -ltbb -o bin/stansummary
arm64-apple-darwin20.0.0-clang++ -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -std=c++14 -fmessage-length=0 -isystem /Users/espinoal/opt/anaconda3/envs/cmdstan/include -std=c++1y -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT -Wno-ignored-attributes      -I /Users/espinoal/opt/anaconda3/envs/cmdstan/include/    -O3 -I src -I stan/src -I lib/rapidjson_1.1.0/ -I lib/CLI11-1.9.1/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.3.9 -I stan/lib/stan_math/lib/boost_1.75.0 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -D_FORTIFY_SOURCE=2 -isystem /Users/espinoal/opt/anaconda3/envs/cmdstan/include    -DBOOST_DISABLE_ASSERTS   -DTBB_INTERFACE_NEW  -DTBB_INTERFACE_NEW     -c -fvisibility=hidden -o bin/cmdstan/print.o        -Wl,-L,"/Users/espinoal/opt/anaconda3/envs/cmdstan/lib/" -Wl,-rpath,"/Users/espinoal/opt/anaconda3/envs/cmdstan/lib/" -ltbb src/cmdstan/print.cpp
clang-12: warning: -Wl,-L,/Users/espinoal/opt/anaconda3/envs/cmdstan/lib/: 'linker' input unused [-Wunused-command-line-argument]
clang-12: warning: -Wl,-rpath,/Users/espinoal/opt/anaconda3/envs/cmdstan/lib/: 'linker' input unused [-Wunused-command-line-argument]
clang-12: warning: -ltbb: 'linker' input unused [-Wunused-command-line-argument]
arm64-apple-darwin20.0.0-clang++ -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -std=c++14 -fmessage-length=0 -isystem /Users/espinoal/opt/anaconda3/envs/cmdstan/include -std=c++1y -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT -Wno-ignored-attributes      -I /Users/espinoal/opt/anaconda3/envs/cmdstan/include/    -O3 -I src -I stan/src -I lib/rapidjson_1.1.0/ -I lib/CLI11-1.9.1/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.3.9 -I stan/lib/stan_math/lib/boost_1.75.0 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -D_FORTIFY_SOURCE=2 -isystem /Users/espinoal/opt/anaconda3/envs/cmdstan/include    -DBOOST_DISABLE_ASSERTS   -DTBB_INTERFACE_NEW  -DTBB_INTERFACE_NEW    -Wl,-pie -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs -Wl,-rpath,/Users/espinoal/opt/anaconda3/envs/cmdstan/lib -L/Users/espinoal/opt/anaconda3/envs/cmdstan/lib        -Wl,-L,"/Users/espinoal/opt/anaconda3/envs/cmdstan/lib/" -Wl,-rpath,"/Users/espinoal/opt/anaconda3/envs/cmdstan/lib/" -ltbb    bin/cmdstan/print.o        -Wl,-L,"/Users/espinoal/opt/anaconda3/envs/cmdstan/lib/" -Wl,-rpath,"/Users/espinoal/opt/anaconda3/envs/cmdstan/lib/" -ltbb -o bin/print
arm64-apple-darwin20.0.0-clang++ -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -std=c++14 -fmessage-length=0 -isystem /Users/espinoal/opt/anaconda3/envs/cmdstan/include -std=c++1y -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT -Wno-ignored-attributes      -I /Users/espinoal/opt/anaconda3/envs/cmdstan/include/    -O3 -I src -I stan/src -I lib/rapidjson_1.1.0/ -I lib/CLI11-1.9.1/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.3.9 -I stan/lib/stan_math/lib/boost_1.75.0 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -D_FORTIFY_SOURCE=2 -isystem /Users/espinoal/opt/anaconda3/envs/cmdstan/include    -DBOOST_DISABLE_ASSERTS   -DTBB_INTERFACE_NEW  -DTBB_INTERFACE_NEW     -c -fvisibility=hidden -o bin/cmdstan/diagnose.o        -Wl,-L,"/Users/espinoal/opt/anaconda3/envs/cmdstan/lib/" -Wl,-rpath,"/Users/espinoal/opt/anaconda3/envs/cmdstan/lib/" -ltbb src/cmdstan/diagnose.cpp
clang-12: warning: -Wl,-L,/Users/espinoal/opt/anaconda3/envs/cmdstan/lib/: 'linker' input unused [-Wunused-command-line-argument]
clang-12: warning: -Wl,-rpath,/Users/espinoal/opt/anaconda3/envs/cmdstan/lib/: 'linker' input unused [-Wunused-command-line-argument]
clang-12: warning: -ltbb: 'linker' input unused [-Wunused-command-line-argument]
arm64-apple-darwin20.0.0-clang++ -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -std=c++14 -fmessage-length=0 -isystem /Users/espinoal/opt/anaconda3/envs/cmdstan/include -std=c++1y -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT -Wno-ignored-attributes      -I /Users/espinoal/opt/anaconda3/envs/cmdstan/include/    -O3 -I src -I stan/src -I lib/rapidjson_1.1.0/ -I lib/CLI11-1.9.1/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.3.9 -I stan/lib/stan_math/lib/boost_1.75.0 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -D_FORTIFY_SOURCE=2 -isystem /Users/espinoal/opt/anaconda3/envs/cmdstan/include    -DBOOST_DISABLE_ASSERTS   -DTBB_INTERFACE_NEW  -DTBB_INTERFACE_NEW    -Wl,-pie -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs -Wl,-rpath,/Users/espinoal/opt/anaconda3/envs/cmdstan/lib -L/Users/espinoal/opt/anaconda3/envs/cmdstan/lib        -Wl,-L,"/Users/espinoal/opt/anaconda3/envs/cmdstan/lib/" -Wl,-rpath,"/Users/espinoal/opt/anaconda3/envs/cmdstan/lib/" -ltbb    bin/cmdstan/diagnose.o        -Wl,-L,"/Users/espinoal/opt/anaconda3/envs/cmdstan/lib/" -Wl,-rpath,"/Users/espinoal/opt/anaconda3/envs/cmdstan/lib/" -ltbb -o bin/diagnose

--- CmdStan v2.29.2 built ---
arm64-apple-darwin20.0.0-clang++ -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -std=c++14 -fmessage-length=0 -isystem /Users/espinoal/opt/anaconda3/envs/cmdstan/include -std=c++1y -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT -Wno-ignored-attributes      -I /Users/espinoal/opt/anaconda3/envs/cmdstan/include/    -O3 -I src -I stan/src -I lib/rapidjson_1.1.0/ -I lib/CLI11-1.9.1/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.3.9 -I stan/lib/stan_math/lib/boost_1.75.0 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -D_FORTIFY_SOURCE=2 -isystem /Users/espinoal/opt/anaconda3/envs/cmdstan/include    -DBOOST_DISABLE_ASSERTS   -DTBB_INTERFACE_NEW  -DTBB_INTERFACE_NEW     -c -MT stan/src/stan/model/model_header.hpp.gch -MT stan/src/stan/model/model_header.d -MM -E -MG -MP -MF stan/src/stan/model/model_header.d stan/src/stan/model/model_header.hpp
arm64-apple-darwin20.0.0-clang++ -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -std=c++14 -fmessage-length=0 -isystem /Users/espinoal/opt/anaconda3/envs/cmdstan/include -std=c++1y -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT -Wno-ignored-attributes      -I /Users/espinoal/opt/anaconda3/envs/cmdstan/include/    -O3 -I src -I stan/src -I lib/rapidjson_1.1.0/ -I lib/CLI11-1.9.1/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.3.9 -I stan/lib/stan_math/lib/boost_1.75.0 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -D_FORTIFY_SOURCE=2 -isystem /Users/espinoal/opt/anaconda3/envs/cmdstan/include    -DBOOST_DISABLE_ASSERTS   -DTBB_INTERFACE_NEW  -DTBB_INTERFACE_NEW     -c -MT src/cmdstan/main.o -MM -E -MG -MP -MF src/cmdstan/main.d src/cmdstan/main.cpp

--- Translating Stan model to C++ code ---
bin/stanc  --o=examples/bernoulli/bernoulli.hpp examples/bernoulli/bernoulli.stan

--- Compiling, linking C++ code ---
arm64-apple-darwin20.0.0-clang++ -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -std=c++14 -fmessage-length=0 -isystem /Users/espinoal/opt/anaconda3/envs/cmdstan/include -std=c++1y -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT -Wno-ignored-attributes      -I /Users/espinoal/opt/anaconda3/envs/cmdstan/include/    -O3 -I src -I stan/src -I lib/rapidjson_1.1.0/ -I lib/CLI11-1.9.1/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.3.9 -I stan/lib/stan_math/lib/boost_1.75.0 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -D_FORTIFY_SOURCE=2 -isystem /Users/espinoal/opt/anaconda3/envs/cmdstan/include    -DBOOST_DISABLE_ASSERTS   -DTBB_INTERFACE_NEW  -DTBB_INTERFACE_NEW     -c -include-pch stan/src/stan/model/model_header.hpp.gch -x c++ -o examples/bernoulli/bernoulli.o examples/bernoulli/bernoulli.hpp
arm64-apple-darwin20.0.0-clang++ -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -std=c++14 -fmessage-length=0 -isystem /Users/espinoal/opt/anaconda3/envs/cmdstan/include -std=c++1y -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT -Wno-ignored-attributes      -I /Users/espinoal/opt/anaconda3/envs/cmdstan/include/    -O3 -I src -I stan/src -I lib/rapidjson_1.1.0/ -I lib/CLI11-1.9.1/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.3.9 -I stan/lib/stan_math/lib/boost_1.75.0 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -D_FORTIFY_SOURCE=2 -isystem /Users/espinoal/opt/anaconda3/envs/cmdstan/include    -DBOOST_DISABLE_ASSERTS   -DTBB_INTERFACE_NEW  -DTBB_INTERFACE_NEW    -Wl,-pie -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs -Wl,-rpath,/Users/espinoal/opt/anaconda3/envs/cmdstan/lib -L/Users/espinoal/opt/anaconda3/envs/cmdstan/lib        -Wl,-L,"/Users/espinoal/opt/anaconda3/envs/cmdstan/lib/" -Wl,-rpath,"/Users/espinoal/opt/anaconda3/envs/cmdstan/lib/" -ltbb    examples/bernoulli/bernoulli.o src/cmdstan/main.o        -Wl,-L,"/Users/espinoal/opt/anaconda3/envs/cmdstan/lib/" -Wl,-rpath,"/Users/espinoal/opt/anaconda3/envs/cmdstan/lib/" -ltbb stan/lib/stan_math/lib/sundials_6.0.0/lib/libsundials_nvecserial.a stan/lib/stan_math/lib/sundials_6.0.0/lib/libsundials_cvodes.a stan/lib/stan_math/lib/sundials_6.0.0/lib/libsundials_idas.a stan/lib/stan_math/lib/sundials_6.0.0/lib/libsundials_kinsol.a   -o examples/bernoulli/bernoulli
rm -f examples/bernoulli/bernoulli.o

And here's the output from the command line cmdstan:

(cmdstan) MacBook-Pro:daily-dose-stan-modeling espinoal$ cmdstan_model /Users/espinoal/Documents/aims_repos/daily-dose-stan-modeling/ohsu_simulator.stan
/Users/espinoal/opt/anaconda3/envs/cmdstan/bin/cmdstan_model: line 3: realpath: command not found
make: Entering directory '/Users/espinoal/opt/anaconda3/envs/cmdstan/bin/cmdstan'
--------------------------------------------------------------------------------
CmdStan v2.29.2 help

  Build CmdStan utilities:
    > make build

    This target will:
    1. Install the Stan compiler bin/stanc from stanc3 binaries.
    2. Build the print utility bin/print (deprecated; will be removed in v3.0)
    3. Build the stansummary utility bin/stansummary
    4. Build the diagnose utility bin/diagnose
    5. Build all libraries and object files compile and link an executable Stan program

    Note: to build using multiple cores, use the -j option to make, e.g., 
    for 4 cores:
    > make build -j4


  Build a Stan program:

    Given a Stan program at foo/bar.stan, build an executable by typing:
    > make foo/bar

    This target will:
    1. Install the Stan compiler (bin/stanc), as needed.
    2. Use the Stan compiler to generate C++ code, foo/bar.hpp.
    3. Compile the C++ code using arm64-apple-darwin20.0.0-clang . to generate foo/bar

  Additional make options:
    STANCFLAGS: defaults to "". These are extra options passed to bin/stanc
      when generating C++ code. If you want to allow undefined functions in the
      Stan program, either add this to make/local or the command line:
          STANCFLAGS = --allow_undefined
    USER_HEADER: when STANCFLAGS has --allow_undefined, this is the name of the
      header file that is included. This defaults to "user_header.hpp" in the
      directory of the Stan program.
    STANC3_VERSION: When set, uses that tagged version specified; otherwise, downloads
      the nightly version.
    STAN_CPP_OPTIMS: Turns on additonal compiler flags for performance.
    STAN_NO_RANGE_CHECKS: Removes the range checks from the model for performance.


  Example - bernoulli model: examples/bernoulli/bernoulli.stan

    1. Build the model:
       > make examples/bernoulli/bernoulli
    2. Run the model:
       > examples/bernoulli/bernoulli sample data file=examples/bernoulli/bernoulli.data.R
    3. Look at the samples:
       > bin/stansummary output.csv


  Clean CmdStan:

    Remove the built CmdStan tools:
    > make clean-all

--------------------------------------------------------------------------------
make: Leaving directory '/Users/espinoal/opt/anaconda3/envs/cmdstan/bin/cmdstan'

azespinoza avatar Apr 26 '22 20:04 azespinoza

Huh, the second one seems like it failed for an unrelated reason, so we can ignore that.

The strange thing is that as part of rebuilding cmdstan it compiles the example model which ships with cmdstan, and that seems to have no issue. So something is happening later which is unusual.

Can you add these lines to the start of your script


import logging
logging.getLogger("cmdstanpy").handlers[0].setLevel(logging.DEBUG)

This should output a lot more before it fails, hopefully some of which is useful

WardBrian avatar Apr 26 '22 20:04 WardBrian

Hmm, that line didn't work for me, but this did: logging.basicConfig(level=logging.DEBUG, format='%(message)s')

Anyway, here's the output from running the python script again:

(cmdstan) MacBook-Pro:daily-dose-stan-modeling espinoal$ python 02_CmdStan_Fit.py
INFO:cmdstanpy:compiling stan file /Users/espinoal/Documents/aims_repos/daily-dose-stan-modeling/ohsu_simulator.stan to exe file /Users/espinoal/Documents/aims_repos/daily-dose-stan-modeling/ohsu_simulator
compiling stan file /Users/espinoal/Documents/aims_repos/daily-dose-stan-modeling/ohsu_simulator.stan to exe file /Users/espinoal/Documents/aims_repos/daily-dose-stan-modeling/ohsu_simulator
cmd: make /Users/espinoal/Documents/aims_repos/daily-dose-stan-modeling/ohsu_simulator
cwd: /Users/espinoal/opt/anaconda3/envs/cmdstan/bin/cmdstan
Console output:
arm64-apple-darwin20.0.0-clang -Wl,-pie -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs -Wl,-rpath,/Users/espinoal/opt/anaconda3/envs/cmdstan/lib -L/Users/espinoal/opt/anaconda3/envs/cmdstan/lib        -Wl,-L,"/Users/espinoal/opt/anaconda3/envs/cmdstan/lib/" -Wl,-rpath,"/Users/espinoal/opt/anaconda3/envs/cmdstan/lib/" -ltbb    /Users/espinoal/Documents/aims_repos/daily-dose-stan-modeling/ohsu_simulator.o stan/src/stan/model/model_header.hpp.gch         -Wl,-L,"/Users/espinoal/opt/anaconda3/envs/cmdstan/lib/" -Wl,-rpath,"/Users/espinoal/opt/anaconda3/envs/cmdstan/lib/" -ltbb -o /Users/espinoal/Documents/aims_repos/daily-dose-stan-modeling/ohsu_simulator
In file included from /Users/espinoal/opt/anaconda3/envs/cmdstan/bin/cmdstan/stan/src/stan/model/model_header.hpp:4:
In file included from /Users/espinoal/opt/anaconda3/envs/cmdstan/bin/cmdstan/stan/lib/stan_math/stan/math.hpp:19:
In file included from /Users/espinoal/opt/anaconda3/envs/cmdstan/bin/cmdstan/stan/lib/stan_math/stan/math/rev.hpp:8:
In file included from /Users/espinoal/opt/anaconda3/envs/cmdstan/bin/cmdstan/stan/lib/stan_math/stan/math/rev/core.hpp:53:
In file included from /Users/espinoal/opt/anaconda3/envs/cmdstan/bin/cmdstan/stan/lib/stan_math/stan/math/rev/core/profiling.hpp:9:
In file included from /Users/espinoal/opt/anaconda3/envs/cmdstan/bin/cmdstan/stan/lib/stan_math/stan/math/prim/err.hpp:6:
In file included from /Users/espinoal/opt/anaconda3/envs/cmdstan/bin/cmdstan/stan/lib/stan_math/stan/math/prim/err/check_bounded.hpp:8:
/Users/espinoal/opt/anaconda3/envs/cmdstan/bin/cmdstan/stan/lib/stan_math/stan/math/prim/fun/max_size.hpp:20:10: error: no matching function for call to 'max'
  return std::max({stan::math::size(x1), stan::math::size(xs)...});
         ^~~~~~~~
/Users/espinoal/opt/anaconda3/envs/cmdstan/bin/cmdstan/stan/lib/stan_math/stan/math/prim/err/check_bounded.hpp:30:28: note: in instantiation of function template specialization 'stan::math::max_size<double, double>' requested here
    for (size_t n = 0; n < max_size(low, high); n++) {
                           ^
/Users/espinoal/opt/anaconda3/envs/cmdstan/bin/cmdstan/stan/lib/stan_math/stan/math/prim/err/check_bounded.hpp:80:70: note: in instantiation of member function 'stan::math::internal::bounded<double, double, double, false>::check' requested here
  internal::bounded<T_y, T_low, T_high, is_vector_like<T_y>::value>::check(
                                                                     ^
/Users/espinoal/opt/anaconda3/envs/cmdstan/bin/cmdstan/stan/lib/stan_math/stan/math/prim/fun/atanh.hpp:31:5: note: in instantiation of function template specialization 'stan::math::check_bounded<double, double, double>' requested here
    check_bounded("atanh", "x", x, -1.0, 1.0);
    ^
/Users/espinoal/opt/anaconda3/envs/cmdstan/bin/../include/c++/v1/__algorithm/max.h:59:1: note: candidate template ignored: couldn't infer template argument '_Tp'
max(initializer_list<_Tp> __t)
^
/Users/espinoal/opt/anaconda3/envs/cmdstan/bin/../include/c++/v1/__algorithm/max.h:39:1: note: candidate function template not viable: requires 2 arguments, but 1 was provided
max(const _Tp& __a, const _Tp& __b)
^
/Users/espinoal/opt/anaconda3/envs/cmdstan/bin/../include/c++/v1/__algorithm/max.h:50:1: note: candidate function template not viable: requires 2 arguments, but 1 was provided
max(initializer_list<_Tp> __t, _Compare __comp)
^
/Users/espinoal/opt/anaconda3/envs/cmdstan/bin/../include/c++/v1/__algorithm/max.h:30:1: note: candidate function template not viable: requires 3 arguments, but 1 was provided
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
^
In file included from /Users/espinoal/opt/anaconda3/envs/cmdstan/bin/cmdstan/stan/src/stan/model/model_header.hpp:4:
In file included from /Users/espinoal/opt/anaconda3/envs/cmdstan/bin/cmdstan/stan/lib/stan_math/stan/math.hpp:19:
In file included from /Users/espinoal/opt/anaconda3/envs/cmdstan/bin/cmdstan/stan/lib/stan_math/stan/math/rev.hpp:8:
In file included from /Users/espinoal/opt/anaconda3/envs/cmdstan/bin/cmdstan/stan/lib/stan_math/stan/math/rev/core.hpp:53:
In file included from /Users/espinoal/opt/anaconda3/envs/cmdstan/bin/cmdstan/stan/lib/stan_math/stan/math/rev/core/profiling.hpp:9:
In file included from /Users/espinoal/opt/anaconda3/envs/cmdstan/bin/cmdstan/stan/lib/stan_math/stan/math/prim/err.hpp:6:
In file included from /Users/espinoal/opt/anaconda3/envs/cmdstan/bin/cmdstan/stan/lib/stan_math/stan/math/prim/err/check_bounded.hpp:8:
/Users/espinoal/opt/anaconda3/envs/cmdstan/bin/cmdstan/stan/lib/stan_math/stan/math/prim/fun/max_size.hpp:20:10: error: no matching function for call to 'max'
  return std::max({stan::math::size(x1), stan::math::size(xs)...});
         ^~~~~~~~
/Users/espinoal/opt/anaconda3/envs/cmdstan/bin/cmdstan/stan/lib/stan_math/stan/math/prim/err/check_bounded.hpp:30:28: note: in instantiation of function template specialization 'stan::math::max_size<int, int>' requested here
    for (size_t n = 0; n < max_size(low, high); n++) {
                           ^
/Users/espinoal/opt/anaconda3/envs/cmdstan/bin/cmdstan/stan/lib/stan_math/stan/math/prim/err/check_bounded.hpp:80:70: note: in instantiation of member function 'stan::math::internal::bounded<int, int, int, false>::check' requested here
  internal::bounded<T_y, T_low, T_high, is_vector_like<T_y>::value>::check(
                                                                     ^
/Users/espinoal/opt/anaconda3/envs/cmdstan/bin/cmdstan/stan/lib/stan_math/stan/math/prim/fun/atanh.hpp:44:3: note: in instantiation of function template specialization 'stan::math::check_bounded<int, int, int>' requested here
  check_bounded("atanh", "x", x, -1, 1);
  ^
/Users/espinoal/opt/anaconda3/envs/cmdstan/bin/../include/c++/v1/__algorithm/max.h:59:1: note: candidate template ignored: couldn't infer template argument '_Tp'
max(initializer_list<_Tp> __t)
^
/Users/espinoal/opt/anaconda3/envs/cmdstan/bin/../include/c++/v1/__algorithm/max.h:39:1: note: candidate function template not viable: requires 2 arguments, but 1 was provided
max(const _Tp& __a, const _Tp& __b)
^
/Users/espinoal/opt/anaconda3/envs/cmdstan/bin/../include/c++/v1/__algorithm/max.h:50:1: note: candidate function template not viable: requires 2 arguments, but 1 was provided
max(initializer_list<_Tp> __t, _Compare __comp)
^
/Users/espinoal/opt/anaconda3/envs/cmdstan/bin/../include/c++/v1/__algorithm/max.h:30:1: note: candidate function template not viable: requires 3 arguments, but 1 was provided
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
^
2 errors generated.
make: *** [<builtin>: /Users/espinoal/Documents/aims_repos/daily-dose-stan-modeling/ohsu_simulator] Error 1

Command ['make', '/Users/espinoal/Documents/aims_repos/daily-dose-stan-modeling/ohsu_simulator']
        error during processing No such file or directory

WARNING:cmdstanpy:CmdStan's precompiled header (PCH) files may need to be rebuilt.If your model failed to compile please run cmdstanpy.rebuild_cmdstan().
If the issue persists please open a bug report
CmdStan's precompiled header (PCH) files may need to be rebuilt.If your model failed to compile please run cmdstanpy.rebuild_cmdstan().
If the issue persists please open a bug report
Traceback (most recent call last):
  File "/Users/espinoal/Documents/aims_repos/daily-dose-stan-modeling/02_CmdStan_Fit.py", line 26, in <module>
    model = CmdStanModel(stan_file=stan_file)# compile='Force')
  File "/Users/espinoal/opt/anaconda3/envs/cmdstan/lib/python3.10/site-packages/cmdstanpy/model.py", line 210, in __init__
    raise ValueError(
ValueError: Unable to compile Stan model file: /Users/espinoal/Documents/aims_repos/daily-dose-stan-modeling/ohsu_simulator.stan.
INFO:cmdstanpy:deleting tmpfiles dir: /var/folders/20/d05_tk914m3ft933jzk_rmnw81m0nb/T/tmpl2131w46
deleting tmpfiles dir: /var/folders/20/d05_tk914m3ft933jzk_rmnw81m0nb/T/tmpl2131w46
INFO:cmdstanpy:done
done

I also tried to resolve the error from the second command

cmdstan_model /Users/espinoal/Documents/aims_repos/daily-dose-stan-modeling/ohsu_simulator.stan
/Users/espinoal/opt/anaconda3/envs/cmdstan/bin/cmdstan_model: line 3: realpath: command not found

I guess there is no realpath on macOS? I used this command from a SO ticket

brew install coreutils

and now I get these errors

(cmdstan) MacBook-Pro:daily-dose-stan-modeling espinoal$ cmdstan_model /Users/espinoal/Documents/aims_repos/daily-dose-stan-modeling/ohsu_simulator.stan
make: Entering directory '/Users/espinoal/opt/anaconda3/envs/cmdstan/bin/cmdstan'
arm64-apple-darwin20.0.0-clang -Wl,-pie -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs -Wl,-rpath,/Users/espinoal/opt/anaconda3/envs/cmdstan/lib -L/Users/espinoal/opt/anaconda3/envs/cmdstan/lib        -Wl,-L,"/Users/espinoal/opt/anaconda3/envs/cmdstan/lib/" -Wl,-rpath,"/Users/espinoal/opt/anaconda3/envs/cmdstan/lib/" -ltbb    ../../../../../../Documents/aims_repos/daily-dose-stan-modeling/ohsu_simulator.o stan/src/stan/model/model_header.hpp.gch         -Wl,-L,"/Users/espinoal/opt/anaconda3/envs/cmdstan/lib/" -Wl,-rpath,"/Users/espinoal/opt/anaconda3/envs/cmdstan/lib/" -ltbb -o ../../../../../../Documents/aims_repos/daily-dose-stan-modeling/ohsu_simulator
In file included from /Users/espinoal/opt/anaconda3/envs/cmdstan/bin/cmdstan/stan/src/stan/model/model_header.hpp:4:
In file included from /Users/espinoal/opt/anaconda3/envs/cmdstan/bin/cmdstan/stan/lib/stan_math/stan/math.hpp:19:
In file included from /Users/espinoal/opt/anaconda3/envs/cmdstan/bin/cmdstan/stan/lib/stan_math/stan/math/rev.hpp:8:
In file included from /Users/espinoal/opt/anaconda3/envs/cmdstan/bin/cmdstan/stan/lib/stan_math/stan/math/rev/core.hpp:53:
In file included from /Users/espinoal/opt/anaconda3/envs/cmdstan/bin/cmdstan/stan/lib/stan_math/stan/math/rev/core/profiling.hpp:9:
In file included from /Users/espinoal/opt/anaconda3/envs/cmdstan/bin/cmdstan/stan/lib/stan_math/stan/math/prim/err.hpp:6:
In file included from /Users/espinoal/opt/anaconda3/envs/cmdstan/bin/cmdstan/stan/lib/stan_math/stan/math/prim/err/check_bounded.hpp:8:
/Users/espinoal/opt/anaconda3/envs/cmdstan/bin/cmdstan/stan/lib/stan_math/stan/math/prim/fun/max_size.hpp:20:10: error: no matching function for call to 'max'
  return std::max({stan::math::size(x1), stan::math::size(xs)...});
         ^~~~~~~~
/Users/espinoal/opt/anaconda3/envs/cmdstan/bin/cmdstan/stan/lib/stan_math/stan/math/prim/err/check_bounded.hpp:30:28: note: in instantiation of function template specialization 'stan::math::max_size<double, double>' requested here
    for (size_t n = 0; n < max_size(low, high); n++) {
                           ^
/Users/espinoal/opt/anaconda3/envs/cmdstan/bin/cmdstan/stan/lib/stan_math/stan/math/prim/err/check_bounded.hpp:80:70: note: in instantiation of member function 'stan::math::internal::bounded<double, double, double, false>::check' requested here
  internal::bounded<T_y, T_low, T_high, is_vector_like<T_y>::value>::check(
                                                                     ^
/Users/espinoal/opt/anaconda3/envs/cmdstan/bin/cmdstan/stan/lib/stan_math/stan/math/prim/fun/atanh.hpp:31:5: note: in instantiation of function template specialization 'stan::math::check_bounded<double, double, double>' requested here
    check_bounded("atanh", "x", x, -1.0, 1.0);
    ^
/Users/espinoal/opt/anaconda3/envs/cmdstan/bin/../include/c++/v1/__algorithm/max.h:59:1: note: candidate template ignored: couldn't infer template argument '_Tp'
max(initializer_list<_Tp> __t)
^
/Users/espinoal/opt/anaconda3/envs/cmdstan/bin/../include/c++/v1/__algorithm/max.h:39:1: note: candidate function template not viable: requires 2 arguments, but 1 was provided
max(const _Tp& __a, const _Tp& __b)
^
/Users/espinoal/opt/anaconda3/envs/cmdstan/bin/../include/c++/v1/__algorithm/max.h:50:1: note: candidate function template not viable: requires 2 arguments, but 1 was provided
max(initializer_list<_Tp> __t, _Compare __comp)
^
/Users/espinoal/opt/anaconda3/envs/cmdstan/bin/../include/c++/v1/__algorithm/max.h:30:1: note: candidate function template not viable: requires 3 arguments, but 1 was provided
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
^
In file included from /Users/espinoal/opt/anaconda3/envs/cmdstan/bin/cmdstan/stan/src/stan/model/model_header.hpp:4:
In file included from /Users/espinoal/opt/anaconda3/envs/cmdstan/bin/cmdstan/stan/lib/stan_math/stan/math.hpp:19:
In file included from /Users/espinoal/opt/anaconda3/envs/cmdstan/bin/cmdstan/stan/lib/stan_math/stan/math/rev.hpp:8:
In file included from /Users/espinoal/opt/anaconda3/envs/cmdstan/bin/cmdstan/stan/lib/stan_math/stan/math/rev/core.hpp:53:
In file included from /Users/espinoal/opt/anaconda3/envs/cmdstan/bin/cmdstan/stan/lib/stan_math/stan/math/rev/core/profiling.hpp:9:
In file included from /Users/espinoal/opt/anaconda3/envs/cmdstan/bin/cmdstan/stan/lib/stan_math/stan/math/prim/err.hpp:6:
In file included from /Users/espinoal/opt/anaconda3/envs/cmdstan/bin/cmdstan/stan/lib/stan_math/stan/math/prim/err/check_bounded.hpp:8:
/Users/espinoal/opt/anaconda3/envs/cmdstan/bin/cmdstan/stan/lib/stan_math/stan/math/prim/fun/max_size.hpp:20:10: error: no matching function for call to 'max'
  return std::max({stan::math::size(x1), stan::math::size(xs)...});
         ^~~~~~~~
/Users/espinoal/opt/anaconda3/envs/cmdstan/bin/cmdstan/stan/lib/stan_math/stan/math/prim/err/check_bounded.hpp:30:28: note: in instantiation of function template specialization 'stan::math::max_size<int, int>' requested here
    for (size_t n = 0; n < max_size(low, high); n++) {
                           ^
/Users/espinoal/opt/anaconda3/envs/cmdstan/bin/cmdstan/stan/lib/stan_math/stan/math/prim/err/check_bounded.hpp:80:70: note: in instantiation of member function 'stan::math::internal::bounded<int, int, int, false>::check' requested here
  internal::bounded<T_y, T_low, T_high, is_vector_like<T_y>::value>::check(
                                                                     ^
/Users/espinoal/opt/anaconda3/envs/cmdstan/bin/cmdstan/stan/lib/stan_math/stan/math/prim/fun/atanh.hpp:44:3: note: in instantiation of function template specialization 'stan::math::check_bounded<int, int, int>' requested here
  check_bounded("atanh", "x", x, -1, 1);
  ^
/Users/espinoal/opt/anaconda3/envs/cmdstan/bin/../include/c++/v1/__algorithm/max.h:59:1: note: candidate template ignored: couldn't infer template argument '_Tp'
max(initializer_list<_Tp> __t)
^
/Users/espinoal/opt/anaconda3/envs/cmdstan/bin/../include/c++/v1/__algorithm/max.h:39:1: note: candidate function template not viable: requires 2 arguments, but 1 was provided
max(const _Tp& __a, const _Tp& __b)
^
/Users/espinoal/opt/anaconda3/envs/cmdstan/bin/../include/c++/v1/__algorithm/max.h:50:1: note: candidate function template not viable: requires 2 arguments, but 1 was provided
max(initializer_list<_Tp> __t, _Compare __comp)
^
/Users/espinoal/opt/anaconda3/envs/cmdstan/bin/../include/c++/v1/__algorithm/max.h:30:1: note: candidate function template not viable: requires 3 arguments, but 1 was provided
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
^
2 errors generated.
make: *** [<builtin>: ../../../../../../Documents/aims_repos/daily-dose-stan-modeling/ohsu_simulator] Error 1
make: Leaving directory '/Users/espinoal/opt/anaconda3/envs/cmdstan/bin/cmdstan'

azespinoza avatar Apr 26 '22 21:04 azespinoza

Hm, it looks like we may have found a bug in Stan rather than any cmdstan[py] issue. Are you able to share your model file?

It also seems like our warning about the PCH file is too overzealous, which I will need to take a look at.

WardBrian avatar Apr 26 '22 21:04 WardBrian

Hm, it looks like we may have found a bug in Stan rather than any cmdstan[py] issue. Are you able to share your model file?

It also seems like our warning about the PCH file is too overzealous, which I will need to take a look at.

Sure, I can share this somewhat anonymized version.

functions {

    real value_at_time (real [] values, real t) {
        real Ts = 1.0;

        int i = 1;
        int j = size (values);
        int k;

        while (j - i > 1) {
            k = i + (j - i) %/% 2; // integer division
            if (t >= k*Ts)
                i = k;
            else
                j = k;
        }

        if (t >= j*Ts)
            return values[j];
        else
            return values[i];
    }


    real conversion (real variable, real feature1) {

        return variable * (1000.0/1.0) * (1.0/5.0) * (1.0/feature1);
    }

    vector my_ode (real t, vector X, real [] ode_parameters, real [,] inputs2, real [,] inputs1, int i) {

        int N_STATES = 10;

        vector [N_STATES] d;  // total
        vector [N_STATES] d1;
        vector [N_STATES] d2;
        vector [N_STATES] d3;
        vector [N_STATES] d4;

        real constant7 = 1.0;
        real constant8 = 1.0;
        real constant6 = 1.0;

        real feature1 = 100;

        real constant9  = 0.1;
        real constant2   = 0.2;
        real constant13   = 0.3;

        real parameter4   = ode_parameters[1];
        real parameter1   = ode_parameters[2];
        real parameter2   = ode_parameters[3];
        real parameter3   = ode_parameters[4];
        real constant5   = 0.4;

        real constant3  = 0.5;
        real constant10 = 50.0;

        real AB    = 0.6;
        real constant11   = 0.7;
        real something1   = 0.8;
        real something2   = 0.9;
        real something3   = 1.9;
        real constant4 = parameter4;

        real L1 = X[1];
        real L2 = X[2];
        real Z1  = X[5];
        real X1 = X[6];
        real X2 = X[7];
        real X3 = X[8];
        real A1 = X[9];
        real A2 = X[10];

        real parameter1_adjusted = constant7 * constant8 * parameter1;
        real parameter2_adjusted = constant7 * constant8 * parameter2;
        real parameter3_adjusted = constant6 * parameter3;

        real somethingelse1 = parameter1_adjusted*something1;
        real somethingelse2 = parameter2_adjusted*something2;
        real somethingelse3 = parameter3_adjusted*something3;

        matrix [N_STATES, N_STATES] Y1 = rep_matrix (0, N_STATES, N_STATES);
        vector [N_STATES] U1 = rep_vector (0, N_STATES);
        vector [N_STATES] U2 = rep_vector (0, N_STATES);
        vector [N_STATES] Y10 = rep_vector (0.0, N_STATES);

        real var1 = L1/constant2;

        real constant12;
        real AO;
        real AI;

        real input1 = inputs1[i,2];

        real input2 = inputs2[i,2];

        real constant1 = 0.0;

        real transformed_value;

        if (var1 < 4.5) {
            constant12 = constant9/(4.5*constant2);
            AO = 0;
            AI = 0;
        }
        else {
            if (var1 >= 4.5 && var1 < 9) {
                constant12 = 0;
                AO = 0;
                AI = constant9;
            }
            else {
                constant12 = 0;
                AO = 0.8;
                AI = constant9 - 0.8*5*constant2;
            }
        }


        Y1[1, 1] = -X1 - constant12 - AO;
        Y1[1, 2] = constant13;
        Y1[1, 6] = -L1;
        Y1[1, 8] = -constant3;
        Y1[1, 10] = constant4;

        Y1[2, 1] = X1;
        Y1[2, 2] = -(constant13+X2);
        Y1[2, 6] = L1;
        Y1[2, 7] = -L2;

        Y1[3, 3] = -1/constant10;

        Y1[4, 3] = 1/constant10;
        Y1[4, 4] = -1/constant10;

        Y1[5, 4] = 1/(constant10*constant11);
        Y1[5, 5] = -AB;

        Y1[6, 5] = somethingelse1;
        Y1[6, 6] = -something1;

        Y1[7, 5] = somethingelse2;
        Y1[7, 7] = -something2;

        Y1[8, 5] = somethingelse3;
        Y1[8, 8] = -something3;

        Y1[9, 9] = - parameter4;

        Y1[10, 9] = + parameter4;
        Y1[10, 10] = -(constant4 + constant5);

        U1[3] = 1;

        U2[1] = X1*L1 - AI + constant3;
        U2[2] = -X1*L1 + X2*L2;

        transformed_value = conversion (input2, feature1);

        Y10[9] = 100.0/(1.0*feature1);

        d1 = Y1 * to_vector(X);
        d2 = U1*transformed_value;
        d3 = U2;
        d4 = Y10*(input1 + constant1);

        d = d1 + d2 + d3 + d4;

        return d;
    }

    int get_upper_index (real t, real [] values) {

        int n = dims (values) [1];
        int index = 1;

        for (i in 1:n) {
            if (values[i] <= t) {
                // if (i > index){
                index = i;
                // }
            }
        }
        return index;
    }

    real [,] compute_states (real t0, real [] t, real [] init,
     real [] ode_parameters, real [,] inputs2, real [,] inputs1) {
        int N_STATES = 10;

        real t0_i = inputs2[1,1];
        vector [N_STATES] x0 = to_vector (init);
        int n = dims(inputs2)[1];
        int total_length = size(t);

        array [total_length, N_STATES] real x;

        int lower_index = 1;
        int upper_index;

        for (i in 1:n) { 

            upper_index = get_upper_index(t0_i, t);
            int sensor_timesteps = size(t[lower_index:upper_index]);
            array[sensor_timesteps+1] real t1;
            t1[1:sensor_timesteps] = to_array_1d(t[lower_index:upper_index]);

            array [sensor_timesteps] vector[N_STATES] x1;

            // append the final event time
            t1[sensor_timesteps+1] = inputs2[i,1];

            // call rk45 solver & save states for specific timesteps to x
            // see https://mc-stan.org/docs/2_24/functions-reference/functions-ode-solver.html
            print(x0);
            x1 = ode_rk45 (my_ode, x0, t0_i, t1, ode_parameters, inputs2, inputs1, i);
            // ode_rk45 returns an array of vectors, need to unpack these and place in correct array location
            for (j in 1:sensor_timesteps){
                x[lower_index+j,] = to_array_1d(x1[j,]);
            }

            t0_i = inputs2[i,1];  // this should be the end of the last event time
            lower_index = upper_index;
            x0 = x1[sensor_timesteps+1];  // states from last timestep become the initial states for the next event
        }

        return x;
    }
}

data {

    int MAX_TIMESTEPS;
    int SENSOR_TIMESTEPS;
    int EVENT_TIMESTEPS;
    int N_SLICES;
    int N_STATES;
    array[N_SLICES] int sensor_lengths;
    array[SENSOR_TIMESTEPS] real tMinSensor;
    array[EVENT_TIMESTEPS] real tMinEvents;
    array[SENSOR_TIMESTEPS] real sensorAllData;
    array[EVENT_TIMESTEPS, 2] real INPUTS2;
    array[EVENT_TIMESTEPS, 2] real INPUTS1;
    array[N_SLICES, N_STATES] real initial_conditions;
    array[N_SLICES, 2] int sensor_indices;
    array[N_SLICES, 2] int event_indices;
}

transformed data {

    real constant2 = 0.16; // IDEALLY REMOVE DUPLICATE
    int N_TIMESTEPS = MAX_TIMESTEPS;

}

parameters {

    real <lower = 0.01, upper = 0.05> parameter4;
    real <lower = 0.0016, upper = 0.0027> parameter1;
    real <lower = 0.00021, upper = 0.0049> parameter2;
    real <lower = 0.0211, upper = 0.02199> parameter3;
    real <lower = 0.01, upper = 5> sd;

}

transformed parameters {

    real state_estimates [N_SLICES, N_TIMESTEPS, N_STATES];

    real ode_parameters [4] = { parameter4, parameter1, parameter2, parameter3 };
    print("test");

    for (i in 1:N_SLICES) {
        int x_sensor = sensor_indices[i,1];
        int y_sensor = sensor_indices[i,2]-1;
        int x_event = event_indices[i,1];
        int y_event = event_indices[i,2]-1;
        int t = sensor_lengths[i];
        state_estimates[i,1:t,] = compute_states (0.0, tMinSensor[x_sensor:y_sensor], initial_conditions[i,],
            ode_parameters, INPUTS2[x_event:y_event,], INPUTS1[x_event:y_event,]);
    }

}

model {

    for (i in 1:N_SLICES) {
        int idx_x = sensor_indices[i,1];
        int idx_y = sensor_indices[i,2]-1;
        int t = sensor_lengths[i];
        sensorAllData[idx_x:idx_y] ~ normal(state_estimates[i,1:t,1], sd);
    }
}

generated quantities {

    vector [SENSOR_TIMESTEPS] est_hat;
    int counter = 1;
    for (i in 1:N_SLICES) {
        int t = sensor_lengths[i];
        est_hat[counter:t] = to_vector(state_estimates[i, 1:t, 1]) / constant2;
        counter += t;
    }
}

azespinoza avatar Apr 26 '22 23:04 azespinoza

If you make a new conda environment but install cmdstanpy via pip and cmdstan via cmdstanpy.install_cmdstan(), does that yield the same result?

Conda unfortunately doesn't support doing testing on the M1 builds, so it's hard to have much confidence in them

WardBrian avatar Apr 27 '22 13:04 WardBrian

So, on a clean environment, this is what I get when I try to install cmdstan through cmdstanpy:

>>> import cmdstanpy
>>> cmdstanpy.install_cmdstan()
Installing CmdStan version: 2.29.2
Install directory: /Users/espinoal/.cmdstan
Downloading CmdStan version 2.29.2
Download successful, file: /var/folders/20/d05_tk914m3ft933jzk_rmnw81m0nb/T/tmpeehk738v
Extracting distribution
Unpacked download as cmdstan-2.29.2
Building version cmdstan-2.29.2, may take several minutes, depending on your system.
Test model compilation
Command "make clean-all" failed
Command ['make', 'examples/bernoulli/bernoulli']
        error during processing No such file or directory
INFO:cmdstanpy:deleting tmpfiles dir: /var/folders/20/d05_tk914m3ft933jzk_rmnw81m0nb/T/tmpa6nkqov1
INFO:cmdstanpy:done

If I follow this with rebuild_cmdstan(), it appears to be successful, but I still can't build the model.

>>> cmdstanpy.rebuild_cmdstan()
Done:  (01:10) | ███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████ | --- CmdStan v2.29.2 built ---
...
>>> model = CmdStanModel(stan_file=stan_file)
INFO:cmdstanpy:compiling stan file /Users/espinoal/Documents/aims_repos/daily-dose-stan-modeling/ohsu_simulator.stan to exe file /Users/espinoal/Documents/aims_repos/daily-dose-stan-modeling/ohsu_simulator
compiling stan file /Users/espinoal/Documents/aims_repos/daily-dose-stan-modeling/ohsu_simulator.stan to exe file /Users/espinoal/Documents/aims_repos/daily-dose-stan-modeling/ohsu_simulator
cmd: make /Users/espinoal/Documents/aims_repos/daily-dose-stan-modeling/ohsu_simulator
cwd: /Users/espinoal/.cmdstan/cmdstan-2.29.2
Console output:
cc        -Wl,-L,"/Users/espinoal/.cmdstan/cmdstan-2.29.2/stan/lib/stan_math/lib/tbb" -Wl,-rpath,"/Users/espinoal/.cmdstan/cmdstan-2.29.2/stan/lib/stan_math/lib/tbb"      /Users/espinoal/Documents/aims_repos/daily-dose-stan-modeling/ohsu_simulator.o stan/src/stan/model/model_header.hpp.gch         -Wl,-L,"/Users/espinoal/.cmdstan/cmdstan-2.29.2/stan/lib/stan_math/lib/tbb" -Wl,-rpath,"/Users/espinoal/.cmdstan/cmdstan-2.29.2/stan/lib/stan_math/lib/tbb"   -o /Users/espinoal/Documents/aims_repos/daily-dose-stan-modeling/ohsu_simulator
In file included from /Users/espinoal/.cmdstan/cmdstan-2.29.2/stan/src/stan/model/model_header.hpp:4:
In file included from /Users/espinoal/.cmdstan/cmdstan-2.29.2/stan/lib/stan_math/stan/math.hpp:19:
In file included from /Users/espinoal/.cmdstan/cmdstan-2.29.2/stan/lib/stan_math/stan/math/rev.hpp:8:
In file included from /Users/espinoal/.cmdstan/cmdstan-2.29.2/stan/lib/stan_math/stan/math/rev/core.hpp:53:
In file included from /Users/espinoal/.cmdstan/cmdstan-2.29.2/stan/lib/stan_math/stan/math/rev/core/profiling.hpp:9:
In file included from /Users/espinoal/.cmdstan/cmdstan-2.29.2/stan/lib/stan_math/stan/math/prim/err.hpp:6:
In file included from /Users/espinoal/.cmdstan/cmdstan-2.29.2/stan/lib/stan_math/stan/math/prim/err/check_bounded.hpp:8:
/Users/espinoal/.cmdstan/cmdstan-2.29.2/stan/lib/stan_math/stan/math/prim/fun/max_size.hpp:20:10: error: no matching function for call to 'max'
  return std::max({stan::math::size(x1), stan::math::size(xs)...});
         ^~~~~~~~
/Users/espinoal/.cmdstan/cmdstan-2.29.2/stan/lib/stan_math/stan/math/prim/err/check_bounded.hpp:30:28: note: in instantiation of function template specialization 'stan::math::max_size<double, double>' requested here
    for (size_t n = 0; n < max_size(low, high); n++) {
                           ^
/Users/espinoal/.cmdstan/cmdstan-2.29.2/stan/lib/stan_math/stan/math/prim/err/check_bounded.hpp:80:70: note: in instantiation of member function 'stan::math::internal::bounded<double, double, double, false>::check' requested here
  internal::bounded<T_y, T_low, T_high, is_vector_like<T_y>::value>::check(
                                                                     ^
/Users/espinoal/.cmdstan/cmdstan-2.29.2/stan/lib/stan_math/stan/math/prim/fun/atanh.hpp:31:5: note: in instantiation of function template specialization 'stan::math::check_bounded<double, double, double>' requested here
    check_bounded("atanh", "x", x, -1.0, 1.0);
    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/max.h:59:1: note: candidate template ignored: couldn't infer template argument '_Tp'
max(initializer_list<_Tp> __t)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/max.h:39:1: note: candidate function template not viable: requires 2 arguments, but 1 was provided
max(const _Tp& __a, const _Tp& __b)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/max.h:50:1: note: candidate function template not viable: requires 2 arguments, but 1 was provided
max(initializer_list<_Tp> __t, _Compare __comp)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/max.h:30:1: note: candidate function template not viable: requires 3 arguments, but 1 was provided
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
^
In file included from /Users/espinoal/.cmdstan/cmdstan-2.29.2/stan/src/stan/model/model_header.hpp:4:
In file included from /Users/espinoal/.cmdstan/cmdstan-2.29.2/stan/lib/stan_math/stan/math.hpp:19:
In file included from /Users/espinoal/.cmdstan/cmdstan-2.29.2/stan/lib/stan_math/stan/math/rev.hpp:8:
In file included from /Users/espinoal/.cmdstan/cmdstan-2.29.2/stan/lib/stan_math/stan/math/rev/core.hpp:53:
In file included from /Users/espinoal/.cmdstan/cmdstan-2.29.2/stan/lib/stan_math/stan/math/rev/core/profiling.hpp:9:
In file included from /Users/espinoal/.cmdstan/cmdstan-2.29.2/stan/lib/stan_math/stan/math/prim/err.hpp:6:
In file included from /Users/espinoal/.cmdstan/cmdstan-2.29.2/stan/lib/stan_math/stan/math/prim/err/check_bounded.hpp:8:
/Users/espinoal/.cmdstan/cmdstan-2.29.2/stan/lib/stan_math/stan/math/prim/fun/max_size.hpp:20:10: error: no matching function for call to 'max'
  return std::max({stan::math::size(x1), stan::math::size(xs)...});
         ^~~~~~~~
/Users/espinoal/.cmdstan/cmdstan-2.29.2/stan/lib/stan_math/stan/math/prim/err/check_bounded.hpp:30:28: note: in instantiation of function template specialization 'stan::math::max_size<int, int>' requested here
    for (size_t n = 0; n < max_size(low, high); n++) {
                           ^
/Users/espinoal/.cmdstan/cmdstan-2.29.2/stan/lib/stan_math/stan/math/prim/err/check_bounded.hpp:80:70: note: in instantiation of member function 'stan::math::internal::bounded<int, int, int, false>::check' requested here
  internal::bounded<T_y, T_low, T_high, is_vector_like<T_y>::value>::check(
                                                                     ^
/Users/espinoal/.cmdstan/cmdstan-2.29.2/stan/lib/stan_math/stan/math/prim/fun/atanh.hpp:44:3: note: in instantiation of function template specialization 'stan::math::check_bounded<int, int, int>' requested here
  check_bounded("atanh", "x", x, -1, 1);
  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/max.h:59:1: note: candidate template ignored: couldn't infer template argument '_Tp'
max(initializer_list<_Tp> __t)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/max.h:39:1: note: candidate function template not viable: requires 2 arguments, but 1 was provided
max(const _Tp& __a, const _Tp& __b)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/max.h:50:1: note: candidate function template not viable: requires 2 arguments, but 1 was provided
max(initializer_list<_Tp> __t, _Compare __comp)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/max.h:30:1: note: candidate function template not viable: requires 3 arguments, but 1 was provided
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
^
2 errors generated.
make: *** [/Users/espinoal/Documents/aims_repos/daily-dose-stan-modeling/ohsu_simulator] Error 1

Command ['make', '/Users/espinoal/Documents/aims_repos/daily-dose-stan-modeling/ohsu_simulator']
        error during processing No such file or directory

WARNING:cmdstanpy:CmdStan's precompiled header (PCH) files may need to be rebuilt.If your model failed to compile please run cmdstanpy.rebuild_cmdstan().
If the issue persists please open a bug report
CmdStan's precompiled header (PCH) files may need to be rebuilt.If your model failed to compile please run cmdstanpy.rebuild_cmdstan().
If the issue persists please open a bug report
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/espinoal/opt/anaconda3/envs/cmdstanpy_test/lib/python3.10/site-packages/cmdstanpy/model.py", line 210, in __init__
    raise ValueError(
ValueError: Unable to compile Stan model file: /Users/espinoal/Documents/aims_repos/daily-dose-stan-modeling/ohsu_simulator.stan.

azespinoza avatar Apr 27 '22 16:04 azespinoza

This is very interesting, it seems like the Mac M1 copy of the C++ standard library may not contain an overload for std::max which we expect. I'm going to see if I can have someone more experienced with C++ take a look at this @rok-cesnovar

WardBrian avatar Apr 27 '22 16:04 WardBrian

Yeah, the error message seems to suggest that. Maybe the M1 standard library is a bit more strict about allowing mixed typed arguments like (double, int). Pure guessing though.

Though on the other hand, we have quite a few M1 users now, and I haven't seen anyone with this issue so far. Lets first try to see whether its a common issue on M1 macs.

@spinkney I think you have an M1 mac right? If yes, can you try to compile the model in this post: https://github.com/stan-dev/cmdstanpy/issues/552#issuecomment-1110349316

rok-cesnovar avatar Apr 27 '22 17:04 rok-cesnovar

Technically yes I have an M1 but practically no. Just started my new job and they have it locked down. Once I get Anaconda and cmdstan installed I can try.

spinkney avatar Apr 27 '22 17:04 spinkney

We have at least 2 confirmations that the model above compiled for users running M1, so there seems to be a toolchain/stdlib issue.

rok-cesnovar avatar Apr 27 '22 18:04 rok-cesnovar

Would re-running the XCode install be helpful here? Not sure how to debug this, especially since the most recent attempt was using the Apple-provided versions not those from conda

WardBrian avatar Apr 27 '22 18:04 WardBrian

I would reinstall Xcode as the first step, yeah.

rok-cesnovar avatar Apr 27 '22 18:04 rok-cesnovar

Thanks for all the help! It sounds like it might be an issue with my Mac then...?

So, I reinstalled Xcode. Then created a clean conda environment and installed cmdstanpy. The Bernoulli example runs without issue now! But my model does not compile still with the same errors as above.

azespinoza avatar Apr 27 '22 18:04 azespinoza

Since this seems to be specific to my machine I'll close this ticket.

azespinoza avatar Apr 28 '22 00:04 azespinoza

reopening this because I'm getting similar errors w/r/t std::max when trying to compile models on MacOS Catalina (!) Intel hardware.

I've got a fresh install of miniconda3; and I created a new environment:

conda create -n stan-2.29 -c conda-forge cmdstanpy

The unit tests for cmdstanpy instantiate and run a bunch of stan models; they are failing because the models don't compile.

============================= test session starts ==============================
platform darwin -- Python 3.9.13, pytest-7.1.2, pluggy-1.0.0
rootdir: /Users/mitzi/github/stan-dev/cmdstanpy
plugins: order-1.0.1, cov-3.0.0
collected 1 item

test/test_generate_quantities.py F                                       [100%]

=================================== FAILURES ===================================
______________________ GenerateQuantitiesTest.test_attrs _______________________

self = <test.test_generate_quantities.GenerateQuantitiesTest testMethod=test_attrs>

    def test_attrs(self):
        stan_bern = os.path.join(DATAFILES_PATH, 'bernoulli.stan')
>       model_bern = CmdStanModel(stan_file=stan_bern)

test/test_generate_quantities.py:449: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = CmdStanModel: name=bernoulli
	 stan_file=/Users/mitzi/github/stan-dev/cmdstanpy/test/data/bernoulli.stan
	 exe_file=None
	 compiler_options=stanc_options={}, cpp_options={}
model_name = None
stan_file = '/Users/mitzi/github/stan-dev/cmdstanpy/test/data/bernoulli.stan'
exe_file = None, compile = True, stanc_options = None, cpp_options = None
user_header = None

    def __init__(
        self,
        model_name: Optional[str] = None,
        stan_file: Optional[str] = None,
        exe_file: Optional[str] = None,
        # TODO should be Literal['force'] not str
        compile: Union[bool, str] = True,
        stanc_options: Optional[Dict[str, Any]] = None,
        cpp_options: Optional[Dict[str, Any]] = None,
        user_header: Optional[str] = None,
    ) -> None:
        """
        Initialize object given constructor args.
    
        :param model_name: Model name, used for output file names.
        :param stan_file: Path to Stan program file.
        :param exe_file: Path to compiled executable file.
        :param compile: Whether or not to compile the model.
        :param stanc_options: Options for stanc compiler.
        :param cpp_options: Options for C++ compiler.
        :param user_header: A path to a header file to include during C++
            compilation.
        """
        self._name = ''
        self._stan_file = None
        self._exe_file = None
        self._compiler_options = CompilerOptions(
            stanc_options=stanc_options,
            cpp_options=cpp_options,
            user_header=user_header,
        )
        self._fixed_param = False
    
        if model_name is not None:
            if not model_name.strip():
                raise ValueError(
                    'Invalid value for argument model name, found "{}"'.format(
                        model_name
                    )
                )
            self._name = model_name.strip()
    
        self._compiler_options.validate()
    
        if stan_file is None:
            if exe_file is None:
                raise ValueError(
                    'Missing model file arguments, you must specify '
                    'either Stan source or executable program file or both.'
                )
        else:
            self._stan_file = os.path.realpath(os.path.expanduser(stan_file))
            if not os.path.exists(self._stan_file):
                raise ValueError('no such file {}'.format(self._stan_file))
            _, filename = os.path.split(stan_file)
            if len(filename) < 6 or not filename.endswith('.stan'):
                raise ValueError(
                    'invalid stan filename {}'.format(self._stan_file)
                )
            if not self._name:
                self._name, _ = os.path.splitext(filename)
    
            # if program has include directives, record path
            with open(self._stan_file, 'r') as fd:
                program = fd.read()
            if '#include' in program:
                path, _ = os.path.split(self._stan_file)
                if self._compiler_options._stanc_options is None:
                    self._compiler_options._stanc_options = {
                        'include-paths': [path]
                    }
                else:
                    self._compiler_options.add_include_path(path)
    
            # try to detect models w/out parameters, needed for sampler
            if not cmdstan_version_before(
                2, 27
            ):  # unknown end of version range
                model_info = self.src_info()
                if 'parameters' in model_info:
                    self._fixed_param |= len(model_info['parameters']) == 0
    
        if exe_file is not None:
            self._exe_file = os.path.realpath(os.path.expanduser(exe_file))
            if not os.path.exists(self._exe_file):
                raise ValueError('no such file {}'.format(self._exe_file))
            _, exename = os.path.split(self._exe_file)
            if not self._name:
                self._name, _ = os.path.splitext(exename)
            else:
                if self._name != os.path.splitext(exename)[0]:
                    raise ValueError(
                        'Name mismatch between Stan file and compiled'
                        ' executable, expecting basename: {}'
                        ' found: {}.'.format(self._name, exename)
                    )
    
        if platform.system() == 'Windows':
            try:
                do_command(['where.exe', 'tbb.dll'], fd_out=None)
            except RuntimeError:
                # Add tbb to the $PATH on Windows
                libtbb = os.environ.get('STAN_TBB')
                if libtbb is None:
                    libtbb = os.path.join(
                        cmdstan_path(), 'stan', 'lib', 'stan_math', 'lib', 'tbb'
                    )
                get_logger().debug("Adding TBB (%s) to PATH", libtbb)
                os.environ['PATH'] = ';'.join(
                    list(
                        OrderedDict.fromkeys(
                            [libtbb] + os.environ.get('PATH', '').split(';')
                        )
                    )
                )
            else:
                get_logger().debug("TBB already found in load path")
    
        if compile and self._exe_file is None:
            self.compile(force=str(compile).lower() == 'force')
            if self._exe_file is None:
>               raise ValueError(
                    'Unable to compile Stan model file: {}.'.format(
                        self._stan_file
                    )
                )
E               ValueError: Unable to compile Stan model file: /Users/mitzi/github/stan-dev/cmdstanpy/test/data/bernoulli.stan.

cmdstanpy/model.py:212: ValueError
----------------------------- Captured stderr call -----------------------------
15:34:28 - cmdstanpy - INFO - compiling stan file /Users/mitzi/github/stan-dev/cmdstanpy/test/data/bernoulli.stan to exe file /Users/mitzi/github/stan-dev/cmdstanpy/test/data/bernoulli
15:34:31 - cmdstanpy - WARNING - CmdStan's precompiled header (PCH) files may need to be rebuilt.If your model failed to compile please run cmdstanpy.rebuild_cmdstan().
If the issue persists please open a bug report
------------------------------ Captured log call -------------------------------
INFO     cmdstanpy:model.py:500 compiling stan file /Users/mitzi/github/stan-dev/cmdstanpy/test/data/bernoulli.stan to exe file /Users/mitzi/github/stan-dev/cmdstanpy/test/data/bernoulli
DEBUG    cmdstanpy:utils.py:1073 cmd: make /Users/mitzi/github/stan-dev/cmdstanpy/test/data/bernoulli
cwd: /Users/mitzi/.conda/envs/stan-2.29/bin/cmdstan
DEBUG    cmdstanpy:model.py:524 Console output:
x86_64-apple-darwin13.4.0-clang -Wl,-pie -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs -Wl,-rpath,/Users/mitzi/.conda/envs/stan-2.29/lib -L/Users/mitzi/.conda/envs/stan-2.29/lib        -Wl,-L,"/Users/mitzi/.conda/envs/stan-2.29/lib/" -Wl,-rpath,"/Users/mitzi/.conda/envs/stan-2.29/lib/" -ltbb    /Users/mitzi/github/stan-dev/cmdstanpy/test/data/bernoulli.o stan/src/stan/model/model_header.hpp.gch         -Wl,-L,"/Users/mitzi/.conda/envs/stan-2.29/lib/" -Wl,-rpath,"/Users/mitzi/.conda/envs/stan-2.29/lib/" -ltbb -o /Users/mitzi/github/stan-dev/cmdstanpy/test/data/bernoulli
In file included from /Users/mitzi/.conda/envs/stan-2.29/bin/cmdstan/stan/src/stan/model/model_header.hpp:4:
In file included from /Users/mitzi/.conda/envs/stan-2.29/bin/cmdstan/stan/lib/stan_math/stan/math.hpp:19:
In file included from /Users/mitzi/.conda/envs/stan-2.29/bin/cmdstan/stan/lib/stan_math/stan/math/rev.hpp:8:
In file included from /Users/mitzi/.conda/envs/stan-2.29/bin/cmdstan/stan/lib/stan_math/stan/math/rev/core.hpp:53:
In file included from /Users/mitzi/.conda/envs/stan-2.29/bin/cmdstan/stan/lib/stan_math/stan/math/rev/core/profiling.hpp:9:
In file included from /Users/mitzi/.conda/envs/stan-2.29/bin/cmdstan/stan/lib/stan_math/stan/math/prim/err.hpp:6:
In file included from /Users/mitzi/.conda/envs/stan-2.29/bin/cmdstan/stan/lib/stan_math/stan/math/prim/err/check_bounded.hpp:8:
/Users/mitzi/.conda/envs/stan-2.29/bin/cmdstan/stan/lib/stan_math/stan/math/prim/fun/max_size.hpp:20:10: error: no matching function for call to 'max'
  return std::max({stan::math::size(x1), stan::math::size(xs)...});
         ^~~~~~~~
/Users/mitzi/.conda/envs/stan-2.29/bin/cmdstan/stan/lib/stan_math/stan/math/prim/err/check_bounded.hpp:30:28: note: in instantiation of function template specialization 'stan::math::max_size<double, double>' requested here
    for (size_t n = 0; n < max_size(low, high); n++) {
                           ^
/Users/mitzi/.conda/envs/stan-2.29/bin/cmdstan/stan/lib/stan_math/stan/math/prim/err/check_bounded.hpp:80:70: note: in instantiation of member function 'stan::math::internal::bounded<double, double, double, false>::check' requested here
  internal::bounded<T_y, T_low, T_high, is_vector_like<T_y>::value>::check(
                                                                     ^
/Users/mitzi/.conda/envs/stan-2.29/bin/cmdstan/stan/lib/stan_math/stan/math/prim/fun/atanh.hpp:31:5: note: in instantiation of function template specialization 'stan::math::check_bounded<double, double, double>' requested here
    check_bounded("atanh", "x", x, -1.0, 1.0);
    ^
/Users/mitzi/.conda/envs/stan-2.29/bin/../include/c++/v1/__algorithm/max.h:61:1: note: candidate template ignored: couldn't infer template argument '_Tp'
max(initializer_list<_Tp> __t)
^
/Users/mitzi/.conda/envs/stan-2.29/bin/../include/c++/v1/__algorithm/max.h:40:1: note: candidate function template not viable: requires 2 arguments, but 1 was provided
max(const _Tp& __a, const _Tp& __b)
^
/Users/mitzi/.conda/envs/stan-2.29/bin/../include/c++/v1/__algorithm/max.h:51:1: note: candidate function template not viable: requires 2 arguments, but 1 was provided
max(initializer_list<_Tp> __t, _Compare __comp)
^
/Users/mitzi/.conda/envs/stan-2.29/bin/../include/c++/v1/__algorithm/max.h:31:1: note: candidate function template not viable: requires 3 arguments, but 1 was provided
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
^
In file included from /Users/mitzi/.conda/envs/stan-2.29/bin/cmdstan/stan/src/stan/model/model_header.hpp:4:
In file included from /Users/mitzi/.conda/envs/stan-2.29/bin/cmdstan/stan/lib/stan_math/stan/math.hpp:19:
In file included from /Users/mitzi/.conda/envs/stan-2.29/bin/cmdstan/stan/lib/stan_math/stan/math/rev.hpp:8:
In file included from /Users/mitzi/.conda/envs/stan-2.29/bin/cmdstan/stan/lib/stan_math/stan/math/rev/core.hpp:53:
In file included from /Users/mitzi/.conda/envs/stan-2.29/bin/cmdstan/stan/lib/stan_math/stan/math/rev/core/profiling.hpp:9:
In file included from /Users/mitzi/.conda/envs/stan-2.29/bin/cmdstan/stan/lib/stan_math/stan/math/prim/err.hpp:6:
In file included from /Users/mitzi/.conda/envs/stan-2.29/bin/cmdstan/stan/lib/stan_math/stan/math/prim/err/check_bounded.hpp:8:
/Users/mitzi/.conda/envs/stan-2.29/bin/cmdstan/stan/lib/stan_math/stan/math/prim/fun/max_size.hpp:20:10: error: no matching function for call to 'max'
  return std::max({stan::math::size(x1), stan::math::size(xs)...});
         ^~~~~~~~
/Users/mitzi/.conda/envs/stan-2.29/bin/cmdstan/stan/lib/stan_math/stan/math/prim/err/check_bounded.hpp:30:28: note: in instantiation of function template specialization 'stan::math::max_size<int, int>' requested here
    for (size_t n = 0; n < max_size(low, high); n++) {
                           ^
/Users/mitzi/.conda/envs/stan-2.29/bin/cmdstan/stan/lib/stan_math/stan/math/prim/err/check_bounded.hpp:80:70: note: in instantiation of member function 'stan::math::internal::bounded<int, int, int, false>::check' requested here
  internal::bounded<T_y, T_low, T_high, is_vector_like<T_y>::value>::check(
                                                                     ^
/Users/mitzi/.conda/envs/stan-2.29/bin/cmdstan/stan/lib/stan_math/stan/math/prim/fun/atanh.hpp:44:3: note: in instantiation of function template specialization 'stan::math::check_bounded<int, int, int>' requested here
  check_bounded("atanh", "x", x, -1, 1);
  ^
/Users/mitzi/.conda/envs/stan-2.29/bin/../include/c++/v1/__algorithm/max.h:61:1: note: candidate template ignored: couldn't infer template argument '_Tp'
max(initializer_list<_Tp> __t)
^
/Users/mitzi/.conda/envs/stan-2.29/bin/../include/c++/v1/__algorithm/max.h:40:1: note: candidate function template not viable: requires 2 arguments, but 1 was provided
max(const _Tp& __a, const _Tp& __b)
^
/Users/mitzi/.conda/envs/stan-2.29/bin/../include/c++/v1/__algorithm/max.h:51:1: note: candidate function template not viable: requires 2 arguments, but 1 was provided
max(initializer_list<_Tp> __t, _Compare __comp)
^
/Users/mitzi/.conda/envs/stan-2.29/bin/../include/c++/v1/__algorithm/max.h:31:1: note: candidate function template not viable: requires 3 arguments, but 1 was provided
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
^
2 errors generated.
make: *** [<builtin>: /Users/mitzi/github/stan-dev/cmdstanpy/test/data/bernoulli] Error 1

Command ['make', '/Users/mitzi/github/stan-dev/cmdstanpy/test/data/bernoulli']
	error during processing No such file or directory

WARNING  cmdstanpy:model.py:562 CmdStan's precompiled header (PCH) files may need to be rebuilt.If your model failed to compile please run cmdstanpy.rebuild_cmdstan().
If the issue persists please open a bug report
=========================== short test summary info ============================
FAILED test/test_generate_quantities.py::GenerateQuantitiesTest::test_attrs
============================== 1 failed in 3.48s ===============================

mitzimorris avatar Jun 13 '22 19:06 mitzimorris

Did this PR fix the issue?

https://github.com/stan-dev/cmdstanpy/pull/556

ahartikainen avatar Jun 13 '22 19:06 ahartikainen

This might make more sense as an issue either at https://github.com/conda-forge/cmdstan-feedstock or https://github.com/stan-dev/cmdstan

This seems to be highly OS-version dependent though, since I know we have various macOS CI (including for conda) which builds the bernoulli model

WardBrian avatar Jun 13 '22 19:06 WardBrian

the versions of clang are the same, but maybe the conda-forge download doesn't have all of the SDK necessary?

conda env:

(stan-2.29) ~/.conda/envs/stan-2.29/bin/cmdstan> clang --version
clang version 12.0.0
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Users/mitzi/.conda/envs/stan-2.29/bin

bash env:

Apple clang version 12.0.0 (clang-1200.0.32.29)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

in the conda env, if I cd to InstalledDir and do a make build; CmdStanC binaries fail to compile.

(stan-2.29) ~/.conda/envs/stan-2.29> cd bin/cmdstan
(stan-2.29) ~/.conda/envs/stan-2.29/bin/cmdstan> ls
Jenkinsfile			build_env_setup.sh		lib				runCmdStanTests.py
LICENSE				conda_build.sh			make				src
README.md			examples			makefile			stan
bin				install-tbb.bat			metadata_conda_debug.yaml	test-all.sh
(stan-2.29) ~/.conda/envs/stan-2.29/bin/cmdstan> make clean-all
rm -f -r test
rm -f 
rm -f 
rm -f 
rm -f 
  removing dependency files
rm -f src/cmdstan/main.d   stan//src/stan/model/model_header.d
rm -f   
rm -f   
  cleaning sundials targets
rm -f stan/lib/stan_math/lib/sundials_6.0.0/lib/libsundials_cvodes.a stan/lib/stan_math/lib/sundials_6.0.0/lib/libsundials_idas.a stan/lib/stan_math/lib/sundials_6.0.0/lib/libsundials_kinsol.a stan/lib/stan_math/lib/sundials_6.0.0/lib/libsundials_nvecserial.a stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodea.o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodea_io.o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes.o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_bandpre.o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_bbdpre.o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_diag.o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_direct.o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_io.o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_ls.o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_nls.o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_nls_sim.o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_nls_stg.o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_nls_stg1.o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_spils.o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idaa.o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idaa_io.o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas.o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_bbdpre.o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_direct.o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_ic.o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_io.o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_ls.o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_nls.o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_nls_sim.o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_nls_stg.o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_spils.o stan/lib/stan_math/lib/sundials_6.0.0/src/kinsol/kinsol.o stan/lib/stan_math/lib/sundials_6.0.0/src/kinsol/kinsol_bbdpre.o stan/lib/stan_math/lib/sundials_6.0.0/src/kinsol/kinsol_direct.o stan/lib/stan_math/lib/sundials_6.0.0/src/kinsol/kinsol_io.o stan/lib/stan_math/lib/sundials_6.0.0/src/kinsol/kinsol_ls.o stan/lib/stan_math/lib/sundials_6.0.0/src/kinsol/kinsol_spils.o stan/lib/stan_math/lib/sundials_6.0.0/src/nvector/serial/nvector_serial.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_band.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_context.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_dense.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_direct.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_futils.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_iterative.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_linearsolver.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_math.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_matrix.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_memory.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_nonlinearsolver.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_nvector.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_nvector_senswrapper.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_version.o stan/lib/stan_math/lib/sundials_6.0.0/src/sunlinsol/band/sunlinsol_band.o stan/lib/stan_math/lib/sundials_6.0.0/src/sunlinsol/dense/sunlinsol_dense.o stan/lib/stan_math/lib/sundials_6.0.0/src/sunmatrix/band/sunmatrix_band.o stan/lib/stan_math/lib/sundials_6.0.0/src/sunmatrix/dense/sunmatrix_dense.o stan/lib/stan_math/lib/sundials_6.0.0/src/sunnonlinsol/fixedpoint/sunnonlinsol_fixedpoint.o stan/lib/stan_math/lib/sundials_6.0.0/src/sunnonlinsol/newton/sunnonlinsol_newton.o
rm -f bin/stanc bin/stansummary bin/print bin/diagnose
rm -f -r src/cmdstan/main*.o bin/cmdstan
rm -f stan/src/stan/model/model_header.hpp.gch
rm -f examples/bernoulli/bernoulli examples/bernoulli/bernoulli.o examples/bernoulli/bernoulli.d examples/bernoulli/bernoulli.hpp
rm -f -r 
(stan-2.29) ~/.conda/envs/stan-2.29/bin/cmdstan> make -j4 build
cp bin/mac-stanc bin/stanc
x86_64-apple-darwin13.4.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/nvector/serial/nvector_serial.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/nvector/serial/nvector_serial.o
x86_64-apple-darwin13.4.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodea.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodea.o
x86_64-apple-darwin13.4.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_math.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_math.o
chmod +x bin/stanc
x86_64-apple-darwin13.4.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodea_io.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodea_io.o
x86_64-apple-darwin13.4.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes.o
x86_64-apple-darwin13.4.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_bandpre.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_bandpre.o
x86_64-apple-darwin13.4.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_bbdpre.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_bbdpre.o
x86_64-apple-darwin13.4.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_diag.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_diag.o
x86_64-apple-darwin13.4.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_direct.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_direct.o
x86_64-apple-darwin13.4.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_io.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_io.o
x86_64-apple-darwin13.4.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_ls.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_ls.o
x86_64-apple-darwin13.4.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_nls.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_nls.o
x86_64-apple-darwin13.4.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_nls_sim.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_nls_sim.o
x86_64-apple-darwin13.4.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_nls_stg.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_nls_stg.o
x86_64-apple-darwin13.4.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_nls_stg1.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_nls_stg1.o
x86_64-apple-darwin13.4.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_spils.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_spils.o
x86_64-apple-darwin13.4.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_band.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_band.o
x86_64-apple-darwin13.4.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_context.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_context.o
x86_64-apple-darwin13.4.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_dense.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_dense.o
x86_64-apple-darwin13.4.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_direct.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_direct.o
x86_64-apple-darwin13.4.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_futils.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_futils.o
x86_64-apple-darwin13.4.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_iterative.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_iterative.o
x86_64-apple-darwin13.4.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_linearsolver.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_linearsolver.o
x86_64-apple-darwin13.4.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_matrix.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_matrix.o
x86_64-apple-darwin13.4.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_memory.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_memory.o
x86_64-apple-darwin13.4.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_nonlinearsolver.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_nonlinearsolver.o
x86_64-apple-darwin13.4.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_nvector.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_nvector.o
x86_64-apple-darwin13.4.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_nvector_senswrapper.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_nvector_senswrapper.o
x86_64-apple-darwin13.4.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_version.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_version.o
x86_64-apple-darwin13.4.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/sunmatrix/band/sunmatrix_band.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/sunmatrix/band/sunmatrix_band.o
x86_64-apple-darwin13.4.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/sunmatrix/dense/sunmatrix_dense.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/sunmatrix/dense/sunmatrix_dense.o
x86_64-apple-darwin13.4.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/sunlinsol/band/sunlinsol_band.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/sunlinsol/band/sunlinsol_band.o
x86_64-apple-darwin13.4.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/sunlinsol/dense/sunlinsol_dense.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/sunlinsol/dense/sunlinsol_dense.o
x86_64-apple-darwin13.4.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/sunnonlinsol/newton/sunnonlinsol_newton.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/sunnonlinsol/newton/sunnonlinsol_newton.o
x86_64-apple-darwin13.4.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/sunnonlinsol/fixedpoint/sunnonlinsol_fixedpoint.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/sunnonlinsol/fixedpoint/sunnonlinsol_fixedpoint.o
x86_64-apple-darwin13.4.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idaa.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idaa.o
x86_64-apple-darwin13.4.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idaa_io.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idaa_io.o
x86_64-apple-darwin13.4.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas.o
x86_64-apple-darwin13.4.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_bbdpre.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_bbdpre.o
x86_64-apple-darwin13.4.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_direct.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_direct.o
x86_64-apple-darwin13.4.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_ic.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_ic.o
x86_64-apple-darwin13.4.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_io.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_io.o
x86_64-apple-darwin13.4.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_ls.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_ls.o
x86_64-apple-darwin13.4.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_nls.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_nls.o
x86_64-apple-darwin13.4.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_nls_sim.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_nls_sim.o
x86_64-apple-darwin13.4.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_nls_stg.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_nls_stg.o
x86_64-apple-darwin13.4.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_spils.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_spils.o
x86_64-apple-darwin13.4.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/kinsol/kinsol.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/kinsol/kinsol.o
x86_64-apple-darwin13.4.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/kinsol/kinsol_bbdpre.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/kinsol/kinsol_bbdpre.o
x86_64-apple-darwin13.4.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/kinsol/kinsol_direct.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/kinsol/kinsol_direct.o
x86_64-apple-darwin13.4.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/kinsol/kinsol_io.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/kinsol/kinsol_io.o
x86_64-apple-darwin13.4.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/kinsol/kinsol_ls.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/kinsol/kinsol_ls.o
x86_64-apple-darwin13.4.0-clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.0.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.0.0/src/kinsol/kinsol_spils.c -o stan/lib/stan_math/lib/sundials_6.0.0/src/kinsol/kinsol_spils.o

--- Compiling the main object file. This might take up to a minute. ---
x86_64-apple-darwin13.4.0-clang++ -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -std=c++14 -fmessage-length=0 -isystem /Users/mitzi/.conda/envs/stan-2.29/include -std=c++1y -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT -Wno-ignored-attributes      -I /Users/mitzi/.conda/envs/stan-2.29/include/    -O3 -I src -I stan/src -I lib/rapidjson_1.1.0/ -I lib/CLI11-1.9.1/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.3.9 -I stan/lib/stan_math/lib/boost_1.75.0 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -D_FORTIFY_SOURCE=2 -isystem /Users/mitzi/.conda/envs/stan-2.29/include    -DBOOST_DISABLE_ASSERTS   -DTBB_INTERFACE_NEW  -DTBB_INTERFACE_NEW     -c -o src/cmdstan/main.o src/cmdstan/main.cpp

--- Compiling pre-compiled header. This might take a few seconds. ---
x86_64-apple-darwin13.4.0-clang++ -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -std=c++14 -fmessage-length=0 -isystem /Users/mitzi/.conda/envs/stan-2.29/include -std=c++1y -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT -Wno-ignored-attributes      -I /Users/mitzi/.conda/envs/stan-2.29/include/    -O3 -I src -I stan/src -I lib/rapidjson_1.1.0/ -I lib/CLI11-1.9.1/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.3.9 -I stan/lib/stan_math/lib/boost_1.75.0 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -D_FORTIFY_SOURCE=2 -isystem /Users/mitzi/.conda/envs/stan-2.29/include    -DBOOST_DISABLE_ASSERTS   -DTBB_INTERFACE_NEW  -DTBB_INTERFACE_NEW     -c stan/src/stan/model/model_header.hpp -o stan/src/stan/model/model_header.hpp.gch
x86_64-apple-darwin13.4.0-clang++ -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -std=c++14 -fmessage-length=0 -isystem /Users/mitzi/.conda/envs/stan-2.29/include -std=c++1y -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT -Wno-ignored-attributes      -I /Users/mitzi/.conda/envs/stan-2.29/include/    -O3 -I src -I stan/src -I lib/rapidjson_1.1.0/ -I lib/CLI11-1.9.1/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.3.9 -I stan/lib/stan_math/lib/boost_1.75.0 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -D_FORTIFY_SOURCE=2 -isystem /Users/mitzi/.conda/envs/stan-2.29/include    -DBOOST_DISABLE_ASSERTS   -DTBB_INTERFACE_NEW  -DTBB_INTERFACE_NEW     -c -fvisibility=hidden -o bin/cmdstan/stansummary.o        -Wl,-L,"/Users/mitzi/.conda/envs/stan-2.29/lib/" -Wl,-rpath,"/Users/mitzi/.conda/envs/stan-2.29/lib/" -ltbb src/cmdstan/stansummary.cpp
clang-12: warning: -Wl,-L,/Users/mitzi/.conda/envs/stan-2.29/lib/: 'linker' input unused [-Wunused-command-line-argument]
clang-12: warning: -Wl,-rpath,/Users/mitzi/.conda/envs/stan-2.29/lib/: 'linker' input unused [-Wunused-command-line-argument]
clang-12: warning: -ltbb: 'linker' input unused [-Wunused-command-line-argument]
x86_64-apple-darwin13.4.0-clang++ -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -std=c++14 -fmessage-length=0 -isystem /Users/mitzi/.conda/envs/stan-2.29/include -std=c++1y -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT -Wno-ignored-attributes      -I /Users/mitzi/.conda/envs/stan-2.29/include/    -O3 -I src -I stan/src -I lib/rapidjson_1.1.0/ -I lib/CLI11-1.9.1/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.3.9 -I stan/lib/stan_math/lib/boost_1.75.0 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -D_FORTIFY_SOURCE=2 -isystem /Users/mitzi/.conda/envs/stan-2.29/include    -DBOOST_DISABLE_ASSERTS   -DTBB_INTERFACE_NEW  -DTBB_INTERFACE_NEW     -c -fvisibility=hidden -o bin/cmdstan/print.o        -Wl,-L,"/Users/mitzi/.conda/envs/stan-2.29/lib/" -Wl,-rpath,"/Users/mitzi/.conda/envs/stan-2.29/lib/" -ltbb src/cmdstan/print.cpp
clang-12: warning: -Wl,-L,/Users/mitzi/.conda/envs/stan-2.29/lib/: 'linker' input unused [-Wunused-command-line-argument]
clang-12: warning: -Wl,-rpath,/Users/mitzi/.conda/envs/stan-2.29/lib/: 'linker' input unused [-Wunused-command-line-argument]
clang-12: warning: -ltbb: 'linker' input unused [-Wunused-command-line-argument]
x86_64-apple-darwin13.4.0-clang++ -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -std=c++14 -fmessage-length=0 -isystem /Users/mitzi/.conda/envs/stan-2.29/include -std=c++1y -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT -Wno-ignored-attributes      -I /Users/mitzi/.conda/envs/stan-2.29/include/    -O3 -I src -I stan/src -I lib/rapidjson_1.1.0/ -I lib/CLI11-1.9.1/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.3.9 -I stan/lib/stan_math/lib/boost_1.75.0 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -D_FORTIFY_SOURCE=2 -isystem /Users/mitzi/.conda/envs/stan-2.29/include    -DBOOST_DISABLE_ASSERTS   -DTBB_INTERFACE_NEW  -DTBB_INTERFACE_NEW     -c -fvisibility=hidden -o bin/cmdstan/diagnose.o        -Wl,-L,"/Users/mitzi/.conda/envs/stan-2.29/lib/" -Wl,-rpath,"/Users/mitzi/.conda/envs/stan-2.29/lib/" -ltbb src/cmdstan/diagnose.cpp
clang-12: warning: -Wl,-L,/Users/mitzi/.conda/envs/stan-2.29/lib/: 'linker' input unused [-Wunused-command-line-argument]
clang-12: warning: -Wl,-rpath,/Users/mitzi/.conda/envs/stan-2.29/lib/: 'linker' input unused [-Wunused-command-line-argument]
clang-12: warning: -ltbb: 'linker' input unused [-Wunused-command-line-argument]
x86_64-apple-darwin13.4.0-ar -rs stan/lib/stan_math/lib/sundials_6.0.0/lib/libsundials_nvecserial.a stan/lib/stan_math/lib/sundials_6.0.0/src/nvector/serial/nvector_serial.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_math.o
x86_64-apple-darwin13.4.0-ar: creating archive stan/lib/stan_math/lib/sundials_6.0.0/lib/libsundials_nvecserial.a
x86_64-apple-darwin13.4.0-ar -rs stan/lib/stan_math/lib/sundials_6.0.0/lib/libsundials_cvodes.a stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodea.o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodea_io.o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes.o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_bandpre.o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_bbdpre.o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_diag.o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_direct.o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_io.o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_ls.o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_nls.o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_nls_sim.o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_nls_stg.o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_nls_stg1.o stan/lib/stan_math/lib/sundials_6.0.0/src/cvodes/cvodes_spils.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_band.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_context.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_dense.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_direct.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_futils.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_iterative.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_linearsolver.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_math.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_matrix.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_memory.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_nonlinearsolver.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_nvector.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_nvector_senswrapper.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_version.o stan/lib/stan_math/lib/sundials_6.0.0/src/sunmatrix/band/sunmatrix_band.o stan/lib/stan_math/lib/sundials_6.0.0/src/sunmatrix/dense/sunmatrix_dense.o stan/lib/stan_math/lib/sundials_6.0.0/src/sunlinsol/band/sunlinsol_band.o stan/lib/stan_math/lib/sundials_6.0.0/src/sunlinsol/dense/sunlinsol_dense.o stan/lib/stan_math/lib/sundials_6.0.0/src/sunnonlinsol/newton/sunnonlinsol_newton.o stan/lib/stan_math/lib/sundials_6.0.0/src/sunnonlinsol/fixedpoint/sunnonlinsol_fixedpoint.o
x86_64-apple-darwin13.4.0-ar: creating archive stan/lib/stan_math/lib/sundials_6.0.0/lib/libsundials_cvodes.a
x86_64-apple-darwin13.4.0-ar -rs stan/lib/stan_math/lib/sundials_6.0.0/lib/libsundials_idas.a stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idaa.o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idaa_io.o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas.o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_bbdpre.o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_direct.o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_ic.o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_io.o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_ls.o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_nls.o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_nls_sim.o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_nls_stg.o stan/lib/stan_math/lib/sundials_6.0.0/src/idas/idas_spils.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_band.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_context.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_dense.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_direct.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_futils.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_iterative.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_linearsolver.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_math.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_matrix.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_memory.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_nonlinearsolver.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_nvector.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_nvector_senswrapper.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_version.o stan/lib/stan_math/lib/sundials_6.0.0/src/sunmatrix/band/sunmatrix_band.o stan/lib/stan_math/lib/sundials_6.0.0/src/sunmatrix/dense/sunmatrix_dense.o stan/lib/stan_math/lib/sundials_6.0.0/src/sunlinsol/band/sunlinsol_band.o stan/lib/stan_math/lib/sundials_6.0.0/src/sunlinsol/dense/sunlinsol_dense.o stan/lib/stan_math/lib/sundials_6.0.0/src/sunnonlinsol/newton/sunnonlinsol_newton.o stan/lib/stan_math/lib/sundials_6.0.0/src/sunnonlinsol/fixedpoint/sunnonlinsol_fixedpoint.o
x86_64-apple-darwin13.4.0-ar: creating archive stan/lib/stan_math/lib/sundials_6.0.0/lib/libsundials_idas.a
x86_64-apple-darwin13.4.0-ar -rs stan/lib/stan_math/lib/sundials_6.0.0/lib/libsundials_kinsol.a stan/lib/stan_math/lib/sundials_6.0.0/src/kinsol/kinsol.o stan/lib/stan_math/lib/sundials_6.0.0/src/kinsol/kinsol_bbdpre.o stan/lib/stan_math/lib/sundials_6.0.0/src/kinsol/kinsol_direct.o stan/lib/stan_math/lib/sundials_6.0.0/src/kinsol/kinsol_io.o stan/lib/stan_math/lib/sundials_6.0.0/src/kinsol/kinsol_ls.o stan/lib/stan_math/lib/sundials_6.0.0/src/kinsol/kinsol_spils.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_band.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_context.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_dense.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_direct.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_futils.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_iterative.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_linearsolver.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_math.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_matrix.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_memory.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_nonlinearsolver.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_nvector.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_nvector_senswrapper.o stan/lib/stan_math/lib/sundials_6.0.0/src/sundials/sundials_version.o stan/lib/stan_math/lib/sundials_6.0.0/src/sunmatrix/band/sunmatrix_band.o stan/lib/stan_math/lib/sundials_6.0.0/src/sunmatrix/dense/sunmatrix_dense.o stan/lib/stan_math/lib/sundials_6.0.0/src/sunlinsol/band/sunlinsol_band.o stan/lib/stan_math/lib/sundials_6.0.0/src/sunlinsol/dense/sunlinsol_dense.o stan/lib/stan_math/lib/sundials_6.0.0/src/sunnonlinsol/newton/sunnonlinsol_newton.o stan/lib/stan_math/lib/sundials_6.0.0/src/sunnonlinsol/fixedpoint/sunnonlinsol_fixedpoint.o
x86_64-apple-darwin13.4.0-ar: creating archive stan/lib/stan_math/lib/sundials_6.0.0/lib/libsundials_kinsol.a
x86_64-apple-darwin13.4.0-clang++ -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -std=c++14 -fmessage-length=0 -isystem /Users/mitzi/.conda/envs/stan-2.29/include -std=c++1y -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT -Wno-ignored-attributes      -I /Users/mitzi/.conda/envs/stan-2.29/include/    -O3 -I src -I stan/src -I lib/rapidjson_1.1.0/ -I lib/CLI11-1.9.1/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.3.9 -I stan/lib/stan_math/lib/boost_1.75.0 -I stan/lib/stan_math/lib/sundials_6.0.0/include -I stan/lib/stan_math/lib/sundials_6.0.0/src/sundials -D_FORTIFY_SOURCE=2 -isystem /Users/mitzi/.conda/envs/stan-2.29/include    -DBOOST_DISABLE_ASSERTS   -DTBB_INTERFACE_NEW  -DTBB_INTERFACE_NEW    -Wl,-pie -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs -Wl,-rpath,/Users/mitzi/.conda/envs/stan-2.29/lib -L/Users/mitzi/.conda/envs/stan-2.29/lib        -Wl,-L,"/Users/mitzi/.conda/envs/stan-2.29/lib/" -Wl,-rpath,"/Users/mitzi/.conda/envs/stan-2.29/lib/" -ltbb    bin/cmdstan/print.o        -Wl,-L,"/Users/mitzi/.conda/envs/stan-2.29/lib/" -Wl,-rpath,"/Users/mitzi/.conda/envs/stan-2.29/lib/" -ltbb -o bin/print
ld: unsupported tapi file type '!tapi-tbd' in YAML file '/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/lib/libSystem.tbd' for architecture x86_64
clang-12: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [make/command:13: bin/print] Error 1
make: *** Waiting for unfinished jobs....

mitzimorris avatar Jun 13 '22 19:06 mitzimorris

is this a clue as to what's missing?

ld: unsupported tapi file type '!tapi-tbd' in YAML file '/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/lib/libSystem.tbd' for architecture x86_64

mitzimorris avatar Jun 13 '22 20:06 mitzimorris

I don't believe it is an issue with missing portions of the sdk - the error you get mentions max(initializer_list<_Tp> __t), which is the correct overload the function is trying to call.

This might be a bug with cmdstan. If we look in prim/fun/max_size.hpp, we find


template <typename T1, typename... Ts>
inline size_t max_size(const T1& x1, const Ts&... xs) {
  return std::max({stan::math::size(x1), stan::math::size(xs)...});
}

Note the two template arguments

However, std::max has a signature like (from cppreference)

template< class T >
constexpr T max( std::initializer_list<T> ilist );

Which only has one template argument. This may be why you're getting the error /Users/mitzi/.conda/envs/stan-2.29/bin/../include/c++/v1/__algorithm/max.h:61:1: note: candidate template ignored: couldn't infer template argument '_Tp' for the correct signature max(initializer_list<_Tp> __t)

If this hypothesis is correct, it doesn't fully explain why it wouldn't be happening elsewhere

WardBrian avatar Jun 13 '22 20:06 WardBrian

agreed this isn't a cmdstanpy issue, other than some mac users are hitting it via conda-forge cmdstanpy. transfer to CmdStan? or?

mitzimorris avatar Jun 13 '22 20:06 mitzimorris

I think it would be better to open a fresh issue rather than transfer the whole history of this one. My guess is that the version of clang vendored by conda-forge might have some additional checks enabled by default, and that combined with some specific sdk versions may be the issue.

This wouldn't be the first time we've had a compilation issue where we had code which was technically non-compliant but some versions of clang/gcc still accepted it while others failed

WardBrian avatar Jun 13 '22 20:06 WardBrian

is this a clue as to what's missing?

ld: unsupported tapi file type '!tapi-tbd' in YAML file '/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/lib/libSystem.tbd' for architecture x86_64

Similar errors seem to be linked to using XCode 12 on Catalina: https://stackoverflow.com/questions/63592445/ld-unsupported-tapi-file-type-tapi-tbd-in-yaml-file

WardBrian avatar Jun 13 '22 20:06 WardBrian

perhaps it's a problem with the version of XCode? cf this: https://stackoverflow.com/questions/9950783/xcode-c-library-location

I don't know enough about conda to know why the call to clang++ fails because it can't find anything here: /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/lib/libSystem.tbd

when it should be looking here: /Application/Xcode.app

mitzimorris avatar Jun 13 '22 20:06 mitzimorris