1 # Created by Octave 3.6.1, Fri Apr 27 13:23:25 2012 UTC <root@t61>
13 # name: <cell-element>
17 mpirun -np 5 octave -q --eval "Pi(2E7,'s')"
21 # name: <cell-element>
25 mpirun -np 5 octave -q --eval "Pi(2E7,'s')"
30 # name: <cell-element>
37 # name: <cell-element>
41 the string NEWORLD is just a label could be whatever you want
45 # name: <cell-element>
49 the string NEWORLD is just a label could be whatever you want
54 # name: <cell-element>
61 # name: <cell-element>
65 if you have 4 cores or a network of 4 computers with a ssh connection with no password and same openmpi 1.3.3 installation
66 type at the terminal mpirun -np 4 octave --eval hellocell
70 # name: <cell-element>
74 if you have 4 cores or a network of 4 computers with a ssh connection with no p
78 # name: <cell-element>
85 # name: <cell-element>
89 the string NEWORLD is just a label could be whatever you want
93 # name: <cell-element>
97 the string NEWORLD is just a label could be whatever you want
102 # name: <cell-element>
109 # name: <cell-element>
113 if you have 4 cores or a network of 4 computers with a ssh connection with no password and same openmpi 1.3.3 installation
114 type at the terminal mpirun -np 4 octave --eval hellostruct
118 # name: <cell-element>
122 if you have 4 cores or a network of 4 computers with a ssh connection with no p
126 # name: <cell-element>
133 # name: <cell-element>
137 if you have 4 cores or a network of 4 computers with a ssh connection with no password and same openmpi 1.3.3 installation
138 type at the terminal mpirun -np 4 octave --eval helloworld
142 # name: <cell-element>
146 if you have 4 cores or a network of 4 computers with a ssh connection with no p
150 # name: <cell-element>
157 # name: <cell-element>
163 montecarlo(f, args, reps, outfile, n_pooled, verbose);
166 info = MPI_Finalize()
170 # name: <cell-element>
176 montecarlo(f, args, reps, outfile, n_pooled, verbose);
181 # name: <cell-element>
188 # name: <cell-element>
192 montecarlo.m: generates a specified number of replications of a function's
193 output and writes them to a user-specified output file.
195 USAGE: montecarlo(f,f_args,reps,outfile,n_pooled,n_returns,usempi, verbose)
197 IMPORTANT: f should return a row vector of output from feval(f,f_args)
199 For normal evaluation on one core, only the first 4 arguments are required.
200 * Arg 1: (required) the function that generates a row vector of output
201 * Arg 2: (required) the arguments of the function, in a cell
202 * Arg 3: (required) the number of replications to generate
203 * Arg 4: (required) the output file name
204 * Arg 5 (optional) number of replications to be pooled together between writes
205 * Arg 6 (optional) verbose: 1 for on, 0 for off
207 If using MPI, you should run using ranks equal to number of cores plus 1,
208 and should make sure that the core running the frontend is also the one that
209 has the second rank. That way the core the frontend is on will also do work.
213 # name: <cell-element>