Date: Thu, 15 Dec 2011 16:59:17 -0600
Reply-To: "Data _null_;" <iebupdte@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Data _null_;" <iebupdte@GMAIL.COM>
Subject: Re: SAS 9.2 performance (SAS/IML)
In-Reply-To: <201112152253.pBFHhLjS013904@waikiki.cc.uga.edu>
Content-Type: text/plain; charset=ISO-8859-1
I would retest but remove SYMSIZE and WORKSIZE so that they user the
defaults associated with the specific version.
proc iml symsize=20000 worksize=200000
Or perhaps better run with various value for these options.
On Thu, Dec 15, 2011 at 4:53 PM, Jesper Sahner Pedersen
<jespersahner@hotmail.com> wrote:
> Hi,
>
> Consider the SAS/IML-program below. The program is run in 3 different SAS-
> sessions with the following results:
> 1. SAS 9.1/32-bit: 100 (performance-index)
> 2. SAS 9.2/32-bit: 150
> 3. SAS 9.2/64-bit: 500
> (SAS 9.1/32-bit and SAS 9.2/32-bit is run on the same physical machine)
>
> I am surprised that SAS 9.2 is so much slower than SAS 9.1, and the SAS
> 9.2/64-bit performance just seems very strange.
>
> Anyone with the same experience and maybe a possible explanation?
>
> Regards,
> Jesper
> __________________
> SAS/IML-program:
> %MACRO IML;
>
> %global MAXALDER;
> %let H=0.1;
> %let MAXALDER=120;
>
> proc iml symsize=20000 worksize=200000;
>
> %local _forste;
> %let _forste=1;
>
> %MACRO RK(funk,k,t0,t20,y0,h,tmax,res);
>
> %if &_forste=1 %then %do;
> %let _forste=0;
>
> start rk(k,t0,t20,y0,h,tmax,z);
> k1=0#y0;
> k2=k1;
> k3=k1;
> k4=k1;
> y=y0;
> z=y;
> IMAT=1+0#y;
> _qw1=shape(1:nrow(y),ncol(y),nrow(y))`;
> _qw2=shape(1:ncol(y),nrow(y),ncol(y));
> qw0=t0#IMAT;
> qw1=_qw1;
> qw2=_qw2;
> do s=1 to (tmax-t0)/h;
> t=t0+s*h;
> run &FUNK(k,t0,t20,t,y,funky);
> k1=h#funky;
> run &FUNK(k,t0,t20,t+h/2,y+k1/2,funky);
> k2=h#funky;
> run &FUNK(k,t0,t20,t+h/2,y+k2/2,funky);
> k3=h#funky;
> run &FUNK(k,t0,t20,t+h,y+k3,funky);
> k4=h#funky;
> y=y+(k1+2#(k2+k3)+k4)/6;
> if abs(t-int(t))<1e-5
> then do;
> qw0=qw0||(t#IMAT);
> qw1=qw1||_qw1;
> qw2=qw2||_qw2;
> z=z||y;
> end;
> end;
> z=shape(qw0,nrow(qw0)#ncol(qw0),1)||
> shape(qw1,nrow(qw1)#ncol(qw1),1)||
> shape(qw2,nrow(qw2)#ncol(qw2),1)||
> shape(z,nrow(z)#ncol(z),1);
> finish;
>
> %end;
> %else %do;
> run rk(&K,&T0,&T20,&Y0,&H,&TMAX,&RES);
> %end;
>
> %MEND RK;
>
> start funk1(k,t0,t20,t,y,z);
> if k=1
> then do;
> a1=0.0000843551;
> b1=0.0000148025;
> c1=1.1096620331;
> a2=0.0001572408;
> b2=0.0000068978;
> c2=1.1140190154;
> ai=0.0004;
> bi=0.060;
> ci=4.54;
> end;
> else do;
> a1=0.0001572408;
> b1=0.0000068978;
> c1=1.1140190154;
> a2=0.0000843551;
> b2=0.0000148025;
> c2=1.1096620331;
> ai=0.0006;
> bi=0.060;
> ci=4.71609;
> end;
> my=a1+b1#c1##t;
> my2=a2+b2#c2##(t+t20-t0);
> if t<=80 then myai=ai+10##(ci+bi#t-10);
> else myai=0;
> z1=shape(0,5,5);
> z1[1,2]=my;
> z1[1,3]=my2;
> z1[1,4]=myai;
> z1[2,5]=my2;
> z1[3,5]=my;
> z1[4,2]=my;
> z1[4,3]=my2;
> z3=z1;
> z1=z1-diag(z1[,+]);
> z2=diag({1 1 1 1 1});
> P=y[,{1 2 3 4 5}];
> P1=shape(y[1,{1 2 3 4 5}],5,5)`;
> Pmy=P*z1;
> z=Pmy||(P*z2)||(P1#z3);
> finish;
>
> tilst1=loc(0=1);
> tilst2=loc(0=1);
> t0=loc(0=1);
> t=loc(0=1);
> p=loc(0=1);
> y0=diag({1 1 1 1 1})||shape(0,5,5)||shape(0,5,5);
> %RK(FUNK1,k,s,m,y0,&H,&MAXALDER,res1);
> do k=1 to 2;
> do s=1 to &MAXALDER;
> do m=max(1,s-11) to min(&MAXALDER,s+11);
> %RK(FUNK1,k,s,m,y0,&H,&MAXALDER,res1);
> res2=res1[loc(res1[,4]>0),];
> kon=kon//shape(k,nrow(res2),1);
> tilst1=tilst1//res2[,2];
> tilst2=tilst2//res2[,3];
> t0=t0//shape(s,nrow(res2),1);
> t20=t20//shape(m,nrow(res2),1);
> t=t//res2[,1];
> p=p//res2[,4];
> end;
> end;
> end;
> create ss var {kon tilst1 tilst2 t0 t t20 p};
> append;
>
> quit;
>
> %MEND IML;
>
> %IML;
|