I am experiencing some issues with the RooMCStudy generateAndFit() function, when I use the same code compiled with clang-500.2.79 (on my own laptop) and with gcc 4.6.3 (on a remote machine).
I am using ROOT v5.34/14 in both cases, where I installed ROOT using MacPorts on my own machine and ROOT was compiled using gcc 4.6.3 on the remote machine.
When I ask for 10 toy fits to be generated and fitted using the generateAndFit() function, on my laptop < 10 of the fits are fully accurate (with some variation in the number of fully accurate fits). On the remote machine, all 10 are consistently forced positive definite. This occurs even when I set the same random seed on my laptop and on the remote machine before calling generateAndFit().
When I ask for just one toy event to be generated using generate(), and I subsequently use the RooDataSet from this toy within my own fit, the code returns the same answer on my laptop and on the remote machine. The difference seems to appear only when generateAndFit() is called.
I’m pretty puzzled by this, given that the same code is being run in both instances. Any insight you might have would be great!