Changeset 453


Ignore:
Timestamp:
05/15/09 14:52:02 (16 years ago)
Author:
jschierm
Message:

Another minor modification for error handling.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/m/solutions/dakota/qmu.m

    r450 r453  
    121121
    122122%  check to see if dakota returned errors in the err file
    123 fide=fopen([qmufile '.err'],'r');
    124 fline=fgetl(fide);
    125 if ischar(fline)
    126     while ischar(fline)
    127         disp(sprintf('%s',fline));
    128         fline=fgetl(fide);
     123if exist([qmufile '.err'],'file')
     124   fide=fopen([qmufile '.err'],'r');
     125   fline=fgetl(fide);
     126   if ischar(fline)
     127       while ischar(fline)
     128           disp(sprintf('%s',fline));
     129           fline=fgetl(fide);
     130       end
     131       status=fclose(fide);
     132       cd ../
     133       error(['Dakota returned error in ''' qmufile '.err'' file.  ''' qmudir ''' directory retained.'])
    129134    end
    130135    status=fclose(fide);
    131     cd ../
    132     error(['Dakota returned error in ''' qmufile '.err'' file.  ''' qmudir ''' directory retained.'])
     136else
     137   cd ../
     138   error(['Dakota did not generate ''' qmufile '.err'' file.  ''' qmudir ''' directory retained.'])
    133139end
    134 status=fclose(fide);
    135140
    136141%parse inputs and results from dakota
Note: See TracChangeset for help on using the changeset viewer.