From: Craig Powers on
aeroguy wrote:
> There is no error message from excel. it just closes and i get the
> standard warning that excel gives, asking me if i want to restart
> excel.
>
> and when i put the breakpoint at the fortran call. this is where excel
> just closes..

That's interesting. I've done most of my mixed language Fortran/VB
stuff with VB proper rather than Excel, so I don't have much experience.
I would guess, though, that it's the issue with the argument mismatch.
Double-check the mixed language docs for CVF (in my experience,
they're excellent) to be sure of the right way to do it on the Fortran
side. On the Excel side, pass the first element of the array by
reference, and you'll effectively get Fortran sequence association to
the Fortran side.
From: aeroguy on
On Dec 6, 12:35 am, Craig Powers <craig.pow...(a)invalid.invalid> wrote:
> aeroguy wrote:
> > There is no error message from excel. it just closes and i get the
> > standard warning that excel gives, asking me if i want to restart
> > excel.
>
> > and when i put the breakpoint at the fortran call. this is where excel
> > just closes..
>
> That's interesting.  I've done most of my mixed language Fortran/VB
> stuff with VB proper rather than Excel, so I don't have much experience.
>   I would guess, though, that it's the issue with the argument mismatch..
>   Double-check the mixed language docs for CVF (in my experience,
> they're excellent) to be sure of the right way to do it on the Fortran
> side.  On the Excel side, pass the first element of the array by
> reference, and you'll effectively get Fortran sequence association to
> the Fortran side.
Thanks!! I will the experiments on Monday. At home I don't have intel
compiler.
From: e p chandler on

"Craig Powers" <craig.powers(a)invalid.invalid> wrote in message
news:hfeclr$rn9$1(a)news.eternal-september.org...
> aeroguy wrote:
>> There is no error message from excel. it just closes and i get the
>> standard warning that excel gives, asking me if i want to restart
>> excel.
>>
>> and when i put the breakpoint at the fortran call. this is where excel
>> just closes..
>
> That's interesting. I've done most of my mixed language Fortran/VB stuff
> with VB proper rather than Excel, so I don't have much experience. I would
> guess, though, that it's the issue with the argument mismatch.
> Double-check the mixed language docs for CVF (in my experience, they're
> excellent) to be sure of the right way to do it on the Fortran side. On
> the Excel side, pass the first element of the array by reference, and
> you'll effectively get Fortran sequence association to the Fortran side.

Just to be pedantic - CVF differs in its defaults and needed settings from
IVF, so using the CVF manual might lead the OP - who is using IVF - astray.

--- e



From: Craig Powers on
e p chandler wrote:
>
> "Craig Powers" <craig.powers(a)invalid.invalid> wrote in message
> news:hfeclr$rn9$1(a)news.eternal-september.org...
>> aeroguy wrote:
>>> There is no error message from excel. it just closes and i get the
>>> standard warning that excel gives, asking me if i want to restart
>>> excel.
>>>
>>> and when i put the breakpoint at the fortran call. this is where excel
>>> just closes..
>>
>> That's interesting. I've done most of my mixed language Fortran/VB
>> stuff with VB proper rather than Excel, so I don't have much
>> experience. I would guess, though, that it's the issue with the
>> argument mismatch. Double-check the mixed language docs for CVF (in my
>> experience, they're excellent) to be sure of the right way to do it on
>> the Fortran side. On the Excel side, pass the first element of the
>> array by reference, and you'll effectively get Fortran sequence
>> association to the Fortran side.
>
> Just to be pedantic - CVF differs in its defaults and needed settings
> from IVF, so using the CVF manual might lead the OP - who is using IVF -
> astray.

Oops, sorry for the inaccuracy. I should have said to check the manual
for the compiler being used, I'm sure the IVF docs are as comprehensive
as the CVF docs.
From: aeroguy on
On Dec 6, 3:19 am, Craig Powers <craig.pow...(a)invalid.invalid> wrote:
> e p chandler wrote:
>
> > "Craig Powers" <craig.pow...(a)invalid.invalid> wrote in message
> >news:hfeclr$rn9$1(a)news.eternal-september.org...
> >> aeroguy wrote:
> >>> There is no error message from excel. it just closes and i get the
> >>> standard warning that excel gives, asking me if i want to restart
> >>> excel.
>
> >>> and when i put the breakpoint at the fortran call. this is where excel
> >>> just closes..
>
> >> That's interesting.  I've done most of my mixed language Fortran/VB
> >> stuff with VB proper rather than Excel, so I don't have much
> >> experience. I would guess, though, that it's the issue with the
> >> argument mismatch. Double-check the mixed language docs for CVF (in my
> >> experience, they're excellent) to be sure of the right way to do it on
> >> the Fortran side.  On the Excel side, pass the first element of the
> >> array by reference, and you'll effectively get Fortran sequence
> >> association to the Fortran side.
>
> > Just to be pedantic - CVF differs in its defaults and needed settings
> > from IVF, so using the CVF manual might lead the OP - who is using IVF -
> > astray.
>
> Oops, sorry for the inaccuracy.  I should have said to check the manual
> for the compiler being used, I'm sure the IVF docs are as comprehensive
> as the CVF docs.- Hide quoted text -
>
> - Show quoted text -

I guess this the problem that is happening here

"
In a single-language program, calling conventions are nearly always
correct, because there is one default for all routines and because
header files or Fortran module files with interface blocks enforce
consistency between the caller and the called routine.

In a mixed-language program, different languages cannot share the same
header files. If you link Fortran and c routines that use different
calling conventions, the error is not apparent until the bad call is
made at run time. During execution, the bad call causes indeterminate
results and/or a fatal error. The error, caused by memory or stack
corruption due to calling errors, often occurs in a seemingly
arbitrary place in the program.

"

I am still experimenting and trying to get at the root of this
problem.

Looking at the code provided, could this be the problem.

Any ideas?