R: [Swift-devel] terrain example
Dr. Raffaele Montella
raffaele.montella at uniparthenope.it
Sun Dec 9 12:45:10 CST 2007
Hi Ben!
Thank you! I will hack around using a fixed number of nests as a better
solution will be available!
I'll post my code as soon as it will be working.
Bye,
Raffaele
-----Messaggio originale-----
Da: Ben Clifford [mailto:benc at hawaga.org.uk]
Inviato: domenica 9 dicembre 2007 9.39
A: Dr. Raffaele Montella
Cc: swift-devel at ci.uchicago.edu
Oggetto: Re: [Swift-devel] terrain example
On Fri, 7 Dec 2007, Dr. Raffaele Montella wrote:
> The terrain script produces a TERRAIN_DOMAINx.gz file (with x=1..nests) in
> the ./output directory.
At the moment, Swift cannot deal with variable numbers of output files
from a program.
In your code, you map this:
terrainDomainType terrainDomains[] <filesys_mapper;
location="./output/",
prefix="TERRAIN_DOMAIN",
suffix=".gz">;
and then try to use this as a return value, like this:
(terrainDomainType terrainDomains[])terrain(string lon, string lat, int
nests) {
At the moment, Swift doesn't know how to deal with that - it does not know
how to deal with output files where the names are not known before
invocation.
You might be able to hack around in certain cases by explicitly listing
the files - declare terrainDomains like this:
terrainDomainType terrainDomains[] <fixed_array_mapper;
files="output/TERRAIN_DOMAIN1.gz output/TERRAIN_DOMAIN2.gz">;
However, this needs to a different declaration for every different value
of nests, so is not a very good solution.
Better handling of this kind of situation is on the to-do list, but it
won't happen soon.
--
More information about the Swift-devel
mailing list