On Fri, 19 May 2017, at 13:42,
larryh...@gmail.com wrote:
> Hi,
> I tried to run multiple chains for an inverse problem by this command:
> mpirun -np 4 myexe my.inp
> Compared with only run 1 chain, the time used is increasing* almost
> linearly*. This is unreasonable for MPI since "np" is only 4 here and I
> have far more processors than 4.
> I was thinking if the time is affected by writing the result to the
> output
> files since the more chains you have, the larger the "ip_raw_chain.m"
> file
> will be, I guess this file must be written sequentially. I checked the
> QUESO documents, I found this in *The Parallel C++ Statistical Library
> for
> Bayesian Inference: **QUESO:*
> *QUESO also provides the user with the option of writing each
> chain-handled
> by its corresponding processor in a separate fi le, which is accomplished
> by setting the variable ip_mh_rawChain_dataOutputAllowedSet = 0 1 ...
> Ns-1. *
> After setting this, I still got "ip_raw_chain.m" along with
> "ip_raw_chain_subX.m" files. For example, I set
> *ip_mh_rawChain_dataOutputAllowedSet
> = 0 1, *I got these files:
> <
https://lh3.googleusercontent.com/-lmKciG1159o/WR87wmQJFdI/AAAAAAAAADM/TgSv0QNelWY4LWDfTWk7aNgWO-Lw1eSTACLcB/s1600/%25E5%25BE%25AE%25E4%25BF%25A1%25E6%2588%25AA%25E5%259B%25BE_20170519133838.png>
>
>
> My question is:
> 1. Is there any way that I can stop QUESO for generating
> "ip_raw_chain.m"?
> 2. Furthermore, can I stop QUESO for generating
> "ip_raw_chain_loglikelihood.m" , "ip_raw_chain_loglikelihood_subX.m",
> "ip_raw_chain_logtarget.m" and "ip_raw_chain_logtarget_subX.m"?
> 3. Can QUESO generate "ip_filt_chain" only instead of "ip_raw_chain"
> since
> the former one is much smaller?
> 4. Besides file writing, can you come up with any other reason that may
> cause the bad performance of running multiple chains?
>
> Thanks!
Just a couple of questions before I address the I/O:
1. How long does your likelihood evaluation take?
2. How long does a run with -np 1 take versus a run with -np 4?
3. How many samples are you writing to disk?
Now to answer your questions:
1. As far as I'm aware, no. Feel free to open a ticket requesting this
feature though, you can open a ticket here:
https://github.com/libqueso/queso/issues/new. I honestly believe it'd
be surprising to the majority of users if, by default, we omitted
writing the concatenated file if the user asked for only a subset of
processes to write output files. If you can think of a less surprising
behaviour, I'm happy to hear it. In your example, if you had asked for
8 chains, only the first two processes would write their chains, and you
wouldn't be given the concatenated chain. That is, you would be missing
chains from processes 2, 3, ..., 7.
2. Yes. You can set
ip_mh_outputLogLikelihood = 0
ip_mh_outputLogTarget = 0
3. Yes. You can set
ip_mh_rawChain_dataOutputFileName = .
but bear in mind you will probably need to set one of the earlier ones,
like
env_subDisplayFileName = outputData8/display
just so the output directory gets created.
4. You might consider writing out an HDF5 file instead (you can use
ip_mh_dataOutputFileType = h5). Writing a binary file is much quicker
than converting floating point numbers to ASCII first. As I test this,
however, we seem to have a bug writing multiple output files from
multiple chains in HDF5 format, so hold off on that for now. I'll open
a ticket for this.
If any of this behaviour isn't acceptable, let us know. We're always
trying to improve the usability of QUESO so if you think something can
be improved, please do feel free to open a ticket on our GitHub page and
we can discuss it further.
--
Damon McDougall
http://dmcdougall.co.uk
Institute for Computational Engineering Sciences
201 E. 24th St., Stop C0200
The University of Texas at Austin
Austin, TX 78712-1229