PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

Enabling inlining causes error

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



Joined: 19 Dec 2013
Posts: 14

PostPosted: Mon Jan 20, 2014 10:37 am    Post subject: Enabling inlining causes error Reply with quote

I developed code using Intel Fortran, and I am now porting it to PGI. When I enable inlining, I get an "error F0000 : Internal compiler error. readin_func:can't scan 1st line"

The following two posts are relevant. The old post is almost exactly my problem, which the more recent post claims was fixed long ago.
http://www.pgroup.com/userforum/viewtopic.php?p=3800&sid=9d4c4a1bae60ca8c58c078c797497d70
http://www.pgroup.com/userforum/viewtopic.php?p=16054&sid=a6a72063b48df0aed21c26452b07cc1e
I am using PVF 13.10. The following two files, when compiled with inlining enabled, reproduce this error. Any thoughts?

ConsoleApp.f90
Code:
      program Prog
      use AttenuationFilter
      implicit none
      call test_attenuation()
      end program Prog


AttenuationFilter.f90
Code:
module AttenuationFilter
    implicit none
    real, parameter :: &
        Pr = 101.325, &
        T0 = 293.15, &
        T01 = 273.16

    contains
   
    subroutine test_attenuation()
        real :: Pa,f,hr,T,s
        integer :: i
        f = 1000.  !Hz !!!!TODO!!!! Is this Hz?
        Pa = 101.325 !kPa
        T = 273.15 + 40.
        hr = .5
        s = 500.       
       
        write(*,*) "Checking attenuation with frequency..."
        do i = 1,10
            write(*,*) "   ",10.**i,attenuation(Pa,10.**i,hr,T,s),&
                attenuated_amplitude(attenuation(Pa,10.**i,hr,T,s),1.)
        enddo
        write(*,*) "Checking attenuation with humidity..."
        do i = 0,10
            write(*,*) "   ",.1*i,attenuation(Pa,f,.1*i,T,s),&
                attenuated_amplitude(attenuation(Pa,f,.1*i,T,s),1.)
        enddo
        write(*,*) "Checking attenuation with pressure..."
        do i = 1,10
            write(*,*) "   ",10.*i,attenuation(10.*i,f,hr,T,s),&
                attenuated_amplitude(attenuation(10.*i,f,hr,T,s),1.)
        enddo
        write(*,*) "Checking attenuation with temperature..."
        do i = 1,10
            write(*,*) "   ",100.*i,attenuation(Pa,f,hr,100.*i,s),&
                attenuated_amplitude(attenuation(Pa,f,hr,100.*i,s),1.)
        enddo
    end subroutine   
   
    real function attenuation(Pa,f,hr,T,s)
        real, intent(in) :: Pa,f,hr,T,s
        attenuation = 1.
    end function
   
   
    real function attenuated_amplitude(attenuation,Pi)
        real, intent(in) :: attenuation, Pi
        real :: x
        x = 1./(10. * log((exp(1.))**2.))
        attenuated_amplitude = Pi * exp(-x * attenuation) ![Pa]
    end function
   
   
end module


Build output:
Code:
c:\program files\pgi\win64\13.10\bin\pgfortran.exe -Hx,123,8 -Hx,123,0x40000 -Hx,0,0x40000000 -Mx,0,0x40000000 -Hx,0,0x20000000 -Bstatic -Mbackslash -Mfree -I"c:\program files\pgi\win64\13.10\include" -I"C:\Program Files\PGI\Microsoft Open Tools 11\include" -I"C:\Program Files (x86)\Windows Kits\8.0\Include\shared" -I"C:\Program Files (x86)\Windows Kits\8.0\Include\um" -fastsse -Mipa=fast,inline -O3 -Minline -Minform=warn -module "x64\Release" -o "x64\Release\AttenuationFilter.obj" -c "C:\Users\Andrew Wilson\Documents\Visual Studio 2012\Projects\InliningProblem\AttenuationFilter.f90"

Command exit code: 2

Command output: [C:\Users\Andrew Wilson\Documents\Visual Studio 2012\Projects\InliningProblem\AttenuationFilter.f90(21) : error F0000 : Internal compiler error. readin_func:can't scan 1st line 297 PGF90/x86-64 Windows 13.10-0: compilation aborted ]
Back to top
View user's profile
mkcolg



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

PostPosted: Mon Jan 20, 2014 6:09 pm    Post subject: Reply with quote

Hi Andrew,

Thank you for the example. I was able to reproduce the problem. I looks like an issue where the compiler isn't quoting a file path when creating a temp file used in inline extraction. Hence, when the path contains a space, this causes problems.

I sent a report to engineering (TPR#19775) for further investigation.

Best Regards,
Mat
Back to top
View user's profile
AndrewWilson41729



Joined: 19 Dec 2013
Posts: 14

PostPosted: Tue Jan 21, 2014 11:26 am    Post subject: Reply with quote

Hey, Mat,

Thanks for the update. Let me know if there's any news.

-- Andrew
Back to top
View user's profile
mkcolg



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

PostPosted: Wed Apr 02, 2014 10:03 am    Post subject: Reply with quote

Hi Andrew,

It looks like TPR#19775 was fixed in 14.3.

- Mat
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