I routinely use the supercomputer Hopper at NERSC to do radiative transfer simulations with PHOENIX. Becuase RT is a computationally demanding problem, I often tinker with compiler options to find ways to improve performance.
A few months ago I was experimenting with the Cray compilers to see how they compare with Intel, GNU, etc. Unfortunately the Cray compiler always quit with an error that made no sense at all to me. It looked something like the following:
cd /scratch/scratchdirs/friesen/X86_64-CRAYFTN-MPICH2/; ftn -O3 -e m -h noomp -c 3drt_module.f module dddrt_module ^ ftn-855 crayftn: ERROR DDDRT_MODULE, File = 3drt_module.f, Line = 92, Column = 14 The compiler has detected errors in module "DDDRT_MODULE". No module information file will be created for this module. type(characteristic), pointer :: next_char => NULL() ! pointer to next char of current voxel's list ^ ftn-1725 crayftn: ERROR DDDRT_MODULE, File = 3drt_module.f, Line = 365, Column = 22 Unexpected syntax while parsing the component-def-stmt statement : ")" was expected but found "I".
After a few days of head-scratching, I finally realized that it was not coincidence that "character" is a Fortran keyword, and the parser was pointing to the first letter following said keyword. So I wrote a simple program which used a different Fortran intrinsic keyword:
program main implicit none type integerfoo real :: bar end type integerfoo type(integerfoo) :: test end program main
And sure enough, the Cray Fortran compiler failed with this error:
type(integerfoo) :: test ^ ftn-1725 crayftn: ERROR MAIN, File = test_crayftn_parser.f, Line = 8, Column = 19 Unexpected syntax while parsing the type-declaration statement : ")" was expected but found "F". ^ ftn-1725 crayftn: ERROR MAIN, File = test_crayftn_parser.f, Line = 8, Column = 22 Unexpected syntax while parsing the type-declaration statement : "object-name" was expected but found ")".
I submitted a bug report to NERSC, who in turn forwarded the bug report to Cray, who tracked it as issue #787382. As of version 8.3 of the Cray Fortran compiler (although probably earlier than that), the bug has been fixed.