trishvz
08-31-2004, 01:14 PM
OK, I'm desperate. I'm sure my problem has to do with my inability to
comprehend modules and interfaces and whatnot, so hopefully someone
can help me easily, knock me on the head and tell me to go away.
I have a complicated application containing two modules each with a
different subroutine (call them A and B) and function to be minimized
(call them fA and fB). Subroutines A and B both call NR's frprmn.
Now frprmn will only commumicate with function func, so I wrote an
external function func that uses the modules A and B and a common
block containing the variables that both fA and fB require. One of
the common variables is a flag, and func selects fA if flag is equal
to 1 and fB otherwise.
The vector alpha contains the variables passed to func from subroutine
A, and the vector beta contains the variables passed to func from
subroutine B. I initialize alpha, call frprmn, and depending on
exactly how I did the initialization, a variety of errors result. If
I initialize with an assignment statement, frprmn fails immediately
with "Allocate error 494: Allocation of Array with extent of
1065353216 failed." If I set alpha equal to another vector (passed to
A from the main program) then frprmn does not fail, passes alpha on to
fA, which then fails with an address error. Compiler diagnostics
indicate that alpha is undefined in fA.
I don't know where to go from here. I'm using the Intel compiler,
version 7.0.
Thanks for any advice.
Trish Van Zandt
The Ohio State University
comprehend modules and interfaces and whatnot, so hopefully someone
can help me easily, knock me on the head and tell me to go away.
I have a complicated application containing two modules each with a
different subroutine (call them A and B) and function to be minimized
(call them fA and fB). Subroutines A and B both call NR's frprmn.
Now frprmn will only commumicate with function func, so I wrote an
external function func that uses the modules A and B and a common
block containing the variables that both fA and fB require. One of
the common variables is a flag, and func selects fA if flag is equal
to 1 and fB otherwise.
The vector alpha contains the variables passed to func from subroutine
A, and the vector beta contains the variables passed to func from
subroutine B. I initialize alpha, call frprmn, and depending on
exactly how I did the initialization, a variety of errors result. If
I initialize with an assignment statement, frprmn fails immediately
with "Allocate error 494: Allocation of Array with extent of
1065353216 failed." If I set alpha equal to another vector (passed to
A from the main program) then frprmn does not fail, passes alpha on to
fA, which then fails with an address error. Compiler diagnostics
indicate that alpha is undefined in fA.
I don't know where to go from here. I'm using the Intel compiler,
version 7.0.
Thanks for any advice.
Trish Van Zandt
The Ohio State University