Skip to content

Commit a18ecf2

Browse files
CHG: if outbin not found, error out instead of warning
1 parent fdffdb6 commit a18ecf2

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/m/solve/loadresultsfromdisk.m

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
error('loadresultsfromdisk: error message.');
1111
end
1212

13-
if ~md.qmu.isdakota,
13+
if ~md.qmu.isdakota
1414
%Check that file exists
15-
if ~exist(filename,'file'),
16-
warning(sprintf(['\n'...
15+
if ~exist(filename,'file')
16+
error(sprintf(['\n'...
1717
'=========================================================================\n'...
1818
' Binary file ' filename ' not found \n'...
1919
' \n'...
@@ -25,17 +25,17 @@
2525
end
2626

2727
%initialize md.results if not a structure yet
28-
if ~isstruct(md.results),
28+
if ~isstruct(md.results)
2929
md.results=struct();
3030
end
3131

3232
%load results onto model
3333
structure=parseresultsfromdisk(md,filename,~md.settings.io_gather);
34-
if isempty(fieldnames(structure)),
34+
if isempty(fieldnames(structure))
3535
error(['No result found in binary file ' filename '. Check for solution crash.']);
3636
end
3737
if isempty(structure(1).SolutionType),
38-
if ~isempty(structure(end).SolutionType),
38+
if ~isempty(structure(end).SolutionType)
3939
structure(1).SolutionType=structure(end).SolutionType;
4040
else
4141
warning(['Cannot find a solution type in the results! Ascribing one: ''NoneSolution''.']);
@@ -48,19 +48,19 @@
4848
md.private.solution=structure(1).SolutionType;
4949

5050
%read log files onto fields (only keep the first 1000 lines!)
51-
if exist([md.miscellaneous.name '.errlog'],'file'),
51+
if exist([md.miscellaneous.name '.errlog'],'file')
5252
md.results.(structure(1).SolutionType)(1).errlog=char(textread([md.miscellaneous.name '.errlog'],'%s',1000,'delimiter','\n'));
5353
else
5454
md.results.(structure(1).SolutionType)(1).errlog='';
5555
end
5656

57-
if exist([md.miscellaneous.name '.outlog'],'file'),
57+
if exist([md.miscellaneous.name '.outlog'],'file')
5858
md.results.(structure(1).SolutionType)(1).outlog=char(textread([md.miscellaneous.name '.outlog'],'%c',4000,'delimiter','\n'));
5959
else
6060
md.results.(structure(1).SolutionType)(1).outlog='';
6161
end
6262

63-
if ~isempty(md.results.(structure(1).SolutionType)(1).errlog),
63+
if ~isempty(md.results.(structure(1).SolutionType)(1).errlog)
6464
disp(['loadresultsfromdisk info message: error during solution. Check your errlog and outlog model fields']);
6565
end
6666

0 commit comments

Comments
 (0)