![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
While trying to build the latest version of the darshan IO profiling library on the Cray XC, I encountered a problem: following the addition of various bits of Lustre-specific code, the library no longer compiles with vendor's compiler; instead it fails with an error message indicating that the code has attempted to use an invalid structure element.
Unwilling to believe the darshan code might be broken, I created a small testcase using the same
Once I was aware of this, I checked the man page for
Unwilling to believe the darshan code might be broken, I created a small testcase using the same
ioctl
calls and lustre/lustre_user.h
macros. I was able to compile this successfully with the GNU C compiler but not with the Cray one. This eventually jogged a memory about a change the in C standards to add support for anonymous unions and, sure enough, a quick google confirmed that the feature was not present in C99 but had been added in C11.Once I was aware of this, I checked the man page for
craycc
only to discover the presence of a the -h gnu
option. This enables support for GCC-like features, including C11-style anonymous, and provided enough compatibility to compile the latest version of darshan with the Cray compiler.