Jeff: Below is the little routine that consumes big cpu time (~8%). Yes it does do **real. Its called 96 times per time iteration. (this is also where I was having the ncalls problem). Any suggestions are welcome.. --Ben !----------------------------------------------------------------------- subroutine aion(si,so,len,lat) CDIR$ VFUNCTION EXPHF implicit none C **** C **** CALCULATES INTEGRATED F(X) NEEDED FOR TOTAL AURORAL C **** IONIZATION C **** C **** SI = X, F(X) RETURNED IN SO C **** LEN = ARRAY LENGTH C **** ! Args: integer,intent(in) :: len,lat real,intent(in) :: si(len) real,intent(out) :: so(len) ! ! Local: real :: cc(8),exphf integer :: i ! integer :: ncalls common/aion_ncalls/ ncalls ! !!MIC$ GUARD !$OMP CRITICAL ncalls = ncalls+1 write(6,"('aion: lat=',i2,' ncalls=',i5)") lat,ncalls !$OMP ENDCRITICAL !!MIC$ ENDGUARD ! ! CONSTANTS FOR PARAMETERIZATION (ED HSU) ! cc = | (/3.2333134511131 , | 2.5658873458085 , | 2.2540957232641 , | 0.72971983372673, | 1.1069072431948 , | 1.7134937681128 , | 1.8835442312993 , | 0.86472135072090/) ! ! len = len2 = imaxp4*kmax = 76*28 = 2128 ! do i=1,len so(i) = cc(1)*si(i)**cc(2)* | exphf(-cc(3)*si(i)**cc(4))+ | cc(5)*si(i)**cc(6)* | exphf(-cc(7)*si(i)**cc(8)) enddo return end !----------------------------------------------------------------------- block data setaion implicit none integer :: ncalls common/aion_ncalls/ ncalls data ncalls/0/ end block data setaion