[Users] GCC 8 -- may need to update Cactus configure script

Erik Schnetter schnetter at gmail.com
Wed May 2 11:25:23 CDT 2018


GCC 8 was just released. The release notes contain this in their fine print:

"Character variables longer than HUGE(0) elements are now possible on
64-bit targets. Note that this changes the procedure call ABI for all
procedures with character arguments on 64-bit targets, as the type of
the hidden character length argument has changed. The hidden character
length argument is now of type INTEGER(C_SIZE_T)."

In other words, strings can now be longer than 2e9 characters. This is
a good change. To make this possible, the length of strings is now
passed as ptrdiff_t instead of as int, and consequently, the C/Fortran
interoperability mechanism in Cactus may need to be updated. Without
this, there might be a segfault e.g. when calling CCTK_INFO from
Fortran. (It might also be that things just work most of the time,
although this would be an unreliable coincidence.)

The respective include file that will need to be modified is
"cctk_FortranString.h" in the flesh.

-erik

-- 
Erik Schnetter <schnetter at gmail.com>
http://www.perimeterinstitute.ca/personal/eschnetter/


More information about the Users mailing list