Commit f0781ee1 authored by Christian Brabetz's avatar Christian Brabetz
Browse files

parallel and progmon disabled everywhere.

parent 0baeb583
...@@ -11,6 +11,7 @@ function varargout = RCF_energyloss_GUI_2016(varargin) ...@@ -11,6 +11,7 @@ function varargout = RCF_energyloss_GUI_2016(varargin)
% %
% Copyright: January 2013 % Copyright: January 2013
% Update: 27. April 2016, CB, RCF config as plain text output ... % Update: 27. April 2016, CB, RCF config as plain text output ...
% Update: 02. September 2019, CB, progress Monitor off, Ver 2.2
% Begin initialization code - DO NOT EDIT % Begin initialization code - DO NOT EDIT
gui_Singleton = 1; gui_Singleton = 1;
...@@ -50,7 +51,7 @@ closeit=0; ...@@ -50,7 +51,7 @@ closeit=0;
%define a version number here: %define a version number here:
%give program version to handles => can be found in file later %give program version to handles => can be found in file later
handles.progversion='2.1'; handles.progversion='2.2';
%set per default to protons %set per default to protons
handles.parameters.ionspecies='protons'; handles.parameters.ionspecies='protons';
...@@ -64,9 +65,9 @@ handles.parameters.MC_parts=handles.MC_parts; ...@@ -64,9 +65,9 @@ handles.parameters.MC_parts=handles.MC_parts;
% parallel switched off! CB 02.11.2017 % parallel switched off! CB 02.11.2017
%v = ver; %v = ver;
%if any(strcmp('Parallel Computing Toolbox', {v.Name})) %if any(strcmp('Parallel Computing Toolbox', {v.Name}))
% handles.parallel = 1; % handles.parallel = true;
%else %else
handles.parallel = 0; handles.parallel = false;
%end %end
%give warning and introduction abount missing mex-file %give warning and introduction abount missing mex-file
...@@ -89,28 +90,28 @@ else ...@@ -89,28 +90,28 @@ else
if handles.parallel if handles.parallel
% parallel toolbox ... % parallel toolbox ...
% start parallel workers; enable processbar java % start parallel workers; enable processbar java
isOpen = parpool('size') > 0; isOpen = parpool('size') > 0;
if isOpen == 1 if isOpen == 1
wb=waitbar(0,'Initializing parallel environment...please be patient...'); wb=waitbar(0,'Initializing parallel environment...please be patient...');
waitbar(0.3); waitbar(0.3);
parpool close force; parpool close force;
waitbar(0.6); waitbar(0.6);
parpool open; parpool open;
waitbar(0.9); waitbar(0.9);
pctRunOnAll javaaddpath java; pctRunOnAll javaaddpath java;
waitbar(1); waitbar(1);
close(wb); close(wb);
else else
wb=waitbar(0,'Initializing parallel environment...please be patient...'); wb=waitbar(0,'Initializing parallel environment...please be patient...');
waitbar(0.6); waitbar(0.6);
parpool open; parpool open;
waitbar(0.9); waitbar(0.9);
pctRunOnAll javaaddpath java; pctRunOnAll javaaddpath java;
waitbar(1); waitbar(1);
close(wb); close(wb);
end end
else else
handles.parallel = 0; handles.parallel = false;
end end
% Update handles structure % Update handles structure
guidata(hObject, handles); guidata(hObject, handles);
...@@ -122,8 +123,6 @@ if ~exist('data', 'dir') ...@@ -122,8 +123,6 @@ if ~exist('data', 'dir')
mkdir('data') mkdir('data')
end end
set(handles.shotfilename_edit,'String', 'new'); set(handles.shotfilename_edit,'String', 'new');
set(handles.rcfconfig_edit,'String', 'H2;'); set(handles.rcfconfig_edit,'String', 'H2;');
handles.parameters.shotfilename = get(handles.shotfilename_edit,'String'); handles.parameters.shotfilename = get(handles.shotfilename_edit,'String');
...@@ -153,8 +152,6 @@ function varargout = RCF_energyloss_GUI_2016_OutputFcn(hObject, eventdata, handl ...@@ -153,8 +152,6 @@ function varargout = RCF_energyloss_GUI_2016_OutputFcn(hObject, eventdata, handl
% eventdata reserved - to be defined in a future version of MATLAB % eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA) % handles structure with handles and user data (see GUIDATA)
function emin_edit_Callback(hObject, eventdata, handles) function emin_edit_Callback(hObject, eventdata, handles)
% hObject handle to emin_edit (see GCBO) % hObject handle to emin_edit (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB % eventdata reserved - to be defined in a future version of MATLAB
...@@ -371,12 +368,13 @@ try ...@@ -371,12 +368,13 @@ try
clear val ind X Y stoppingECR stoppingE; clear val ind X Y stoppingECR stoppingE;
v = ver; % parallel out
if any(strcmp('Parallel Computing Toolbox', {v.Name})) % v = ver;
handles.parallel = 1; % if any(strcmp('Parallel Computing Toolbox', {v.Name}))
else % handles.parallel = true;
handles.parallel = 0; % else
end handles.parallel = false;
% end
% Update handles structure % Update handles structure
guidata(hObject, handles); guidata(hObject, handles);
...@@ -724,7 +722,7 @@ end ...@@ -724,7 +722,7 @@ end
MCparticles=handles.parameters.MC_parts; MCparticles=handles.parameters.MC_parts;
if handles.parallel==0 if ~handles.parallel
%if not parallel - print energy-progress into GUI; use for %if not parallel - print energy-progress into GUI; use for
for k=1:index for k=1:index
v=zeros(4,index2); v=zeros(4,index2);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment