|
From: Catherine M. <Cat...@jp...> - 2006-09-20 21:05:12
|
Hi,
I'm trying to run a program with --gen-suppressions turned on, and
that's
working, except that valgrind isn't pausing after every error to allow
me to
generate the suppressions. It just keeps on going and eventually fails
with an "attempt to read past end of file" error, even though the input
file is fine.
I'm running the code redirecting standard-in from a file, and I'm
wondering
if this is the cause of my problems. (i.e. test.exe < input_file.txt).
Is
valgrind reading the values of the "print-suppression" prompts from the
"input_file.txt" and then eventually running out of room in the input
file?
Is there any way around this, other than rewriting my code so it no
longer expects input from standard in?
And, a second question related to an error I'm getting. I'm using
the Portland Group F90 compiler, and have several lines in my code
that read in strings from standard-in and put them into variables,
like so:
character(len=200), dimension(ncams) :: flname_rad
do icam = 1,ncams
read(*,'(a)') flname_rad(icam)
end do
And it's generating the error:
"==7820== Conditional jump or move depends on uninitialised value(s)"
Is this a known problem with Fortran? Another code-checking tool
(Purify)
always gave Uninitialized Memory Read errors on lines like this.
Catherine
----------------------------------------------------
Catherine Moroney Jet Propulsion Lab, CalTech
MailStop 168-414 4800 Oak Grove Drive
Pasadena, CA 91109-8099
Phone: 818-393-3392
Fax: 818-393-3134
Email: Cat...@jp...
|
|
From: Julian S. <js...@ac...> - 2006-09-20 21:17:29
|
> I'm trying to run a program with --gen-suppressions turned on, and > that's > working, except that valgrind isn't pausing after every error to allow > me to > generate the suppressions. It just keeps on going and eventually fails > with an "attempt to read past end of file" error, even though the input > file is fine. Try this: --gen-suppressions=all --log-file=xyz.txt This should keep V from messing with your program's stdin/stdout. > And, a second question related to an error I'm getting. I'm using > the Portland Group F90 compiler, and have several lines in my code > that read in strings from standard-in and put them into variables, > like so: > > character(len=200), dimension(ncams) :: flname_rad > do icam = 1,ncams > read(*,'(a)') flname_rad(icam) > end do > > And it's generating the error: > "==7820== Conditional jump or move depends on uninitialised value(s)" What's the full text of this error, including the backtrace? You might want to consider using valgrind-3.2.1, which was recently released and contains a fix for handling PGI generated code on amd64 and also a fix in the --gen-suppressions handling. It probably won't make any difference here but might avoid future problems. J |
|
From: Catherine M. <Cat...@jp...> - 2006-09-20 21:30:36
|
On Sep 20, 2006, at 2:17 PM, Julian Seward wrote: > >> I'm trying to run a program with --gen-suppressions turned on, and >> that's >> working, except that valgrind isn't pausing after every error to allow >> me to >> generate the suppressions. It just keeps on going and eventually >> fails >> with an "attempt to read past end of file" error, even though the >> input >> file is fine. > > Try this: --gen-suppressions=all --log-file=xyz.txt > This should keep V from messing with your program's stdin/stdout. It was actually very easy to rewrite my code not to use stdin. Thanks for the information, anyways. > >> And, a second question related to an error I'm getting. I'm using >> the Portland Group F90 compiler, and have several lines in my code >> that read in strings from standard-in and put them into variables, >> like so: >> >> character(len=200), dimension(ncams) :: flname_rad >> do icam = 1,ncams >> read(*,'(a)') flname_rad(icam) >> end do >> >> And it's generating the error: >> "==7820== Conditional jump or move depends on uninitialised value(s)" > > What's the full text of this error, including the backtrace? Full text below. It seems to be coming from one of the compilers functions. ==5050== Conditional jump or move depends on uninitialised value(s) ==5050== at 0x7596A8: __hpfio_rwinit (in /data/L2TC/cmm/linux_code/stereo_cmm/bin/read_swath_stereo.debug.exe) ==5050== by 0x74E5EB: fr_init (in /data/L2TC/cmm/linux_code/stereo_cmm/bin/read_swath_stereo.debug.exe) ==5050== by 0x74E7CB: pgf90io_fmtr_init (in /data/L2TC/cmm/linux_code/stereo_cmm/bin/read_swath_stereo.debug.exe) ==5050== by 0x52F8E1: init_input_ (/data/L2TC/cmm/linux_code/stereo_cmm/src_pgf90/stereo_input.f:47) ==5050== by 0x403CB1: MAIN_ (/data/L2TC/cmm/linux_code/stereo_cmm/src_pgf90/read_swath_stereo.f: 172) ==5050== by 0x40325D: main (in /data/L2TC/cmm/linux_code/stereo_cmm/bin/read_swath_stereo.debug.exe) ==5050== > > You might want to consider using valgrind-3.2.1, which was recently > released and contains a fix for handling PGI generated code on amd64 > and also a fix in the --gen-suppressions handling. It probably won't > make any difference here but might avoid future problems. I just got a "the impossible happened" error, running with the PGI compilers on an amd64 opteron. I'll try downloading the latest version of valgrind and see if this error goes away. > > J Catherine |