parallel MCMC waiting bar

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

parallel MCMC waiting bar

Postby lombard » Thu Mar 21, 2013 1:40 pm

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
lombard
 
Posts: 132
Joined: Wed Feb 02, 2005 12:36 pm
Location: Basel

Re: parallel MCMC waiting bar

Postby jpfeifer » Thu Mar 21, 2013 3:21 pm

Which version are you using on which operating system? Are you using the standard MCMC? Which parallel options do you use?
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: parallel MCMC waiting bar

Postby lombard » Thu Mar 21, 2013 4:46 pm

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
lombard
 
Posts: 132
Joined: Wed Feb 02, 2005 12:36 pm
Location: Basel

Re: parallel MCMC waiting bar

Postby rattoma » Fri Mar 22, 2013 7:21 am

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
rattoma
 
Posts: 51
Joined: Tue Jan 04, 2005 10:48 am

Re: parallel MCMC waiting bar

Postby lombard » Thu Apr 18, 2013 12:38 pm

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
lombard
 
Posts: 132
Joined: Wed Feb 02, 2005 12:36 pm
Location: Basel

Re: parallel MCMC waiting bar

Postby rattoma » Thu Apr 18, 2013 1:51 pm

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
rattoma
 
Posts: 51
Joined: Tue Jan 04, 2005 10:48 am

Re: parallel MCMC waiting bar

Postby lombard » Fri Apr 19, 2013 11:14 am

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
lombard
 
Posts: 132
Joined: Wed Feb 02, 2005 12:36 pm
Location: Basel

Re: parallel MCMC waiting bar

Postby lombard » Fri Apr 19, 2013 1:23 pm

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
lombard
 
Posts: 132
Joined: Wed Feb 02, 2005 12:36 pm
Location: Basel

Re: parallel MCMC waiting bar

Postby rattoma » Sat Apr 20, 2013 10:31 am

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
rattoma
 
Posts: 51
Joined: Tue Jan 04, 2005 10:48 am

Re: parallel MCMC waiting bar

Postby lombard » Mon Apr 22, 2013 2:44 pm

Followed your suggestion and still get that the executed share is jumping up and down (also in console mode).
lombard
 
Posts: 132
Joined: Wed Feb 02, 2005 12:36 pm
Location: Basel


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 7 guests