Re: matmul trouble
- From: nospam@xxxxxxxxxxxxx (Richard Maine)
- Date: Sun, 8 Jul 2007 16:39:57 -0700
Wade Ward <invalid@xxxxxxxxxxxx> wrote:
"dpb" <none@xxxxxxx> wrote in message news:f6rmk8$hc7$1@xxxxxxxxxxx
Wade Ward wrote:
program maine2
integer :: x(3,3), z(3,3)
write (*,'(a)',advance='no') 'Give me 9 ints: '
read(*,*) x
z=matmul(x,x)
write (*,*) x, z
end program maine2
I'm puzzled that this should turn into a runtime error with 123456789 as
an input. You'd think the usual culprit would be inappropriately-sized
arrays, but it's hard to go wrong on that count with square matrices.
Ideas?
It's difficult to show carriage return on a usenet message. I am hitting
carriage return after each int, with no spaces or any bonehead stuff like
that.
Well, I'd start with trying to enter them the simple way. *DO* put
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 to
read from location 0562fe70 in file maine2.f95 at line 7.
Well, this doesn't tell me much about what the error is, but it does
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 to
have something bogus substituted for what ought to be matmul. MIstakes
in invoking the compiler could also fall under here.
Something else.
I know those are vague, esoteric, and of little help. But frankly,
that's about as good as I can do with the information given.
--
Richard Maine | Good judgement comes from experience;
email: last name at domain . net | experience comes from bad judgement.
domain: summertriangle | -- Mark Twain
.
- 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
- matmul trouble
- Prev by Date: Re: How old is the average Fortran programmer?
- Next by Date: Re: how to avoid auto new line?
- Previous by thread: Re: matmul trouble
- Next by thread: Re: matmul trouble
- Index(es):
Relevant Pages
|