PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Course

unexpected load/store datatype

Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message

Joined: 26 Jun 2013
Posts: 2

PostPosted: Wed Jun 26, 2013 4:43 am    Post subject: unexpected load/store datatype Reply with quote

Hi, I have a problem with a small subroutine that is the only part a want to parallelize of my program. Compiler says

PGF90-S-0000-Internal compiler error. unexpected load datatype 92 (EMTparms_class_v3.f95: 605)
PGF90-S-0000-Internal compiler error. unexpected store datatype 92 (EMTparms_class_v3.f95: 605)

where line 605 is the 'end subroutine' statement. Here is the code

attributes(global) subroutine inner_loop(d_r0_lat, d_sigma_ll, d_cell, d_V_ll, rcut, &
                                         acut, kappadbeta_l, betas0_l, n_l, i, pars_l, &
                                         d_sigma_ll_i, d_sum_V_ll)
    ! 'device' means: implicitly private to the module
    ! INPUT
    integer, value                          ::  n_l, i
    real(8), device, dimension(:,:)         ::  d_r0_lat
    real(8), device, dimension(:)           ::  d_sigma_ll
    real(8), device, dimension(:)           ::  d_sigma_ll_i, d_sum_V_ll
    real(8), device, dimension(3)           ::  d_cell
    real(8), device                         ::  d_V_ll
    real(8), value                          ::  rcut, acut
    real(8), value                          ::  kappadbeta_l, betas0_l
    type(EMTparms), value                   ::  pars_l

    real(8), device, dimension(3)           ::  r3temp
    real(8), device                         ::  r, theta, rtemp
    integer                                 ::  thid

                          ! Only works if n_l <= 1024 lattice atoms.
    thid = threadIdx%x    ! Otherwise blockDim needs to be used additionally
                          ! e. g. (blockidx%x-1)*blockdim%x + threadidx%x

    if (thid > i .and. thid <= n_l) then
      r3temp(1) = d_r0_lat( 1,i ) - d_r0_lat( 1,thid )  &
                  - ( d_cell(1) * ANINT( (d_r0_lat(1,i) &
                  - d_r0_lat(1,thid)) / d_cell(1)) )

      r3temp(2) = d_r0_lat( 2,i ) - d_r0_lat( 2,thid )  &
                  - ( d_cell(2) * ANINT( (d_r0_lat(2,i) &
                  - d_r0_lat(2,thid)) / d_cell(2)) )

      r3temp(3) = d_r0_lat(3,i) - d_r0_lat(3,thid)

      r = sqrt( sum( r3temp**2 ) )

      theta = 1.0 / (1 + exp( acut * (r - rcut) ) )

      rtemp = theta*exp(-pars_l%eta2 * (r - betas0_l) )
      d_sigma_ll(thid) = d_sigma_ll(thid) + rtemp

      d_sigma_ll_i(thid) = rtemp

      rtemp = theta*exp(-kappadbeta_l * (r - betas0_l))
      d_sum_V_ll(thid) = rtemp

    else if (thid <= i) then
      d_sigma_ll_i(thid) = 0.0
      d_sum_V_ll(thid)   = 0.0
        WRITE(*,*) "ERROR: thid > n_l"

    end if

end subroutine inner_loop

I'm relatively new to Fortran, so it might just be some stupid mistake, but I could find any help elsewhere. Thanks in advance!
Back to top
View user's profile

Joined: 30 Jun 2004
Posts: 6745
Location: The Portland Group Inc.

PostPosted: Wed Jun 26, 2013 10:02 am    Post subject: Reply with quote

Hi Ingo11,

An ICE is always a problem with the compiler. Can you put together a reproducing example and sent it to PGI Customer Service (

I can't reproduce the error with the code you provided since the definition for EMTparams is missing, but my best guess is that the problem has to do with passing a dervived type by value. Can you try rewritting the code so you're only passing the value of eta2 instead of pars_l?

Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling All times are GMT - 7 Hours
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © phpBB Group