210 likes | 364 Views
Pre-Installed Application Launcher Module for P-GRADE portal. Goran Topi ć Ru đer Bošković Institute Zagreb, Croatia. Introduction. Grid Not user friendly Portals Inflexible, or Not user friendly enough. Example.
E N D
Pre-Installed Application Launcher Module for P-GRADE portal Goran Topić Ruđer Bošković Institute Zagreb, Croatia Goran Topic
Introduction • Grid • Not user friendly • Portals • Inflexible, or • Not user friendly enough Goran Topic
Example parf –t trainset.arff –ri 1 –c status –cp –cp single –b 2048 –bi 10000 –n 2500 –tc train_conf_matrix.txt –i importances.txt –tv train_votes.txt –w 1.4,3,0.85,1 –uu height,friends –r 1 –sd 3 –st train_scale.txt –p 25% Goran Topic
Idea • Existence of application on a resource is the duty of resource admin, not the user • Syntax of application invocation is the duty of portal admin, not the user • The system needs to be flexible and allow for new applications to be added without code interventions Goran Topic
Solution • Application definition files • Syntax declaration file • Presentation template file Goran Topic
Syntax Declaration • XML file • Describes all options of the application Goran Topic
DTD <?xml version='1.0' encoding='utf-8'?> <!ELEMENT application (option+)> <!ATTLIST application type (single | multiple | mpi | pvm) "single"> <!ELEMENT option EMPTY> <!ATTLIST option name CDATA #REQUIRED> <!ATTLIST option option CDATA #IMPLIED> <!-- null means not on cmdline, e.g. implicitly used files --> <!ATTLIST option file (input | output | none) "none"> <!ATTLIST option separator (equals | space | none) "space"> <!ATTLIST option multiple (yes | no) "no"> <!-- can it be repeated on the command line? --> <!ATTLIST option arg (yes | no) "yes"> <!-- can it accept an argument? --> <!ATTLIST option bare (yes | no) #IMPLIED> <!-- can it stand without an argument? null means not(arg) --> <!ATTLIST option none (yes | no) "yes"> <!-- can it be left off (no means mandatory option) --> <!ATTLIST option size CDATA "0"> <!-- size of the text box used for input --> Goran Topic
Excerpt from parf.xml <!DOCTYPE options SYSTEM "options.dtd"> <application type="mpi"> <option name="verbose" option="--verbose" arg="no" /> <option name="trainset" option="-t" file="input" /> <option name="trainvotes" option="-tv" file="output" bare="yes" /> <option name="trainconf" option="-tc" file="output" bare="yes" /> <option name="class" option="-c" /> <!-- ... --> </application> Goran Topic
Presentation Template • HTML file with option markers • Determines the GUI layout • Option markers syntax: $name • The INPUT element type determined by option declaration Goran Topic
Excerpt from parf.tpt <h3>PARF</h3> $verbose Verbose output<br /> <style><!-- td { vertical-align: top; } --></style> <table><tr><td> <table> <tr> <td>Training set</td> <td>$trainset</td> </tr> <tr> <td>Training class</td> <td>$class</td> </tr> <!-- ... --> </table> </td></tr></table> Goran Topic
Option Attributes • To Do: • Options are unordered Goran Topic
Option Name • Identifies the option in the template • The option is inserted into HTML by a special sequence $name • Some names are reserved (i.e. automatically declared): • stdout, stdin, stderr • display • count Goran Topic
Option Option • Gives the option tag that is used in the command line • For example, the following declaration will produce an input box (inserted by $width), which, if filled with “320”, will give “-w 320” in the command line: <option name=“width” option=“-w”/> Goran Topic
Option File • Controls the stage-in and stage-out mechanism • If file=“input”, the control is a file box, allowing the user to upload the file to the portal • You can also type in a GridFTP URL Goran Topic
Option Separator • Determines how the option tag is connected with its value: • equals: “-h=320” • space: “-h 320” • none: “-h320” Goran Topic
Option Multiple • Allows an option to be specified several times, or none at all • Use the “Update” button in the form to send the changes but stay in the form • If a multiple option is filled, another form control is added to allow for the next value Goran Topic
Option Arg • Determines whether the option is allowed to have an argument • If yes, a text box is created • If no, a check box is created • The default is “yes” Goran Topic
Option Bare • Determines whether the option is allowed not to have an argument • The default is the opposite of “arg” • If both “bare” and “arg” are “yes”, then both a text box and a check box are created, for options with optional values (e.g. both “-p” and “-p 20” are allowed) Goran Topic
Option None • Determines whether it is allowed to leave the option off the command line (i.e. whether it is mandatory) • The default is “yes” – the option can be left off (it is not mandatory) Goran Topic
Option Size • For the options that generate a text box, determines the width of that text box Goran Topic
Thank You Goran Topic