Skip to content

Instantly share code, notes, and snippets.

@Hopobcn
Created July 31, 2017 14:59
Show Gist options
  • Save Hopobcn/c7968669bcbd4797a86bdf933359564a to your computer and use it in GitHub Desktop.
Save Hopobcn/c7968669bcbd4797a86bdf933359564a to your computer and use it in GitHub Desktop.
Linking PGI-OpenACC libraries with GCC

Linking PGI-OpenACC libraries with GCC

Let's say we want to link the OpenACC libraries from PGI into a binary compiled with gcc

example:

gcc -fopenacc -I${PGI_HOME}/etc/include_acc -o foo foo.c -L${PGI_HOME}/lib -Wl,-rpath,${PGI_HOME}/lib -laccapi -laccg -laccg2 -ldl -lpgc -lm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment