Quantcast
Channel: Intel® Software - Intel® Fortran Compiler for Linux* and macOS*
Viewing all articles
Browse latest Browse all 2746

change run time just for a line

$
0
0

Dear all,

I wrote a very complex code. I mean a code with many subroutines and functions. I used to worked fine. Last few days I noticed that the code became very very slow. After that I noticed that this depends by a single line. If I comment this line the code became very fast again.

To be more clear, this is a peace of may code:

                  CALL PDEPositivity(status,QR)
                          IF(status.LT.0) THEN
                             QR = QQ(:,jp)
                          ENDIF
                     VL(1)  = QL(2)/QL(1)
                     VL(2)  = QL(3)/QL(1)
                     VR(1)  = QR(2)/QR(1)
                     VR(2)  = QR(3)/QR(1)

                      UU  = 0.5d0*(VL+VR)
                      !
                      VL=0.d0
                      VR=0.d0
                      UU=0.d0
                      VPL=0.d0
                      VPR=0.d0
                      !
                      FL = PDEflux(nVar,UU,QL(:))
                      FR = PDEflux(nVar,UU,QR(:))
                      FI = PDEflux(nVar,VPL,QQ(:,ip))
                      Gij =  0.5d0*(FL+FR)-FI
                      Vij =  0.5d0*(VL+VR)-VPL
!
                      Vfn(:,ip) = Vfn(:,ip)+VPR*W*VOL(jp)

If I comment the line

      Vfn(:,ip) = Vfn(:,ip)+VPR*W*VOL(jp)

all became fast again.

I do bot understand why, it looks a very simple line.

Someone could explain me why or where I am wrong?

Thanks alot


Viewing all articles
Browse latest Browse all 2746

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>