Back to the main page.

Bug 2417 - Numerical Precision difference in MATLAB interactive session and qsub

Reported 2013-12-10 12:25:00 +0100
Modified 2013-12-10 13:12:20 +0100
Product: FieldTrip
Component: qsub
Version: unspecified
Hardware: Other
Operating System: Linux
Importance: P3 minor
Assigned to: Robert Oostenveld
Depends on:
See also:

Tim van Mourik - 2013-12-10 12:25:43 +0100

Created attachment 572 The script in which the problem is highlighted I encountered this problem using the matlab function butter.m, but it is probably not restricted to this function alone. The input of the upper cut-off frequency should be smaller than 1 (not equal). Now there seems to be a slight change in numerical precision when a job is executed by means of qsubfeval: where feval (or cellfun) run normally, qsubfeval (or qsubcellfun) crash in the same computation. Qsub gives the error that the input is equal to or larger than 1. Attached a script that highlights the problem, including the output it gives when I run it. I stopped the script in debug mode at line 415 "[status, result] = system(cmdline);" of qsubfeval. At this point executing "qsubexec(jobid);" (line 421) works fine, though executing line 415 gives the above error message. Best wishes, Tim van Mourik

Robert Oostenveld - 2013-12-10 12:32:37 +0100

I can reproduce the error on mentat with matlab2013a >> [a, b] = cellfun(@butter, {filterOrder}, {Wn}, 'UniformOutput', false); >> a a = [1x9 double] >> b b = [1x8 double] >> [c, d] = qsubcellfun(@butter, {filterOrder}, {Wn}, 'timreq', 0, 'memreq', 0); submitting job roboos_dccn_c014_p31626_b1_j001... qstat job id job roboos_dccn_c014_p31626_b1_j001 returned, it required NaN seconds and NaN GB %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % an error was detected inside MATLAB, the diary output of the remote execution follows %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Error using ==> butter at 41 The cutoff frequencies must be within the interval of (0,1). Error in butter (line 41) if ~isempty(errStr), error(generatemsgid('SigErr'),errStr); end Error in fexec (line 154) [argout{:}] = feval(fname, argin{:}); Error in qsubexec (line 89) [argout, optout] = fexec(argin, optin);

Robert Oostenveld - 2013-12-10 13:06:30 +0100

(In reply to comment #1) that is interesting, I went out for lunch, came back, started a new matlab on the cluster and now get TR = 1.680; filterLow = 0.008; filterHigh = 1 / ( 2 * TR); %Nyquist, i.e. no low-pass samplingRate = 1 / TR; filterOrder = 4; Wn = [filterLow, filterHigh] * 2 / samplingRate; [a, b] = cellfun(@butter, {filterOrder}, {Wn}, 'UniformOutput', false); Error using butter (line 57) The cutoff frequencies must be within the interval of (0,1). So already at the first instance it fails. This suggests that it has to do with the particular computer on which it is executed. So on dccn-c014 it fails....

Robert Oostenveld - 2013-12-10 13:12:20 +0100

(In reply to comment #2) the cluster is too busy right now to try different types of machines.