Changeset 895 for trunk/src/series.m


Ignore:
Timestamp:
May 20, 2015, 11:21:25 AM (9 years ago)
Author:
sommeria
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/series.m

    r886 r895  
    14811481    [success,message]=copyfile(fullfile(path_series,'PARAM.xml.default'),xmlfile);
    14821482end
    1483 RunTime='';
     1483% RunTime='';
    14841484if strcmp(ActionExt,'.sh')
    14851485    if exist(xmlfile,'file')
    14861486        s=xml2struct(xmlfile);
    14871487        if strcmp(RunMode,'cluster_oar') && isfield(s,'BatchParam')
    1488             if isfield(s.BatchParam,'RunTime')
    1489                 RunTime=s.BatchParam.RunTime;
    1490             end
     1488%             if isfield(s.BatchParam,'RunTime')
     1489%                 RunTime=s.BatchParam.RunTime;
     1490%             end
    14911491            if isfield(s.BatchParam,'NbCore')
    14921492                NbCore=s.BatchParam.NbCore;
    14931493            end
    14941494        elseif (strcmp(RunMode,'background')||strcmp(RunMode,'local')) && isfield(s,'RunParam')
    1495             if isfield(s.RunParam,'RunTime')
    1496                 RunTime=s.RunParam.RunTime;
    1497             end
     1495%             if isfield(s.RunParam,'RunTime')
     1496%                 RunTime=s.RunParam.RunTime;
     1497%             end
    14981498            if isfield(s.RunParam,'NbCore')
    14991499                NbCore=s.RunParam.NbCore;
     
    15011501        end
    15021502    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         return
    1506     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%         return
     1506%     end
    15071507end
    15081508
     
    15151515    set(handles.series,'Pointer','watch') % set the mouse pointer to 'watch'
    15161516    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']);
    15181522    if ~exist(ActionFullName,'file')
    15191523        answer=msgbox_uvmat('INPUT_Y-N','compiled version has not been created: compile now?');
     
    15311535        end       
    15321536    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']));
    15341538        m_file_info=dir(fullfile(get(handles.ActionPath,'String'),[ActionName '.m']));
    15351539        if isfield(m_file_info,'datenum') && m_file_info.datenum>sh_file_info.datenum
    15361540            set(handles.ActionExt,'BackgroundColor',[1 1 0])
    15371541            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?']);
    15391543            if strcmp(answer,'Yes')
    15401544                path_uvmat=fileparts(which('series'));
Note: See TracChangeset for help on using the changeset viewer.