Changeset 910 for trunk/src/series.m


Ignore:
Timestamp:
Jun 13, 2015, 7:20:37 PM (9 years ago)
Author:
sommeria
Message:

bugs corrected in fix in civ_series. vectors set to 0 inside mask

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/series.m

    r909 r910  
    14811481errormsg='';%default error message
    14821482xmlfile=fullfile(path_series,'PARAM.xml');
    1483 test_batch=0;%default: ,no batch mode available
     1483%test_batch=0;%default: ,no batch mode available
    14841484if ~exist(xmlfile,'file')
    14851485    [success,message]=copyfile(fullfile(path_series,'PARAM.xml.default'),xmlfile);
    14861486end
    1487 % RunTime='';
    14881487if strcmp(ActionExt,'.sh')
    14891488    if exist(xmlfile,'file')
    14901489        s=xml2struct(xmlfile);
    14911490        if strcmp(RunMode,'cluster_oar') && isfield(s,'BatchParam')
    1492 %             if isfield(s.BatchParam,'RunTime')
    1493 %                 RunTime=s.BatchParam.RunTime;
    1494 %             end
    14951491            if isfield(s.BatchParam,'NbCore')
    14961492                NbCore=s.BatchParam.NbCore;
    14971493            end
    14981494        elseif (strcmp(RunMode,'background')||strcmp(RunMode,'local')) && isfield(s,'RunParam')
    1499 %             if isfield(s.RunParam,'RunTime')
    1500 %                 RunTime=s.RunParam.RunTime;
    1501 %             end
    15021495            if isfield(s.RunParam,'NbCore')
    15031496                NbCore=s.RunParam.NbCore;
     
    15051498        end
    15061499    end
    1507 %     if isempty(RunTime) && strcmp(RunMode,'cluster_oar')
    1508 %        errormsg='RunTime name not found in PARAM.xml, compiled version .sh cannot run on cluster';
    1509 %         return
    1510 %     end
    15111500end
    15121501
     
    17271716end
    17281717nbfield_j=numel(ref_j); % number of j indices
    1729 BlockLength=numel(ref_i);%default
    1730 if isempty(Param.IndexRange.NbSlice)
    1731     NbProcess=NbCore;% choose one process per core by default if NbSlice is not imposed
    1732     switch RunMode
    1733         case 'cluster_oar'
    1734             BlockLength= ceil(20/(CPUTime*nbfield_j));% short iterations are grouped such that the minimum time of a process is 20 min.
    1735             NbProcess=ceil(numel(ref_i)/BlockLength) ; % nbre of processes sent to oar
    1736     end
    1737 else
    1738     NbProcess=Param.IndexRange.NbSlice;% the parameter NbSlice sets the nbre of run processes
    1739     NbCore=min(NbCore,NbProcess);% reduces the number of cores if it exceeds the number of processes
    1740 end
    1741 
    1742 %BlockLength=ceil(numel(ref_i)/NbProcess);% nbre of input fields in each process
    1743 %nbfield_j=numel(ref_j); % number of j indices
     1718BlockLength=numel(ref_i);% by default, job involves the full set of i field indices
     1719NbProcess=1;
     1720switch RunMode
     1721    case {'cluster_oar','cluster_pbs'}
     1722        if isempty(Param.IndexRange.NbSlice)% if NbSlice is not defined
     1723             BlockLength= ceil(20/(CPUTime*nbfield_j));% short iterations are grouped such that the minimum time of a process is 20 min.
     1724             BlockLength=max(BlockLength,ceil(numel(ref_i)/1000));% possibly increase the BlockLength to have less than 1000 jobs
     1725             NbProcess=ceil(numel(ref_i)/BlockLength) ; % nbre of processes sent to oar
     1726        else
     1727            NbProcess=Param.IndexRange.NbSlice;% the parameter NbSlice sets the nbre of run processes
     1728            NbCore=min(NbCore,NbProcess);% reduces the number of cores if it exceeds the number of processes
     1729        end
     1730end
    17441731
    17451732%% record nbre of output files and starting time for computation for status
Note: See TracChangeset for help on using the changeset viewer.