Download presentation
Presentation is loading. Please wait.
Published byDonna Gallagher Modified over 9 years ago
1
Parallel Processing in SAS CPUCOUNT A comparison of Proc Means for the Project
2
THREADS and CPUCOUNT In SAS there is an option to let SAS create THREADS=YES, this allows SAS to start different threads that can be run on different CPUs. SAS also has an option to set the number of available CPUs, for example CPUCOUNT = 2
3
CPUCOUNT = 1 - 8 The times to run the following code on the Project problem 2 were recorded for different CPUCOUNTs proc means data=data01 n mean std maxdec=2; class location; title 'Mean scores for each location'; var M1 - M8; run;
4
Code DM 'LOG;CLEAR;OUT;CLEAR'; OPTIONS THREADS=YES CPUCOUNT=8; options mlogic mprint mtrace symbolgen; data data01; infile 'C:\Documents and Settings\Eric A. Suess\Desktop\Stat6250\data01.txt'; input ID Location M1 M2 M3 M4 M5 M6 M7 M8; run; /* Compute the mean and stdev of the measurement. */ proc means data=data01 n mean std maxdec=2; class location; title 'Mean scores for each location'; var M1 - M8; run; proc sort data=data01; by location; run; proc means data=data01 n mean std maxdec=2; by location; title 'Mean scores for each location'; var M1 - M8; run; /* Create a new data set using the "output" subcommand. */ proc means data=data01 noprint nway; class location; var M1 - M8; output out=locationsum n = n_measurement mean = m_measurement std = s_measurement max = max_measurement min = min_measurement; run; proc print data=locationsum; title 'Listing of data set locationsum'; run; proc contents data=data01 ; run;
5
For CPUCOUNT=7 419 /* Compute the mean and stdev of the measurement. */ 420 proc means data=data01 n mean std maxdec=2; 421 class location; 422 title 'Mean scores for each location'; 423 var M1 - M8; 424 run; NOTE: There were 3000000 observations read from the data set WORK.DATA01. NOTE: PROCEDURE MEANS used (Total process time): real time 1.64 seconds cpu time 3.39 seconds
6
Times CPUsreal timecpu time 15.922.81 22.483.56 32.033.29 41.923.7 51.543.42 61.623.31 71.643.39 81.573.2
7
Graph
8
Question For what CPUCOUNT is there the most gain? After what number of CPUs is there no clear added advantage?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.