Dear all,
I usually compile in this way:
ifort -fpp -r8 *.f90
In this way I have double precision with my real number.
Is there any way to do the same thing with complex number?
Thanks a lot
链接已复制
Dear all, Dear Lorri,
I am working with complex number and MPI and I have noticed some difference in my results when I use MPI or not. I do not know if there is a problem in my code or this difference is normal. The difference is less than 1.e-19.
Thanks
-fp-model source specifically disables optimizations where round-off varies with alignment. If, instead, you want to assure all ranks achieve full performance and reduce these variations, you would set -align array32byte.
-r8 does not correct the MPI data type. You need to specify the correct data type when using MPI.
Note that I think it is BAD practice to force the compilation of programs with such flags. Do so by other means to ensure that it always works.
Dear Nick, Dear all,
I know that, indeed I use:
SELECT CASE(KIND(realtest)) CASE(4) MPIdata%AUTO_REAL = MPI_REAL !Single precision used for real MPIdata%AUTO_COMP = MPI_COMPLEX CASE(8) MPIdata%AUTO_REAL = MPI_DOUBLE_PRECISION !Double precision used for real MPIdata%AUTO_COMP = MPI_DOUBLE_COMPLEX END SELECT
So I do not know there is a bug or not
Thanks
A difference of 1e-19 is less than the precision capability of a double (~16 decimal places).
The order in which operations are performed will make such differences
MPI rank 1 or single may accumulate iterating an entire array
MPI rank 2 may accumulate iterating two halves of the array, then reducing the two partial sums.
The two results may differ when the numbers exceed the precision capability and/or where they differ greatly in magnitude.
Jim Dempsey
