Changeset 602 for trunk


Ignore:
Timestamp:
Apr 3, 2013, 9:11:49 PM (12 years ago)
Author:
sommeria
Message:

limit time increased for series with cluster, status improved

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/series.m

    r601 r602  
    14301430    NbCore=min(NbCore,NbProcess);% at least one process per core
    14311431end
     1432       
    14321433
    14331434%% read index ranges
     
    14371438first_j=1;
    14381439last_j=1;
     1440incr_j=1;
    14391441if isfield(Series.IndexRange,'first_i')
    14401442    first_i=Series.IndexRange.first_i;
     
    14451447    first_j=Series.IndexRange.first_j;
    14461448    last_j=Series.IndexRange.last_j;
     1449    incr_j=Series.IndexRange.incr_j;
    14471450end
    14481451if last_i < first_i || last_j < first_j , msgbox_uvmat('ERROR','last field number must be larger than the first one'),...
     
    14501453else
    14511454    BlockLength=ceil(numel(first_i:incr_i:last_i)/NbProcess);
     1455end
     1456nbfield_j=numel(first_j:incr_j:last_j);
     1457
     1458%% record nbre of output files for status
     1459StatusData=get(handles.status,'UserData');
     1460StatusData.NbCore=NbCore;
     1461StatusData.NbProcess=NbProcess;
     1462if isfield(StatusData,'OutputFileMode')
     1463switch StatusData.OutputFileMode
     1464    case 'NbInput'%TODO:finish
     1465end
    14521466end
    14531467
     
    16111625            end
    16121626        end
    1613         max_walltime=3600*12; % 12h max
    1614         walltime_onejob=600;%seconds
     1627        max_walltime=3600*12; % 12h max total calculation
     1628        walltime_onejob=600;%seconds, max estimated time for asingle file index value
    16151629        filename_joblist=fullfile(DirOAR,'job_list.txt');%create name of the global executable file
    16161630        fid=fopen(filename_joblist,'w');
     
    16231637            '-t idempotent --checkpoint ' num2str(walltime_onejob+60) ' '...
    16241638            '-l /core=' num2str(NbCore) ','...
    1625             'walltime=' datestr(min(1.05*walltime_onejob/86400*max(length(batch_file_list),NbCore)/NbCore,max_walltime/86400),13) ' '...
     1639            'walltime=' datestr(min(1.05*walltime_onejob/86400*max(NbProcess*BlockLength*nbfield_j,NbCore)/NbCore,max_walltime/86400),13) ' '...
    16261640            '-E ' regexprep(filename_joblist,'\.txt\>','.stderr') ' '...
    16271641            '-O ' regexprep(filename_joblist,'\.txt\>','.stdout') ' '...
     
    20232037set(handles.RunMode_title,'Visible',OutputDirVisible)
    20242038set(handles.ActionExt_title,'Visible',OutputDirVisible)
     2039
     2040%% Expected nbre of output files
     2041if isfield(ParamOut,'OutputFileMode')
     2042StatusData.NbOutputFile=ParamOut.OutputFileMode;
     2043set(handles.status,'UserData',StatusData)
     2044end
    20252045
    20262046%% definition of an additional parameter set, determined by an ancillary GUI
     
    24162436    hfig=findobj(allchild(0),'name','series_status');
    24172437    if isempty(hfig)
    2418         hfig=figure('DeleteFcn',@stop_status);
     2438        hfig=figure('DeleteFcn',@stop_status,'Position',[600 600 560 600]);
    24192439        set(hfig,'MenuBar','none')% suppress the menu bar
    24202440        set(hfig,'NumberTitle','off')%suppress the fig number in the title
     
    24922512htitlebox=findobj(hfig,'tag','titlebox');
    24932513hlist=findobj(hfig,'tag','list');
     2514StatusData=get(hObject,'UserData');
    24942515OutputDir=get(htitlebox,'String');
    2495 ListFiles=dir(OutputDir);
     2516if ischar(OutputDir),OutputDir={OutputDir};end
     2517ListFiles=dir(OutputDir{1});
    24962518ListDisplay=cell(numel(ListFiles),1);
     2519testrecent=0;
     2520datnum=zeros(numel(ListDisplay)-1,1);
    24972521for ilist=2:numel(ListDisplay)
    24982522    ListDisplay{ilist-1}=ListFiles(ilist).name;
     2523      if ~ListFiles(ilist).isdir && isfield(ListFiles(ilist),'datenum')
     2524            datnum(ilist)=ListFiles(ilist).datenum;%only available in recent matlab versions
     2525            testrecent=1;
     2526       end
    24992527end
    25002528set(hlist,'String',ListDisplay)
     2529
     2530%% Look at date of creation
     2531datnum=datnum(datnum~=0);%keep the non zero values corresponding to existing files
     2532ListDisplay=ListDisplay(datnum~=0);
     2533if isempty(datnum)
     2534    if testrecent
     2535        message='no civ result created yet';
     2536    else
     2537        message='';
     2538    end
     2539else
     2540    [first,indfirst]=min(datnum);
     2541    [last,indlast]=max(datnum);
     2542    message={[num2str(numel(datnum)) ' file(s) done over ?'] ;['oldest modification:  ' ListDisplay{indfirst} ' : ' datestr(first)];...
     2543        ['latest modification:  ' ListDisplay{indlast} ' : ' datestr(last)]};
     2544end
     2545titlebox=findobj(hfig,'tag','titlebox');
     2546msg_old=get(titlebox,'String');
     2547set(titlebox,'String', [msg_old(1);message])
     2548hwaitbar=findobj(hfig,'tag','waitbar');
     2549%TODO: adjust waitbar
     2550
    25012551% civ_files=get(hfig,'UserData');
    25022552
  • trunk/src/series/ima_levels.m

    r592 r602  
    5454    ParamOut.Mask='off';%can use mask option   (option 'off'/'on', 'off' by default)
    5555    ParamOut.OutputDirExt='.lev';%set the output dir extension
     56    ParamOut.OutputFileMode='NbInput';%NbInput= 1 output file per input file index, NbInput_i=1 fileper input file index i,NbSlice= 1 file per slice
    5657return
    5758end
Note: See TracChangeset for help on using the changeset viewer.