This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Stream benchmark with large array on Arm Compiler for Linux

When compiling with the recommended array size for Nvidia Grace CPU Superchip I get the following error:

$ armclang stream.c -DSTREAM_ARRAY_SIZE=240000000
/tmp/stream-01a87c.o: in function `main':
stream.c:(.text+0x5b0): relocation truncated to fit: R_AARCH64_ADR_PREL_PG_HI21 against `.bss'
stream.c:(.text+0x66c): relocation truncated to fit: R_AARCH64_ADR_PREL_PG_HI21 against `.bss'
stream.c:(.text+0x6a4): relocation truncated to fit: R_AARCH64_ADR_PREL_PG_HI21 against `.bss'
stream.c:(.text+0x6e4): relocation truncated to fit: R_AARCH64_ADR_PREL_PG_HI21 against `.bss'
stream.c:(.text+0x740): relocation truncated to fit: R_AARCH64_ADR_PREL_PG_HI21 against `.bss'
stream.c:(.text+0x7b0): relocation truncated to fit: R_AARCH64_ADR_PREL_PG_HI21 against `.bss'
armclang: error: linker command failed with exit code 1 (use -v to see invocation)

When I try to use the -mcmodel=large option I then get a different error regarding the use of -fpic.

Is this a known limitation of the current compiler.  Other compilers seem to compiler this code without an issue.

Looks very similar to gcc.gnu.org/.../show_bug.cgi

Parents
  • Hi - with help from others it seems I didn't have particular flags set - e.g.

    /opt/arm/arm-linux-compiler-24.10.1_SLES-15/bin/armclang -mcpu=neoverse-v2 -DSTREAM_ARRAY_SIZE=240000000 -fopenmp -mcmodel=large -no-pie -fno-pic stream.c

Reply
  • Hi - with help from others it seems I didn't have particular flags set - e.g.

    /opt/arm/arm-linux-compiler-24.10.1_SLES-15/bin/armclang -mcpu=neoverse-v2 -DSTREAM_ARRAY_SIZE=240000000 -fopenmp -mcmodel=large -no-pie -fno-pic stream.c

Children
No data