- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a weird problem. My project sometimes goes out of memory . When I use fortran powerstation i will endup with out of memory message. For the same code if I use Inter fortran compiler the whole computer hangs during memory allocation. Is there anyway I can stop the code excuction if its out of memory.
PS: I am using visual studio 2008 as well
Regards,
skravoof
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Some people like to allocate several arrays in one allocate statement which is ok but if you are doing this and your arrays are large then IMHO it is better to allocate one array at a time and check the status.
If you also have large arrays(not sized by allocate) then use /heap-arrays:0
See in VisualStudio Project -> Properties -> Fortran -> Optimization -> Heap Arrays
Les
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You wrote "For the same code if I use Inter fortran compiler the whole computer hangs during memory allocation". That is hard to believe. An ALLOCATE statement either succeeds or fails. I have never seen an ALLOCATE statement cause a computer to hang. On the other hand, if the status is not checked following a failed ALLOCATE, and the not-yet-properly-allocated memory is used, that can certainly cause the hang.
You can use the /traceback compiler option to locate the part of your program where a problem occurs. You can use the STAT=
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am new in the use of the coarray ifort facilities, for linux, and I have a problem similar to the one described before. The following is a summary of the code that fails.
.......................... (ifort code)
real(sp), allocatable :: snr(:)[:]
........................(ifort code)
allocate (snr(NumberBeams)
write(*,*) "snr ",stat
..................................................
And the program hangs, and never executes the last sentence.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
>>>For the same code if I use Inter fortran compiler the whole computer hangs during memory allocation. Is there anyway I can stop the code excuction if its out of memory.>>>
Can you use process explorer or better VMmap to confirm out-of-memory scenario?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@skravoof
any updates on your problem?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Antonio R. wrote:
I am new in the use of the coarray ifort facilities, for linux, and I have a problem similar to the one described before. The following is a summary of the code that fails.
.......................... (ifort code)
real(sp), allocatable :: snr(:)[:]
........................(ifort code)
allocate (snr(NumberBeams)
,stat=stat)
write(*,*) "snr ",stat..................................................
And the program hangs, and never executes the last sentence.
Popping back to this one for a second ... please look at your code, and make sure that the allocate statement is happening on ALL images. It is a requirement that all images perform the same allocate on a coarray object. Also, the language requires that all images wait until everyone has completed the allocation before continuing.
If you have code that only performs the allocation on some of the images, well, they are waiting patiently for the ones not participating.
--Lorri

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