The HPREDUCE Procedure

Example 9.2 Running in Distributed Mode

When a host for distributed computing is specified and the NODES option in the PERFORMANCE statement is specified, PROC HPREDUCE uses the specified host for computing and runs in distributed mode.

 option set=GRIDHOST="&GRIDHOST";
 option set=GRIDINSTALLLOC="&GRIDINSTALLLOC";

 data one;
     array x{10};
     array c{10};
     do i=1 to 2000;
         do j=1 to 10;
             x{j}=ranuni(1);
             c{j}=int(ranuni(1)*4);
         end;
         y=int(ranuni(1)*2);
         output;
     end;
 run;

 proc hpreduce data=one tech=var;
     class c1 c2 c3;
     reduce supervised y = c1-c3 x1-x10/maxsteps=5;
     performance nodes=2;
 run;

To run the preceding example successfully, you need to set the macro variables GRIDHOST and GRIDINSTALLLOC to resolve to appropriate values, or you can replace the references to the macro variables in the example with the appropriate values.

Output 9.2.1 shows the results for PROC HPREDUCE running in distributed mode. Notice that the "Performance Information" table shows that the "Execution mode" is "Distributed."

Output 9.2.1: PROC HPREDUCE Running in Distributed Mode

Performance Information
Host Node<< your grid host >>
Execution ModeDistributed
Number of Compute Nodes2
Number of Threads per Node32