- Timestamp:
- Apr 3, 2013, 9:11:49 PM (12 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series.m
r601 r602 1430 1430 NbCore=min(NbCore,NbProcess);% at least one process per core 1431 1431 end 1432 1432 1433 1433 1434 %% read index ranges … … 1437 1438 first_j=1; 1438 1439 last_j=1; 1440 incr_j=1; 1439 1441 if isfield(Series.IndexRange,'first_i') 1440 1442 first_i=Series.IndexRange.first_i; … … 1445 1447 first_j=Series.IndexRange.first_j; 1446 1448 last_j=Series.IndexRange.last_j; 1449 incr_j=Series.IndexRange.incr_j; 1447 1450 end 1448 1451 if last_i < first_i || last_j < first_j , msgbox_uvmat('ERROR','last field number must be larger than the first one'),... … … 1450 1453 else 1451 1454 BlockLength=ceil(numel(first_i:incr_i:last_i)/NbProcess); 1455 end 1456 nbfield_j=numel(first_j:incr_j:last_j); 1457 1458 %% record nbre of output files for status 1459 StatusData=get(handles.status,'UserData'); 1460 StatusData.NbCore=NbCore; 1461 StatusData.NbProcess=NbProcess; 1462 if isfield(StatusData,'OutputFileMode') 1463 switch StatusData.OutputFileMode 1464 case 'NbInput'%TODO:finish 1465 end 1452 1466 end 1453 1467 … … 1611 1625 end 1612 1626 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 1615 1629 filename_joblist=fullfile(DirOAR,'job_list.txt');%create name of the global executable file 1616 1630 fid=fopen(filename_joblist,'w'); … … 1623 1637 '-t idempotent --checkpoint ' num2str(walltime_onejob+60) ' '... 1624 1638 '-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) ' '... 1626 1640 '-E ' regexprep(filename_joblist,'\.txt\>','.stderr') ' '... 1627 1641 '-O ' regexprep(filename_joblist,'\.txt\>','.stdout') ' '... … … 2023 2037 set(handles.RunMode_title,'Visible',OutputDirVisible) 2024 2038 set(handles.ActionExt_title,'Visible',OutputDirVisible) 2039 2040 %% Expected nbre of output files 2041 if isfield(ParamOut,'OutputFileMode') 2042 StatusData.NbOutputFile=ParamOut.OutputFileMode; 2043 set(handles.status,'UserData',StatusData) 2044 end 2025 2045 2026 2046 %% definition of an additional parameter set, determined by an ancillary GUI … … 2416 2436 hfig=findobj(allchild(0),'name','series_status'); 2417 2437 if isempty(hfig) 2418 hfig=figure('DeleteFcn',@stop_status );2438 hfig=figure('DeleteFcn',@stop_status,'Position',[600 600 560 600]); 2419 2439 set(hfig,'MenuBar','none')% suppress the menu bar 2420 2440 set(hfig,'NumberTitle','off')%suppress the fig number in the title … … 2492 2512 htitlebox=findobj(hfig,'tag','titlebox'); 2493 2513 hlist=findobj(hfig,'tag','list'); 2514 StatusData=get(hObject,'UserData'); 2494 2515 OutputDir=get(htitlebox,'String'); 2495 ListFiles=dir(OutputDir); 2516 if ischar(OutputDir),OutputDir={OutputDir};end 2517 ListFiles=dir(OutputDir{1}); 2496 2518 ListDisplay=cell(numel(ListFiles),1); 2519 testrecent=0; 2520 datnum=zeros(numel(ListDisplay)-1,1); 2497 2521 for ilist=2:numel(ListDisplay) 2498 2522 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 2499 2527 end 2500 2528 set(hlist,'String',ListDisplay) 2529 2530 %% Look at date of creation 2531 datnum=datnum(datnum~=0);%keep the non zero values corresponding to existing files 2532 ListDisplay=ListDisplay(datnum~=0); 2533 if isempty(datnum) 2534 if testrecent 2535 message='no civ result created yet'; 2536 else 2537 message=''; 2538 end 2539 else 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)]}; 2544 end 2545 titlebox=findobj(hfig,'tag','titlebox'); 2546 msg_old=get(titlebox,'String'); 2547 set(titlebox,'String', [msg_old(1);message]) 2548 hwaitbar=findobj(hfig,'tag','waitbar'); 2549 %TODO: adjust waitbar 2550 2501 2551 % civ_files=get(hfig,'UserData'); 2502 2552 -
trunk/src/series/ima_levels.m
r592 r602 54 54 ParamOut.Mask='off';%can use mask option (option 'off'/'on', 'off' by default) 55 55 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 56 57 return 57 58 end
Note: See TracChangeset
for help on using the changeset viewer.