- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I downloaded IVF 11.0 which has the latest Fortran compiler & MKL bundles. I made use of IMSL libs from the earlier verison (10.025). When i compiled my application, I get the following error:
"error #6633: ...actual argument differs from dummy argument.....". (the code snippet is incomplete...)
-----------------------------------
program main
common a(100)
n1 = 1
n2 = 11
n3 = 21
call foo(a(n1), a(n2), a(n3))
....
stop
end
subroutine foo(x, y, narr)
dimension x(1), y(1), narr(1)
do i=1,10
x(i) = y(i) + real(narr(i))
enddo
return
end
------------------------------------------
Basically, I am unable to share the data from "a(n3)" and "narr()". I included the compiler/linker/libraries/include options in tools->options->fortran, project->properties->fortran and project->properties->linker locations. In addition, i have include /force:multiple in my linker command line.
Please help!
Thanks
Praba
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
common a(100)
You could add :
integer narr(10)
equivalence (narr,a(21))
always assuming that a(21) to a(30) contain valid integers of course.
then you change the call to :
call foo(a(1),a(11),narr(1))
Les
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I downloaded IVF 11.0 which has the latest Fortran compiler & MKL bundles. I made use of IMSL libs from the earlier verison (10.025). When i compiled my application, I get the following error:
"error #6633: ...actual argument differs from dummy argument.....". (the code snippet is incomplete...)
-----------------------------------
program main
common a(100)
n1 = 1
n2 = 11
n3 = 21
call foo(a(n1), a(n2), a(n3))
....
stop
end
subroutine foo(x, y, narr)
dimension x(1), y(1), narr(1)
do i=1,10
x(i) = y(i) + real(narr(i))
enddo
return
end
------------------------------------------
Basically, I am unable to share the data from "a(n3)" and "narr()". I included the compiler/linker/libraries/include options in tools->options->fortran, project->properties->fortran and project->properties->linker locations. In addition, i have include /force:multiple in my linker command line.
Please help!
Thanks
Praba
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
".........................
May 1998
"Ask Dr. Fortran"
Steve Lionel
Dear Dr. Fortran,
I know this program who seems to be OK, but he is a little different from all the other programs. (Just between you and me, he is a legacy program. Don't let that get out. It would not be politically correct.)
But lets give this a go. I need some help understanding what really goes on in this guys head. There are many cases of the following coding:
subroutine xyz(n,array) integer n real array(1) <-- Note the size is only 1 . . . <-- code in here loops from 1 to n. return end
........"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I suspect that this has something to do with the fact that a is implicitly typed as a real and you're passing it to narr which is implicitly typed as an integer. Note that the Dr. Fortran column explicitly typed the variables.
Cheers,
Rich
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I downloaded IVF 11.0 which has the latest Fortran compiler & MKL bundles. I made use of IMSL libs from the earlier verison (10.025). When i compiled my application, I get the following error:
"error #6633: ...actual argument differs from dummy argument.....". (the code snippet is incomplete...)
-----------------------------------
program main
common a(100)
n1 = 1
n2 = 11
n3 = 21
call foo(a(n1), a(n2), a(n3))
....
stop
end
subroutine foo(x, y, narr)
dimension x(1), y(1), narr(1)
do i=1,10
x(i) = y(i) + real(narr(i))
enddo
return
end
------------------------------------------
Basically, I am unable to share the data from "a(n3)" and "narr()". I included the compiler/linker/libraries/include options in tools->options->fortran, project->properties->fortran and project->properties->linker locations. In addition, i have include /force:multiple in my linker command line.
Please help!
Thanks
Praba
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What happens if we are calculating n3 runtime? Is there a way of overcoming this difficulty ? (Calling equivalence is not possible then)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Passing real data to a subroutine which takes them as integer and converts them to real can't do anything useful.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page