Changeset 505
- Timestamp:
- Jul 26, 2012, 11:04:43 PM (12 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/check_files.m
r498 r505 184 184 checkmsg=checkmsg'; 185 185 186 %% check dates of compilation 187 currentdir=pwd; 188 cd(pathuvmat) 189 list_compile=dir('*.sh'); 190 for ilist=1:numel(list_compile) 191 mfile=regexprep(list_compile(ilist).name,'.sh$','.m'); 192 datfile=dir(mfile); 193 if isfield(datfile,'datenum') && datfile.datenum>list_compile(ilist).datenum 194 checkmsg=[checkmsg;{[list_compile(ilist).name ' needs to be updated by compile_functions']}]; 195 end 196 end 197 -
trunk/src/civ.m
r501 r505 63 63 sparam=[]; 64 64 if ~exist(xmlfile,'file') 65 [success,message]=copyfile(fullfile(path_civ,'PARAM.xml.default'),xmlfile) 65 [success,message]=copyfile(fullfile(path_civ,'PARAM.xml.default'),xmlfile); 66 66 end 67 67 if exist(xmlfile,'file') … … 106 106 else 107 107 set(handles.RunMode,'String',{'local';'background';'cluster'}) 108 % set(handles.BATCH,'Enable','off')% put the BATCH button in grey (unactivated)109 % set(handles.BATCH,'BackgroundColor',[0.831 0.816 0.784])% put the BATCH button in grey (unactivated)110 108 end 111 109 % if isfield(sparam.RunParam,'CivBin') … … 323 321 set(handles.RUN, 'Enable','On') 324 322 set(handles.RUN,'BackgroundColor',[1 0 0])%set RUN button to red color 325 % set(handles.BATCH,'Enable','On')326 % set(handles.BATCH,'BackgroundColor',[1 0 0])%set BATCH button to red color327 323 if isfield(handles,'status') 328 324 set(handles.status,'Value',0); %suppress the 'status' display … … 618 614 %% set the civ options depending on the input file content when a nc file has been opened 619 615 ListOptions={'CheckCiv1', 'CheckFix1' 'CheckPatch1', 'CheckCiv2', 'CheckFix2', 'CheckPatch2'}; 620 if ind_opening==0 616 checkbox=zeros(size(ListOptions));%default 617 if ind_opening==0%case of image opening, start with Civ1 621 618 for index=1:numel(ListOptions) 622 619 checkbox(index)=get(handles.(ListOptions{index}),'Value'); 623 620 end 624 for index=1:max(1,max(find(checkbox))) 621 index_max=find(checkbox, 1, 'last' ); 622 if isempty(index_max),index_max=1;end 623 for index=1:index_max 625 624 set(handles.(ListOptions{index}),'Value',1)% select all operations starting from CIV1 626 625 end … … 848 847 status_Callback(hObject, eventdata, handles) 849 848 end 850 %851 % %------------------------------------------------------------------------852 % % --- Executes on button press in BATCH: remote processing853 % function BATCH_Callback(hObject, eventdata, handles)854 % % -----------------------------------------------------------------------855 % set(handles.BATCH, 'Enable','Off')856 % set(handles.BATCH,'BackgroundColor',[0.831 0.816 0.784])857 % batch=1;858 % errormsg=launch_jobs(hObject, eventdata, handles, batch);859 % set(handles.BATCH, 'Enable','On')860 % set(handles.BATCH,'BackgroundColor',[1 0 0])861 %862 % % display errors or start status callback to visualise results863 % if ~isempty(errormsg)864 % display(errormsg)865 % msgbox_uvmat('ERROR',errormsg)866 % elseif isfield(handles,'status')867 % set(handles.status,'Value',1);%suppress status display868 % status_Callback(hObject, eventdata, handles)869 % end870 849 871 850 %------------------------------------------------------------------- … … 1186 1165 if ~exist(fullfile(path_civ,'civ_matlab.sh'),'file') 1187 1166 errormsg=[{'no file civ_matlab.sh found'}; {'run compile_functions.m to create it by compiling civ_matlab.m'}]; 1188 end1189 return1167 return 1168 end 1190 1169 end 1191 1170 … … 1361 1340 switch Param.Program 1362 1341 case {'civ_matlab'} 1363 filename_bat=regexprep(Param.OutputFile,'(.+)([/\\])(.+$)','$1$20_BAT$2$3.m'); 1364 filename_bat=regexprep(filename_bat,'-','__'); 1342 filename_bat=regexprep(Param.OutputFile,'(.+)([/\\])(.+$)','$1$20_BAT$2$3.m'); 1343 [BatRoot,BatFile]=fileparts(filename_bat); 1344 BatFile=regexprep(BatFile,'-','__');%transform name to suppress'-' (not valid for .m files) 1345 filename_bat=[fullfile(BatRoot,BatFile) '.m']; 1365 1346 case {'CivX','CivAll','civ_matlab.sh'} 1366 1347 switch computer … … 4413 4394 4414 4395 case 'civ_matlab.sh' 4396 CivmBin=fullfile(fileparts(which('civ')),'civ_matlab.sh'); %path to the source directory of uvmat 4415 4397 switch computer 4416 4398 case {'PCWIN','PCWIN64'} … … 4422 4404 'hostname && date \n '... 4423 4405 'umask 002 \n'... 4424 Param.xml.CivmBin ' ' Param.xml.RunTime ' ' regexprep(filename,'(.+)([/\\])(.+$)','$1$20_XML$2$3.xml') ' ' Param.OutputFile '.nc'];%allow writting access to created files for user group4406 CivmBin ' ' Param.xml.RunTime ' ' regexprep(filename,'(.+)([/\\])(.+$)','$1$20_XML$2$3.xml') ' ' Param.OutputFile '.nc'];%allow writting access to created files for user group 4425 4407 end 4426 4408 end
Note: See TracChangeset
for help on using the changeset viewer.