Re: matmul trouble
- From: "Wade Ward" <invalid@xxxxxxxxxxxx>
- Date: Mon, 9 Jul 2007 04:00:21 -0400
"Louis Krupp" <lkrupp@xxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:1393o4dgjvt5a7d@xxxxxxxxxxxxxxxxxxxxx
Wade Ward wrote:
"Louis Krupp" <lkrupp@xxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:1393jba9n530lfd@xxxxxxxxxxxxxxxxxxxxx
I always try to post working source if it masquerades as a program. TheAlong those lines, I would try initializing x within the program andI find no example of this in MR&C. This initialization fails:
then calling matmul and printing the result; it gets the read statement
out of the picture.
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.
above is an exception not because of the statemnent with matmul, but an
incorrect initialization. All I need to do is uncomment the matmul to hit
that runtime error.
When you say the example fails, what message do you get?My syntax is wrong on the initialization of x. The only examp[les I saw in
MRC were arrays of rank one or zero. The statement is:
x = (/1,2,3,4/)
I would also stick with "write(*, ...)" instead of opening a disk file. ItWhen I write to an external file, then I don't have to redirect output from
eliminates some variables.
a lousy dos window. Big labor saver.
If a simple initialization followed by a call to matmul fails, it might beThe initialization doesn't work yet, but I'm sure that's a quick fix for
worth checking that you're linking against the correct library. Do other
intrinsics work?
tomorrow. The last intrinsic I used gave me an inexplicable runtime error.
It was sum. Since I was in a rush, I used a do loop instead and essentially
avoided the intrinsic. Maybe I should pluck a couple out and test them.
--
Wade Ward
.
- Follow-Ups:
- Re: matmul trouble
- From: Richard Maine
- 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
- Re: matmul trouble
- From: Louis Krupp
- matmul trouble
- Prev by Date: Re: matmul trouble
- Next by Date: Re: RAN(IRANZ,IRBNZ)
- Previous by thread: Re: matmul trouble
- Next by thread: Re: matmul trouble
- Index(es):
Relevant Pages
|