Changeset 1033 for trunk/src/series.m


Ignore:
Timestamp:
Apr 30, 2018, 8:01:35 PM (3 years ago)
Author:
sommeria
Message:

miscellaneous updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/series.m

    r1030 r1033  
    175175    RunModeList=[RunModeList;{'cluster'}];
    176176    set(handles.MonitorCluster,'Visible','on'); % make visible button for access to Monika
    177     set(handles.num_CPUTime,'Visible','on'); % make visible button for access to Monika
    178     set(handles.CPUTime_txt,'Visible','on'); % make visible button for CPU time estimate for one ref index
     177    set(handles.num_CPUTime,'Visible','on'); % make visible button for CPU time estimate for one ref index
     178    set(handles.num_CPUTime,'String','1')% defqult CPU time estimate 1 minute
     179    set(handles.CPUTime_txt,'Visible','on'); % make visible button for CPU time title
    179180end
    180181% [s,w]=system('qstat -help'); % look for cluster system 'sge'
     
    15691570        NbCoreAdvised=SeriesData.SeriesParam.ClusterParam.NbCoreAdvised;
    15701571        NbCoreMax=SeriesData.SeriesParam.ClusterParam.NbCoreMax;
    1571         if strcmp(ActionExt,'.m')% case of Matlab function (uncompiled)
    1572             warning_string=', preferably use .sh option to save Matlab licences';
     1572        if NbCoreMax~=1
     1573            if strcmp(ActionExt,'.m')% case of Matlab function (uncompiled)
     1574                warning_string=', preferably use .sh option to save Matlab licences';
     1575            else
     1576                warning_string=')';
     1577            end
     1578            answer=msgbox_uvmat('INPUT_TXT',['Number of cores (max ' num2str(NbCoreMax) ', ' warning_string],num2str(NbCoreAdvised));
     1579            if isempty(answer)
     1580                errormsg='Action launch interrupted by user';
     1581                return
     1582            end
     1583            NbCore=str2double(answer);
    15731584        else
    1574             warning_string=')';
    1575         end
    1576         answer=msgbox_uvmat('INPUT_TXT',['Number of cores (max ' num2str(NbCoreMax) ', ' warning_string],num2str(NbCoreAdvised));
    1577         if isempty(answer)
    1578             errormsg='Action launch interrupted by user';
    1579             return
    1580         end
    1581         NbCore=str2double(answer);
    1582 %         extra_oar=answer{2};
    1583 %     case {'cluster_pbs', 'cluster_sge', 'cluster_qstat_unknown'}
    1584 %         if strcmp(ActionExt,'.m')% case of Matlab function (uncompiled)
    1585 %             NbCore=1; % one core used only (limitation of Matlab licences)
    1586 %             answer=msgbox_uvmat('INPUT_Y-N','Number of cores =1: select the compiled version .sh for multi-core processing. Proceed with the .m version?');
    1587 %             if ~strcmp(answer,'Yes')
    1588 %                 errormsg='Action launch interrupted';
    1589 %                 return
    1590 %             end
    1591 %             extra_oar='';
    1592 %         else
    1593 %             answer=inputdlg({'Number of jobs (max 1000)','Queue'},'qsub parameters',1,{'100','piv_debian'});
    1594 %             NbCore=str2double(answer{1});
    1595 %             qstat_Queue=answer{2};
    1596 %             %extra_oar=answer{2}; % TODO : fix this for LMFA cluster. Maybe
    1597 %             %extrs_oar and extra_pbs are not the best names
    1598 %         end
     1585            NbCore=1;
     1586        end
    15991587end
    16001588if ~isfield(Param.IndexRange,'NbSlice')
     
    21572145%------------------------------------------------------------------------
    21582146% --- Executes on selection change in ActionName.
    2159 function ActionName_Callback(hObject, eventdata, handles)
     2147function ActionName_Callback(hObject, ActionPath, handles)
    21602148%------------------------------------------------------------------------
    21612149
     
    21642152    answer= msgbox_uvmat('INPUT_Y-N','stop current Action process?');
    21652153    if strcmp(answer,'Yes')
    2166         STOP_Callback(hObject, eventdata, handles)
     2154        STOP_Callback(hObject, [], handles)
    21672155    else
    21682156        return
     
    21922180%% add a new function to the menu if 'more...' has been selected in the menu ActionName
    21932181if isequal(ActionName,'more...')
     2182    if isempty(ActionPath)
     2183        ActionPath=get(handles.ActionPath,'String');
     2184    end
    21942185    [FileName, PathName] = uigetfile( ...
    21952186        {'*.m', ' (*.m)';
    21962187        '*.m',  '.m files '; ...
    21972188        '*.*', 'All Files (*.*)'}, ...
    2198         'Pick a series processing function ',get(handles.ActionPath,'String'));
     2189        'Pick a series processing function ',ActionPath);
    21992190    if length(FileName)<2
    22002191        return
     
    22812272ActionName= ActionList{get(handles.ActionName,'Value')}; % selected function name
    22822273if ~exist(ActionPath,'dir')
    2283     msgbox_uvmat('ERROR',['The prescribed function path ' ActionPath ' does not exist']);
     2274    ActionName_Callback(handles.ActionName, ActionPath, handles)% update the function
     2275%     msgbox_uvmat('ERROR',['The prescribed function path ' ActionPath ' does not exist']);
    22842276    return
    22852277end
Note: See TracChangeset for help on using the changeset viewer.