I'm trying to use bfloat16 as a format for an application for work on HPC-clusters. For this I've installed g++13 which supposedly supports the bfloat16 format but this hasn't been working consistently for me. On my local machine it works and supports both std::float16_t as well as std::bfloat16_t but on two different clusters these are not supported. The predefined macros are also non-existent, which seems to imply to me that these are unsupported by the implementation. All three machines have the same microarchitecture, x86_64, and the installation shouldn't differ between my local machine and at least one of the two clusters. On the other gcc-13 came pre-installed as a module. What defines whether bfloat16 is available or not and is there some way to use it anyway? Unfortunately __Float16, which is available on all three machines, doesn't provide sufficient exponent bits and therefore doesn't work for my purposes. Alternatively if this isn't solvable are there any libraries that add support for bfloat16? I could only find libraries for IEEE fp16.
I've manually installed g++13 on two of the machines, it works on one of the two but not the other and I haven't been able to find the cause for this in the gcc documentation. The only reason I could think of would be because the machines have different architectures but the command uname -m returns x86_64 for all three of these, so at least the microarchitecture of all three is the same.