- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there,
is there a way to control whether ifort uses malloc or virtualAlloc "behind" Fortran's allocate statements ?
As far as I've learned from other threads in this forum ifort does switch to virtualAlloc depending on the size of the memory to be allocated. However, I'm wondering if there is a way to control when to switch - which would of course allow to always use virtualAlloc.
Thanks in advance,
Sebi
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No, there is no user control over this. What problem are you trying to solve?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Steve,
thanks for your answer.
I'm trying to enforce data locality in an OpenMP parallelization. In the C/C++ world virtualAlloc would give me exactly what I need: reserving the memory, but not yet touching it. So, I can still exploit the first-touch policy as with Linux.
Is there another way to enforce data locality with OpenMP by ifort ?
I have searched quite a bit for it, but havn't found it. All I've found was moving to Fortran 2003 and use c_ptr's to get the C world's freedom. However, that's quite a dirty trick that moreover would require quite some code changes for me. So my hope was some kind of "backwards-enforced" use of virtualAlloc. I cannot really believe it should be impossible to build performant OpenMP applications also for multi-socket machines using ifort. Is it ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
"Impossible"? Certainly not. You're asking for some NUMA-awareness to Fortran ALLOCATE and we don't have that at this time, but there are other ways of allocating memory you can use. I agree it's not as convenient as ALLOCATE. I'll let the OpenMP experts here (of which I am not a member!) offer suggestions.

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