How To Install gcc-offload-nvptx on Rocky Linux 8

In this tutorial we learn how to install gcc-offload-nvptx on Rocky Linux 8. gcc-offload-nvptx is Offloading compiler to NVPTX

Introduction

In this tutorial we learn how to install gcc-offload-nvptx on Rocky Linux 8.

What is gcc-offload-nvptx

The gcc-offload-nvptx package provides offloading support for NVidia PTX. OpenMP and OpenACC programs linked with -fopenmp will by default add PTX code into the binaries, which can be offloaded to NVidia PTX capable devices if available.

We can use yum or dnf to install gcc-offload-nvptx on Rocky Linux 8. In this tutorial we discuss both methods but you only need to choose one of method to install gcc-offload-nvptx.

Install gcc-offload-nvptx on Rocky Linux 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install gcc-offload-nvptx using dnf by running the following command:

sudo dnf -y install gcc-offload-nvptx

Install gcc-offload-nvptx on Rocky Linux 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install gcc-offload-nvptx using yum by running the following command:

sudo yum -y install gcc-offload-nvptx

How To Uninstall gcc-offload-nvptx on Rocky Linux 8

To uninstall only the gcc-offload-nvptx package we can use the following command:

sudo dnf remove gcc-offload-nvptx

gcc-offload-nvptx Package Contents on Rocky Linux 8

