name." at ".$timestr; $jobname = workunit_name( $workunit ); if( $user -> id != $job -> user ) { $title = "Job '".$jobname."' (".$workunitid.")"; page_head( $title ); exit_with_text( "You are not the owner of this job !" ); } $config = get_config(); $jobapplication = mysql_fetch_object( mysql_query( "SELECT * FROM app WHERE id=".$workunit -> appid ) ); $jobapplicationname = $jobapplication -> name; $jobapplicationfriendlyname = $jobapplication -> user_friendly_name; $jobfops = $workunit -> rsc_fpops_est; $jobmem = $workunit -> rsc_memory_bound; $jobdisk = $workunit -> rsc_disk_bound; $jobstatusstring = workunit_status_string( $workunit ); $coloredjobstatusstring = $jobstatusstring; if( $jobstatusstring == "running" ) $coloredjobstatusstring = "".$jobstatusstring.""; if( $jobstatusstring == "queued" ) $coloredjobstatusstring = "".$jobstatusstring.""; if( $jobstatusstring == "ERROR" ) $coloredjobstatusstring = "".$jobstatusstring.""; $jobsubmittime = time_str( $workunit -> create_time ); $workunitidstring = " workunit.">".$job -> workunit.""; $jobinputurl = parse_element( $workunit -> xml_doc, "" ); $jobinputurl = parse_element( $jobinputurl, "" ); $jobinput = parse_element( $workunit -> xml_doc, "" ); $jobinput = parse_element( $jobinput, "" ); page_head( $title ); start_table(); row1( "Job speciffics" ); row2( "Job status: ", $coloredjobstatusstring ); row2( "Job application: ", $jobapplicationfriendlyname ); row2( "Job submit time: ", $jobsubmittime ); row2( "Job name: ", $jobname ); row2( "Job id: ", $workunitidstring ); row2( "Job estimated time to complete: ", floor((float)($jobfops)/92254963740)." min. " ); row2( "Job estimated memory usage: ", floor((float)($jobmem)/1048576)." Mb. " ); row2( "Job estimated disk usage: ", floor((float)($jobdisk)/1048576)." Mb. " ); row2( "Job input file:", ' '.$jobinput.'' ); if( ( $jobstatusstring == "finished" ) || ( $jobstatusstring == "ERROR" ) ) { if( $jobstatusstring != "finished" ) { $resultunitquery = mysql_query( "SELECT * FROM result WHERE workunitid=".$workunit -> id ); $nrofresults = mysql_num_rows( $resultunitquery ); for( $index = 0; $index < $nrofresults; ++$index ) { $resultunit = mysql_fetch_object( $resultunitquery ); $jobstderr = parse_element( $resultunit -> stderr_out, "" ); if( $jobstderr ) { row1( "Error output of this job" ); row2( "", $jobstderr ); } } } else { $resultunit = mysql_fetch_object( mysql_query( "SELECT * FROM result WHERE id=".$workunit -> canonical_resultid ) ); $xmldoc = $resultunit -> xml_doc_out; $jobstderr = parse_element( $resultunit -> stderr_out, "" ); $nroffiles = 0; $cursor = 0; while( $tempfileinfo = parse_next_element( $xmldoc, "", &$cursor ) ) $outputfiles[ $nroffiles++ ] = parse_element( $tempfileinfo, "" ); if( $nroffiles >= 1 ) { $fanoutnr = parse_config( $config, "" ); row1( "Output of this job" ); row2( "Number of output files of job: ", $nroffiles ); for( $index = 0; $index < $nroffiles; ++$index ) { $filename = $outputfiles[ $index ]; $url = "upload/".fan_out_dir( $filename, $fanoutnr )."/".$filename; $outputfilelink = ''.$filename.''; row2( "Output file ".($index+1).": ", $outputfilelink ); } } if( $jobstderr ) { row1( "Error output of this job" ); row2( "", $jobstderr ); } } } $max_jobs = max_nr_of_jobs_of_user( $user ); $njobs = nr_of_jobs_of_user( $user ); row1( "Commands" ); if( $njobs < $max_jobs ) { if( $max_jobs - $njobs > 1 ) $line = "You can submit ".($max_jobs-$njobs)." more jobs: "; else $line = "You can submit one more job: "; row2( $line, 'Submit a job' ); } row2( "", 'Kill or Remove this job' ); row2( "", 'Go back to your queue' ); row2( "", 'Log out' ); end_table(); page_tail(); ?>