- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear all,
I find very useful to print out the CPU time in a Fortran program.
I would like to know if is possible to print out also the RAM or memory usage.
Thanks a lot
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I believe IVF uses the C Runtime library heap manager, this can be verified with VTune on Release build with loop performing very large number of allocate/deallocate. Or stepping into an allocate in Debug build from the disassembly window (this may take quite a few steps but eventually you will get there). If you can confirm the C runtime library heap manager is used, then you can call the C heap manager function (e.g. heapwalk) to identify the in-use nodes. There are things that will complicate this process. At least this should get you going.
Another option you could do, if you are adventuresome, is to look at how a C/C++ program overloads new/delete and malloc/free TBB does this. This technique could potentially be implemented in your Fortran program. Essentially this is a filter that you insert between the Fortran code that calls malloc/free and the CRTL malloc/free. In there you can keep tally of the total allocations/deallocations in addition to other statistics.
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Note that what Jim describes is usage of the C heap, which is not RAM and not all of the virtual memory a program uses. Intel Inspector XE has a memory growth analysis feature that can track virtual memory usage over time.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page