Changeset 14101


Ignore:
Timestamp:
12/05/12 14:32:40 (12 years ago)
Author:
jschierm
Message:

CHG: Change default waitonlock to integer inf for python (plus other cosmetic changes).

Location:
issm/trunk-jpl/src/m/classes
Files:
5 edited

Legend:

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

    r13731 r14101  
    8484                %CHANGEOPTIONVALUE - change the value of an option in an option list
    8585
    86                         %track occurance of field
     86                        %track occurrence of field
    8787                        lines=find(strcmpi(obj.list(:,1),field));
    8888
     
    100100                %DELETEDUPLICATES - delete duplicates in an option list
    101101
    102                         %track the first occurance of each option
     102                        %track the first occurrence of each option
    103103                        [dummy lines]=unique(obj.list(:,1),'first');
    104104                        clear dummy
     
    109109                                for i=1:numoptions,
    110110                                        if ~ismember(i,lines),
    111                                                 disp(['WARNING: option ' obj.list{i,1} ' appeared more than once. Only its first occurence will be kept'])
     111                                                disp(['WARNING: option ' obj.list{i,1} ' appeared more than once. Only its first occurrence will be kept'])
    112112                                        end
    113113                                end
     
    137137                end % }}}
    138138                function bool = exist(obj,field) % {{{
    139                 %EXIST - check if the option exist
     139                %EXIST - check if the option exists
    140140
    141141                        %some argument checking:
     
    150150                        bool=any(strcmpi(field,obj.list(:,1)));
    151151                end % }}}
    152                 function num = fieldoccurences(obj,field), % {{{
    153                 %FIELDOCCURENCES - get number of occurence of a field
     152                function num = fieldoccurrences(obj,field), % {{{
     153                %FIELDOCCURRENCES - get number of occurrence of a field
    154154
    155155                        %check input
    156156                        if ~ischar(field),
    157                                 error('fieldoccurences error message: field should be a string');
    158                         end
    159 
    160                         %get number of occurence
     157                                error('fieldoccurrences error message: field should be a string');
     158                        end
     159
     160                        %get number of occurrence
    161161                        num=sum(strcmpi(field,obj.list(:,1)));
    162162                end % }}}
     
    204204                %      obj=removefield(obj,field,warn)
    205205                %
    206                 %   if warn==1 display an info message to wan user that
     206                %   if warn==1 display an info message to warn user that
    207207                %   some of his options have been removed.
    208208
  • issm/trunk-jpl/src/m/classes/pairoptions.py

    r13424 r14101  
    7878#       %DELETEDUPLICATES - delete duplicates in an option list
    7979#
    80 #               %track the first occurance of each option
     80#               %track the first occurrence of each option
    8181#               [dummy lines]=unique(obj.list(:,1),'first');
    8282#               clear dummy
     
    8787#                       for i=1:numoptions,
    8888#                               if ~ismember(i,lines),
    89 #                                       disp(['WARNING: option ' obj.list{i,1} ' appeared more than once. Only its first occurence will be kept'])
     89#                                       disp(['WARNING: option ' obj.list{i,1} ' appeared more than once. Only its first occurrence will be kept'])
    9090#                               end
    9191#                       end
     
    128128        # }}}
    129129
    130         #def fieldoccurences(self,field): #{{{
     130        #def fieldoccurrences(self,field): #{{{
    131131        #       '''
    132         #       FIELDOCCURENCES - get number of occurence of a field
     132        #       FIELDOCCURRENCES - get number of occurrence of a field
    133133        #       '''
    134134        #
    135135        #       #check input
    136136        #       if not isinstance(field,(str,unicode)):
    137         #               raise TypeError("fieldoccurences error message: field should be a string")
    138 
    139         #       #get number of occurence
     137        #               raise TypeError("fieldoccurrences error message: field should be a string")
     138
     139        #       #get number of occurrence
    140140        #       # ??
    141141        #       #return num
  • issm/trunk-jpl/src/m/classes/plotoptions.m

    r12365 r14101  
    6868
    6969                         %get number of data to be plotted
    70                          numberofplots=fieldoccurences(rawoptions,'data');
     70                         numberofplots=fieldoccurrences(rawoptions,'data');
    7171                         opt.numberofplots=numberofplots;
    7272
  • issm/trunk-jpl/src/m/classes/settings.m

    r13040 r14101  
    3838                        %onto the model after a parallel run by waiting for the lock file
    3939                        %N minutes that is generated once the solution has converged
    40                         %0 to desactivate
     40                        %0 to deactivate
    4141                        obj.waitonlock=Inf;
    4242                end % }}}
  • issm/trunk-jpl/src/m/classes/settings.py

    r13040 r14101  
    5656                #onto the model after a parallel run by waiting for the lock file
    5757                #N minutes that is generated once the solution has converged
    58                 #0 to desactivate
    59                 self.waitonlock=float('Inf')
     58                #0 to deactivate
     59                self.waitonlock=2**31-1
    6060
    6161                return self
Note: See TracChangeset for help on using the changeset viewer.