| 1 |
cslavePI R function to use external C program cslavePI. |
| 2 |
Copy cslavePI.c in Rmpi library directory to your |
| 3 |
working directory and compile as "mpicc -o |
| 4 |
cslavePI cslavePI.c" |
| 5 |
masterslavePI R script to compute PI=4*\int_0^1 1/(1+x^2) dx. |
| 6 |
simPI Use Monto Carlo simulation to compute PI (with plot). |
| 7 |
Use simPI to run the program. Run mpi.setup.rngstream |
| 8 |
to setup a parallel RNG. |
| 9 |
simplePI R function to compute PI using slavedaemon.R. |
| 10 |
slave1PI R functions to compute PI using slavedaemon.R (load |
| 11 |
balancing with a server and workers). Use master1PI to |
| 12 |
run the program. |
| 13 |
slave2PI R functions to compute PI using slavedaemon.R (load |
| 14 |
balancing with workers only). Use master2PI to run the |
| 15 |
program. |