- Timestamp:
- May 20, 2015, 11:21:25 AM (10 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/compile.m
r830 r895 43 43 SubfctPath=['-I ' SubfctPath];%string indicating the option of including the path SubfctPath 44 44 end 45 45 hver=ver('MATLAB'); 46 FctNameVersion=[FctName '_MCRROOT' regexprep(hver.Version,'\.','')];%suppress the dot in version number 46 47 try 47 48 disp(['mcc -m -R -nojvm -R -nodisplay -R -singleCompThread ' SubfctPath ' ' FctName '.m']) 48 49 eval(['mcc -m -R -nojvm -R -nodisplay -R -singleCompThread ' SubfctPath ' ' FctName '.m'])% compile the source file [FctName .m], which produces a binary file FctName and a cmd file [run_' FctName '.sh] 49 50 system(['mv -f ' FctName ' bin/']);%move the binary file FctName to the subdir /bin 50 system(['sed -e ''''s#/' FctName '#/bin/' FctName '#'''' run_' FctName '.sh > ' FctName '.sh']);%modify the cmd file and copy it to [FctName '.sh']51 system(['sed -e ''''s#/' FctName '#/bin/' FctName '#'''' run_' FctName '.sh > ' FctNameVersion '.sh']);%modify the cmd file and copy it to [FctName '.sh'] 51 52 system(['rm run_' FctName '.sh']);% remove the initial cmd file [run_' FctName '.sh] 52 system(['chmod +x ' FctName '.sh']); % set the cmd file to 'executable'53 system(['chmod +x ' FctNameVersion '.sh']); % set the cmd file to 'executable' 53 54 catch ME 54 55 hh=msgbox_uvmat('ERROR',ME.message); -
trunk/src/proj_field.m
r890 r895 1275 1275 [VarVal,ListVarName,VarAttribute,errormsg]=calc_field_interp([coord_X coord_Y],FieldData,CellInfo{icell}.FieldName,XI,YI); 1276 1276 1277 % set to NaN interpolation points which are too far from any initial data (more than 2 CoordMaesh) 1278 F=scatteredInterpolant(coord_X, coord_Y,coord_X,'nearest'); 1279 G=scatteredInterpolant(coord_X, coord_Y,coord_Y,'nearest'); 1277 % set to NaN interpolation points which are too far from any initial data (more than 2 CoordMesh) 1278 if exist('scatteredInterpolant','file')%recent Matlab versions 1279 F=scatteredInterpolant(coord_X, coord_Y,coord_X,'nearest'); 1280 G=scatteredInterpolant(coord_X, coord_Y,coord_Y,'nearest'); 1281 else 1282 F=TriScatteredInterp([coord_X coord_Y],coord_X,'nearest'); 1283 G=TriScatteredInterp([coord_X coord_Y],coord_Y,'nearest'); 1284 end 1280 1285 Distx=F(XI,YI)-XI;% diff of x coordinates with the nearest measurement point 1281 1286 Disty=G(XI,YI)-YI;% diff of y coordinates with the nearest measurement point … … 1319 1324 [DataOut,VarAttribute,errormsg]=calc_field_tps(Coord,NbCentres,SubRange,FieldVar,CellInfo{icell}.FieldName,cat(3,XI,YI)); 1320 1325 1321 % set to NaN interpolation points which are too far from any initial data (more than 2 CoordMaesh) 1322 F=scatteredInterpolant(coord_X, coord_Y,coord_X,'nearest'); 1323 G=scatteredInterpolant(coord_X, coord_Y,coord_Y,'nearest'); 1324 Distx=F(XI,YI)-XI;% diff of x coordinates with the nearest measurement point 1325 Disty=G(XI,YI)-YI;% diff of y coordinates with the nearest measurement point 1326 Dist=Distx.*Distx+Disty.*Disty; 1327 for ivar=1:numel(VarVal) 1328 VarVal{ivar}(Dist>2*ProjData.CoordMesh)=NaN;% put to NaN interpolated positions too far from initial data 1329 end 1326 % set to NaN interpolation points which are too far from any initial data (more than 2 CoordMesh) 1327 if exist('scatteredInterpolant','file')%recent Matlab versions 1328 F=scatteredInterpolant(coord_X, coord_Y,coord_X,'nearest'); 1329 G=scatteredInterpolant(coord_X, coord_Y,coord_Y,'nearest'); 1330 else 1331 F=TriScatteredInterp([coord_X coord_Y],coord_X,'nearest'); 1332 G=TriScatteredInterp([coord_X coord_Y],coord_Y,'nearest'); 1333 end 1334 Distx=F(XI,YI)-XI;% diff of x coordinates with the nearest measurement point 1335 Disty=G(XI,YI)-YI;% diff of y coordinates with the nearest measurement point 1336 Dist=Distx.*Distx+Disty.*Disty; 1337 for ivar=1:numel(VarVal) 1338 VarVal{ivar}(Dist>2*ProjData.CoordMesh)=NaN;% put to NaN interpolated positions too far from initial data 1339 end 1340 1330 1341 1331 1342 ListVarName=(fieldnames(DataOut))'; -
trunk/src/series.m
r886 r895 1481 1481 [success,message]=copyfile(fullfile(path_series,'PARAM.xml.default'),xmlfile); 1482 1482 end 1483 RunTime='';1483 % RunTime=''; 1484 1484 if strcmp(ActionExt,'.sh') 1485 1485 if exist(xmlfile,'file') 1486 1486 s=xml2struct(xmlfile); 1487 1487 if strcmp(RunMode,'cluster_oar') && isfield(s,'BatchParam') 1488 if isfield(s.BatchParam,'RunTime')1489 RunTime=s.BatchParam.RunTime;1490 end1488 % if isfield(s.BatchParam,'RunTime') 1489 % RunTime=s.BatchParam.RunTime; 1490 % end 1491 1491 if isfield(s.BatchParam,'NbCore') 1492 1492 NbCore=s.BatchParam.NbCore; 1493 1493 end 1494 1494 elseif (strcmp(RunMode,'background')||strcmp(RunMode,'local')) && isfield(s,'RunParam') 1495 if isfield(s.RunParam,'RunTime')1496 RunTime=s.RunParam.RunTime;1497 end1495 % if isfield(s.RunParam,'RunTime') 1496 % RunTime=s.RunParam.RunTime; 1497 % end 1498 1498 if isfield(s.RunParam,'NbCore') 1499 1499 NbCore=s.RunParam.NbCore; … … 1501 1501 end 1502 1502 end 1503 if isempty(RunTime) && strcmp(RunMode,'cluster_oar')1504 errormsg='RunTime name not found in PARAM.xml, compiled version .sh cannot run on cluster';1505 return1506 end1503 % if isempty(RunTime) && strcmp(RunMode,'cluster_oar') 1504 % errormsg='RunTime name not found in PARAM.xml, compiled version .sh cannot run on cluster'; 1505 % return 1506 % end 1507 1507 end 1508 1508 … … 1515 1515 set(handles.series,'Pointer','watch') % set the mouse pointer to 'watch' 1516 1516 set(handles.ActionExt,'BackgroundColor',[1 1 0]) 1517 ActionFullName=fullfile(get(handles.ActionPath,'String'),[ActionName '.sh']); 1517 hver=ver('MATLAB'); 1518 MCRROOT=['MCRROOT' regexprep(hver.Version,'\.','')];%suppress the dot in version number 1519 RunTime = getenv(MCRROOT); 1520 ActionNameVersion=[ActionName '_' MCRROOT]; 1521 ActionFullName=fullfile(get(handles.ActionPath,'String'),[ActionNameVersion '.sh']); 1518 1522 if ~exist(ActionFullName,'file') 1519 1523 answer=msgbox_uvmat('INPUT_Y-N','compiled version has not been created: compile now?'); … … 1531 1535 end 1532 1536 else 1533 sh_file_info=dir(fullfile(get(handles.ActionPath,'String'),[ActionName '.sh']));1537 sh_file_info=dir(fullfile(get(handles.ActionPath,'String'),[ActionNameVersion '.sh'])); 1534 1538 m_file_info=dir(fullfile(get(handles.ActionPath,'String'),[ActionName '.m'])); 1535 1539 if isfield(m_file_info,'datenum') && m_file_info.datenum>sh_file_info.datenum 1536 1540 set(handles.ActionExt,'BackgroundColor',[1 1 0]) 1537 1541 drawnow 1538 answer=msgbox_uvmat('INPUT_Y-N',[ActionName '.sh needs to be updated: recompile now?']);1542 answer=msgbox_uvmat('INPUT_Y-N',[ActionNameVersion '.sh needs to be updated: recompile now?']); 1539 1543 if strcmp(answer,'Yes') 1540 1544 path_uvmat=fileparts(which('series')); -
trunk/src/series/civ_series.m
r894 r895 324 324 %%%%% MAIN LOOP %%%%%% 325 325 maskname='';% initiate the mask name 326 t start=tic;326 tic; 327 327 for ifield=1:NbField 328 328 if ~isempty(RUNHandle)% update the waitbar in interactive mode with GUI series (checkrun=1)
Note: See TracChangeset
for help on using the changeset viewer.