Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Jeffrey_Konz
Beginner
42 Views

using compiler flags to cast to 64-bits

Hello all,

I am compiling with 11.1 Fortan compiler, using flags '-integer_size 64 -real_size 64 -double_size 128'.
My questions is do these compiler flags also effect complex declarations?

Will the declaration "COMPLEX A" be cast to 'DOUBLE COMPLEX A"?

Also how about intrinsic call "conjg()" ? Will it automatically be recast to dconjg() or do I need to edit the source to explicitly call 'dconjg' ?

Thanks,

-Jeff
0 Kudos
1 Reply
mecej4
Black Belt
42 Views

Here is a tiny test program to answer some of your questions. Expand it to answer the rest.

[fortran]program tcmplx
  real :: r; double precision :: d; complex :: c
  write(*,*)sizeof,sizeof(d),sizeof(c)
end program tcmplx[/fortran]
With the different compiler switches that you listed, here are the outputs.

[bash]~/LANG> ifort cmplx.f90
~/LANG> ./a.out
                     4                     8                     8
~/LANG> ifort -real_size 64 cmplx.f90
~/LANG> ./a.out
                     8                     8                    16
~/LANG> ifort -real_size 64 -double_size 128 cmplx.f90
~/LANG> ./a.out
                     8                    16                    16[/bash]
Reply