Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
phelix
RCF
rcf_energyloss_gui
Commits
f0781ee1
Commit
f0781ee1
authored
Sep 02, 2019
by
Christian Brabetz
Browse files
parallel and progmon disabled everywhere.
parent
0baeb583
Changes
1
Hide whitespace changes
Inline
Side-by-side
RCF_energyloss_GUI_2016.m
View file @
f0781ee1
...
...
@@ -11,6 +11,7 @@ function varargout = RCF_energyloss_GUI_2016(varargin)
%
% Copyright: January 2013
% 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
gui_Singleton
=
1
;
...
...
@@ -50,7 +51,7 @@ closeit=0;
%define a version number here:
%give program version to handles => can be found in file later
handles
.
progversion
=
'2.
1
'
;
handles
.
progversion
=
'2.
2
'
;
%set per default to protons
handles
.
parameters
.
ionspecies
=
'protons'
;
...
...
@@ -64,9 +65,9 @@ handles.parameters.MC_parts=handles.MC_parts;
% parallel switched off! CB 02.11.2017
%v = ver;
%if any(strcmp('Parallel Computing Toolbox', {v.Name}))
% handles.parallel =
1
;
% handles.parallel =
true
;
%else
handles
.
parallel
=
0
;
handles
.
parallel
=
false
;
%end
%give warning and introduction abount missing mex-file
...
...
@@ -89,28 +90,28 @@ else
if
handles
.
parallel
% parallel toolbox ...
% start parallel workers; enable processbar java
isOpen
=
parpool
(
'size'
)
>
0
;
if
isOpen
==
1
wb
=
waitbar
(
0
,
'Initializing parallel environment...please be patient...'
);
waitbar
(
0.3
);
parpool
close
force
;
waitbar
(
0.6
);
parpool
open
;
waitbar
(
0.9
);
pctRunOnAll
javaaddpath
java
;
waitbar
(
1
);
close
(
wb
);
else
wb
=
waitbar
(
0
,
'Initializing parallel environment...please be patient...'
);
waitbar
(
0.6
);
parpool
open
;
waitbar
(
0.9
);
pctRunOnAll
javaaddpath
java
;
waitbar
(
1
);
close
(
wb
);
end
isOpen
=
parpool
(
'size'
)
>
0
;
if
isOpen
==
1
wb
=
waitbar
(
0
,
'Initializing parallel environment...please be patient...'
);
waitbar
(
0.3
);
parpool
close
force
;
waitbar
(
0.6
);
parpool
open
;
waitbar
(
0.9
);
pctRunOnAll
javaaddpath
java
;
waitbar
(
1
);
close
(
wb
);
else
wb
=
waitbar
(
0
,
'Initializing parallel environment...please be patient...'
);
waitbar
(
0.6
);
parpool
open
;
waitbar
(
0.9
);
pctRunOnAll
javaaddpath
java
;
waitbar
(
1
);
close
(
wb
);
end
else
handles
.
parallel
=
0
;
handles
.
parallel
=
false
;
end
% Update handles structure
guidata
(
hObject
,
handles
);
...
...
@@ -122,8 +123,6 @@ if ~exist('data', 'dir')
mkdir
(
'data'
)
end
set
(
handles
.
shotfilename_edit
,
'String'
,
'new'
);
set
(
handles
.
rcfconfig_edit
,
'String'
,
'H2;'
);
handles
.
parameters
.
shotfilename
=
get
(
handles
.
shotfilename_edit
,
'String'
);
...
...
@@ -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
% handles structure with handles and user data (see GUIDATA)
function
emin_edit_Callback
(
hObject
,
eventdata
,
handles
)
% hObject handle to emin_edit (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
...
...
@@ -371,12 +368,13 @@ try
clear
val
ind
X
Y
stoppingECR
stoppingE
;
v
=
ver
;
if
any
(
strcmp
(
'Parallel Computing Toolbox'
,
{
v
.
Name
}))
handles
.
parallel
=
1
;
else
handles
.
parallel
=
0
;
end
% parallel out
% v = ver;
% if any(strcmp('Parallel Computing Toolbox', {v.Name}))
% handles.parallel = true;
% else
handles
.
parallel
=
false
;
% end
% Update handles structure
guidata
(
hObject
,
handles
);
...
...
@@ -724,7 +722,7 @@ end
MCparticles
=
handles
.
parameters
.
MC_parts
;
if
handles
.
parallel
==
0
if
~
handles
.
parallel
%if not parallel - print energy-progress into GUI; use for
for
k
=
1
:
index
v
=
zeros
(
4
,
index2
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment