<div>Hi Michael:</div>
<ol>
<li><span class="562292413-07082009"><font face="Arial" size="2">After running a .swift or .dtm code, two files gets created: .xml and .klm. What do they represent?</font></span></li>
<li><span class="562292413-07082009"><font face="Arial" size="2">Correct me if I am wrong: </font></span></li>
<ul>
<li><span class="562292413-07082009"><font face="Arial" size="2">Datasets are mapped to physical presentation using mapping algorithms. Some mapping algorithms already created part of swift and the user can add/create others and use the existing once as the base.</font></span></li>
<li><span class="562292413-07082009"><font face="Arial" size="2">Currently, the physical representation are files.</font></span></li></ul>
<li><span class="562292413-07082009"><font face="Arial" size="2">In the fMRI example, I see volume, Image, etc declared as a type? who defines them as a type?</font></span></li>
<li><span class="562292413-07082009"><font face="Arial" size="2">In one of your emails, you stated that Swift functions can take accept files, int, string, float and boolean values as arguments. They return files, or scalar values inside files. My question is: if the output is a string that is inside a file, how can I use this output in another program that takes it as an input? doesn't call the file name and should have a code to read from the file?</font></span></li>
<li><span class="562292413-07082009"><font face="Arial" size="2">I am still confused when talk about XML Data Type and Mapping. Where is the XML representation? Is it the .xml that gets generated when run the swift code?</font></span></li>
<li><span class="562292413-07082009"><font face="Arial" size="2">Let's look at this example:</font></span></li></ol>
<blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
<div><span class="562292413-07082009"><font face="Arial" color="#cc0000" size="2">type messagefile {} </font></span></div>
<div><font color="#cc0000"> </font></div>
<div><span class="562292413-07082009"><font face="Arial" size="2"><font color="#cc0000">(messagefile t) greeting (string s[]) { <br> app {<br> echo s[0] s[1] s[2] </font><a href="mailto:stdout=@filename(t"><font color="#cc0000">stdout=@filename(t</font></a><font color="#cc0000">);<br>
}<br>}</font></font></span></div>
<div><font color="#cc0000"> </font></div>
<div><span class="562292413-07082009"><font face="Arial" color="#cc0000" size="2">messagefile outfile <"q5out.txt">;</font></span></div>
<div><font color="#cc0000"> </font></div>
<div><span class="562292413-07082009"><font face="Arial" color="#cc0000" size="2">string words[] = ["how","are","you"];</font></span></div>
<div><font color="#cc0000"> </font></div>
<div><span class="562292413-07082009"><font face="Arial" size="2"><font color="#cc0000">outfile = greeting(words);</font><br>===</font></span></div>
<div><span class="562292413-07082009"><font face="Arial" size="2"></font></span> </div>
<div><span class="562292413-07082009"><font face="Arial" size="2">So we have messagefile as a data type. outfile and words are datasets. what will be the physical representation for these 2 datasets? is thee system parsing the swift code, identifying the data types and datasets and based on that choosea the proper mapping algorithm needed?</font></span></div>
<div><span class="562292413-07082009"></span> </div></blockquote>
<div dir="ltr"><span class="562292413-07082009">Thanks,</span></div>
<div dir="ltr"><span class="562292413-07082009">Jamal</span></div>
<div dir="ltr"><span class="562292413-07082009"></span> </div>
<p dir="ltr" style="MARGIN-RIGHT: 0px"><span class="562292413-07082009"></span> </p>
<blockquote dir="ltr" style="MARGIN-RIGHT: 0px"><span class="562292413-07082009"></span>
<div><br><br></div></blockquote>
<div class="gmail_quote">On Sun, Jul 26, 2009 at 9:53 PM, Michael Wilde <span dir="ltr"><<a href="mailto:wilde@mcs.anl.gov">wilde@mcs.anl.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi Jamal,<br><br>A lot of this is covered in the Swift user guide and tutorial. Have you read through those yet?<br>
<br>All the docs are at: <a href="http://www.ci.uchicago.edu/swift/docs/index.php" target="_blank">http://www.ci.uchicago.edu/swift/docs/index.php</a><br><br>If so, and the clarifications below don't help, please ask again on the list, OK?<br>
<br>- Mike
<div class="im"><br><br><br>On 7/26/09 7:27 PM, J A wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi Michael:<br> First, thank you for your reply and information provided.<br> I am trying to understand more how it handles the input/output parameters and make them available for other functions.<br>
</blockquote><br></div>All functions in Swift are either atomic interfaces to application programs (ie, how o exec the program) or composite higher level functions.
<div class="im"><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"> To illustrate, I will give this example for the sake of discussion:<br> I have a C program called test.c that contains 4 functions ( main(), F1, F2, and F3). each function takes some parameters such as int, string, name of a file that is in the same directory, and each one produced some output (string, int, and a file). Of course i am using global variables. Now, main calls F1, F1 passes its output to F2, and F2 passes its output to F3.<br>
</blockquote><br></div>Swift doesnt look at the functions inside an application. It invokes the application as a program (think fork/exec) just like a shell would, but distributed and in parallel if so specified.
<div class="im"><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"> Overall, the test.c takes an int, string, and file, and output several files. the output files contains output produced by the internal functions (tasks).<br>
</blockquote><br></div>Swift functions can take accept files, int, string, float and boolean values as arguments. They return files, or scalar values inside files. (Again, think shell scripts). Composite structures - structs and arrays - of the above can be passed.
<div class="im"><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"> I would like to understand more when i transfer my code to Swift how it handles the input/output data, where it stores them, etc. I read couple of papers about XDTM and still have some confusion about the terms: dataset, typed, how/where its physical representation is located at, and how the input/output is used within the internal functions.<br>
</blockquote><br></div>Files are by default named ("mapped") relative to the directory in which you run the Swift command. Many flexible extensions to that model are provided for (eg, URIs). Swift sends the data to the site chosen for execution (thats yet another topic) and returns results back to the same submission host.<br>
<br>Mapping declarations in the Swift script specify how files and directory structures are mapped to Swift variables (scalars, arrays, structures). These are used in the specification of the Swift code. When Swift runs programs, it takes files that were mapped and knows how to send them to grid sites or clusters and get data back.<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div class="im"> I am new to this area and trying to understand how the DTM works.<br> Any help from your side on this area is really appreciated.<br> Thanks,<br>Jamal<br> <br></div>
<div>
<div></div>
<div class="h5"> On Sun, Jul 26, 2009 at 7:09 PM, Michael Wilde <<a href="mailto:wilde@mcs.anl.gov" target="_blank">wilde@mcs.anl.gov</a> <mailto:<a href="mailto:wilde@mcs.anl.gov" target="_blank">wilde@mcs.anl.gov</a>>> wrote:<br>
<br> Jamal,<br><br> As Swift evolved from its early prototypes to a more mature system,<br> the notion of XDTM evolved to one of mapping between<br> filesystem-based structures and Swift in-memory data structures (ie,<br>
scalars, arrays, and structures, which can be nested and typed).<br><br> This is best seen by looking at the "external" mapper, which allows<br> a user to map a dataset using any external program (typically a<br>
script) that returns the members of the dataset as a two-column<br> list: the Swift variable reference, and the external file or URI.<br><br> See the user guide section on the external mapper:<br><br> <a href="http://www.ci.uchicago.edu/swift/guides/userguide.php#mapper.ext_mapper" target="_blank">http://www.ci.uchicago.edu/swift/guides/userguide.php#mapper.ext_mapper</a><br>
(but the example in the user guide doesn't show the power of mapping<br> to nested structures).<br><br> In other words, it still has the flavor of XDTM, but without any XML<br> being visible to the user. It meets the same need but is easier to<br>
use and explain.<br><br> - Mike<br><br><br> On 7/26/09 2:50 PM, J A wrote:<br><br> Hi All:<br> Can any one direct me to a source with more<br> examples/explanation on how XDTM is working/implemented?<br>
Thanks,<br> Jamal<br> <br> ------------------------------------------------------------------------<br><br> _______________________________________________<br> Swift-user mailing list<br>
</div></div> <a href="mailto:Swift-user@ci.uchicago.edu" target="_blank">Swift-user@ci.uchicago.edu</a> <mailto:<a href="mailto:Swift-user@ci.uchicago.edu" target="_blank">Swift-user@ci.uchicago.edu</a>>
<div class="im"><br> <a href="http://mail.ci.uchicago.edu/mailman/listinfo/swift-user" target="_blank">http://mail.ci.uchicago.edu/mailman/listinfo/swift-user</a><br><br><br></div></blockquote></blockquote></div><br>