|
10 | 10 | error('loadresultsfromdisk: error message.'); |
11 | 11 | end |
12 | 12 |
|
13 | | -if ~md.qmu.isdakota, |
| 13 | +if ~md.qmu.isdakota |
14 | 14 | %Check that file exists |
15 | | - if ~exist(filename,'file'), |
16 | | - warning(sprintf(['\n'... |
| 15 | + if ~exist(filename,'file') |
| 16 | + error(sprintf(['\n'... |
17 | 17 | '=========================================================================\n'... |
18 | 18 | ' Binary file ' filename ' not found \n'... |
19 | 19 | ' \n'... |
|
25 | 25 | end |
26 | 26 |
|
27 | 27 | %initialize md.results if not a structure yet |
28 | | - if ~isstruct(md.results), |
| 28 | + if ~isstruct(md.results) |
29 | 29 | md.results=struct(); |
30 | 30 | end |
31 | 31 |
|
32 | 32 | %load results onto model |
33 | 33 | structure=parseresultsfromdisk(md,filename,~md.settings.io_gather); |
34 | | - if isempty(fieldnames(structure)), |
| 34 | + if isempty(fieldnames(structure)) |
35 | 35 | error(['No result found in binary file ' filename '. Check for solution crash.']); |
36 | 36 | end |
37 | 37 | if isempty(structure(1).SolutionType), |
38 | | - if ~isempty(structure(end).SolutionType), |
| 38 | + if ~isempty(structure(end).SolutionType) |
39 | 39 | structure(1).SolutionType=structure(end).SolutionType; |
40 | 40 | else |
41 | 41 | warning(['Cannot find a solution type in the results! Ascribing one: ''NoneSolution''.']); |
|
48 | 48 | md.private.solution=structure(1).SolutionType; |
49 | 49 |
|
50 | 50 | %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') |
52 | 52 | md.results.(structure(1).SolutionType)(1).errlog=char(textread([md.miscellaneous.name '.errlog'],'%s',1000,'delimiter','\n')); |
53 | 53 | else |
54 | 54 | md.results.(structure(1).SolutionType)(1).errlog=''; |
55 | 55 | end |
56 | 56 |
|
57 | | - if exist([md.miscellaneous.name '.outlog'],'file'), |
| 57 | + if exist([md.miscellaneous.name '.outlog'],'file') |
58 | 58 | md.results.(structure(1).SolutionType)(1).outlog=char(textread([md.miscellaneous.name '.outlog'],'%c',4000,'delimiter','\n')); |
59 | 59 | else |
60 | 60 | md.results.(structure(1).SolutionType)(1).outlog=''; |
61 | 61 | end |
62 | 62 |
|
63 | | - if ~isempty(md.results.(structure(1).SolutionType)(1).errlog), |
| 63 | + if ~isempty(md.results.(structure(1).SolutionType)(1).errlog) |
64 | 64 | disp(['loadresultsfromdisk info message: error during solution. Check your errlog and outlog model fields']); |
65 | 65 | end |
66 | 66 |
|
|
0 commit comments