Package: gcc-12-offload-nvptx Version: 12.4.0-2 Severity: grave Justification: renders package unusable
Dear Maintainer, Any attempt to compile code that offloads to nvptx-none fails with the following error: gmulas@capitanata:~/mintest$ gcc -fopenmp -O3 -ggdb -fcf-protection=check -foffload=default -foffload=nvptx-none="-O3 -ggdb -fopt-info -lm -latomic -mgomp" -o mintest mintest.c mintest.c:5:9: optimized: basic block part vectorized using 16 byte vectors collect2: fatal error: ld terminated with signal 11 [Errore di segmentazione], core dumped compilation terminated. nvptx mkoffload: fatal error: x86_64-linux-gnu-accel-nvptx-none-gcc-12 returned 1 exit status compilation terminated. lto-wrapper: fatal error: /usr/libexec/gcc/x86_64-linux-gnu/12//accel/nvptx-none/mkoffload returned 1 exit status compilation terminated. /usr/bin/ld: error: lto-wrapper failed collect2: error: ld returned 1 exit status This occurs with any gcc (or g++) version installable on debian sid, so I suspect it is connected to some update on the nvptx-tools side, but since it is reproduced using gcc I am initially reporting the bug on gcc-12-offload-nvptx. If/when you can trace it to some other package, of course feel free to move the bug where it belongs. This is rather critical, since it makes it impossible to compile any code that offloads to nvptx. I attach a minimal test code that reproduces it. It compiles and runs flawlessly on a debian stable machine. Thanks in advance, best regards Giacomo Mulas #include <stdio.h> #include <stdlib.h> #include <omp.h> void saxpy(float a, float* x, float* y, int sz) { #pragma omp target teams distribute parallel for simd \ num_teams(3) map(to:x[0:sz]) map(tofrom:y[0:sz]) for (int i = 0; i < sz; i++) { if (omp_is_initial_device()) { printf("Running on host\n"); } else { int nthreads= omp_get_num_threads(); int nteams= omp_get_num_teams(); printf("Running on device with %d teams (fixed) in total and %d threads in each team\n",nteams,nthreads); } printf("Thread %d %i\n", omp_get_thread_num(), i ); y[i] = a * x[i] + y[i]; } } int main(int argc, char** argv) { float a = 2.0; int sz = 16; float *x = (float *) calloc( sz, sizeof *x ); float *y = (float *) calloc( sz, sizeof *y ); //Set values int num_devices = omp_get_num_devices(); printf("Number of available devices %d\n", num_devices); saxpy( a, x, y, sz ); return 0; } -- System Information: Debian Release: trixie/sid APT prefers unstable APT policy: (401, 'unstable'), (10, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 6.11.9-amd64 (SMP w/12 CPU threads; PREEMPT) Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages gcc-12-offload-nvptx depends on: ii gcc-12 12.4.0-2 ii gcc-12-base 12.4.0-2 ii libc6 2.40-3 ii libc6-dev 2.40-3 ii libgmp10 2:6.3.0+dfsg-2+b2 ii libgomp-plugin-nvptx1 14.2.0-8 ii libmpc3 1.3.1-1+b3 ii libmpfr6 4.2.1-1+b2 ii libzstd1 1.5.6+dfsg-1+b1 ii nvptx-tools 0.20240810-1 ii zlib1g 1:1.3.dfsg+really1.3.1-1+b1 gcc-12-offload-nvptx recommends no packages. gcc-12-offload-nvptx suggests no packages. -- no debconf information