Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
Announcements
The Intel sign-in experience has changed to support enhanced security controls. If you sign in, click here for more information.
7782 Discussions

using compiler flags to cast to 64-bits

Jeffrey_Konz
Beginner
175 Views
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
175 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