$ gfortran -fopenmp matmul.f90 -o test.x
lto-wrapper: fatal error: could not find accel/amdgcn-amdhsa/mkoffload in /usr/lib/gcc/x86_64-linux-gnu/10/:/usr/lib/gcc/x86_64-linux-gnu/10/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/10/:/usr/lib/gcc/x86_64-linux-gnu/ (consider using ‘-B’)
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
I reported that before but someone has closed it.
$ gfortran -fopenmp -foffload=nvptx-none matmul.f90 -o test.x
/usr/bin/ld: /tmp/ccvGeRgU.crtoffloadtable.o: warning: relocation against `__offload_vars_end' in read-only section `.rodata'
/usr/bin/ld: warning: creating DT_TEXTREL in a PIE
libgomp: while loading libgomp-plugin-gcn.so.1: libgomp-plugin-gcn.so.1: cannot open shared object file: No such file or directory
Offloading Time = 11.8520002
Max(|C2-C1|) = 5.79833984E-04
$ ./test.x 1024
dim1 = dim2 = 1024
MATMUL Time = 6.30000010E-02
libgomp: while loading libgomp-plugin-gcn.so.1: libgomp-plugin-gcn.so.1: cannot open shared object file: No such file or directory
libgomp: cuCtxSynchronize error: the launch timed out and was terminated
libgomp: cuMemFree_v2 error: the launch timed out and was terminated
It's getting worse on Ubuntu 21.04
$ gfortran -fopenmp matmul.f90 -o test.x amdhsa/ mkoffload in /usr/lib/ gcc/x86_ 64-linux- gnu/10/ :/usr/lib/ gcc/x86_ 64-linux- gnu/10/ :/usr/lib/ gcc/x86_ 64-linux- gnu/:/usr/ lib/gcc/ x86_64- linux-gnu/ 10/:/usr/ lib/gcc/ x86_64- linux-gnu/ (consider using ‘-B’)
lto-wrapper: fatal error: could not find accel/amdgcn-
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
I reported that before but someone has closed it.
$ gfortran -fopenmp -foffload= nvptx-none matmul.f90 -o test.x crtoffloadtable .o: warning: relocation against `__offload_ vars_end' in read-only section `.rodata'
/usr/bin/ld: /tmp/ccvGeRgU.
/usr/bin/ld: warning: creating DT_TEXTREL in a PIE
$ gfortran -fopenmp -foffload= nvptx-none -no-pie matmul.f90 -o test.x
$ ./test.x 1024
dim1 = dim2 = 1024
MATMUL Time = 6.80000037E-02
libgomp: while loading libgomp- plugin- gcn.so. 1: libgomp- plugin- gcn.so. 1: cannot open shared object file: No such file or directory
Offloading Time = 11.8520002
Max(|C2-C1|) = 5.79833984E-04
$ ./test.x 1024
dim1 = dim2 = 1024
MATMUL Time = 6.30000010E-02
libgomp: while loading libgomp- plugin- gcn.so. 1: libgomp- plugin- gcn.so. 1: cannot open shared object file: No such file or directory
libgomp: cuCtxSynchronize error: the launch timed out and was terminated
libgomp: cuMemFree_v2 error: the launch timed out and was terminated
libgomp: device finalization failed