Changes

Jump to navigation Jump to search
8 bytes added ,  16:21, 11 September 2013
m
Line 78: Line 78:  
=== The Problem and the Code ===
 
=== The Problem and the Code ===
 
Consider the following simple, well-suited job for a cluster: independent Monte Carlo calculations of π. The following R-program implements random sampling of points withing a square bounding a circle. (The probability of landing inside the circle can be shown to be π/4)
 
Consider the following simple, well-suited job for a cluster: independent Monte Carlo calculations of π. The following R-program implements random sampling of points withing a square bounding a circle. (The probability of landing inside the circle can be shown to be π/4)
<pre>#!/usr/local/bin/Rscript
+
<pre>#!/home/statsadmin/R/bin/Rscript
    
# Prepare: collect command line arguments,
 
# Prepare: collect command line arguments,
191

edits

Navigation menu