This is a static copy of a profile reportHome
read_arc>whichHost (1 call, 0.011 sec)
Generated 05-Aug-2011 13:00:29 using cpu time.
subfunction in file /home/LeechJ/cbass_analysis/reduc/read_arc.m
Copy to new window for comparing multiple runs
Parents (calling functions)
Function Name | Function Type | Calls |
read_arc | function | 1 |
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
148 | [s w] = unix('hostname'); | 1 | 0.011 s | 100.0% |  |
240 | return; | 1 | 0 s | 0% |  |
235 | if(isnan(hostNum)) | 1 | 0 s | 0% |  |
231 | end ... | 1 | 0 s | 0% |  |
230 | defaultReader = '/home/LeechJ... | 1 | 0 s | 0% |  |
All other lines | | | 0 s | 0% |  |
Totals | | | 0.011 s | 100% | |
Children (called functions)
No childrenCode Analyzer results
Line number | Message |
148 | The value assigned here to 's' appears to be unused. Consider replacing it by ~. |
237 | This statement (and possibly following ones) cannot be reached. |
Coverage results
[ Show coverage for parent directory ]
Total lines in function | 107 |
Non-code lines (comments, blank lines) | 37 |
Code lines (lines that can run) | 70 |
Code lines that did run | 27 |
Code lines that did not run | 43 |
Coverage (did run/can run) | 38.57 % |
Function listing
time calls line
134 function [defaultDataDir defaultCalfile defaultReader] = whichHost()
135
136 % Here we want to have the function know which directory to look for the
137 % data depending on the machine name.
138 % For simplicity, we assign numbers to each hostname as follows:
139 % 0 - cbasscontrol (OVRO)
140 % 1 - haggis (CALTECH)
141 % 2 - falcon (MANCHESTER)
142 % 3 - aslx10 (OXFORD)
143 % 4 - asosx48 (OXFORD)
144 % 5 - asosx39 (OXFORD)
145 % 6 - aslx2 (OXFORD)
146 % 7 - pravda (Oliver)
147
0.01 1 148 [s w] = unix('hostname');
149
1 150 hostNum = nan;
151
152 % check for cbasscontrol
1 153 host = strfind(w, 'cbasscontrol');
1 154 if(~isempty(host))
155 hostNum = 0;
156 defaultDataDir = '/mnt/data/cbass/arc';
157 defaultCalfile = '/home/cbass/gcpCbass/control/conf/cbass/cal';
158 defaultReader = '/home/cbass/gcpCbass/matlab/common/';
159 end
160
161 % check for haggis
1 162 host = strfind(w, 'haggis');
1 163 if(~isempty(host))
164 hostNum = 1;
165 defaultDataDir = '/scr/cbassarc/data/arc';
166 defaultCalfile = '/home/cbassuser/cbass/gcpCbass/control/conf/cbass/cal';
167 defaultReader = '/home/cbassuser/cbass/gcpCbass/matlab/common/';
168 end
169
170 % check for falcon
1 171 host = strfind(w, 'falcon');
1 172 if(~isempty(host))
173 hostNum = 2;
174 defaultDataDir = '/scratch/falcon_4/cdickins/cbass/cbassarc/data/arc';
175 defaultCalfile = '/home/muchovej/cbass/gcpCbass/control/conf/cbass/cal';
176 defaultReader = '/home/muchovej/cbass/gcpCbass/matlab/common/';
177 end
178
179 % check for aslx
1 180 host = strfind(w, 'aslx10');
1 181 if(~isempty(host))
182 hostNum = 3;
183 defaultDataDir = '/data/cbassuser/data/arc';
184 defaultCalfile = '/home/Muchovej/cbass/gcpCbass/control/conf/cbass/cal';
185 defaultReader = '/home/Muchovej/cbass/gcpCbass/matlab/common/';
186 end
187
188 % check for asosx48
1 189 host = strfind(w, 'asosx48');
1 190 if(~isempty(host))
191 hostNum = 4;
192 defaultDataDir = '/Volumes/Data2/CBASS_ARC';
193 %defaultDataDir = '/Volumes/C-BASS-1';
194 %defaultDataDir = '/Volumes/C-BASS/data';
195
196 defaultCalfile = '/Users/taylorA/CBASS/cbass/gcpCbass/control/conf/cbass/cal';
197 defaultReader = '/Users/taylorA/CBASS/cbass/gcpCbass/matlab/common/';
198 end
199
200 % check for pravda
1 201 host = strfind(w, 'pravda');
1 202 if(~isempty(host))
203 hostNum = 7;
204 defaultDataDir = '/Volumes/DATA/cbass/arc';
205 defaultCalfile = '/Users/oliver/C-BASS/software/cbass/gcpCbass/control/conf/cbass/cal';
206 defaultReader = '/Users/oliver/C-BASS/software/cbass/gcpCbass/matlab/common/';
207 end
208
1 209 host = strfind(w, 'asosx39');
1 210 if(~isempty(host))
211 hostNum = 5;
212 defaultDataDir = '/Volumes/My Book/zuntz/cbass/arc';
213 defaultCalfile = '/Users/zuntz/src/cbass/cbass/gcpCbass/control/conf/cbass/cal';
214 defaultReader = '/Users/zuntz/src/cbass/cbass/gcpCbass/matlab/common/';
215 end
216
1 217 host = strfind(w, 'aslx2');
1 218 if(~isempty(host))
219 hostNum = 6;
220 defaultDataDir = '/home/jxl/cbass_data/arc';
221 defaultCalfile = '/home/jxl/cbass/gcpCbass/control/conf/cbass/cal';
222 defaultReader = '/home/jxl/cbass/gcpCbass/matlab/common/';
223 end
224
1 225 host = strfind(w, 'aslx5');
1 226 if(~isempty(host))
1 227 hostNum = 7;
1 228 defaultDataDir = '/home/LeechJ/cbass_data/arc';
1 229 defaultCalfile = '/home/LeechJ/cbass/gcpCbass/control/conf/cbass/cal';
1 230 defaultReader = '/home/LeechJ/cbass/gcpCbass/matlab/common/';
1 231 end
232
233
234
1 235 if(isnan(hostNum))
236 error('Can not match your host name to a recognized one');
237 error('Update read_arc.m to reflect your host');
238 end
239
1 240 return;
Other subfunctions in this file are not included in this listing.