Cmdstanpy reduce_sum doesn't produce executable

Okay how can I add a ld64 flag? Trying different things from here

@WardBrian Okay, I went down the codesigning path.

Running make STAN_THREADS=1 redcard_reduce_sum in ~/.cmdstanpy/cmdstan-2.33.1/ and then running

codesign --verify --verbose redcard_reduce_sum

yields:

redcard_reduce_sum: valid on disk
redcard_reduce_sum: satisfies its Designated Requirement

which (I think?) implies that it is correctly codesigned?

As an alternate: where can I find the rules for compiling and linking _threads (i.e. the

ifdef STAN_THREADS
STAN_FLAG_THREADS=_threads
else

in the makefile?

The only compiler flags changed by this are in stan/lib/stan_math/make/compiler_flags starting on line 308. The only thing it does is pass -DSTAN_THREADS

If you look around the source code, you will find a fair number of #ifdef STAN_THREADSs that this enables

1 Like