The GLMSELECT Procedure |
Parallel BY-Group Computation |
The BY-group processing in PROC GLMSELECT is multithreaded, enabling parallel processing of BY groups when more than one processor is available. Before effect selection begins, PROC GLMSELECT preprocesses the entire input data set and writes the preprocessed data to one or more utility files. When you specify BY-group processing and there are multiple CPUs available, one utility file is created for each processor and each BY group is assigned to one of these utility files. Once this preprocessing phase is complete, each utility file is read and all the BY groups it contains are processed in a dedicated thread. Finally, once model selection has been completed for each thread, then the results are displayed sequentially from a single thread.
You can control the use of threading in PROC GLMSELECT and other multithreaded procedures by using the SAS system options THREADS | NOTHREADS and CPUCOUNT=. You can override these SAS system options by specifying THREADS | NOTHREADS and CPUCOUNT= in the PERFORMANCE statement. Note that if NOTHREADS is in effect, or CPUCOUNT=1, or no BY processing is used, then PROC GLMSELECT will use singly threaded code. If BY groups are to be processed in multiple threads, then the memory required is proportional to the number of threads used. PROC GLMSELECT tries to predict how much memory is required for model selection and reduces the number of threads it uses if there is insufficient memory for simultaneously processing more threads. You can find out the number of threads actually used by PROC GLMSELECT in the "Performance Settings" table that you request by using the DETAILS option in the PERFORMANCE statement.
The speedup you will obtain processing BY groups in parallel depends on several factors. First, if the time required to perform model selection on each BY group is small, then the multithreading overhead might negate any gains obtained by parallel processing. Another limiting factor is the I/O speed. When PROC GLMSELECT builds crossproduct matrices incrementally (see the section Building the SSCP Matrix), data in each BY group are read multiple times. If there is insufficient I/O bandwidth, then the parallel processing can stall as CPUs wait on I/O. Optimal results will be obtained if each of the utility files used by PROC GLMSELECT is assigned to its own I/O controller. The locations of utility files can be controlled by using the SAS system option UTILLOC, which must be specified when SAS is invoked. For information about the UTILLOC option and additional information about parallel processing in SAS, see the chapter "Support for Parallel Processing" in SAS Language Reference: Concepts.
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.