#!/bin/bash # MyGrid - put server up mygrid start sleep 3 # Checking MyGrid status mygrid status ret=$? if [ $ret -eq 72 ]; then echo "Could not start MyGrid..." exit 1 else echo fi # Initializing GUI echo "Mygrid Graphical Interface" mygrid gui # Setting Grid echo echo "Making sure Grid is ok..." echo mygrid setgrid ../resources/grid.gdf # Creating Job description file (jdf) echo echo "Creating Job Description File" java Factory 10 # Running test echo echo "Submitting sample application..." mygrid addjob job.jdf numTasks=`cat job.jdf | grep "task :" | wc -l` echo echo "number of tasks = $numTasks" echo # Waiting for job to finish sleep 20 echo "Waiting for job to finish..."; echo mygrid waitforjob 1 if [ `ls -l output* | wc -l` -ge $numTasks ]; then echo "MyGrid is working OK" else echo "MyGrid failed" fi echo # Stopping MyGrid mygrid stop