Changeset 905 for trunk/src/series.m
- Timestamp:
- May 30, 2015, 8:44:20 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series.m
r904 r905 1607 1607 detect=exist(fullfile(Param.InputTable{1,1},SubDirOutNew),'dir');% test if the dir already exist 1608 1608 check_create=1; %need to create the result directory by default 1609 CheckOverwrite=1; 1610 if isfield(Param,'CheckOverwrite') 1611 CheckOverwrite=Param.CheckOverwrite; 1612 end 1609 1613 while detect 1610 if Param.CheckOverwrite1614 if CheckOverwrite 1611 1615 comment=', possibly overwrite previous data'; 1612 1616 else … … 1719 1723 end 1720 1724 nbfield_j=numel(ref_j); % number of j indices 1725 BlockLength=numel(ref_i);%default 1721 1726 if isempty(Param.IndexRange.NbSlice) 1722 1727 NbProcess=NbCore;% choose one process per core by default if NbSlice is not imposed … … 1805 1810 %% processing on a different session of the same computer (background) or cluster, create executable files 1806 1811 batch_file_list=cell(NbProcess,1);% initiate the list of executable files 1807 Dir Bat=fullfile(OutputDir,'0_EXE');1812 DirExe=fullfile(OutputDir,'0_EXE');%directory name for executable files 1808 1813 switch computer 1809 1814 case {'PCWIN','PCWIN64'} %Windows system … … 1813 1818 end 1814 1819 %create subdirectory for executable files 1815 if ~exist(Dir Bat,'dir')1816 [tild,msg1]=mkdir(Dir Bat);1820 if ~exist(DirExe,'dir') 1821 [tild,msg1]=mkdir(DirExe); 1817 1822 if ~strcmp(msg1,'') 1818 errormsg=['cannot create ' Dir Bat': ' msg1];%error message for directory creation1823 errormsg=['cannot create ' DirExe ': ' msg1];%error message for directory creation 1819 1824 return 1820 1825 end … … 1852 1857 1853 1858 %create the executable file 1854 filebat=fullfile_uvmat(Dir Bat,'',Param.InputTable{1,3},ExeExt,OutputNomType,...1859 filebat=fullfile_uvmat(DirExe,'',Param.InputTable{1,3},ExeExt,OutputNomType,... 1855 1860 Param.IndexRange.first_i,Param.IndexRange.last_i,first_j,last_j); 1856 1861 batch_file_list{iprocess}=filebat; … … 1919 1924 case 'cluster_oar' % option 'oar-parexec' used 1920 1925 %create subdirectory for oar command and log files 1921 DirOAR=fullfile(OutputDir,'0_LOG'); 1922 if exist(DirOAR,'dir')% delete the content of the dir 0_LOG to allow new input 1923 curdir=pwd; 1924 cd(DirOAR) 1925 delete('*') 1926 cd(curdir) 1927 else 1928 [tild,msg1]=mkdir(DirOAR); 1929 if ~strcmp(msg1,'') 1930 errormsg=['cannot create ' DirOAR ': ' msg1];%error message for directory creation 1931 return 1932 end 1933 end 1934 filename_joblist=fullfile(DirOAR,'0_job_list.txt');%create name of the global executable file 1926 %DirOARLog=fullfile(OutputDir,'0_LOG'); 1927 %DirOARExe=fullfile(OutputDir,'0_EXE'); 1928 % if exist(DirOAR,'dir')% delete the content of the dir 0_LOG to allow new input 1929 % curdir=pwd; 1930 % cd(DirOAR) 1931 % delete('*') 1932 % cd(curdir) 1933 % else 1934 % [tild,msg1]=mkdir(DirOAR); 1935 % if ~strcmp(msg1,'') 1936 % errormsg=['cannot create ' DirOAR ': ' msg1];%error message for directory creation 1937 % return 1938 % end 1939 % end 1940 filename_joblist=fullfile(DirExe,'0_job_list.txt');%create name of the global executable file 1941 filename_log=fullfile(DirLog,'0_job_list.stdout');%file for output messages of the master oar process 1942 filename_errors=fullfile(DirLog,'0_job_list.stderr');%file for error messages of the master oar process 1943 1935 1944 fid=fopen(filename_joblist,'w'); 1936 1945 for p=1:length(batch_file_list) … … 1958 1967 '-l /core=' num2str(NbCore) ','... 1959 1968 'walltime=' datestr(WallTimeOneJob/24,13) ' '... 1960 '-E ' regexprep(filename_joblist,'\.txt\>','.stderr')' '...1961 '-O ' regexprep(filename_joblist,'\.txt\>','.stdout')' '...1969 '-E ' filename_errors ' '... 1970 '-O ' filename_log ' '... 1962 1971 extra_oar ' '... 1963 1972 '"oar-parexec -s -f ' filename_joblist ' '... 1964 1973 '-l ' filename_joblist '.log"\n']; 1965 1974 1966 filename_oarcommand=fullfile(Dir OAR,'0_oar_command');1975 filename_oarcommand=fullfile(DirExe,'0_oar_command'); 1967 1976 fid=fopen(filename_oarcommand,'w'); 1968 1977 fprintf(fid,oar_command); … … 3597 3606 % --- Executes on button press in CheckOverwrite. 3598 3607 function CheckOverwrite_Callback(hObject, eventdata, handles) 3599 % hObject handle to CheckOverwrite (see GCBO) 3600 % eventdata reserved - to be defined in a future version of MATLAB 3601 % handles structure with handles and user data (see GUIDATA) 3602 3603 % Hint: get(hObject,'Value') returns toggle state of CheckOverwrite 3608 3604 3609 3605 3610
Note: See TracChangeset
for help on using the changeset viewer.