May be a bug!

For posts concerning the documentation, errors, ommissions, general comments, etc.

Moderators: silvia, selimgunay, Moderators

Post Reply
fereshtehnejad
Posts: 7
Joined: Tue Sep 01, 2009 5:47 am
Location: Ohio State University

May be a bug!

Post by fereshtehnejad »

Dear opensees group

I dont know if I can call it a bug! or there are some problems I am not aware of. I had made a post-processing program through opensees 2.1.0 in which every line of a recorder text-file corresponding to a zero length element in dynamic analysis was meant to be read, however when I upgraded to the version 2.2.2.g, the interpreter didnt read lines to the end of the file and after reading 1923 lines (out of 1967), it jumps out of the reading-loop. It should be noted that in the former version the interpreter successfully reads all the lines to the end. Here is the command that I used to read the lines:

set infileID [open data/ZerolengthFor17.out r]
foreach line [split [read $infileID] \n] {
if {[llength $line] != 0} {
incr m
set help $line
set force(17,$m) [lindex $help 3]}
}
close $infileID


I am seeking your help
Thank you
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Re: May be a bug!

Post by fmk »

the recorders in 2.2 no longer open and close the file during the running of the program .. they are opened once and closed when the recorder is deleted, typically when the program ends ..
this may be the cause of your problem if you are reading before the recorder actually finishes writing ... you can issue the remove recorder coommand if this is the case.
fereshtehnejad
Posts: 7
Joined: Tue Sep 01, 2009 5:47 am
Location: Ohio State University

Re: May be a bug!

Post by fereshtehnejad »

Thank you dear fmk. By adding the "remove recorders" command before the aforementioned line reading command, the problem was solved. :D
le2night
Posts: 4
Joined: Wed Nov 09, 2011 8:06 am
Location: Harbin institute of technology

Re: May be a bug!

Post by le2night »

just "wipe" after the analysis and before you post process
Post Reply