[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
data structure for simulation
From: |
Francesco Potorti` |
Subject: |
data structure for simulation |
Date: |
Tue, 17 Mar 2009 15:14:16 +0100 |
I want to run a simulation on several inputs. I can easily number each
input from 1 to 262143. For each input, I have an output made of a
struct, like this:
octave> rss18(262143)
ans =
{
tplemap =
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
samples = 10
qlev =
0.50000 0.70000 0.75000 0.80000 0.90000
qval =
0.14278 1.39793 2.57294 2.93048 3.87450
qerr =
0.14338 1.48273 1.64111 1.69764 Inf
}
Where rss18 is a struct array whose only non-empty element is currently
the last one:
octave> whos rss18
Variables in the current scope:
Attr Name Size Bytes Class
==== ==== ==== ===== =====
rss18 1x262143 146 struct
Total is 262143 elements using 146 bytes
Now I would like to exploit a cluster of nodes by running several Octave
instances in parallel, each computing a subset of the 1:262143 space. (I
do not need anything more sophisticated.) In the end, each of the
running Octaves would create its own struct array, which will be
partially empty.
I cannot find an efficient way of:
- finding which array elements are nonempty
- merging arrays with different sets of nonempty elements
Maybe struct arrays are not the best data structure for this purpose?
--
Francesco Potortì (ricercatore) Voice: +39 050 315 3058 (op.2111)
ISTI - Area della ricerca CNR Fax: +39 050 315 2040
via G. Moruzzi 1, I-56124 Pisa Email: address@hidden
(entrance 20, 1st floor, room C71) Web: http://fly.isti.cnr.it/