On Jun 19, 2008, at 1:40 PM, matt wrote:
> I discovered that this approach is incompatible with meep-mpi as-is.
> The h5math and file deletion needs to be run serially. I just
> output the files I need and use h5math from the command line, but
> that would require either a long h5math expression "d1*d1 + d2*d2
> + ...", or a bash script which operates on two h5 files at a time.
>
> I tried putting a (= 0 (meep-my-rank)) in the step function to
> serialize this, but then meep-mpi deadlocked as warned in the
> documentation.
Hi Matt,
Checking for (zero? (meep-my-rank)) should work, but you have to put
it in the right place.
I suspect that you based your convert-complex-h5 function on the
convert-h5 in an old version of Meep. If you look at convert-h5 in
the latest version (0.10.1), you'll find that it looks like:
(define (convert-h5 rm? convert-cmd . step-funcs)
(define (convert fname)
(if (zero? (meep-my-rank))
(if (and (zero? (system (string-append convert-cmd " \""
fname "\"")))
rm?)
.....)
where the check of meep-my-rank was inserted in Meep 0.10.1 precisely
to serialize any conversion commands done on the output files.
Steven
_______________________________________________
meep-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss