- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi i am using fortran for linux 9.0
i have a bunch of legacy code written in f77 and there all real declaration are real*8 ,
i have been coding in f90 free format , and i wrote my modules and libraries and and have other people's libraries also in f90, here the declararation are simply real , and use some allocateble arrays
i added in my makefile the -r8 option for my f90 files and it compiles with no warning any time i run i got 'error glibc detected double free or corruption '
when i try to deallocate the arrays ,
I compiled without the -r8 option and so far seems to be compatible , however i am afraid in the future one call from my new code to one subroutine in the old legacy code it might not pass the values as it supposed to be
any way to have all real of the same size ?
i have a bunch of legacy code written in f77 and there all real declaration are real*8 ,
i have been coding in f90 free format , and i wrote my modules and libraries and and have other people's libraries also in f90, here the declararation are simply real , and use some allocateble arrays
i added in my makefile the -r8 option for my f90 files and it compiles with no warning any time i run i got 'error glibc detected double free or corruption '
when i try to deallocate the arrays ,
I compiled without the -r8 option and so far seems to be compatible , however i am afraid in the future one call from my new code to one subroutine in the old legacy code it might not pass the values as it supposed to be
any way to have all real of the same size ?
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My guess is that you have a mismatch in types when passing arguments and are accessing outside the actual array or variable. One way to detect this is to use 9.1 ( a current one, preferably) and the "-gen_interface -warn interface" options when building.
I generally recommend against "big hammers" such as -r8, especially when you don't control all the code, as it can cause problems similar to yours.
I generally recommend against "big hammers" such as -r8, especially when you don't control all the code, as it can cause problems similar to yours.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page