Nvc error: '@Initializer' definition

Compiling with nvc 21.7, this error appears:

error: '@Initializer' defined with type 'void (i32, i8**, i8**)*' but expected 'void ()*'
nvc-Fatal-llvmopt completed with exit code 1

The verbose preceding instruction is:

/opt/nvidia/hpc_sdk/Linux_x86_64/21.7/compilers/bin/tools/cpp2 …/…/…/…/jsrc/io.c -opt 2 -x 119 0xa10000 -x 122 0x40 -x 123 0x1000 -x 127 4 -x 127 17 -x 19 0x400000 -x 28 0x40000 -x 120 0x10000000 -x 70 0x8000 -x 122 1 -x 125 0x20000 -quad -vect 56 -y 34 16 -x 34 0x8 -y 19 8 -y 35 0 -x 42 0x30 -x 39 0x40 -x 39 0x80 -x 59 4 -x 129 2 -tp haswell -x 120 0x1000 -astype 0 -x 121 1 -fn …/…/…/…/jsrc/io.c -il /tmp/nvcInXfoMQDaEkZO.il -x 123 0x80000000 -x 123 4 -x 119 0x20 -def __pgnu_vsn=90300 -x 70 0x40000000 -x 183 4 -x 121 0x800 -x 6 0x20000 -x 122 0x400000 -y 125 0x100000 -autoinl 10 -x 168 400 -x 174 128000 -x 14 0x200000 -x 14 0x400000 -autoinl 10 -x 168 400 -x 174 128000 -x 14 0x200000 -x 14 0x400000 -y 127 0x20 -x 249 110 -x 120 0x200000 -x 70 0x40000000 -x 8 0x40000000 -x 164 0x800000 -x 85 0x2000 -x 85 0x4000 -x 34 0x40000000 -x 53 0x800000 -x 206 0x02 -x 68 0x1 -x 39 4 -x 56 0x10 -x 26 0x10 -x 26 1 -x 56 0x4000 -y 163 0xc0000000 -x 201 0xf0000000 -x 189 0x10 -y 189 0x4000000 -x 9 1 -x 72 0x1 -x 136 0x11 -x 37 0x480000 -mp -x 69 0x200 -x 69 0x400 -x 69 2 -x 69 1 -x 62 8 -x 9 1 -x 72 0x1 -x 136 0x11 -x 37 0x480000 -gnuvsn 90300 -x 69 0x200 -x 123 0x400 -x 180 0x4000000 -x 194 0x20000000 -cmdline ‘+nvc /tmp/nvcInXfoMQDaEkZO.il -march=haswell -tp haswell -c -o io.o -fopenmp -mp -v -Mnoopenmp -fPIC -O2 -Mvect=simd -fvisibility=hidden -fno-strict-aliasing -Mint128 -Mm128 -DSLEEF=1 -DNO_SHA_ASM -DC_AVX=1 -DC_AVX2=1 -mavx2 -mfma -mbmi -mbmi2 -mlzcnt -mpopcnt’ -asm /tmp/nvccnXfog6INTqdA.ll
NVC++/x86-64 Linux 21.7-0: compilation successful

/opt/nvidia/hpc_sdk/Linux_x86_64/21.7/compilers/share/llvm/bin/opt -O2 -openmp-opt-disable -mcpu=haswell /tmp/nvccnXfog6INTqdA.ll -S -o /tmp/nvcInXfoMHlLHJil.llvm
/opt/nvidia/hpc_sdk/Linux_x86_64/21.7/compilers/share/llvm/bin/opt: /tmp/nvccnXfog6INTqdA.ll:10965:113: error: ‘@Initializer’ defined with type ‘void (i32, i8**, i8**)’ but expected 'void ()
@llvm.global_ctors = appending global [1 x { i32, void (), i8 }][{ i32, void (), i8 } { i32 65535, void ()* @Initializer, i8* null }]
^
nvc-Fatal-llvmopt completed with exit code 1

The source code is here:

and it is compiled for linux x86 avx2 with:

cd make3
./build_libj.sh

Are there any suggestions on how to approach this?

It’s a compiler LLVM code generation error, so there unfortunately not much you can do. I filed an issue report, TPR #30542, and sent it to engineering for investigation.

-Mat

1 Like