|
From: | Fredrik Lingvall |
Subject: | Re: 2.9.14+ hold issue |
Date: | Wed, 26 Sep 2007 20:51:38 +0200 |
User-agent: | Thunderbird 2.0.0.6 (X11/20070804) |
David Bateman wrote:
I have attached a simpler script (testit.m) that triggers the problem on my 4GB (eg., 3.3 GB) core2 (Dell M90). You need about 3GB ram to run this. The problem is however not triggered on an 2 cpu dual core Opteron with 16GB ram. If it works correctly then octave should complain of the variable Ro_orig being undefined and not print: octave 2.9.14+ dont like the line below... error: value on right hand side of assignment is undefined error: evaluating assignment _expression_ near line 31, column 23 error: evaluating if command near line 30, column 3 error: called from `__gnuplot_version__' in file `/usr/local//share/octave/2.9.14+/m/plot/__gnuplot_version__.m' error: evaluating argument list element number 1 error: evaluating static command near line 32, column 5 error: evaluating if command near line 26, column 3 error: called from `__go_draw_axes__' in file `/usr/local//share/octave/2.9.14+/m/plot/__go_draw_axes__.m' error: evaluating switch command near line 54, column 4 error: evaluating for command near line 52, column 2 error: evaluating if command near line 34, column 7 error: evaluating if command near line 27, column 5 error: evaluating if command near line 26, column 3 error: called from `__go_draw_figure__' in file `/usr/local//share/octave/2.9.14+/m/plot/__go_draw_figure__.m' error: evaluating if command near line 74, column 6 error: evaluating if command near line 71, column 4 error: evaluating if command near line 69, column 2 error: evaluating for command near line 68, column 7 error: evaluating if command near line 42, column 5 error: called from `drawnow' in file `/usr/local//share/octave/2.9.14+/m/plot/drawnow.m' error: evaluating if command near line 60, column 5 error: evaluating if command near line 59, column 3 error: called from `figure' in file `/usr/local//share/octave/2.9.14+/m/plot/figure.m' error: near line 131 of file `/root/projects/jasa2007b/trunk/m_files/testit.m' I have octave configured with --enable-64 on both machines (gcc 4.1.2 on the laptop and gcc 4.1.1 on the opteron machine, respectively). CVS octave and gnuplot from 2007-09-26 on both machines. /Fredrik |
%load u_square_16_1000 u = ones(1,16001); global n_cpus; [dummy,tmp_str]= system('cat /proc/cpuinfo | grep model | grep name'); if size(strfind(tmp_str,'model'),2) == 2 n_cpus = 2; elseif size(strfind(tmp_str,'model'),2) == 4 n_cpus = 4; else n_cpus = 1; end fprintf('\n*** Detected a %d cpu system ***\n\n',n_cpus); % % Setup array and sampling grid. % % % Define the array. % % Spacing between array elements. arr_samp = 1.0; % [mm] %arr_samp = 0.5; % [mm] % Transmit. nt = 8; at = 0.9; % [mm] Transmit element size(s). %nt = 16; %at = 0.4; % [mm] Transmit element size(s). xt = arr_samp*(-nt+0.5:nt-0.5); trans = [xt; at*ones(1,2*nt);]; % Receive. nr = 8; ar = 0.9; % [mm] Receive element size(s). %nr = 16; %ar = 0.4; % [mm] Receive element size(s). xr = arr_samp*(-nr+0.5:nr-0.5); rec = [xr; ar*ones(1,2*nr);]; % Number of receive elements. L = size(xr,2); spat_samp = 0.5; spat_samp_z = 0.5; x_max = 15; z_min = 45; z_max = 65; % Horizontal grid. % % Spatial sampling (in mm). x = -x_max:spat_samp:x_max; N = length(x); % % Vertical grid size. % % spat_samp_z = Ts*cp/1e6; % [m]. z = (z_min:spat_samp_z:z_max); M = length(z); % % Observation grid matrix. % [X,Z] = meshgrid(x,z); Y = zeros(size(X)); xo = X(:); yo = Y(:); zo = Z(:); Ro = [xo yo zo]; Lt = L; L_u = 1000; u = u(1:end-1)'; L_u = length(u)/L; Ht = rand(19984,2501); Kt = round(size(Ht,1)/Lt); K = Kt+L_u+Kt-2; P = rand(L*K,size(Ht,2)); fprintf('z_min = %1.1f [mm], z_max = %1.1f [mm]\n',z_min,z_max); fprintf('K = %d, L = %d, M = %d, N = %d.\n',K,L,M,N); fprintf('K*L = %d, M*N = %d.\n',K*L,M*N); Ht_3d = zeros(Kt,size(Ht,2)); for l=1:L Ht_3d(:,:,l) = Ht(Kt*(l-1)+1:l*Kt,:); end corr_img = zeros(1,size(P,2)); m=1451; Ro(m,:) for n=1:size(P,2) corr_img(n) = (P(:,n)'*P(:,m)) / ( sqrt(P(:,n)'*P(:,n)) * sqrt(P(:,m)'*P(:,m)) ); end fprintf('\n'); cm = reshape(corr_img,M,N); %save cm.mat cm x z Ro Ro_orig %clear all %load cm disp('octave 2.9.14+ dont like the line below...'); figure(1); clf; mesh(x,z,cm); figure(2); clf; plot(Ro(:,1),Ro(:,3),'o'); hold plot(Ro_orig(:,1),Ro_orig(:,3),'r*');
[Prev in Thread] | Current Thread | [Next in Thread] |