Results 1 to 3 of 3

Thread: allocatable arrays

  1. #1
    Junior Member
    Join Date
    Jun 2008
    Posts
    2

    allocatable arrays

    I am using gfortran f90. I was wondering can anyone else see allocatable arrays?. They seem to show up as a structure

  2. #2

    Re: [jfchessa] allocatable arrays

    The problem with allocatable arrays in gfortran (and g95, iirc) is long-standing. The basic problem is that hte debug information produced by the compiler is somewhat immature. You're seeing what is basically an intermediate step towards producing the information we expect. The data in the struct you see should be translated into DWARF (the debug interface spec) and then we would be able to translate the data directly, as you see with other F90 compilers. I know one of the the Labs has been working with Red Hat to improve things, and allocatable arrays was on the list, but I don't know if they've addressed this specific issue. If you have a Red Hat subscription, you can check

    https://rhn.redhat.com/network/software/channels/packages.pxt?upper=643&lower=624&cid=6007

    Which is a beta version of the compiler. That should be released in RH 5.2, but I don't know that the changes have made their way back into the GNU community yet. Or if this specific issue was addressed.

    In the meantime, you can dive on the data pointer, and then change the type to agree with the array type and size. For instance, I have a array of 10 int*8 that has just been allocated.

    ALLOCATE (ifp(10))

    If I dive on ifp after the allocate, and then dive on DATA, I see the corect data for the first element. Change the void type to integer*8 (10) (or $integer_8(10)) and you should see your data.

    I hope that helps.

    Regards,
    Pete Thompson
    TotalView Customer Services

  3. #3
    Junior Member
    Join Date
    Jun 2008
    Posts
    2

    Re: [Peter-TotalView-Tech] allocatable arrays

    Great that works good enough for me

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •