Hi Emanuel,
Do you need a standalone code that will fail on this error? I tried to modify the
alps-2.0.2-r5790-src-with-boost/alps/test/alea/simpleobseval.C
file, but I don't know how to run it in such a way that measurements are done on different CPUs and then evaluated together (on one CPU it always works even in my case).
Anyway, the problem seems to be that ReG and ImG do does not have the same number of bins even though they are measured and collected together.
Structure of the simplest failing code is the following:
data types used: std::valarray<double> re_G_omega_meas; std::valarray<double> im_G_omega_meas;
measurements << RealVectorObservable("re_G_omega"); measurements << RealVectorObservable("im_G_omega"); . . Measure ReG and ImG.. re_G_omega_meas[i] = G.real(); im_G_omega_meas[i] = G.imag(); . . collect measurements: measurements.get <RealVectorObservable> ("re_G_omega") << re_G_omega_meas; measurements.get <RealVectorObservable> ("im_G_omega") << im_G_omega_meas; . . evaluation: alps::RealVectorObsevaluator reG, imG; reG = get_measurements()["re_G_omega"]; imG = get_measurements()["im_G_omega"];
reG.covariance(imG); And here, it fails with the error mesage I sent in my last mail ("both observables need same number of measurements and bins").
Is this enough? If not, I will try to produce some real code.
Pavel
Hi Pavel,
I'm not sure, I've never tried this. I do not know this error. Do both F and G have the same number of measurements?
Could you please try to create a small test example that reproduces the error so we can have a look at it?
Emanuel
On Jul 18, 2012, at 11:38 AM, august@fzu.cz wrote:
Hi Emanuel,
thank you for quick answer. I changed my measurement objects from 'SimpleRealVectorObservable' to 'RealVectorObservable' and now it works. To some extent.. I can calculate the covariance matrix of a directly measured quantity like Im G. But when I want to calculate the covariance matrix for the selfenergy (calculated from the equation of motion as F/G) and I run the code on more then one CPU, it fails again. This time, the error is:
Bin number: 87 86 Bin size: 128 128 terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injectorstd::runtime_error
'
what(): both observables need same number of measurements and bins
which sounds a bit surprising since I call it as ReSigma.covariance(ReSigma). Any suggestions?
Thank you again!
Pavel
Hi Pavel,
are you trying to compute covariances of 'SimpleRealVectorObservable' objects or of collected objects? The 'RealVectorObservable' objects should have all the information needed for the covariances.
In the next version, hybridization3, we write out the covariance matrices to the hdf5 by default. In that way they can be used directly in Maxent. This is probably what you need.
Best regards, Emanuel
On Jul 18, 2012, at 10:31 AM, august@fzu.cz wrote:
Hi all,
I would like to calculate the covarince matrix of MC data from CT-HYB. But when I run the method "covarinace" of the SimpleObservableEvaluator class, it fails on "no binning information available for calculation of covariances". Is there some way to fix this and set the number of bins? I am using ALPS 2.0.2-r5790. Thank you,
Pavel