Changeset 6702 for branches/1.7
- Timestamp:
- Sep 27, 2018 2:24:29 PM (6 years ago)
- Location:
- branches/1.7
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.7/gui/apps/execute.tcl
r6700 r6702 82 82 # copy structure.current.fields and structure.current.components 83 83 foreach path [Rappture::entities -as path $driverobj input] { 84 if {[$driverobj element -as type $path.current] eq ""} { 84 if {[$driverobj element -as type $path.current] eq ""} { 85 # if element has no current tag copy it 85 86 $toolobj copy $path from $driverobj $path 87 } elseif {[$driverobj get $path.current] eq ""} { 88 # if element has current tag and it is empty and toolobj is missing the element 89 if {[$toolobj element -as type $path.current] eq ""} { 90 $toolobj copy $path.current from $driverobj $path.current 91 } 86 92 } 87 93 } -
branches/1.7/lang/tcl/scripts/task.tcl
r6700 r6702 226 226 227 227 # Initialize job array variables 228 array set _job { 228 array set _job { 229 229 control "" 230 230 exitcode 0 … … 237 237 } 238 238 239 SetCpuResourceLimit 239 SetCpuResourceLimit 240 240 set driverFile [GetDriverFile] 241 241 set cached 0 242 242 if { [IsCacheable] } { 243 243 puts stderr "Cache checking: [time { 244 set cached [CheckForCachedRunFile $driverFile] 244 set cached [CheckForCachedRunFile $driverFile] 245 245 } ]" 246 246 puts stderr "checking cache=$cached" … … 674 674 set _job(mesg) "" 675 675 return 1; # Success 676 } 676 } 677 677 678 678 # Step 3. Execute the command, collecting its stdout and stderr. … … 697 697 if {$_job(exitcode) > 128} { 698 698 set logmesg "Program signaled: signal was [GetSignal $_job(exitcode)]" 699 } else { 699 } else { 700 700 set logmesg "Program finished: non-zero exit code is $_job(exitcode)" 701 701 } … … 756 756 "cputime" $times(cputime) \ 757 757 "status" $_job(exitcode) 758 uplevel #0 $jobstats $args 758 uplevel #0 $jobstats $args 759 759 } 760 760 … … 847 847 # "cputime" $times(cputime) \ 848 848 # "status" $_job(exitcode) 849 # uplevel #0 $jobstats $args 849 # uplevel #0 $jobstats $args 850 850 # } 851 851 … … 859 859 "cputime" 0 \ 860 860 "status" 0 861 uplevel #0 $jobstats $args 861 uplevel #0 $jobstats $args 862 862 } 863 863 … … 940 940 "cputime" 0 \ 941 941 "status" 0 942 uplevel #0 $jobstats $args 942 uplevel #0 $jobstats $args 943 943 } 944 944 … … 960 960 error "Can't create rappture library: $xmlobj" 961 961 } 962 # Get the session from runfile 962 # Get the session from runfile 963 963 set session [$xmlobj get "output.session"] 964 964 if { [catch {exec submit --cache $session} result] != 0 } { … … 984 984 return 0 985 985 } 986 987 # puts stderr "ncode = [http::ncode $token]" 988 # puts stderr "code = [::http::code $token]" 989 # puts stderr "status = [::http::status $token]" 990 # puts stderr "meta = [::http::meta $token]" 991 992 foreach {key value} [::http::meta $token] { 993 set headers([string tolower $key]) $value 994 if { [string tolower $key] == "etag" } { 995 set guid $value 996 } 997 } 998 # puts stderr "SQUID = $headers(etag)" 999 # puts stderr "SQUID = $guid" 1000 986 1001 # If the code isn't 200, we'll assume it's a cache miss. 987 1002 if { [http::ncode $token] != 200} { 988 1003 return 0 989 1004 } 990 # Get contents of the run file. 1005 # Get contents of the run file. 991 1006 set contents [http::data $token] 992 1007 if { $contents == "" } { … … 994 1009 } 995 1010 996 # Create a new run.xml file and write the results into it. 1011 # Create a new run.xml file and write the results into it. 997 1012 set secs [clock seconds] 998 1013 set millisecs [expr [clock clicks -milliseconds] % 1000]
Note: See TracChangeset
for help on using the changeset viewer.