- Timestamp:
- Jun 28, 2012, 11:26:31 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/civ.m
r485 r486 800 800 set(handles.RUN, 'Enable','Off') 801 801 set(handles.RUN,'BackgroundColor',[0.831 0.816 0.784]) 802 %batch=get(handles.RunMode,'Value'); 803 % batch=0; 802 set(handles.RUN,'UserData',now)% record the time of launch 804 803 errormsg=launch_jobs(hObject, eventdata, handles); 805 804 set(handles.RUN, 'Enable','On') … … 895 894 drawnow 896 895 end 897 StatusData.time_ref= now;% store the current time896 StatusData.time_ref=get(handles.RUN,'UserData');% get the time of launch 898 897 StatusData.option_civ=option_civ; 899 898 set(hrefresh,'UserData',StatusData) … … 1319 1318 end 1320 1319 1321 % print the command in the file1320 % print the command in the bat file 1322 1321 [fid,message]=fopen(filename_bat,'w'); 1323 1322 if isequal(fid,-1) 1324 1323 errormsg=['creation of .bat file: ' message]; 1325 1324 return 1326 end1327 if ~isunix1328 cmd=regexprep(cmd,'\\','\\\\');1329 1325 end 1330 1326 fprintf(fid,cmd); … … 4375 4371 cmd=[cmd sparam.CivBin ' -f ' Param.OutputFile '.xml ' CivAllCmd ' >' Param.OutputFile '.log' '\n']; 4376 4372 case 'civ_matlab' 4373 switch computer 4374 case {'PCWIN','PCWIN64'} 4375 filename=regexprep(filename,'\\','\\\\');% add '\' so that '\' are left as characters 4376 case {'GLNX86','GLNXA64','MACI64'} 4377 end 4377 4378 cmd=['civ_matlab(''' regexprep(filename,'(\w+)([/\\])(\w+$)','$1$20_XML$2$3.xml') ''','''... 4378 4379 filename '.nc'');']; 4379 4380 case 'civ_matlab.sh' 4380 cmd=['#!/bin/bash \n '... 4381 '#$ -cwd \n '... 4382 'hostname && date \n '... 4383 'umask 002 \n'... 4384 Param.xml.CivmBin ' ' Param.xml.RunTime ' ' regexprep(filename,'(\w+)([/\\])(\w+$)','$1$20_XML$2$3.xml') ' ' Param.OutputFile '.nc'];%allow writting access to created files for user group 4381 switch computer 4382 case {'PCWIN','PCWIN64'} 4383 filename=regexprep(filename,'\\','\\\\');% add '\' so that '\' are left as characters 4384 % TODO launch command in DOS 4385 case {'GLNX86','GLNXA64','MACI64'} 4386 cmd=['#!/bin/bash \n '... 4387 '#$ -cwd \n '... 4388 'hostname && date \n '... 4389 'umask 002 \n'... 4390 Param.xml.CivmBin ' ' Param.xml.RunTime ' ' regexprep(filename,'(\w+)([/\\])(\w+$)','$1$20_XML$2$3.xml') ' ' Param.OutputFile '.nc'];%allow writting access to created files for user group 4391 end 4385 4392 end 4386 4393
Note: See TracChangeset
for help on using the changeset viewer.