Thread: C++/Fortran on AIX

  1. #1
    Registered User
    Join Date
    May 2008
    Location
    Paris
    Posts
    248

    C++/Fortran on AIX

    Dear all,

    My C++ program, which calls various Fortran functions (using wrappers), works very well on Windows and Sun Solaris, but crashes badly on AIX.

    All arguments in the wrapper are correct, but at the first Fortran instruction it badly crashes.

    Can this be due to the size of integers/doubles/... ? I know that AIX is a 64-bit machine, whereas I've always tested it on 32-bit machines.

    Could anyone enlighten me? Thank you very much!

    Mark

    edit: Of course I do re-compile and re-link all of the code..
    Last edited by MarkZWEERS; 02-18-2009 at 02:29 AM.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Did you just guess there was a size problem, or did you try to construct a really simple test case to test your idea?

    Crawl through that code one instruction at a time using a debugger, and figure out exactly what the size/alignment issue is. When you know that, you should be able to fix the main code.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. AIX compiler
    By MarkZWEERS in forum C++ Programming
    Replies: 4
    Last Post: 01-21-2009, 04:50 AM
  2. AIX passwdpolicy() subroutine
    By syndex in forum C Programming
    Replies: 1
    Last Post: 10-06-2008, 06:04 PM
  3. Implementing POSIX Timers on AIX - Holy Moly
    By dedham_ma_man in forum C Programming
    Replies: 2
    Last Post: 10-03-2007, 02:36 AM
  4. AIX unix system script (need help)
    By Liam Battle in forum Linux Programming
    Replies: 4
    Last Post: 02-10-2002, 05:34 PM