randompieof section 5.2.7 does not check for the correctness of the parameter passed on the command line. It does not check if anything is passed on the command line to begin with. Try running this program without passing the value of
epsilonon the command line and see what happens.
randompieso that process of rank zero checks the command line for any parameters, then checks if the parameters are correct, then sends the OK message to other processes if it has found the value of there. Otherwise process rank zero should write an error message on standard error and send a termination message to other processes that would make them go directly to
TOTAL. Observe that the accuracy of does not improve beyond a certain
TOTALnumber of sand grains used in the computation. Why?