Our main instructional machine, Rohan is a SunFire 4800 running Solaris 8 at San Diego State University, with 8 CPUs.
Chap 3: SPARC Optimization and Parallel Processing from Sun Docs
You must add /opt/SUNWhpc/HPC5.0/bin to your path and /opt/SUNWhpc/HPC5.0/man to your MANPATH.
Sun provides some introductory codes, with Makefile, to demonstrate how to write MPI:
You will also want to examine the source code for the Fortran, C and C++ sample codes. Until you update your MANPATH, you can use the following commands to access more information on the needed software, so you can use:
An even simpler starting example would be a "hello world" example I obtained from a workshop I attend at the San Diego Supercomputer. Below you have the samples code and its execution on Rohan. Obtain you own copies from the instructor's account:
Using the template example from our text, in Chapter 11 : Programming Shared-Memory Multiprocessors (p. 223), we can example the following run-time information (with timings) from a student account masc0155. From the top command, you see the job running, with the number of threads from autoparallelizing. At the end of each file, you see the /bin/time timing results, revealing that the real time (wall clock time) is reduced when more threads are running. You also see that the user time grows, since the user is charged for the amount of time used on each processor. The final case with 8 threads is very costly, probably due to thrashing by the operating systems. Recall, Rohan has a total of 8 CPUs.