Ignore:
Timestamp:
03/09/15 12:45:28 (10 years ago)
Author:
Eric.Larour
Message:

CHG: introducing checkpointing capability. Right now, just empty shell, getting thematlab and python apis
to accept restart_frequency settings.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/classes/settings.m

    r19040 r19191  
    1010                lowmem              = 0;
    1111                output_frequency    = 0;
     12                restart_frequency   = 0;
    1213                waitonlock          = 0;
    1314                upload_server       = '';
     
    5859                        self.output_frequency=1;
    5960
     61                        %checkpoints frequency, by default never:
     62                        self.restart_frequency=0;
     63
    6064                        %this option can be activated to load automatically the results
    6165                        %onto the model after a parallel run by waiting for the lock file
     
    7478                        md = checkfield(md,'fieldname','settings.lowmem','numel',[1],'values',[0 1]);
    7579                        md = checkfield(md,'fieldname','settings.output_frequency','numel',[1],'>=',1);
     80                        md = checkfield(md,'fieldname','settings.restart_frequency','numel',[1],'>=',0);
    7681                        md = checkfield(md,'fieldname','settings.waitonlock','numel',[1]);
    7782
     
    8489                        fielddisplay(self,'lowmem','is the memory limited ? (0 or 1)');
    8590                        fielddisplay(self,'output_frequency','frequency at which results are saved in all solutions with multiple time_steps');
     91                        fielddisplay(self,'restart_frequency','frequency at which the runs are being checkpointed, allowing for a restart');
    8692                        fielddisplay(self,'waitonlock','maximum number of minutes to wait for batch results (NaN to deactivate)');
    8793                        fielddisplay(self,'upload_server','server hostname where model should be uploaded');
     
    97103                        WriteData(fid,'object',self,'fieldname','lowmem','format','Boolean');
    98104                        WriteData(fid,'object',self,'fieldname','output_frequency','format','Integer');
     105                        WriteData(fid,'object',self,'fieldname','restart_frequency','format','Integer');
    99106                        if self.waitonlock>0,
    100107                                WriteData(fid,'enum',SettingsWaitonlockEnum(),'data',true,'format','Boolean');
Note: See TracChangeset for help on using the changeset viewer.