strange behaviour secnds function

The same code:

a. compiled with gfortran and acml (external installation):

-bash-4.1$ gfortran -O3 -fopenmp ./axpy.F -o ./axpyGF -lacml_mp
-bash-4.1$ ./axpyGF
tiempo1-> 1.17187500E-02 , tiempo2-> 1.17187500E-02
tiempo1-> 3.90625000E-03 , tiempo2-> 1.95312500E-02
tiempo1-> 3.90625000E-03 , tiempo2-> 3.12500000E-02

b. compiled with pgf90 (or pgf95) and its own acml:

-bash-4.1$ pgf95 -O3 -mp -Mextend -mcmodel=medium ./axpy.F -o ./axpyPGI -lacml_mp
-bash-4.1$ ./axpyPGI
tiempo1-> 0.000000 , tiempo2-> 0.000000
tiempo1-> 0.000000 , tiempo2-> 0.000000
tiempo1-> 0.000000 , tiempo2-> 0.000000

-bash-4.1$ grep secnds axpy.F
inicio1=secnds(0.0)
tiempo1=secnds(inicio1)
inicio2=secnds(0.0)
tiempo2=secnds(inicio2)

-bash-4.1$ grep inicio1,inicio2 axpy.F
real*4 inicio1,inicio2,tiempo1,tiempo2,tiempo

It seems to be that in PGI version there is less precision than in GNU version. Is this posible? Should I change the intrinsic fuction?

ps. I already try to use “real*4” instead of “double precision” with the same result:

-bash-4.1$ pgf95 -O3 -mp -Mextend -mcmodel=medium ./axpy.F -o ./axpyPGI2 -lacml_mp
-bash-4.1$ ./axpyPGI2
tiempo1-> 0.000000000000000 , tiempo2-> 0.000000000000000
tiempo1-> 0.000000000000000 , tiempo2-> 0.000000000000000
tiempo1-> 0.000000000000000 , tiempo2-> 0.000000000000000
tiempo1-> 0.000000000000000 , tiempo2-> 0.000000000000000

ps.2. I know that I can use cpu_time, but I think this is a workaround not a real solution.

Hi APLICACIONS,

SECNDS returns the number of seconds since midnight less the input value, hence the granularity is in seconds. Other compilers may have different granularity since the intrinsic is not standard.

ps.2. I know that I can use cpu_time, but I think this is a workaround not a real solution.

SECNDS is a F77 extension and it’s use is discouraged per the Gfortran help page (See: SECNDS (The GNU Fortran Compiler)). CPU_TIME is standard and hence you may wish to consider updating your code.

Thanks,
Mat