You can download the source files used in this tutorial from the Download area of the Oracle Solaris Studio developer portal.
After you download and unpack the sample files, you can find the samples in the SolarisStudioSampleApplications/ThreadAnalyzer directory. The samples are located in the prime_omp and prime_pthr subdirectories. Each sample directory includes a Makefile and a DEMO file of instructions, but this tutorial does not follow those instructions or use the Makefile. Instead, you are instructed to execute commands individually.
To follow the tutorial, you can copy the prime_omp.c and prime_pthr.c files from the samples directories to a different directory, or you can create your own files and copy the code from the following code listings.