- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a lot of dynamically allocated memory is used in my code. The code generated by Compaq Visual Fortran runs good. But when I use Intel Fortran Compiler for Linux to compile it, the performance drops terribly. I used gprof to dig out that this problem is related to several subroutines in which the dynamic memory is intensively used as well as pointers. But I don't know how to solve this problem. Does anybody have any experience or idea about this issue?
one of the subroutines mentioned about is give here. In the following code, the array elements of taLvl(level) are all dynamic memory.
Any suggestion or comments would be appreciated.
subroutine collect(level)
integer, intent(in):: level
integer iL,iGrpNum
complex cK,cEta
complex, dimension(:,:), pointer:: caCtrb2OutE, caCtrb2OutH
complex, dimension(:,:), pointer:: caCtrb2SonE, caCtrb2SonH
complex, dimension(:), pointer:: alpha
type(grp), dimension(:), pointer:: taGrp
integer g,m,n,iNbr,alphaIdx
iGrpNum=taLvl(level)%iGrpNum
iL=taLvl(level)%iL
cK=taLvl(level)%cK
cEta=taLvl(level)%cEta
taGrp=>taLvl(level)%taGrp
do g=1, iGrpNum
caCtrb2SonE=>taGrp(g)%caCtrb2SonE
caCtrb2SonH=>taGrp(g)%caCtrb2SonH
caCtrb2SonE=zero
caCtrb2SonH=zero
do n=1, taGrp(g)%iNbrNum
iNbr=taGrp(g)%iaNbr(n)
caCtrb2OutE=>taGrp(iNbr)%caCtrb2OutE
caCtrb2OutH=>taGrp(iNbr)%caCtrb2OutH
alphaIdx=taGrp(g)%iaAlphaIdx(n)
alpha=>taLvl(level)%caAlpha(:,alphaIdx)
do m=1, 2*iL**2
caCtrb2SonE(:,m) = caCtrb2SonE(:,m) + caCtrb2OutE(:,m)*alpha(m)
caCtrb2SonH(:,m) = caCtrb2SonH(:,m) + caCtrb2OutH(:,m)*alpha(m)
end do
continue
end do
continue
end do
end subroutine collect
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Which build of the Intel compiler?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page