Re: matmul trouble
- From: Louis Krupp <lkrupp@xxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 09 Jul 2007 01:15:18 -0600
Wade Ward wrote:
"Louis Krupp" <lkrupp@xxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:1393jba9n530lfd@xxxxxxxxxxxxxxxxxxxxxRichard Maine wrote:I took that off and uncommented the matmul. Same runtime error.Richard Maine <nospam@xxxxxxxxxxxxx> wrote:
Wade Ward <invalid@xxxxxxxxxxxx> wrote:Probably the first pointless fiddle I'd do would be to take the matmul
I thought matmul was the culprit, but it's the write statement.Well. That's where you see the error. That doesn't necessarily mean that
is actually where the problem is....
out of the picture by doing something trivial like z = x instead of the
matmul.
And another might be to take the advance='no' off of the prior write.
(No, I don't have any good reason for that. It is probably completely
pointless. But well... maybe if the advance='no' doesn't leave the I/O
system in a good state for some reason...)
Along those lines, I would try initializing x within the program and then calling matmul and printing the result; it gets the read statement out of the picture.I find no example of this in MR&C. This initialization fails:
program maine4
integer :: x(2,2), z(2,2)
OPEN(11, File="output4.txt",STATUS='REPLACE')
write (*,'(a)') 'Give me ints: '
x = (/1,2,3,4/)
z =x
!z = matmul(x,x)
write (11,'(i4)') z
close(11)
end program maine4
--
You said you "uncommented the matmul," but your example shows it commented out.
When you say the example fails, what message do you get?
I would also stick with "write(*, ...)" instead of opening a disk file. It eliminates some variables.
If a simple initialization followed by a call to matmul fails, it might be worth checking that you're linking against the correct library. Do other intrinsics work?
Louis
.
- 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
- Re: matmul trouble
- From: Richard Maine
- Re: matmul trouble
- From: Richard Maine
- Re: matmul trouble
- From: Louis Krupp
- Re: matmul trouble
- From: Wade Ward
- matmul trouble
- Prev by Date: Re: character*80 versus character*1 (80)
- Next by Date: Re: On writing negative zero - with or without sign
- Previous by thread: Re: matmul trouble
- Next by thread: Re: matmul trouble
- Index(es):
Relevant Pages
|