- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
CVF Version 6.6c
I have a program that dynamically allocates a user defined data structure that itself contains allocatable components, some of which are also user defined. When the program attempts to allocate the data structure and it is too large for the available memory the STAT status correctly flags an error but there appears to be no memory available for the program to continue. It seems that the memory is allocated until there is none left butthen is not released upon failure thus causing the program to hang. Is this behaviour correct? AlsoI'm not sure whether thisapplies tosimpler allocatable data structures or standard FORTRAN data types.
To avoid this I would have to somehow calculate the size of the proposed data structure and then obtain the amount of available memory before trying to allocate.
I've also noticed that if an allocation fails any subsequent
if(allocated(array)) deallocate(array)
statementswill crash the program.
Any advice on these metterswould be appreciated.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That said, CVF 6.6C was left with many bugs in its support for allocatable arrays. Some of these bugs might cause the behavior you note.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page