[Swift-devel] Re: passing types and variables in swift

Michael Wilde wilde at mcs.anl.gov
Thu Oct 4 22:39:16 CDT 2007


thanks for the info, Yong.

while we're discussing mappers, could you or Ben clarify:

- can a mapper be only used on a single variable declaration? ie you can 
not map a dataset to a variable within a struct?  this would be useful 
eg to create a struct that has both file and scalar valued members, to 
set up a parameter sweep where each file needs specific parameters.

- are mappers processed before the program (or procedure) starts 
executing? so you cant use a mapper like an assignment statement to set 
or reset a variable?

- mike

On 10/4/07 10:21 PM, Yong Zhao wrote:
> Mappers should ideally be able to map primitive types such as string and
> int, as well as file names. The CSVMapper can read all the values in the
> file, it is just that it needs to interprete the values according to their
> types. So If we convey the type info 'RGIparams' to the csv mapper, it
> should have no problem reading the values.
> 
> I actually added getType and setType to the mapper interface, that did
> not get into the release, but I think it is what it should have.
> 
> Yong.
> 
> On Thu, 4 Oct 2007 andrewj at uchicago.edu wrote:
> 
>> All right, thanks.
>>
>> I am just trying to figure out the best way to setup parameter
>> sweeps.  Ideally, I would like to have some file of directory
>> of files containing experiments to be run on the Grid
>> environment and Swift picks them up and automatically sets up
>> the appropriate WF based on the parameter information in the
>> files.
>>
>>
>>> On Wed, 3 Oct 2007, andrewj at uchicago.edu wrote:
>>>
>>>> could I do something like this:
>>>>
>>>> RGIparams RGIinput[] <csv_mapper;file="rgi_runs.txt">;
>>>>
>>>> where rgi_runs would contain say
>>>>
>>>> 1,2,true
>>>> 3,4,false
>>>> 18,20,true
>>>>
>>>> and so on..so that the parameters are passed into the workflow?
>>> no.
>>>
>>> mappers only map filenames (or URIs now); they don't map
>> variable values.
>>> --
>> _______________________________________________
>> Swift-devel mailing list
>> Swift-devel at ci.uchicago.edu
>> http://mail.ci.uchicago.edu/mailman/listinfo/swift-devel
>>
> _______________________________________________
> Swift-devel mailing list
> Swift-devel at ci.uchicago.edu
> http://mail.ci.uchicago.edu/mailman/listinfo/swift-devel
> 
> 



More information about the Swift-devel mailing list