Dear Michael,
I have posted MPI_Iprobe.cc and MPI_Probe.cc with info as last flag.
Please let me know if it helps in building other examples.
For the comunicator issue I am thinking on passing a simple string as 
alternative comunicator and if nothing is provided by the user then 
MPI_COMM_WORLD is the default value.
Thanks and bests
Riccardo

--- Sab 21/11/09, Michael Creel <michael.cr...@uab.es> ha scritto:

Da: Michael Creel <michael.cr...@uab.es>
Oggetto: Monte Carlo example for new MPI bindings
A: "Riccardo Corradini" <riccardocorrad...@yahoo.it>, "Jaroslav Hajek" 
<high...@gmail.com>, "octave-forge list" <octave-dev@lists.sourceforge.net>
Data: Sabato 21 novembre 2009, 14:14

Hello all,
Attached are two files, montecarlo.m and mc_example.m that implement parallel 
Monte Carlo simulation of a user defined function. The function just needs to 
return a row vector, and montecarlo.m will stack the replications into a 
matrix. This implementation is basic and illustrative. At 
http://pareto.uab.es/mcreel/Econometrics/MyOctaveFiles/Econometrics/MonteCarlo/ 
and http://pareto.uab.es/mcreel/Econometrics/Examples/Parallel/montecarlo/ 
there is a more sophisticated version that uses MPITB. 


The basic version is susceptible to the crash of a node, and will not balance 
the load between nodes of different speed. To implement that, MPI_Iprobe would 
be needed.

To use it, doe something like

mich...@tuolumne:~/Desktop/openmpi_ext/src$ mpirun -np 2 octave -q --eval 
mc_example

Sending block to 0
I have sent  4
I have sent  15
I have sent  2
   1.00000   0.96457   1.23784
   1.00000   1.20805   1.19109
   1.00000   1.21014   1.15861
   1.00000   0.93194   0.83522
   1.00000   0.73157   1.36160

   0.00000   1.07361   0.96141
   0.00000   1.32715   1.06895
   0.00000   0.73529   0.94909
   0.00000   1.24376   1.02082
   0.00000   1.05802   1.20701
mich...@tuolumne:~/Desktop/openmpi_ext/src$



In that, the first column is the MPI rank of the node that generated the rest 
of the row, which is the output of the function that is being simulated..

Cheers, Michael




      
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Octave-dev mailing list
Octave-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to