# cat numCPU.c #include <errno.h> #include <stdio.h> #include <stdlib.h> #include <sys/mpctl.h> main(argc,argv) int argc; char *argv[]; { spu_t new_processor; printf("Number of locality domains = %d\n", mpctl(MPC_GETNUMLDOMS_SYS,0,0)); printf("Number of processors = %d\n",mpctl(MPC_GETNUMSPUS_SYS,0,0)); } # # make numCPU cc -O numCPU.c -o numCPU (Bundled) cc: warning 480: The -O option is available only with the C/ANSI C product; ignored. /usr/ccs/bin/ld: (Warning) At least one PA 2.0 object file (numCPU.o) was detected. The linked output may not run on a PA 1.x system. # ./numCPU Number of locality domains = 1 Number of processors = 4 #