Page 1 of 1

parallel MCMC waiting bar

PostPosted: Thu Mar 21, 2013 1:40 pm
by lombard
Hi,
it seems to me that the information displayed
by the waiting bar concerning the various chains of MCMC that are run in parallel is incorrect.
Within a second the bars go from almost full to 2/3 and vice versa (I'm running 100000 draws per chain).
In other words it is not clear what the bars try to indicate: fraction of draws done?
If so, there must be something wrong.

Can this be fixed?

Thanks and best

Gianni

Re: parallel MCMC waiting bar

PostPosted: Thu Mar 21, 2013 3:21 pm
by jpfeifer
Which version are you using on which operating system? Are you using the standard MCMC? Which parallel options do you use?

Re: parallel MCMC waiting bar

PostPosted: Thu Mar 21, 2013 4:46 pm
by lombard
Thanks for the reply.

I'm using Dynare 4.3.2 on Red Hat 6.4
with Matlab 2012b and option
options_.parallel=struct('Local', 1, 'PcName','localhost', 'CPUnbr', [0:12], 'user','','passwd','',...
'SingleCompThread','true','RemoteDrive', '', 'RemoteFolder','', 'MatlabOctavePath', '/opt/matlab2012b/bin/matlab', 'DynarePath', '/jobdata/dynare-4.3.2/matlab','NodeWeight','1');


best

Re: parallel MCMC waiting bar

PostPosted: Fri Mar 22, 2013 7:21 am
by rattoma
Gianni,

indeed it should work correctly. I have to check what happens in linux. Can you give me the following info:
1) do the chains actually perform the right job;
2) could you try to run the command in console mode, i.e. run

dynare <your_model> parallel console

and see what is printed on the screen?

thanks
Marco

Re: parallel MCMC waiting bar

PostPosted: Thu Apr 18, 2013 12:38 pm
by lombard
Hi Marco,

sorry it took so long to come back to you. I had to suspend the work on this project.

This is what I get in parallel mode and console
1 3% done! 2 4% done! 3 4% done! 4 4% done! 5 4% done! 6 3% done!
End Parallel Session ....


It seems to stop quite early. Also

MH: average acceptation rate per chain :
1.0e-04 *

0 0 0.2000 0 0 0


This might not be a representative run, as normally I don't get zeros at the end (now I'm running a graphical session and acceptance rate is hovering around 20% (though with bars jumping around)

As this happens in graphical mode I would be surprised if it has anything to do with the OS.

Thanks for looking into this (and for the toolbox!!)

Ciao

Gianni

Re: parallel MCMC waiting bar

PostPosted: Thu Apr 18, 2013 1:51 pm
by rattoma
Dear Gianni,

I have recently fixed a number of bugs in the parallel toolbox when it runs remotely. Your configuration file looks a local one, so the fixes may not apply to your case. However, it seems that your parallel chains are so quick because they simply do not sample anything due to some error in the evaluation of the posterior kernel so that draws are all rejected. Would you be so kind to try re-running your project with the latest bug fix release of dynare 4.3.3. Or perhaps you already re-run that project with 4.3.3, meaning that more bugs are still there?

Another helpful thing (still with 4.3.3, if possible) would be to run test mode, i.e. parallel_test in place of parallel.

thanks
Marco

Re: parallel MCMC waiting bar

PostPosted: Fri Apr 19, 2013 11:14 am
by lombard
I just rebuilt dynare 4.3.3 and running it in parallel I get
Reference to non-existent field 'Port'.

Error in dynareParallelDelete (line 44)
if ~isempty(Parallel(indPC).Port),


It used to work with these options

options_.parallel=struct('Local', 1, 'PcName','localhost', 'CPUnbr', [0:12],'user','','passwd','',...
'SingleCompThread','true','RemoteDrive', '', 'RemoteFolder','', 'MatlabOctavePath', '/opt/matlab2012b/bin/matlab', 'DynarePath', '/jobdata/dynare-4.3.2/matlab','NodeWeight','1');


Best

Gianni

Re: parallel MCMC waiting bar

PostPosted: Fri Apr 19, 2013 1:23 pm
by lombard
I've managed to run a parallel MCMC (by changing names of options...). Still the waiting bars jump (this does not happen in non-parallel mode).
Are the bars showing the share of executed draws (both accepted + discarded)?

Best

Gianni

Re: parallel MCMC waiting bar

PostPosted: Sat Apr 20, 2013 10:31 am
by rattoma
Dear Gianni,

could you please try to use only the options

[node]
Name = myname
ComputerName=localhost
CPUnbr=[1:12]

without anything else in the dynare parallel configuration file?
Since you are running local it may be that adding the other options creates some conflict.
thanks
Marco

Re: parallel MCMC waiting bar

PostPosted: Mon Apr 22, 2013 2:44 pm
by lombard
Followed your suggestion and still get that the executed share is jumping up and down (also in console mode).