Tags:
tag this topic
create new tag
view all tags
---++ The Database (SQL) <verbatim> drop table if exists RUNS_JMALT; create table RUNS_JMALT ( i INT NOT NULL AUTO_INCREMENT, job INT, run_file VARCHAR(128), out_file VARCHAR(128), error_file VARCHAR(128), state INT, PRIMARY KEY(i)); create index idx_job on RUNS_JMALT(job); create index idx_run_file on RUNS_JMALT(run_file); create index idx_out_file on RUNS_JMALT(out_file); create index idx_error_file on RUNS_JMALT(error_file); </verbatim> ---++ Checking Script (PERL) <verbatim> # This is designed to run on the cluster, wrap in a SH script with the $SGE_TASK_ID var ($job, @dummies) = @ARGV; $dbCommand = "mysql -u<Your User Name> -hsamos -P4040 <Your Database Name> -s -e "; chomp $job; print "$dbCommand \"select out_file from RUNS_JMALT where state = 0 limit $job, 1;\"\n"; ($out_file, @dummies) = `$dbCommand \"select out_file from RUNS_JMALT where state = 0 limit $job, 1;\"`; ($run_file, @dummies) = `$dbCommand \"select run_file from RUNS_JMALT where state = 0 limit $job, 1;\"`; chomp($out_file); print "Checking <$out_file>\n"; if(-e $out_file){ print "CLEAN\n"; update_status($job, 1); } else{ print "MISSING\n"; update_status($job, 0); } sub update_status{ ($jobNumber, $newStatus)= @_; print `$dbCommand \"update RUNS_JMALT set state = $newStatus where job = $jobNumber\"\n`; } </verbatim>
E
dit
|
A
ttach
|
Watch
|
P
rint version
|
H
istory
: r1
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r1 - 2007-10-31
-
ErikZawadzki
Home
Site map
BETA web
Communications web
Faculty web
Imager web
LCI web
Main web
SPL web
Sandbox web
TWiki web
TestCases web
BETA Web
Create New Topic
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
P
View
Raw View
Print version
Find backlinks
History
More topic actions
Edit
Raw edit
Attach file or image
Edit topic preference settings
Set new parent
More topic actions
Account
Log In
Register User
E
dit
A
ttach
Copyright © 2008-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback