Skip to content

Compiling

Hüseyin Tuğrul BÜYÜKIŞIK edited this page Feb 8, 2021 · 7 revisions

Compile output from Nsight-Eclipse:

g++ -std=c++1y -O3 -g3 -Wall -c -fmessage-length=0 -march=native -mavx -fopenmp -pthread -fPIC -MMD -MP -MF"src/foo.d" -MT"src/foo.d" -o "src/foo.o" "../src/foo.cpp"

Linking part:

g++ -L/usr/local/cuda/lib64 -o "your_app_name" ./src/foo.o -lOpenCL -lpthread -lgomp

Both g++7 - g++10 can run it. For AMD/Intel cards, lib64 file may be in another directory or even have a different name.

If you see error messages: ‘VirtualMultiArray’ was not declared in this scope or ‘GraphicsCardSupplyDepot’ was not declared in this scope then their headers are missing from include-lines:

#include "GraphicsCardSupplyDepot.h"
#include "VirtualMultiArray.h"