Page 1 of 1

Error when using "recorder mpco"

Posted: Wed Dec 18, 2019 1:35 pm
by whzju
When I use "recorder mpco" function, this error came out.
I think this is because I used the function "clock" in my main tcl file.
Does anyone how to solve this problem?

#################################################################
couldn't read file "C:/Program Files/STKO/opensees/bin/tcl/lib/tcl8.6/clock.tcl": no such file or directory
while executing
"source -encoding utf-8 [file join $TclLibDir clock.tcl]"
(procedure "::tcl::clock::format" line 3)
invoked from within
"clock format [clock seconds]"
invoked from within
"if { $parallel == 0 } {
puts "Analysis started at: [clock format [clock seconds]]\n"
# clock format [clock seconds] -format "%T"
set start..."
(file "Pile_20191215.tcl" line 20)
##################################################################

Many thanks,
Huan

Re: Error when using "recorder mpco"

Posted: Thu Dec 19, 2019 1:38 pm
by MassimoPetracca
don't use "format" otherwise tcl will look for the clock.tcl procedure, which is not included in the tcl folder that we distribute with STKO.

You can either just use "set time [clock seconds]" without the "format" option
or
You can copy a complete TCL installation in "C:\Program Files\STKO\opensees" (replacing the tcl folder there) and then you can use the "format" option

Typically what I do for timing a function is :
set time_start [clock milliseconds]
...
set time_end [clock milliseconds]
set elapsed [expr ($time_end - $time_start)/1000.0]
puts "Elapsed time: $elapsed sec."

Re: Error when using "recorder mpco"

Posted: Sun Dec 22, 2019 2:24 pm
by whzju
Got it.

Many thanks,
Huan