Why does PVF slow than IVF while reading ascii file?

Hi, All

I happened to find that reading the same ascii file using the execution compiled by PVF 10.9 spent 10.76 seconds.
However, using the execution compiled by IVF 11.1.065 (the same source code) spent just 1.6 seconds.
The platform is Windows XP 32-bit.
The ascii file is about 25.2 Mb and the main source code is the following…
Do I do something wrong?

    do j=1, 67600
        read(fid,'(A3,A6,1X,A2)',advance='no') Y_TYPE, ID, REG_MESSAGE
        if (REG_MESSAGE == 'ER') then
            read(fid,*)
            WX_Est(n_eqn)%OMP_P_Eqn(j)%Nx=0
            allocate( WX_Est(n_eqn)%OMP_P_Eqn(j)%COEF(1) )
            WX_Est(n_eqn)%OMP_P_Eqn(j)%COEF(1)=-9999.
            cycle
        else
            read(fid,'(I3)',advance='no') WX_Est(n_eqn)%OMP_P_Eqn(j)%Nx
            allocate(WX_Est(n_eqn)%OMP_P_Eqn(j)%COEF(WX_Est(n_eqn)%OMP_P_Eqn(j)%Nx+1))
            allocate(WX_Est(n_eqn)%OMP_P_Eqn(j)%CODE(WX_Est(n_eqn)%OMP_P_Eqn(j)%Nx) )
            write(S_FORMAT,'(A4,I2,A12,I2,A8)')"(1X,",WX_Est(n_eqn)%OMP_P_Eqn(j)%Nx+1,"(ES15.8,1x),",&
                  &WX_Est(n_eqn)%OMP_P_Eqn(j)%Nx,"(A8,1x))"
            read(fid,trim(S_FORMAT))WX_Est(n_eqn)%OMP_P_Eqn(j)%COEF(k),&
                  &k=1,WX_Est(n_eqn)%OMP_P_Eqn(j)%NX+1),&
                  &WX_Est(n_eqn)%OMP_P_Eqn(j)%CODE(k),&
                  &k=1,WX_Est(n_eqn)%OMP_P_Eqn(j)%NX)
            do k=1,WX_Est(n_eqn)%OMP_P_Eqn(j)%NX
                WX_Est(n_eqn)%OMP_P_Eqn(j)%CODE(k)=&
                &adjustl(WX_Est(n_eqn)%OMP_P_Eqn(j)%CODE(k))
            end do
        end if
    end do

Hi cyFeng,

Unfortunately, we can’t tell without a reproducing example. Can you send a test case to PGI Customer Service (trs@pgroup.com)?

Though, one thing to try is replace your format strings with FORMAT statements. i.e.

read(fid,’(A3,A6,1X,A2)’,advance=‘no’) …
becomes
read(fid,97,advance=‘no’) …
97 format(A3,A6,1X,A2)

read(fid,’(I3)’,advance=‘no’) …
becomes
read(fid,98,advance=‘no’) …
98 format(A3,A6,1X,A2)

write(S_FORMAT,’(A4,I2,A12,I2,A8)’) …
becomes
write(S_FORMAT,99) …
99 format(A3,A6,1X,A2

Thanks,
Mat

Hi Mat,

I tried your suggestion. But…in vain
The test case have been sent to trs@pgroup.com. (titled “test case for Mat”)
Thank you for the kind help.

cyFeng

Hi cyFeng,

I was able to recreate your issue and have sent a report to our engineers for further investigation (TRS#17898).

Most the time is spent in the Microsoft system libraries. We’re not sure how much control we’ll have in speeding these routines up, but we will make our best effort.

Thanks for bringing this issue to our attention,
Mat

Hi Mat,

Thanks for your help.
BTW, will it be improved soon…?

Hi cyFeng,

Sorry, we don’t have a time line yet. If it’s something simple that we can control, then it’s likely to be soon. If it’s very complex or requires changes by Microsoft, it could be awhile.

  • Mat