- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am a heavy user of Visual FORTRAN under Win2k. On HPUX/Solaris there is a software package called PURIFY that checks for memory errors at run time (access past end of an array, freed memory read, memory leaks etc etc.) This package has been ported to the PC but only for C/C++.
Are you aware of any similar package that will work with CVF under Win2k to check for these types of errors?
Thanks in advance
Please reply via e-mail connell@crd.ge.com
Are you aware of any similar package that will work with CVF under Win2k to check for these types of errors?
Thanks in advance
Please reply via e-mail connell@crd.ge.com
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
CVF (like all modern Fortran compilers) has built-in checks for:
- access out of array bounds (run-time)
- attempt to write into constant memory (run-time)
- uninitialized variables (compile-time, only partly)
these are all by default on in Debug configurations. Check out switches at Project/Settings/Fortran/Run-time and Fortran data categories. Array bounds checking is IMO especially important; most C/C++ compilers don't have it built-in due to language design -- they don't have arrays, only pointers.
CVF doesn't have built-in memory leak checks. However, due to language design, it's not so easy to make them in Fortran -- the only ways to do it are extensive use of POINTERs and calling C/C++ based functions (including Windows APIs). Most 3rd-party tools which work with Visual C++ should, however, be able to detect such leaks in CVF programs (as CVF and VC++ share C RTL and Win32 libraries, .pdb file format etc).
Jugoslav
- access out of array bounds (run-time)
- attempt to write into constant memory (run-time)
- uninitialized variables (compile-time, only partly)
these are all by default on in Debug configurations. Check out switches at Project/Settings/Fortran/Run-time and Fortran data categories. Array bounds checking is IMO especially important; most C/C++ compilers don't have it built-in due to language design -- they don't have arrays, only pointers.
CVF doesn't have built-in memory leak checks. However, due to language design, it's not so easy to make them in Fortran -- the only ways to do it are extensive use of POINTERs and calling C/C++ based functions (including Windows APIs). Most 3rd-party tools which work with Visual C++ should, however, be able to detect such leaks in CVF programs (as CVF and VC++ share C RTL and Win32 libraries, .pdb file format etc).
Jugoslav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To clarify things - I am using dynamic memory allocation and cray pointers. i.e.
pointer (ip_x, x(1))
ip_x = malloc(4*100)
I believe the error checking you speak of only applies to fixed size arrays i.e.
dimension x(100)
not dynamic arrays
pointer (ip_x, x(1))
ip_x = malloc(4*100)
I believe the error checking you speak of only applies to fixed size arrays i.e.
dimension x(100)
not dynamic arrays
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The error checking applies to:
- static arrays
- ALLOCATABLE arrays
- pointer arrays
- assumed-shape dummy arguments
- Cray target arrays containing DIMENSION statement, i.e.
integer x(4*100); pointer(ip_x, x); ip_x = malloc(4*100)
but not on
- Cray targets with (*) size.
- assumed-size dummy arguments.
If I were you, I would rework all the non-standard crays to standard and portable ALLOCATABLE arrays. I understand, however, that thay may not be an (easy) option.
Jugoslav
- static arrays
- ALLOCATABLE arrays
- pointer arrays
- assumed-shape dummy arguments
- Cray target arrays containing DIMENSION statement, i.e.
integer x(4*100); pointer(ip_x, x); ip_x = malloc(4*100)
but not on
- Cray targets with (*) size.
- assumed-size dummy arguments.
If I were you, I would rework all the non-standard crays to standard and portable ALLOCATABLE arrays. I understand, however, that thay may not be an (easy) option.
Jugoslav

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