- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Using the "-r8" switch also affects the size of complex variables.
Are you seeing something different?
--Lorri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you set -r8 you must call explicitly the d and z blas functions and the like. R8 doesn't adjust mkl calls.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you want to eliminate minor variations in results under MPI you should look into the MKL conditional numerical reproducibility feature.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear All, Dear Tim,
I do not use any mkl libraries in this case.
I have notice that this difference does not affect my results.
I think that this small differences are normal, am I right?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
-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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
-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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page