Re: matmul trouble
- From: dpb <none@xxxxxxx>
- Date: Sun, 08 Jul 2007 23:52:00 -0500
Wade Ward wrote:
"Richard Maine" <nospam@xxxxxxxxxxxxx> wrote in message news:1i0xxk4.1x7rrui1hmerwsN%nospam@xxxxxxxxxxxxxxxxWade Ward <invalid@xxxxxxxxxxxx> wrote:
"dpb" <none@xxxxxxx> wrote in message news:f6rmk8$hc7$1@xxxxxxxxxxx
Well, I'd start with trying to enter them the simple way. *DO* putChecked that one. It's happened to me before, too.
spaces between them. That is the "normal" form for list-directed input.
Hitting CR between them is slightly more complicated; out to work, but
that's actually not the simple case. I'm not sure why the most simple
and direct form would count as "bonehead".
The runtime error doesn't seem to say a lot.Nonetheless, it is hugely important. In fact...
It says "Access Violation" The instruction at address 00401756 attempted toWell, this doesn't tell me much about what the error is, but it does
read from location 0562fe70 in file maine2.f95 at line 7.
tell me what it isn't. This has zero to do with reading array input. In
fact, it is hard to imagine how you could possibly get an error like
that from that program, no matter what you put for input.
My best guesses are along esoteric lines such as...
Running the program that is compiled from different code than you think
it is. I am not kidding. That is actually not an uncommon error. I've
done it myself at one time or other, as I suspect have most long-term
users.
Compiler installation problems, including such things as managing toI thought matmul was the culprit, but it's the write statement. The data gets in there just fine by typing 1 2 3 4 CR. Sometimes the write statement works, sometimes not. Is there a buffer that needs to get flushed?
have something bogus substituted for what ought to be matmul. MIstakes
in invoking the compiler could also fall under here.
program maine3
integer :: x(2,2), z(2,2)
OPEN(11, File="output4.txt",STATUS='REPLACE')
write (*,'(a)',advance='no') 'Give me ints: '
read(*,*) x
z = matmul(x,x)
write (11,'(i4)') z
close(11)
end program maine3
Sometimes the write statement works, sometimes it has the same access violation runtime error. It's vexxing.
If you're sure it's the same source being compiled and executed, then I'm w/ Richard on a possible installation problem or perhaps compiler/linker switch combination error or library mismatch or something similar -- your program compiles and runs w/o error here and there's certainly nothing that shows up reading it that seems a likely culprit for an ACCVIO (which often is indicative of an array bounds error as noted in previous threads on bounds checking).
Which compiler and version/OS and what command line to compile/link?
--
.
- Follow-Ups:
- Re: matmul trouble
- From: Wade Ward
- Re: matmul trouble
- References:
- matmul trouble
- From: Wade Ward
- Re: matmul trouble
- From: dpb
- Re: matmul trouble
- From: Wade Ward
- Re: matmul trouble
- From: Richard Maine
- Re: matmul trouble
- From: Wade Ward
- matmul trouble
- Prev by Date: Re: matmul trouble
- Next by Date: Re: matmul trouble
- Previous by thread: Re: matmul trouble
- Next by thread: Re: matmul trouble
- Index(es):
Relevant Pages
|