- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I have a program that works with huge arrays and because of this I have many DTLB L2 misses. I would like to reduce number of DTLB misses by using larger memory page size. As I understood, VirtualAlloc with MEM_LARGE_PAGES flag can be used for that purpose.
I'm not quite familiar with Fortran (I used to write in C/C++), so I'm not sure how to use VirtualAlloc to allocate multidimensional arraydeclared as:
DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:):: A.
Can anyone help me with this problem?
The second question here is the following. As I understood, MEM_LARGE_PAGES enables allocation of large pages with minimum size. I read though that IA-64 systems support 8 different page sizes, so how can I set the large page size more than minimal? Can it be selected programmatically? Or can this be done from OS (I'm running Windows Server 2003 R2 x64 on Itanium2)?
Thanks,
Olga
I have a program that works with huge arrays and because of this I have many DTLB L2 misses. I would like to reduce number of DTLB misses by using larger memory page size. As I understood, VirtualAlloc with MEM_LARGE_PAGES flag can be used for that purpose.
I'm not quite familiar with Fortran (I used to write in C/C++), so I'm not sure how to use VirtualAlloc to allocate multidimensional arraydeclared as:
DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:):: A.
Can anyone help me with this problem?
The second question here is the following. As I understood, MEM_LARGE_PAGES enables allocation of large pages with minimum size. I read though that IA-64 systems support 8 different page sizes, so how can I set the large page size more than minimal? Can it be selected programmatically? Or can this be done from OS (I'm running Windows Server 2003 R2 x64 on Itanium2)?
Thanks,
Olga
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would have thought that ifort must implement its allocations by VirtualAlloc(), alleviating that particular non-portability factor of Windows. In legacy code which drops into C and uses malloc(), you would of course require this change.
There hasn't been much discussion of Itanium-specific programming in recent years; Microsoft disowned Itanium in large segments of their market when AMD Opteron was introduced, and so it's difficult to get value from such efforts.
There hasn't been much discussion of Itanium-specific programming in recent years; Microsoft disowned Itanium in large segments of their market when AMD Opteron was introduced, and so it's difficult to get value from such efforts.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can't use external allocation methods for an ALLOCATABLE array. As I understand it, Intel Fortran does use VirtualAlloc internally, but I think only for larger requests.
Ordinarily, you can't use VirtualAlloc for a POINTER array either, but with the C interoperability features, you can. It would look something like this:
Ordinarily, you can't use VirtualAlloc for a POINTER array either, but with the C interoperability features, you can. It would look something like this:
[plain]use iso_c_binding double precision, pointer, dimension(:,:,:) :: A type(C_PTR) :: cp integer(C_INTPTR_T) :: vp ... vp = VirtualAlloc (....) call C_F_POINTER (TRANSFER(vp,cp), A, [100,200,300]) ! Now A is allocated with dimensions (100,200,300)[/plain]

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