Jan K. Labanowski: Computational Portals for Chemistry  

status.xml -- the XMLlet!!! (continued)

Under example1 directory you find the following files:
-rw-r--r--   1 tomcat4  tomcat4      818 Nov 14 10:25 description
-rw-r--r--   1 tomcat4  tomcat4      254 Nov 11 10:34 example1.in
-rw-r--r--   1 tomcat4  tomcat4      992 Nov 13 11:06 example1.script
-rw-r--r--   1 tomcat4  tomcat4     3203 Nov 11 09:41 example1.xyz
-rw-r--r--   1 tomcat4  tomcat4     2606 Nov 13 04:10 input-files.xml
-rw-r--r--   1 tomcat4  tomcat4     3567 Nov 13 11:23 output-files.xml
-rw-r--r--   1 tomcat4  tomcat4     2513 Nov 17 08:18 status.xml
status.xml -- the status file after 1st event, directory was created on the remote host. The JSP page, which submits the job, and the listener (the RunEvent class which actually processes this file and runs the commands and updates event fields), save each partial event file for later debugging. It may be a good idea in general, not only to track what went wrong, but also to possibly restart the long calculations if something failed on the way.

<status>
  <applicationName>Wilkins Code</applicationName>
  <fileVersion>1.0</fileVersion>
  <event name="CreateRemoteRunDirectory">
     <eventPassword>M9kLeQH0iqB1BaW</eventPassword>
     <eventTimestamp>Wed Feb 20 02:41:07 EST 2002</eventTimestamp>
     <eventType>COMMAND_ON_WEB_SERVER</eventType>
     <eventCommand>ssh -l portal oscbw.ccl.net mkdir -p \
 /f/portal/PortalRuns/jkl@asdn.net/example1</eventCommand>
     <eventMessage>Directory on Remote Host has been create:
 COMMAND: /bin/sh /usr/local/tomcat_4.0/jakarta-tomcat-4.0/webapps/sciPortal/\
WEB-INF/Users/jkl@asdn.net/example1/1.sh
STATUS: 0
STDOUT:

STDERR:
</eventMessage>
  </event>
  <event name="CopyFilesToBackend">
     <eventPassword>tucy3AJig372oqG</eventPassword>
     <eventTimestamp>none</eventTimestamp>
     <eventType>COMMAND_ON_WEB_SERVER</eventType>
     <eventCommand>scp -pAv /usr/local/tomcat_4.0/jakarta-tomcat-4.0/\
webapps/sciPortal/WEB-INF/Users/jkl@asdn.net/example1/example1.* \
portal@oscbw.ccl.net:/f/portal/PortalRuns/jkl@asdn.net/example1</eventCommand>
     <eventMessage>none</eventMessage>
  </event>
  <event name="SubmitJob">
     <eventPassword>tvdYxRPzOvyrPr0</eventPassword>
     <eventTimestamp>none</eventTimestamp>
     <eventType>COMMAND_ON_WEB_SERVER</eventType>
     <eventCommand>ssh -l  portal oscbw.ccl.net\
  '( cd /f/portal/PortalRuns/jkl@asdn.net/example1; \
  /usr/local/pbs/bin/qsub example1.script )'</eventCommand>
     <eventMessage>none</eventMessage>
  </event>
  <event name="JobStarted">
     <eventPassword>uqiQoLVr0O7CFzK</eventPassword>
     <eventTimestamp>none</eventTimestamp>
     <eventType>COMMAND_ON_WEB_SERVER</eventType>
     <eventCommand>ssh -l portal oscbw.ccl.net '/usr/local/pbs/bin/qstat \
 -a | grep example1'</eventCommand>
     <eventMessage>none</eventMessage>
  </event>
  <event name="CopyOutputFiles">
     <eventPassword>t5GBECPzArrSYVI</eventPassword>
     <eventTimestamp>none</eventTimestamp>
     <eventType>COMMAND_ON_WEB_SERVER</eventType>
     <eventCommand>/usr/bin/batch <<EOF
sleep 5
/usr/local/bin/scp -pAvr 'portal@oscbw.ccl.net:/f/portal/PortalRuns/\
jkl@asdn.net/example1/*' /usr/local/tomcat_4.0/jakarta-tomcat-4.0/webapps\
/sciPortal/WEB-INF/Users/jkl@asdn.net/example1
EOF
</eventCommand>
     <eventMessage>none</eventMessage>
  </event>
  <event name="JobFinished">
     <eventPassword>NwFnozEUq0fu1I5</eventPassword>
     <eventTimestamp>none</eventTimestamp>
     <eventType>NO_ACTION</eventType>
     <eventCommand>none</eventCommand>
     <eventMessage>none</eventMessage>
  </event>
</status>