Re: Stack corruption and memory leak problems in c++/Fortran application



Anndy wrote:
Hello Folks,

I am facing problem in a Porting project(HP-Unix->Windows XP(64 bit))
where there are lots of C++->Fortran and Fortran->C++ calls.

There are some thousands of files including FORTRAN and C++ code.
After performing few operation which involves lot of FORTRAN->C++ and C
++->FORTRAN calling, application gives stack overflow error or behaves
unexpectedly.

Is it possible that you have a recursive routine that isn't behaving well?



one more thing which i have noticed is, whenever i am making a call to
a FORTRAN function there is a increase in
application memory by 4Bytes.

On the stack? Do you suspect this change signifies something? What?



compiler c++ : MS Visual Studio 2005 / Compiling for 64 bit
compiler FORTRAN :Intel Fortran Compiler 9.1

Some environment specific advice. Have you tried building a debug version and seeing what the call stack looks like when the app crashes?



Can anyone please help in mentioning the possible problem areas ...

I'd like to reiterate glen herrmannsfeldt's advice that you verify that you're calling with the parameters you think you're calling with.

LR
.



Relevant Pages

  • Re: floating point... it still puzzles me :-)
    ... I think I need some advice... ... numerical computations done in Fortran: ... There are modern books with titles like "Accuracy of Numerical Compuatations" ... Fortran users tend to know a lot about numerical analysis also. ...
    (comp.lang.fortran)
  • Re: what to buy now?
    ... That's a pretty broad request for advice. ... What software you may find useful depends on what you want to do, or where you're going to be working (I'm assuming it's not in a CS dept since you're asking about Fortran:o). ... If everyone else in your dept is using matlab and you code everything in C++, you might stifle creative cross-fertilisation of ideas or applications. ...
    (comp.lang.fortran)
  • Re: data mining
    ... would like some advice on desigining a program to do one of them ... from scratch in Fortran, I would appreciate the group's suggestions as ... 5-10 attributes that would give you the maximum differentiation among ...
    (comp.lang.fortran)
  • Re: data mining
    ... and if you are talking about internet browsing data, ... would like some advice on desigining a program to do one of them ... from scratch in Fortran, I would appreciate the group's suggestions as ...
    (comp.lang.fortran)
  • Re: how can I parameterize a 1d function by extracting it from a 2d function?
    ... Richard's suggestion of using Fortran 90/95 instead of Fortran ... 77 compiler is the best advice. ... Second, while not advised, you can use Fortran 77 Single Precision as ... real function A ...
    (comp.lang.fortran)