3%> containing the content(s) of the ParaMonte simulation output restart
4%> file(s) whose path(s) match the specified input ``pattern`` or the
5%> simulation specification ``sampler.spec.outputFileName``.<br>
8%> This method is to be only used
for post-processing of the output
9%> restart file(s) of an already finished simulation.<br>
10%> Although possible,
this method is NOT meant
11%> to be called by all processes in
15%> Currently, only the restart output files in ASCII format can be read via
this method.<br>
16%> The binary restart files are not meant to be parsed via
this method.<br>
17%> To request
for ASCII restart output files in simulations,
18%> set the input simulation specification,
21%> sampler.spec.restartFileFormat =
"ascii"
24%> where ``sampler`` can be an instance of any one of the ParaMonte
25%> sampler classes, such as [pm.sampling.Paradram](@ref
Paradram).<br>
28%> Avoid
using this routine
for very large
long simulations.<br>
29%> Reading the full restart file of a large-scale simulation problem
30%> can be extremely memory-intensive.<br>
32%> \param[in] self : The input parent
object of
class [pm.sampling.Sampler](@ref
Sampler)
33%>
which is **implicitly** passed to
this dynamic method (not by the user).<br>
34%> \param[in] pattern : The input scalar MATLAB
string containing the pattern matching
35%> the desired restart file(s) whose contents is to be read.<br>
36%> The specified ``pattern`` only needs to partially identify
37%> the
name of the simulation to
which the restart file belongs.<br>
38%> For example, specifying ``
"./mydir/mysim"`` as input will
39%> lead to a search
for file(s) beginning with
"mysim" and
40%> ending with ``
"_restart.txt"`` inside the directory ``
"./mydir/"``.<br>
41%> If there are multiple files matching in the input ``pattern``,
42%> then all such files will be read and returned as elements of a
list.<br>
43%> If the specified pattern is a valid existing URL, the file will be
44%> downloaded as a temporary file to the local system, its contents
45%> shall be parsed and the file will be subsequently removed.<br>
46%> If the input ``pattern`` is empty, then the method will search
47%>
for any possible candidate files with the appropriate suffix
48%> in the current working directory.<br>
49%> (**optional**,
default = ``sampler.spec.outputFileName`` or ``
"./"``)
52%> ``restartList`` : The output MATLAB cell array of objects
54%> each of
which corresponds to the contents
55%> of a unique restart file.<br>
60%> sampler = pm.sampling.Sampler();
61%> restartList = sampler.readRestart();
62%> restartList = sampler.readRestart([]);
63%> restartList = sampler.readRestart(pattern);
68%> See the documentation of the subclasses of [pm.sampling.Sampler](@ref
Sampler)
69%> (e.g., [pm.sampling.Paradram](@ref
Paradram))
for example usage in action.<br>
74%> sampler.readRestart(
"./out/test_run_");
76%> sampler.spec.outputFileName =
"./out/test_run_";
77%> sampler.readRestart();
79%> sampler.readRestart(
"./out/test_run_",
",");
86%> \JoshuaOsborne, May 21 2024, 12:35 AM, University of Texas at Arlington<br>
87%> \FatemehBagheri, May 20 2024, 1:25 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.<br>
88%> \AmirShahmoradi, May 16 2016, 9:03 AM, Oden Institute
for Computational Engineering and Sciences (ICES), UT Austin<br>
96 restartList = pm.sampling.readRestart(self, pattern);
function name(in vendor)
Return the MPI library name as used in naming the ParaMonte MATLAB shared library directories.
function list()
Return a list of MATLAB strings containing the names of OS platforms supported by the ParaMonte MATLA...
This is the base class for generating objects that contain the contents of a restart file generated b...
This is the ParaDRAM class for generating instances of serial and parallel Delayed-Rejection Adaptive...
This is the base class for the ParaMonte sampler routines.
function parallel()
Return a scalar MATLAB logical that is true if and only if the current installation of MATLAB contain...
function readRestart(in sampler, in pattern)
Return a list of objects of superclass pm.sampling.FileContentsRestart containing the contents of a (...
function which(in vendor)
Return the a MATLAB string containing the path to the first mpiexec executable binary found in system...