1 / 21

APST Internals

APST Internals. Sathish Vadhiyar. apstd daemon should be started on the local resource Opens a port to listen for apst client requests Runs on the host where input files are located Input files can also be specified by running <files> element

yale
Download Presentation

APST Internals

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. APST Internals Sathish Vadhiyar

  2. apstd daemon should be started on the local resource • Opens a port to listen for apst client requests • Runs on the host where input files are located • Input files can also be specified by running <files> element • apstd automatically copies output files from working directory to where apstd is started • apst and apstd started by same user since apstd writes files on behalf of apst’s user

  3. A APST run is associated with a XML file • Task dependency can be enforced by APST XML <apst> <tasks> <task executable='second' input='anyfile'/> <task executable='first' output='anyfile'/> </tasks> </apst>

  4. Some times there may not be file dependency but task dependency <apst> <files> <file id='anyfile' download='no' transfer='no'/> </files> <tasks> <task executable='second' input='anyfile'/> <task executable='first' output='anyfile'/> </tasks> </apst>

  5. XML example • <apst> <storage> <disk id='blueDisk'><scp server='blue.ufo.edu'/></disk> <disk id='greenDisk'><scp server='green.ufo.edu'/></disk> <disk id='redDisk'><scp server='red.ufo.edu'/></disk> <disk id='grayDisk'><scp server='gray.ufo.edu'/></disk> </storage> <compute> <host id='blueHost disk='blueDisk'><ssh server='blue.ufo.edu'/></host> <host id='greenHost disk='greenDisk'><ssh server='green.ufo.edu'/></host> <host id='redHost disk='redDisk'><ssh server='red.ufo.edu'/></host> <host id='grayHost disk='grayDisk'><ssh server='gray.ufo.edu'/></host> </compute> <files> <file id='blueOrGreenOnly' transfer='no'> <copy disk='blueDisk'/> <copy disk='greenDisk'/> </file> </files> <tasks> <task executable='first' input='blueOrGreenOnly'/> </tasks> </apst>

  6. security • Some kind of security regarding what kind of commands will apstd accept over socket • Given a description of the tasks to do and the resources (disks and machines) available, APST will assign individual tasks to available machines, copy the input files, run the tasks, and return the output files. APST also tries to assign tasks to machines intelligently, using information such as the load and speed of individual machines. • The main APST program, apstd, handles all of the task assignment, application execution, and file copying. • Splitting the control and user interface portions of APST like this allows you, for example, to run apstd on your main system but control it from your laptop.

  7. Using local resources • <apst> <compute> <host id='myMachine'/> </compute> <tasks> <task executable='perl' arguments='/home/${USER}/apst/Examples/charcount.pl /home/${USER}/apst/Examples/charcount0.dat' stdout='charcount0.out' /> </tasks> </apst> • /home/${USER}/apst/bin/apstd -d --port 7890 first.xml

  8. APST can use remote machines accessed through either a Globus GRAM or ssh, remote storage accessed through a Globus GASS server, scp, ftp, sftp, or an SRB server, and queueing systems controlled by Condor, DQS, LoadLeveler, LSF, PBS, or SGE.

  9. Accessing remote resources – walk through <apst> <compute> <host id='blueHost'> <ssh server='blue.ufo.edu'/> </host> </compute> </apst> Launches task on blueHost through ssh but assume files on local disk can be directly accessed

  10. <apst> <storage> <disk id='blueDisk'> <scp server='blue.ufo.edu'/> </disk> </storage> <compute> <host id='blueHost' disk='blueDisk'> <ssh server='blue.ufo.edu'/> </host> </compute> </apst> • This tells apstd that blueHost can see files available on blueDisk, rather than those on the local disk.

  11. <apst> <storage> <disk id='blueDisk'> <scp server='blue.ufo.edu'/> </disk> </storage> <compute> <host id='blueHost' disk='blueDisk'> <ssh server='blue.ufo.edu'/> </host> </compute> <tasks> <task executable='perl' arguments='/home/${USER}/apst/Examples/charcount.pl /home/${USER}/apst/Examples/charcount0.dat' stdout='charcount0.out' /> </tasks> </apst> • The problem with this XML is that it requires that APST be installed on the remote machine in /home/${USER}/apst, since the arguments task attribute refers to files in this directory.

  12. <apst> <storage> <disk id='local' datadir='/home/${USER}/apst/example'/> <disk id='blueDisk' datadir='/tmp'> <scp server='blue.ufo.edu'/> </disk> </storage> <compute> <host id='blueHost' disk='blueDisk'> <ssh server='blue.ufo.edu'/> </host> </compute> <tasks> <task executable='perl' arguments='./charcount.pl ./charcount0.dat' input='charcount.pl charcount0.dat' stdout='charcount0.out' /> </tasks> </apst> • Equivalent to • scp /home/${USER}/apst/Examples/charcount.pl blue.ufo.edu:/tmp/charcount.pl scp /home/${USER}/apst/Examples/charcount0.dat blue.ufo.edu:/tmp/charcount0.dat ssh blue.ufo.edu 'cd /tmp; perl ./charcount.pl ./charcount0.dat > charcount0.out' scp blue.ufo.edu:/tmp/charcount0.out /home/${USER}/apst/Examples/charcount0.out

  13. Run the above example: /home/${USER}/apst/bin/apstd -d --port 7890 second.xml • For globus: • Scp -> gass • Ssh -> globus • <globus server='blue.ufo.edu:4300'/> - i.e. machine and port where gatekeeper is running • E.g. <gass server='gridftp://blue.ufo.edu:2345'/>. • Run grid-proxy-init before starting apstd

  14. Apst client program • You can use apst to examine your application's state, add, stop, or restart tasks, and add or disable resources • /home/${USER}/apst/bin/apst --host localhost:7890 command

  15. Accessing batch systems • <apst> <storage> <disk id='bigDisk'> <scp server='big.ufo.edu'/> </disk> </storage> <compute> <host id='bigHost' disk='bigDisk' cpus='8'> <ssh server='big.ufo.edu'/> <pbs nodes='20' time='240' queue='normal'/> </host> </compute> </apst> • Can replace pbs with lsf, condor, loadleveler

  16. Gridinfo tag • <apst> <gridinfo> <infosource id='localInfo'> <local/> </infosource> <infosource id='gangliaInfo'> <ganglia server='ganglia.ufo.edu'/> </infosource> <infosource id='mdsInfo'> <mds server='mds.ufo.edu:2345' basedn='mds-vo-name=local,o=grid'/> </infosource> <infosource id='nwsInfo'> <nws server='nws.ufo.edu:8800'/> </infosource> </gridinfo> </apst>

  17. Apstd daemon • Can be started –heuristic= option. Default is wq • Xml file has <storage>, <compute>, <files>, <tasks> • <disk> • Attributes – unique id, datadir • Access method element • Access method can be <ftp/>, <gass/>, <local/>, <scp/>, <sftp/>, or <srb/>

  18. <host> • Attributes – unique ID, cpus, disk, dnsname, memory, wd • Access method - <globus/>, <local/>, or <ssh/> • Batch queuing system - <condor\>, <dqs/>, <loadleveler/>, <lsf/>, <pbs/>, or <sge/> • Attributes – account, memory, node, nodetype, queue, stdin, stdout, stderr, time, option

  19. <files> • Specifies input, output and executable files • Contains one or more file attribute • <file> • Input files may have transfer attribute (yes or no) – whether files have to be transferred from submitting machine • Output files have analogously download attribute, may also have size attribute indicating the size of the output file – useful for scheduling decisions

  20. <file> element may have <copy> element for input files • To indicate the placement of copies of the file that you have pre-staged to remote disks • Will have disk attribute and copy attribute

  21. <task> • Attributes – executable, id, groups, wd, arguments, input, stdin, stdout, stderr, priority, host, memory, cost • <infosource> • Access method - <ganglia/>, <local/>, <mds/>, or <nws/>.

More Related