/usr/bin/nvptx-none-ar
/usr/bin/nvptx-none-as
/usr/bin/nvptx-none-ld
/usr/bin/nvptx-none-ranlib
/usr/bin/x86_64-redhat-linux-accel-nvptx-none-gcc
/usr/lib/.build-id
/usr/lib/.build-id/13
/usr/lib/.build-id/13/aa9f0dd8500e67529cc2e1b06727140ac7da41
/usr/lib/.build-id/3c
/usr/lib/.build-id/3c/9fa4ee6ea00143af73079c160dfee78aff7019
/usr/lib/.build-id/97
/usr/lib/.build-id/97/356f76fbda874ab98f124a80d2b5e13e13b14e
/usr/lib/.build-id/a2
/usr/lib/.build-id/a2/1a2f42b56bffb767ba99c6d101686ad879e830
/usr/lib/.build-id/ce
/usr/lib/.build-id/ce/643665d713cdbf36db8c0564b066f45b962390
/usr/lib/.build-id/da/b0cd5052055a015724c0c52d02b9d553a63387
/usr/lib/.build-id/f1
/usr/lib/.build-id/f1/58377b03f0bef4996873eafa799f993d154021
/usr/lib/gcc
/usr/lib/gcc/nvptx-none
/usr/lib/gcc/nvptx-none/8
/usr/lib/gcc/nvptx-none/8/finclude
/usr/lib/gcc/nvptx-none/8/finclude/omp_lib.f90
/usr/lib/gcc/nvptx-none/8/finclude/omp_lib.h
/usr/lib/gcc/nvptx-none/8/finclude/omp_lib.mod
/usr/lib/gcc/nvptx-none/8/finclude/omp_lib_kinds.mod
/usr/lib/gcc/nvptx-none/8/finclude/openacc.f90
/usr/lib/gcc/nvptx-none/8/finclude/openacc.mod
/usr/lib/gcc/nvptx-none/8/finclude/openacc_kinds.mod
/usr/lib/gcc/nvptx-none/8/finclude/openacc_lib.h
/usr/lib/gcc/nvptx-none/8/include
/usr/lib/gcc/nvptx-none/8/include/omp.h
/usr/lib/gcc/nvptx-none/8/include/openacc.h
/usr/lib/gcc/nvptx-none/8/mgomp
/usr/lib/gcc/nvptx-none/8/mgomp/finclude
/usr/lib/gcc/nvptx-none/8/mgomp/finclude/omp_lib.f90
/usr/lib/gcc/nvptx-none/8/mgomp/finclude/omp_lib.h
/usr/lib/gcc/nvptx-none/8/mgomp/finclude/omp_lib.mod
/usr/lib/gcc/nvptx-none/8/mgomp/finclude/omp_lib_kinds.mod
/usr/lib/gcc/nvptx-none/8/mgomp/finclude/openacc.f90
/usr/lib/gcc/nvptx-none/8/mgomp/finclude/openacc.mod
/usr/lib/gcc/nvptx-none/8/mgomp/finclude/openacc_kinds.mod
/usr/lib/gcc/nvptx-none/8/mgomp/finclude/openacc_lib.h
/usr/lib/gcc/x86_64-redhat-linux
/usr/lib/gcc/x86_64-redhat-linux/8
/usr/lib/gcc/x86_64-redhat-linux/8/accel
/usr/lib/gcc/x86_64-redhat-linux/8/accel/nvptx-none
/usr/lib/gcc/x86_64-redhat-linux/8/accel/nvptx-none/crt0.o
/usr/lib/gcc/x86_64-redhat-linux/8/accel/nvptx-none/finclude
/usr/lib/gcc/x86_64-redhat-linux/8/accel/nvptx-none/include
/usr/lib/gcc/x86_64-redhat-linux/8/accel/nvptx-none/include/float.h
/usr/lib/gcc/x86_64-redhat-linux/8/accel/nvptx-none/include/gcov.h
/usr/lib/gcc/x86_64-redhat-linux/8/accel/nvptx-none/include/iso646.h
/usr/lib/gcc/x86_64-redhat-linux/8/accel/nvptx-none/include/stdalign.h
/usr/lib/gcc/x86_64-redhat-linux/8/accel/nvptx-none/include/stdarg.h
/usr/lib/gcc/x86_64-redhat-linux/8/accel/nvptx-none/include/stdatomic.h
/usr/lib/gcc/x86_64-redhat-linux/8/accel/nvptx-none/include/stdbool.h
/usr/lib/gcc/x86_64-redhat-linux/8/accel/nvptx-none/include/stddef.h
/usr/lib/gcc/x86_64-redhat-linux/8/accel/nvptx-none/include/stdfix.h
/usr/lib/gcc/x86_64-redhat-linux/8/accel/nvptx-none/include/stdint-gcc.h
/usr/lib/gcc/x86_64-redhat-linux/8/accel/nvptx-none/include/stdint.h
/usr/lib/gcc/x86_64-redhat-linux/8/accel/nvptx-none/include/stdnoreturn.h
/usr/lib/gcc/x86_64-redhat-linux/8/accel/nvptx-none/include/tgmath.h
/usr/lib/gcc/x86_64-redhat-linux/8/accel/nvptx-none/include/unwind.h
/usr/lib/gcc/x86_64-redhat-linux/8/accel/nvptx-none/include/varargs.h
/usr/lib/gcc/x86_64-redhat-linux/8/accel/nvptx-none/libc.a
/usr/lib/gcc/x86_64-redhat-linux/8/accel/nvptx-none/libcaf_single.a
/usr/lib/gcc/x86_64-redhat-linux/8/accel/nvptx-none/libg.a
/usr/lib/gcc/x86_64-redhat-linux/8/accel/nvptx-none/libgcc.a
/usr/lib/gcc/x86_64-redhat-linux/8/accel/nvptx-none/libgcov.a
/usr/lib/gcc/x86_64-redhat-linux/8/accel/nvptx-none/libgfortran.a
/usr/lib/gcc/x86_64-redhat-linux/8/accel/nvptx-none/libgfortran.spec
/usr/lib/gcc/x86_64-redhat-linux/8/accel/nvptx-none/libgomp.a
/usr/lib/gcc/x86_64-redhat-linux/8/accel/nvptx-none/libgomp.spec
/usr/lib/gcc/x86_64-redhat-linux/8/accel/nvptx-none/libm.a
/usr/lib/gcc/x86_64-redhat-linux/8/accel/nvptx-none/mgomp
/usr/lib/gcc/x86_64-redhat-linux/8/accel/nvptx-none/mgomp/crt0.o
/usr/lib/gcc/x86_64-redhat-linux/8/accel/nvptx-none/mgomp/libc.a
/usr/lib/gcc/x86_64-redhat-linux/8/accel/nvptx-none/mgomp/libcaf_single.a
/usr/lib/gcc/x86_64-redhat-linux/8/accel/nvptx-none/mgomp/libg.a
/usr/lib/gcc/x86_64-redhat-linux/8/accel/nvptx-none/mgomp/libgcc.a
/usr/lib/gcc/x86_64-redhat-linux/8/accel/nvptx-none/mgomp/libgcov.a
/usr/lib/gcc/x86_64-redhat-linux/8/accel/nvptx-none/mgomp/libgfortran.a
/usr/lib/gcc/x86_64-redhat-linux/8/accel/nvptx-none/mgomp/libgfortran.spec
/usr/lib/gcc/x86_64-redhat-linux/8/accel/nvptx-none/mgomp/libgomp.a
/usr/lib/gcc/x86_64-redhat-linux/8/accel/nvptx-none/mgomp/libgomp.spec
/usr/lib/gcc/x86_64-redhat-linux/8/accel/nvptx-none/mgomp/libm.a
/usr/libexec/gcc
/usr/libexec/gcc/x86_64-redhat-linux
/usr/libexec/gcc/x86_64-redhat-linux/8
/usr/libexec/gcc/x86_64-redhat-linux/8/accel
/usr/libexec/gcc/x86_64-redhat-linux/8/accel/nvptx-none
/usr/libexec/gcc/x86_64-redhat-linux/8/accel/nvptx-none/collect2
/usr/libexec/gcc/x86_64-redhat-linux/8/accel/nvptx-none/lto-wrapper
/usr/libexec/gcc/x86_64-redhat-linux/8/accel/nvptx-none/lto1
/usr/libexec/gcc/x86_64-redhat-linux/8/accel/nvptx-none/mkoffload
/usr/nvptx-none
/usr/nvptx-none/bin
/usr/nvptx-none/bin/ar
/usr/nvptx-none/bin/as
/usr/nvptx-none/bin/ld
/usr/nvptx-none/bin/ranlib
/usr/nvptx-none/include
/usr/nvptx-none/include/_ansi.h
/usr/nvptx-none/include/_syslist.h
/usr/nvptx-none/include/alloca.h
/usr/nvptx-none/include/ar.h
/usr/nvptx-none/include/argz.h
/usr/nvptx-none/include/assert.h
/usr/nvptx-none/include/bits
/usr/nvptx-none/include/complex.h
/usr/nvptx-none/include/ctype.h
/usr/nvptx-none/include/dirent.h
/usr/nvptx-none/include/envlock.h
/usr/nvptx-none/include/envz.h
/usr/nvptx-none/include/errno.h
/usr/nvptx-none/include/fastmath.h
/usr/nvptx-none/include/fcntl.h
/usr/nvptx-none/include/fnmatch.h
/usr/nvptx-none/include/getopt.h
/usr/nvptx-none/include/glob.h
/usr/nvptx-none/include/grp.h
/usr/nvptx-none/include/iconv.h
/usr/nvptx-none/include/ieeefp.h
/usr/nvptx-none/include/inttypes.h
/usr/nvptx-none/include/langinfo.h
/usr/nvptx-none/include/libgen.h
/usr/nvptx-none/include/limits.h
/usr/nvptx-none/include/locale.h
/usr/nvptx-none/include/machine
/usr/nvptx-none/include/machine/_default_types.h
/usr/nvptx-none/include/machine/_types.h
/usr/nvptx-none/include/machine/ansi.h
/usr/nvptx-none/include/machine/endian.h
/usr/nvptx-none/include/machine/fastmath.h
/usr/nvptx-none/include/machine/ieeefp.h
/usr/nvptx-none/include/machine/malloc.h
/usr/nvptx-none/include/machine/param.h
/usr/nvptx-none/include/machine/setjmp-dj.h
/usr/nvptx-none/include/machine/setjmp.h
/usr/nvptx-none/include/machine/stdlib.h
/usr/nvptx-none/include/machine/termios.h
/usr/nvptx-none/include/machine/time.h
/usr/nvptx-none/include/machine/types.h
/usr/nvptx-none/include/malloc.h
/usr/nvptx-none/include/math.h
/usr/nvptx-none/include/newlib.h
/usr/nvptx-none/include/paths.h
/usr/nvptx-none/include/pthread.h
/usr/nvptx-none/include/pwd.h
/usr/nvptx-none/include/reent.h
/usr/nvptx-none/include/regdef.h
/usr/nvptx-none/include/regex.h
/usr/nvptx-none/include/rpc
/usr/nvptx-none/include/sched.h
/usr/nvptx-none/include/search.h
/usr/nvptx-none/include/setjmp.h
/usr/nvptx-none/include/signal.h
/usr/nvptx-none/include/spawn.h
/usr/nvptx-none/include/stdatomic.h
/usr/nvptx-none/include/stdint.h
/usr/nvptx-none/include/stdio.h
/usr/nvptx-none/include/stdio_ext.h
/usr/nvptx-none/include/stdlib.h
/usr/nvptx-none/include/string.h
/usr/nvptx-none/include/strings.h
/usr/nvptx-none/include/sys
/usr/nvptx-none/include/sys/_default_fcntl.h
/usr/nvptx-none/include/sys/_types.h
/usr/nvptx-none/include/sys/cdefs.h
/usr/nvptx-none/include/sys/config.h
/usr/nvptx-none/include/sys/custom_file.h
/usr/nvptx-none/include/sys/dir.h
/usr/nvptx-none/include/sys/dirent.h
/usr/nvptx-none/include/sys/errno.h
/usr/nvptx-none/include/sys/fcntl.h
/usr/nvptx-none/include/sys/features.h
/usr/nvptx-none/include/sys/file.h
/usr/nvptx-none/include/sys/iconvnls.h
/usr/nvptx-none/include/sys/lock.h
/usr/nvptx-none/include/sys/param.h
/usr/nvptx-none/include/sys/queue.h
/usr/nvptx-none/include/sys/reent.h
/usr/nvptx-none/include/sys/resource.h
/usr/nvptx-none/include/sys/sched.h
/usr/nvptx-none/include/sys/signal.h
/usr/nvptx-none/include/sys/stat.h
/usr/nvptx-none/include/sys/stdio.h
/usr/nvptx-none/include/sys/string.h
/usr/nvptx-none/include/sys/syslimits.h
/usr/nvptx-none/include/sys/time.h
/usr/nvptx-none/include/sys/timeb.h
/usr/nvptx-none/include/sys/times.h
/usr/nvptx-none/include/sys/types.h
/usr/nvptx-none/include/sys/unistd.h
/usr/nvptx-none/include/sys/utime.h
/usr/nvptx-none/include/sys/wait.h
/usr/nvptx-none/include/tar.h
/usr/nvptx-none/include/termios.h
/usr/nvptx-none/include/tgmath.h
/usr/nvptx-none/include/time.h
/usr/nvptx-none/include/unctrl.h
/usr/nvptx-none/include/unistd.h
/usr/nvptx-none/include/utime.h
/usr/nvptx-none/include/utmp.h
/usr/nvptx-none/include/wchar.h
/usr/nvptx-none/include/wctype.h
/usr/nvptx-none/include/wordexp.h

References

Summary

In this tutorial we learn how to install gcc-offload-nvptx on Rocky Linux 8 using yum and dnf.