Operating System : Windows 10
Interface Version : CmdStan 2.19.0 / PyStan 184.108.40.206
Compiler/Toolkit: GCC 7.9
I tried to run 1 single chain of my model on both CmdStan and PyStan with the exact same parameters and data. The problem is that the total execution time is 10 times slower on CmdStan than on PyStan.
Here you can see the PyStan call of the sampling function :
fit = sm.sampling(data=data_cpld, iter=2000, warmup=1000, chains=1, algorithm = 'NUTS')
this command is executed with no warning, a total execution time of approximately 100 seconds and good sampling results.
Now I’m trying to do the same thing on CmdStan :
model.exe sample ^ num_samples=1000 ^ num_warmup=1000 ^ data file=data_cpld.json
and the total execution time is approximately 1000 seconds even if sampling results are the same.
The gradient computation predict a total execution time of 100 seconds, so it looks like I’m doing something wrong with CmdStan
The difference is that on CmdStan, i’m getting multiple warnings during the warmup early phase (0% -5%) :
Informational Message: The current Metropolis proposal is about to be rejected because of the following issue: Exception: normal_lpdf: Location parameter is inf, but must be finite! (in 'STAN_USER_MODELcoupled_simplecoupled_simple.stan' at line 55) If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine, but if this warning occurs often then your model may be either severely ill-conditioned or misspecified.
My model is well specified using PyStan so it should be the same on CmdStan right ?
The program seems to be stocked in this early phase but after this 5%, it seems to run with constant speed, but still slower than PyStan.
Is there something that i’m doing wrong using CmdStan sample function ?