- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
I have a Fortran project that recieves arguments passed in from a VB6 exe, via a C# COM wrapper. I find that afew of the arguments are getting swapped around. I step through the VB and find that they are passed in correctly. I step through the C# and find them correct both comeing in and passing out. And then, the instant that I get inside the Fortran code, 2 of the 11 arguments being passed in have literally 'swapped places'. The numbers are there, they are simply assigned to a different variable.
Can anyone give me some pointers in why this might be happening or where to look for some answers?
Thanks.
Can anyone give me some pointers in why this might be happening or where to look for some answers?
Thanks.
コピーされたリンク
4 返答(返信)
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
I would guess that the arguments are not being passed correctly - that you have some character arguments and you're passing the lengths in the wrong location. By default, Intel Fortran expects the character lengths at the end of the argument list.
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Don't have character arguments but I do have arrays that are real(4)'s declared as (inout). The arguments that are flipping are integer(4)'s declared (in). The following is the argument list:
yraw,kin,spec,wt,au,ntimes,nwaves,nwt,nconc,grflag,err
The 1st 3 arg.'s (yraw,kin,spec)are 2 dimensional arrays, the next 2 args (wt,au,)are 1 dimensional arrays, and the remaining arg's (ntimes,nwaves,nwt,nconc,grflag,err) are integer(4)'s.
nmwaves becomes 0 though I have confirmed that 201 is passed in.
nwt becomes 201 though 6 is passed in.
grflag becomes 6 though 0 is passed in.
Any thoughts?
As for confirming what is passed, I have used breakpoints in the debuggers as well as using message boxs that show the contents of the variables being passed.
yraw,kin,spec,wt,au,ntimes,nwaves,nwt,nconc,grflag,err
The 1st 3 arg.'s (yraw,kin,spec)are 2 dimensional arrays, the next 2 args (wt,au,)are 1 dimensional arrays, and the remaining arg's (ntimes,nwaves,nwt,nconc,grflag,err) are integer(4)'s.
nmwaves becomes 0 though I have confirmed that 201 is passed in.
nwt becomes 201 though 6 is passed in.
grflag becomes 6 though 0 is passed in.
Any thoughts?
As for confirming what is passed, I have used breakpoints in the debuggers as well as using message boxs that show the contents of the variables being passed.
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
I'd need to see the actual code. 2-D arrays are tricky in C and variants. If you can't find a solution, send a test case to Intel Premier Support.
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Thanks Steve,
I will let you know how things pan out.
I will let you know how things pan out.
