Fortran Compiler Engineer in Austin, Texas | Advanced Micro Devices, Inc

4 Likes

AMDā€™s compiler is pretty nice, and free to use.

Itā€™s always nice to have multiple compilers to check our code with.

1 Like

@aerosayan said ā€œAMDā€™s compiler is pretty nice, and free to use.ā€ I had never heard of it, so I downloaded it (instructions easier to follow than most) but I seem to have found a bug in it with my second test program. (The first one was hundreds of lines long but this one has 4 lines.)

program testhugeqp
  integer,parameter::qp = selected_real_kind(30)
  print "(ES45.35E4)",huge(1.0_qp)
end program testhugeqp

Output from AMD compiler (called flang) was

                                          Inf

but gfortran and ifort both gave what I think is the correct output,

 1.18973149535723176508575932662800702E+4932

FYI, flang (Classic, nvfortran, AOCC) does not currently support quadruple precision, if that is what you would like to try.

AOCC Fortran 4.1 for Linux amd64 does support 128-bit REAL type (KIND=16) but thereā€™s obviously bugs in the implementation, as above.

1 Like

I checked my notes. You are right. However, I note that AOCC Flang complains about ā€œundefined symbol: ā€˜fort_rnumq_i8ā€™ā€ in my test with quadruple precision, although I do not have a minimal working example at hand.

Thank you @themos. I should have said in my original posting that I was using flang 4.1 in my Linux Ubuntu system. Should this topic be renamed as something like ā€œAMD compiler problemsā€? (I donā€™t know how) It seems to be moving away from where it started: a job advertisement in the AMD company.