I’m getting this really bizarre (in my perspective) error in VS2012 when trying to compile some code that had previously worked. I use CUDA to generate a 2D array of data and my goal is to write it to a text file…but when I append this snippet of code from the example at the end of my main function
// basic file operations
#include <iostream>
#include <fstream>
using namespace std;
int main () {
ofstream myfile;
myfile.open ("example.txt");
myfile << "Writing this to a file.n";
myfile.close();
return 0;
}
I get
1> C:UsersKarsten ChuNew Google DriveResearchVisual Studio 2012ProjectsDynamic Parallelism TestDynamic Parallelism Test>"C:Program FilesNVIDIA GPU Computing ToolkitCUDAv5.5binnvcc.exe" -dlink -o "x64DebugDynamic Parallelism Test.device-link.obj" -Xcompiler "/EHsc /W3 /nologo /Od /Zi /RTC1 /MDd " -L"C:Program FilesNVIDIA GPU Computing ToolkitCUDAv5.5libx64" cuda.lib cudart.lib cudadevrt.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib -gencode=arch=compute_35,code=sm_35 -G --machine 64 "x64DebugCUDA Test 2.cu.obj" "x64DebugCUDA Test.cu.obj" "x64DebugRKF5 Prototype 2.cu.obj" x64Debugversion.cu.obj
1>nvlink : error : Undefined reference to '_ZTVSo__St14basic_ofstreamIcSt11char_traitsIcEE' in 'x64/Debug/RKF5 Prototype 2.cu.obj'
1>nvlink : error : Undefined reference to '_ZTVSt9basic_iosIcSt11char_traitsIcEE__So__St14basic_ofstreamIcS1_E' in 'x64/Debug/RKF5 Prototype 2.cu.obj'
1>C:Program Files (x86)MSBuildMicrosoft.Cppv4.0V110BuildCustomizationsCUDA 5.5.targets(668,9): error MSB3721: The command ""C:Program FilesNVIDIA GPU Computing ToolkitCUDAv5.5binnvcc.exe" -dlink -o "x64DebugDynamic Parallelism Test.device-link.obj" -Xcompiler "/EHsc /W3 /nologo /Od /Zi /RTC1 /MDd " -L"C:Program FilesNVIDIA GPU Computing ToolkitCUDAv5.5libx64" cuda.lib cudart.lib cudadevrt.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib -gencode=arch=compute_35,code=sm_35 -G --machine 64 "x64DebugCUDA Test 2.cu.obj" "x64DebugCUDA Test.cu.obj" "x64DebugRKF5 Prototype 2.cu.obj" x64Debugversion.cu.obj" exited with code -1.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Now my understanding is that nvlink has to do with the CUDA linking for that part of my code…why is are these two aspects of my code interfering? I thought these errors meant that there was a library that needed to be added that isn’t in my project settings or the parameters of a function definition and a prototype don’t match up.
EDIT
Here’s the #includes and main() of my code…all the CUDA stuff is posted in my earlier question. My compiler options I’m not sure how to get besides from the error code. The project is just a Win32 Console Application and I’ve got only one source file, this RKF5 Prototype 2.cu file. I tried a separate, new project and the code compiled fine for me, too.
#include <cuda.h>
#include <cuda_runtime.h>
#include <device_launch_parameters.h>
//#include <stdio.h>
#include <iostream>
#include <fstream>
//#include <iomanip> //display 2 decimal places
#include <math.h>
using namespace std;
__global__ void rkf5(double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, int*, int*, size_t, double*, double*, double*);
__global__ void calcK(double*, double*, double*);
__global__ void k1(double*, double*, double*);
__global__ void k2(double*, double*, double*);
__global__ void k3(double*, double*, double*);
__global__ void k4(double*, double*, double*);
__global__ void k5(double*, double*, double*);
__global__ void k6(double*, double*, double*);
__global__ void arrAdd(double*, double*, double*);
__global__ void arrSub(double*, double*, double*);
__global__ void arrMult(double*, double*, double*);
__global__ void arrInit(double*, double);
__global__ void arrCopy(double*, double*);
__device__ void setup(double , double*, double*, double*, double*, int*);
__device__ double flux(int, double*) ;
__device__ double knowles_flux(int, double*);
__device__ void calcStepSize(double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, int*);
__global__ void storeConcs(double*, size_t, double*, int);
__global__ void takeFourthOrderStep(double*, double*, double*, double*, double*, double*, double*);
__global__ void takeFifthOrderStep(double*, double*, double*, double*, double*, double*, double*, double*);
//Error checking that I don't understand yet.
#define gpuErrchk(ans) { gpuAssert((ans), __FILE__, __LINE__); }
inline void gpuAssert(cudaError_t code, char *file, int line, bool abort=true)
{
if (code != cudaSuccess)
{
fprintf(stderr,"GPUassert: %s %s %dn", cudaGetErrorString(code), file, line);
if (abort) exit(code);
}
}
//Main program.
int main(int argc, char** argv)
{
//std::cout << std::fixed; //display 2 decimal places
//std::cout << std::setprecision(12); //display 2 decimal places
const int maxlength = 1; //Number of discrete concentrations we are tracking.
double concs[maxlength]; //Meant to store the current concentrations
double temp1[maxlength]; //Used as a bin to store products of Butcher's tableau and k values.
double temp2[maxlength]; //Used as a bin to store products of Butcher's tableau and k values.
double tempsum[maxlength]; //Used as a bin to store cumulative sum of tableau and k values
double k1s[maxlength];
double k2s[maxlength];
double k3s[maxlength];
double k4s[maxlength];
double k5s[maxlength];
double k6s[maxlength];
const int numpoints = 40;
double to = 0;
double tf = 1;
//double dt = static_cast<double>(.5)/static_cast<double>(64);
double dt = (tf-to)/static_cast<double>(numpoints);
double mo = 1;
double concStorage[maxlength][numpoints]; //Stores concs vs. time
//Initialize all the arrays on the host to ensure arrays of 0's are sent to the device.
//Also, here is where we can seed the system.
std::cout<<dt;
std::cout<<"n";
concs[0]=mo;
std::cout<<concs[0];
std::cout<<" ";
for (int i=0; i<maxlength; i++)
{
for (int j=0; j<numpoints; j++)
concStorage[i][j]=0;
concs[i]=0;
temp1[i]=0;
temp2[i]=0;
tempsum[i]=0;
k1s[i]=0;
k2s[i]=0;
k3s[i]=0;
k4s[i]=0;
k5s[i]=0;
k6s[i]=0;
std::cout<<concs[i];
std::cout<<" ";
}
concs[0]=mo;
std::cout<<"n";
//Define all the pointers to device array memory addresses. These contain the on-GPU
//addresses of all the data we're generating/using.
double *d_concs;
double *d_temp1;
double *d_temp2;
double *d_tempsum;
double *d_k1s;
double *d_k2s;
double *d_k3s;
double *d_k4s;
double *d_k5s;
double *d_k6s;
double *d_dt;
int *d_maxlength;
int *d_numpoints;
double *d_to;
double *d_tf;
double *d_concStorage;
//Calculate all the sizes of the arrays in order to allocate the proper amount of memory on the GPU.
size_t size_concs = sizeof(concs);
size_t size_temp1 = sizeof(temp1);
size_t size_temp2 = sizeof(temp2);
size_t size_tempsum = sizeof(tempsum);
size_t size_ks = sizeof(k1s);
size_t size_maxlength = sizeof(maxlength);
size_t size_numpoints = sizeof(numpoints);
size_t size_dt = sizeof(dt);
size_t size_to = sizeof(to);
size_t size_tf = sizeof(tf);
size_t h_pitch = numpoints*sizeof(double);
size_t d_pitch;
//Calculate the "pitch" of the 2D array. The pitch is basically the length of a 2D array's row. IT's larger
//than the actual row full of data due to hadware issues. We thusly will use the pitch instead of the data
//size to traverse the array.
gpuErrchk(cudaMallocPitch( (void**)&d_concStorage, &d_pitch, numpoints * sizeof(double), maxlength));
//Allocate memory on the GPU for all the arrrays we're going to use in the integrator.
gpuErrchk(cudaMalloc((void**)&d_concs, size_concs));
gpuErrchk(cudaMalloc((void**)&d_temp1, size_temp1));
gpuErrchk(cudaMalloc((void**)&d_temp2, size_temp1));
gpuErrchk(cudaMalloc((void**)&d_tempsum, size_tempsum));
gpuErrchk(cudaMalloc((void**)&d_k1s, size_ks));
gpuErrchk(cudaMalloc((void**)&d_k2s, size_ks));
gpuErrchk(cudaMalloc((void**)&d_k3s, size_ks));
gpuErrchk(cudaMalloc((void**)&d_k4s, size_ks));
gpuErrchk(cudaMalloc((void**)&d_k5s, size_ks));
gpuErrchk(cudaMalloc((void**)&d_k6s, size_ks));
gpuErrchk(cudaMalloc((void**)&d_maxlength, size_maxlength));
gpuErrchk(cudaMalloc((void**)&d_numpoints, size_numpoints));
gpuErrchk(cudaMalloc((void**)&d_dt, size_dt));
gpuErrchk(cudaMalloc((void**)&d_to, size_to));
gpuErrchk(cudaMalloc((void**)&d_tf, size_tf));
//Copy all initial values of arrays to GPU.
gpuErrchk(cudaMemcpy2D(d_concStorage, d_pitch, concStorage, h_pitch, numpoints*sizeof(double), maxlength, cudaMemcpyHostToDevice));
gpuErrchk(cudaMemcpy(d_concs, &concs, size_concs, cudaMemcpyHostToDevice));
gpuErrchk(cudaMemcpy(d_temp1, &temp1, size_temp1, cudaMemcpyHostToDevice));
gpuErrchk(cudaMemcpy(d_temp2, &temp2, size_temp2, cudaMemcpyHostToDevice));
gpuErrchk(cudaMemcpy(d_tempsum, &tempsum, size_tempsum, cudaMemcpyHostToDevice));
gpuErrchk(cudaMemcpy(d_k1s, &k1s, size_ks, cudaMemcpyHostToDevice));
gpuErrchk(cudaMemcpy(d_k2s, &k2s, size_ks, cudaMemcpyHostToDevice));
gpuErrchk(cudaMemcpy(d_k3s, &k3s, size_ks, cudaMemcpyHostToDevice));
gpuErrchk(cudaMemcpy(d_k4s, &k4s, size_ks, cudaMemcpyHostToDevice));
gpuErrchk(cudaMemcpy(d_k5s, &k5s, size_ks, cudaMemcpyHostToDevice));
gpuErrchk(cudaMemcpy(d_k6s, &k6s, size_ks, cudaMemcpyHostToDevice));
gpuErrchk(cudaMemcpy(d_maxlength, &maxlength, size_maxlength, cudaMemcpyHostToDevice));
gpuErrchk(cudaMemcpy(d_numpoints, &numpoints, size_numpoints, cudaMemcpyHostToDevice));
gpuErrchk(cudaMemcpy(d_dt, &dt, size_dt, cudaMemcpyHostToDevice));
gpuErrchk(cudaMemcpy(d_to, &to, size_to, cudaMemcpyHostToDevice));
gpuErrchk(cudaMemcpy(d_tf, &tf, size_tf, cudaMemcpyHostToDevice));
//Run the integrator.
rkf5<<<1,1>>>(d_concs, d_concStorage, d_temp1, d_temp2, d_tempsum, d_k1s, d_k2s, d_k3s, d_k4s, d_k5s, d_k6s, d_maxlength, d_numpoints, d_pitch, d_dt, d_to, d_tf);
gpuErrchk( cudaPeekAtLastError() );
gpuErrchk( cudaDeviceSynchronize() );
cudaDeviceSynchronize();
/*
//Sets all of concStorage to 1 after the kernel runs. Used to make sure that 2D array copied over the array.
std::cout << "n";
for (int i=0; i<maxlength; i++)
for(int j=0; j<numpoints; j++)
concStorage[i][j]=1;
*/
//Copy concentrations from GPU to Host. Almost defunct now that transferring the 2D array works.
cudaMemcpy(concs, d_concs, size_concs, cudaMemcpyDeviceToHost);
//Copy 2D array of concentrations vs. time from GPU to Host.
gpuErrchk( cudaMemcpy2D(concStorage, h_pitch, d_concStorage, d_pitch, numpoints*sizeof(double), maxlength, cudaMemcpyDeviceToHost) );
//Print concentrations after the integrator kernel runs. Used to test that data was transferring to and from GPU correctly.
std::cout << "n";
for (int i=0; i<maxlength; i++)
{
std::cout<<concs[i];
std::cout<<" ";
}
double a[10];
double b[10];
double c[10];
for(int i = 0; i< 10; i++)
{
a[i]=0;
b[i]=0;
c[i]=0;
}
//Print out the concStorage array after the kernel runs. Used to test that the 2D array transferred correctly from host to GPU and back.
std::cout << "nn";
std::cout << "Calculated Array";
std::cout << "nn";
for (int i=0; i<maxlength; i++)
{
for(int j=0; j<numpoints; j++)
{
if (j%(numpoints/10)==0)
{
a[j/(numpoints/10)]=concStorage[i][j];
std::cout<<concStorage[i][j];
std::cout<<" ";
}
}
std::cout << "n";
}
std::cout << "n";
std::cout << "Exponential";
std::cout << "nn";
for (int i=0; i<10; i++)
{
b[i]=exp(-i*(tf-to)/10);
std::cout<<exp(-i*(tf-to)/10);
std::cout<<" ";
}
std::cout << "nn";
std::cout << "Error Array";
std::cout << "nn";
for (int i=0; i<10; i++)
{
c[i]=a[i]-b[i];
std::cout<<c[i];
std::cout<<" ";
}
std::cout << "nn";
cudaDeviceReset(); //Clean up all memory.
///*
ofstream myfile;
myfile.open ("example.txt");
myfile << "Writing.";
myfile.close();
//*/
return 0;
}
Hi,I don’t have the root ,so I am trying to install NCCL by source code on a Ubuntu machine 18.04, with RTX2080ti Cuda 10.0, But there is an error when I am trying to excute «make src.build BUILDDIR=/home/chenz/software/nccl CUDA_HOME=/usr/local/cuda», do you have any ideas? #668
Comments
nvlink error : Undefined reference to ‘_Z45ncclFunction_AllReduce_TREE_LL128_Min_int64_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z46ncclFunction_AllReduce_TREE_SIMPLE_Min_int64_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z42ncclFunction_AllReduce_RING_LL_Min_int64_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z45ncclFunction_AllReduce_RING_LL128_Min_int64_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z46ncclFunction_AllReduce_RING_SIMPLE_Min_int64_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z45ncclFunction_AllReduce_COLLNET_LL_Min_int64_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z48ncclFunction_AllReduce_COLLNET_LL128_Min_int64_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z49ncclFunction_AllReduce_COLLNET_SIMPLE_Min_int64_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z43ncclFunction_AllReduce_TREE_LL_Min_uint64_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z46ncclFunction_AllReduce_TREE_LL128_Min_uint64_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z47ncclFunction_AllReduce_TREE_SIMPLE_Min_uint64_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z43ncclFunction_AllReduce_RING_LL_Min_uint64_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z46ncclFunction_AllReduce_RING_LL128_Min_uint64_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z47ncclFunction_AllReduce_RING_SIMPLE_Min_uint64_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z46ncclFunction_AllReduce_COLLNET_LL_Min_uint64_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z49ncclFunction_AllReduce_COLLNET_LL128_Min_uint64_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z50ncclFunction_AllReduce_COLLNET_SIMPLE_Min_uint64_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z39ncclFunction_AllReduce_TREE_LL_Min_halfv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z42ncclFunction_AllReduce_TREE_LL128_Min_halfv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z43ncclFunction_AllReduce_TREE_SIMPLE_Min_halfv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z39ncclFunction_AllReduce_RING_LL_Min_halfv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z42ncclFunction_AllReduce_RING_LL128_Min_halfv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z43ncclFunction_AllReduce_RING_SIMPLE_Min_halfv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z42ncclFunction_AllReduce_COLLNET_LL_Min_halfv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z45ncclFunction_AllReduce_COLLNET_LL128_Min_halfv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z46ncclFunction_AllReduce_COLLNET_SIMPLE_Min_halfv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z40ncclFunction_AllReduce_TREE_LL_Min_floatv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z43ncclFunction_AllReduce_TREE_LL128_Min_floatv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z44ncclFunction_AllReduce_TREE_SIMPLE_Min_floatv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z40ncclFunction_AllReduce_RING_LL_Min_floatv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z43ncclFunction_AllReduce_RING_LL128_Min_floatv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z44ncclFunction_AllReduce_RING_SIMPLE_Min_floatv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z43ncclFunction_AllReduce_COLLNET_LL_Min_floatv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z46ncclFunction_AllReduce_COLLNET_LL128_Min_floatv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z47ncclFunction_AllReduce_COLLNET_SIMPLE_Min_floatv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z41ncclFunction_AllReduce_TREE_LL_Min_doublev’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z44ncclFunction_AllReduce_TREE_LL128_Min_doublev’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z45ncclFunction_AllReduce_TREE_SIMPLE_Min_doublev’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z41ncclFunction_AllReduce_RING_LL_Min_doublev’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z44ncclFunction_AllReduce_RING_LL128_Min_doublev’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z45ncclFunction_AllReduce_RING_SIMPLE_Min_doublev’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z44ncclFunction_AllReduce_COLLNET_LL_Min_doublev’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z47ncclFunction_AllReduce_COLLNET_LL128_Min_doublev’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z48ncclFunction_AllReduce_COLLNET_SIMPLE_Min_doublev’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z47ncclFunction_AllReduce_TREE_LL_PreMulSum_int8_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z50ncclFunction_AllReduce_TREE_LL128_PreMulSum_int8_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z51ncclFunction_AllReduce_TREE_SIMPLE_PreMulSum_int8_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z47ncclFunction_AllReduce_RING_LL_PreMulSum_int8_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z50ncclFunction_AllReduce_RING_LL128_PreMulSum_int8_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z51ncclFunction_AllReduce_RING_SIMPLE_PreMulSum_int8_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z50ncclFunction_AllReduce_COLLNET_LL_PreMulSum_int8_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z53ncclFunction_AllReduce_COLLNET_LL128_PreMulSum_int8_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z54ncclFunction_AllReduce_COLLNET_SIMPLE_PreMulSum_int8_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z48ncclFunction_AllReduce_TREE_LL_PreMulSum_uint8_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z51ncclFunction_AllReduce_TREE_LL128_PreMulSum_uint8_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z52ncclFunction_AllReduce_TREE_SIMPLE_PreMulSum_uint8_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z48ncclFunction_AllReduce_RING_LL_PreMulSum_uint8_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z51ncclFunction_AllReduce_RING_LL128_PreMulSum_uint8_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z52ncclFunction_AllReduce_RING_SIMPLE_PreMulSum_uint8_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z51ncclFunction_AllReduce_COLLNET_LL_PreMulSum_uint8_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z54ncclFunction_AllReduce_COLLNET_LL128_PreMulSum_uint8_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z55ncclFunction_AllReduce_COLLNET_SIMPLE_PreMulSum_uint8_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z48ncclFunction_AllReduce_TREE_LL_PreMulSum_int32_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z51ncclFunction_AllReduce_TREE_LL128_PreMulSum_int32_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z52ncclFunction_AllReduce_TREE_SIMPLE_PreMulSum_int32_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z48ncclFunction_AllReduce_RING_LL_PreMulSum_int32_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z51ncclFunction_AllReduce_RING_LL128_PreMulSum_int32_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z52ncclFunction_AllReduce_RING_SIMPLE_PreMulSum_int32_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z51ncclFunction_AllReduce_COLLNET_LL_PreMulSum_int32_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z54ncclFunction_AllReduce_COLLNET_LL128_PreMulSum_int32_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z55ncclFunction_AllReduce_COLLNET_SIMPLE_PreMulSum_int32_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z49ncclFunction_AllReduce_TREE_LL_PreMulSum_uint32_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z52ncclFunction_AllReduce_TREE_LL128_PreMulSum_uint32_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z53ncclFunction_AllReduce_TREE_SIMPLE_PreMulSum_uint32_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z49ncclFunction_AllReduce_RING_LL_PreMulSum_uint32_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z52ncclFunction_AllReduce_RING_LL128_PreMulSum_uint32_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z53ncclFunction_AllReduce_RING_SIMPLE_PreMulSum_uint32_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z52ncclFunction_AllReduce_COLLNET_LL_PreMulSum_uint32_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z55ncclFunction_AllReduce_COLLNET_LL128_PreMulSum_uint32_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z56ncclFunction_AllReduce_COLLNET_SIMPLE_PreMulSum_uint32_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z48ncclFunction_AllReduce_TREE_LL_PreMulSum_int64_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z51ncclFunction_AllReduce_TREE_LL128_PreMulSum_int64_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z52ncclFunction_AllReduce_TREE_SIMPLE_PreMulSum_int64_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z48ncclFunction_AllReduce_RING_LL_PreMulSum_int64_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z51ncclFunction_AllReduce_RING_LL128_PreMulSum_int64_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z52ncclFunction_AllReduce_RING_SIMPLE_PreMulSum_int64_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z51ncclFunction_AllReduce_COLLNET_LL_PreMulSum_int64_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z54ncclFunction_AllReduce_COLLNET_LL128_PreMulSum_int64_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z55ncclFunction_AllReduce_COLLNET_SIMPLE_PreMulSum_int64_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z49ncclFunction_AllReduce_TREE_LL_PreMulSum_uint64_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z52ncclFunction_AllReduce_TREE_LL128_PreMulSum_uint64_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z53ncclFunction_AllReduce_TREE_SIMPLE_PreMulSum_uint64_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z49ncclFunction_AllReduce_RING_LL_PreMulSum_uint64_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z52ncclFunction_AllReduce_RING_LL128_PreMulSum_uint64_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z53ncclFunction_AllReduce_RING_SIMPLE_PreMulSum_uint64_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z52ncclFunction_AllReduce_COLLNET_LL_PreMulSum_uint64_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z55ncclFunction_AllReduce_COLLNET_LL128_PreMulSum_uint64_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z56ncclFunction_AllReduce_COLLNET_SIMPLE_PreMulSum_uint64_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z45ncclFunction_AllReduce_TREE_LL_PreMulSum_halfv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z48ncclFunction_AllReduce_TREE_LL128_PreMulSum_halfv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z49ncclFunction_AllReduce_TREE_SIMPLE_PreMulSum_halfv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z45ncclFunction_AllReduce_RING_LL_PreMulSum_halfv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z48ncclFunction_AllReduce_RING_LL128_PreMulSum_halfv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z49ncclFunction_AllReduce_RING_SIMPLE_PreMulSum_halfv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z48ncclFunction_AllReduce_COLLNET_LL_PreMulSum_halfv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z51ncclFunction_AllReduce_COLLNET_LL128_PreMulSum_halfv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z52ncclFunction_AllReduce_COLLNET_SIMPLE_PreMulSum_halfv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z46ncclFunction_AllReduce_TREE_LL_PreMulSum_floatv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z49ncclFunction_AllReduce_TREE_LL128_PreMulSum_floatv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z50ncclFunction_AllReduce_TREE_SIMPLE_PreMulSum_floatv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z46ncclFunction_AllReduce_RING_LL_PreMulSum_floatv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z49ncclFunction_AllReduce_RING_LL128_PreMulSum_floatv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z50ncclFunction_AllReduce_RING_SIMPLE_PreMulSum_floatv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z49ncclFunction_AllReduce_COLLNET_LL_PreMulSum_floatv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z52ncclFunction_AllReduce_COLLNET_LL128_PreMulSum_floatv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z53ncclFunction_AllReduce_COLLNET_SIMPLE_PreMulSum_floatv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z47ncclFunction_AllReduce_TREE_LL_PreMulSum_doublev’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z50ncclFunction_AllReduce_TREE_LL128_PreMulSum_doublev’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z51ncclFunction_AllReduce_TREE_SIMPLE_PreMulSum_doublev’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z47ncclFunction_AllReduce_RING_LL_PreMulSum_doublev’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z50ncclFunction_AllReduce_RING_LL128_PreMulSum_doublev’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z51ncclFunction_AllReduce_RING_SIMPLE_PreMulSum_doublev’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z50ncclFunction_AllReduce_COLLNET_LL_PreMulSum_doublev’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z53ncclFunction_AllReduce_COLLNET_LL128_PreMulSum_doublev’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z54ncclFunction_AllReduce_COLLNET_SIMPLE_PreMulSum_doublev’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z48ncclFunction_AllReduce_TREE_LL_SumPostDiv_int8_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z51ncclFunction_AllReduce_TREE_LL128_SumPostDiv_int8_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z52ncclFunction_AllReduce_TREE_SIMPLE_SumPostDiv_int8_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z48ncclFunction_AllReduce_RING_LL_SumPostDiv_int8_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z51ncclFunction_AllReduce_RING_LL128_SumPostDiv_int8_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z52ncclFunction_AllReduce_RING_SIMPLE_SumPostDiv_int8_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z51ncclFunction_AllReduce_COLLNET_LL_SumPostDiv_int8_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z54ncclFunction_AllReduce_COLLNET_LL128_SumPostDiv_int8_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z55ncclFunction_AllReduce_COLLNET_SIMPLE_SumPostDiv_int8_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z49ncclFunction_AllReduce_TREE_LL_SumPostDiv_uint8_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z52ncclFunction_AllReduce_TREE_LL128_SumPostDiv_uint8_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z53ncclFunction_AllReduce_TREE_SIMPLE_SumPostDiv_uint8_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z49ncclFunction_AllReduce_RING_LL_SumPostDiv_uint8_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z52ncclFunction_AllReduce_RING_LL128_SumPostDiv_uint8_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z53ncclFunction_AllReduce_RING_SIMPLE_SumPostDiv_uint8_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z52ncclFunction_AllReduce_COLLNET_LL_SumPostDiv_uint8_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z55ncclFunction_AllReduce_COLLNET_LL128_SumPostDiv_uint8_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z56ncclFunction_AllReduce_COLLNET_SIMPLE_SumPostDiv_uint8_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z49ncclFunction_AllReduce_TREE_LL_SumPostDiv_int32_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z52ncclFunction_AllReduce_TREE_LL128_SumPostDiv_int32_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z53ncclFunction_AllReduce_TREE_SIMPLE_SumPostDiv_int32_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z49ncclFunction_AllReduce_RING_LL_SumPostDiv_int32_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z52ncclFunction_AllReduce_RING_LL128_SumPostDiv_int32_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z53ncclFunction_AllReduce_RING_SIMPLE_SumPostDiv_int32_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z52ncclFunction_AllReduce_COLLNET_LL_SumPostDiv_int32_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z55ncclFunction_AllReduce_COLLNET_LL128_SumPostDiv_int32_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z56ncclFunction_AllReduce_COLLNET_SIMPLE_SumPostDiv_int32_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z50ncclFunction_AllReduce_TREE_LL_SumPostDiv_uint32_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z53ncclFunction_AllReduce_TREE_LL128_SumPostDiv_uint32_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z54ncclFunction_AllReduce_TREE_SIMPLE_SumPostDiv_uint32_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z50ncclFunction_AllReduce_RING_LL_SumPostDiv_uint32_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z53ncclFunction_AllReduce_RING_LL128_SumPostDiv_uint32_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z54ncclFunction_AllReduce_RING_SIMPLE_SumPostDiv_uint32_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z53ncclFunction_AllReduce_COLLNET_LL_SumPostDiv_uint32_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z56ncclFunction_AllReduce_COLLNET_LL128_SumPostDiv_uint32_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z57ncclFunction_AllReduce_COLLNET_SIMPLE_SumPostDiv_uint32_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z49ncclFunction_AllReduce_TREE_LL_SumPostDiv_int64_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z52ncclFunction_AllReduce_TREE_LL128_SumPostDiv_int64_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z53ncclFunction_AllReduce_TREE_SIMPLE_SumPostDiv_int64_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z49ncclFunction_AllReduce_RING_LL_SumPostDiv_int64_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z52ncclFunction_AllReduce_RING_LL128_SumPostDiv_int64_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z53ncclFunction_AllReduce_RING_SIMPLE_SumPostDiv_int64_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z52ncclFunction_AllReduce_COLLNET_LL_SumPostDiv_int64_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z55ncclFunction_AllReduce_COLLNET_LL128_SumPostDiv_int64_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z56ncclFunction_AllReduce_COLLNET_SIMPLE_SumPostDiv_int64_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z50ncclFunction_AllReduce_TREE_LL_SumPostDiv_uint64_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z53ncclFunction_AllReduce_TREE_LL128_SumPostDiv_uint64_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z54ncclFunction_AllReduce_TREE_SIMPLE_SumPostDiv_uint64_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z50ncclFunction_AllReduce_RING_LL_SumPostDiv_uint64_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z53ncclFunction_AllReduce_RING_LL128_SumPostDiv_uint64_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z54ncclFunction_AllReduce_RING_SIMPLE_SumPostDiv_uint64_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z53ncclFunction_AllReduce_COLLNET_LL_SumPostDiv_uint64_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z56ncclFunction_AllReduce_COLLNET_LL128_SumPostDiv_uint64_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
nvlink error : Undefined reference to ‘_Z57ncclFunction_AllReduce_COLLNET_SIMPLE_SumPostDiv_uint64_tv’ in ‘/home/liukai/software/nccl/obj/collectives/device/functions.o’
Makefile:73: recipe for target ‘/home/liukai/software/nccl/obj/collectives/device/devlink.o’ failed
make[2]: *** [/home/liukai/software/nccl/obj/collectives/device/devlink.o] Error 255
make[2]: Leaving directory ‘/home/liukai/Downloads/nccl/src/collectives/device’
Makefile:50: recipe for target ‘/home/liukai/software/nccl/obj/collectives/device/colldevice.a’ failed
make[1]: *** [/home/liukai/software/nccl/obj/collectives/device/colldevice.a] Error 2
make[1]: Leaving directory ‘/home/liukai/Downloads/nccl/src’
Makefile:25: recipe for target ‘src.build’ failed
make: *** [src.build] Error 2
The text was updated successfully, but these errors were encountered:
Источник
I encounter the same error when targeting NVIDIA Jetson & DRIVE with debugging enabled.
In Simulink:
I have a Simulink model that I’m trying to deploy to an NVIDIA Jetson board. The model contains a MATLAB Function block to perform sort on the GPU using the gpucoder.sort function.
[~,<indexOutput>] = gpucoder.sort(<input>)
The model is configured to generate GPU code and deploy to the NVIDIA Jetson/Drive hardware. In addition, I have set the Debug mode parameter in the Code Generation > Build Configuration pane. When I build the model, the generated code fails to link on the target during the compilation phase with a nvlink error. A snippet of the error is shown below:
nvlink error : Undefined reference to ‘cudaDeviceSynchronize’ in ‘<Model>.o’
nvlink error : Undefined reference to ‘cudaPeekAtLastError’ in ‘<Model>.o’
nvlink error : Undefined reference to ‘cudaGetParameterBuffer’ in ‘<Model>.o’
nvlink error : Undefined reference to ‘cudaLaunchDevice’ in ‘<Model>.o’
nvlink error : Undefined reference to ‘cudaGetErrorString’ in ‘<Model>.o’
I have been successful deploying other models using the same configuration. But this combination of gpucoder.sort and debug mode fails with the aforementioned error.
In MATLAB:
Instead of using Simulink, I created an entry-point function in MATLAB with a similar code signature and attempted GPU code generation by using a code configuration object set for Jetson/Drive targeting.
cfg = coder.gpuConfig(‘exe’);
cfg.Hardware = coder.hardware(‘NVIDIA Jetson’);
cfg.GenerateExampleMain = ‘GenerateCodeAndCompile’;
cfg.BuildConfiguration = ‘Debug’;
codegen -config cfg -args {<required arguments>} <function> -report
I encounter the same error as before.
nvlink error : Undefined reference to ‘cudaDeviceSynchronize’ in ‘<function>.o’
nvlink error : Undefined reference to ‘cudaPeekAtLastError’ in ‘<function>.o’
nvlink error : Undefined reference to ‘cudaGetParameterBuffer’ in ‘<function>.o’
nvlink error : Undefined reference to ‘cudaLaunchDevice’ in ‘<function>.o’
nvlink error : Undefined reference to ‘cudaGetErrorString’ in ‘<function>.o’
Are there additional options that need to be enabled? How can I resolve this?
Accepted Answer
Background
gpucoder.sort()takes advantage of the Thrust Library for generating kernels on the GPU. Certain Thrust APIs take advantage of the dynamic parallelism feature of CUDA. Compiling CUDA code that contains dynamic parallelism on NVIDIA embedded boards may result in a linker error because of unrecognizable symbols, similar to the one above.
There are two possible scenarios where enabling debug mode can cause the nvlink errors:
- A MATLAB entry-point function or a Simulink MATLAB Function block directly calls gpucoder.sort
- A built-in function calls gpucoder.sort. For example, a deep learning object detector such as yolov2ObjectDetector
The issue is also observed when these models use the XCP-based External Mode functionality. Because External Mode relies on the presence of debug symbols to access both signals and parameters variables for calibration and measurement (in accordance to the ASAM MCD-1-XCP communication protocol), the debug mode is automatically enabled even if the parameter is not explicitly set.
To fix these linker error(s), it is recommended to provide the linker with the compute capability of the board. For GPU Coder, you must set the compute capability of the GPU device on the board through the code configuration object or Simulink configuration parameters.
Identify the Compute Capability of the Target Platform
To get the compute capability of the board, create a live hardware connection to the board as follows:
hwobj = jetson(‘<IpAddress>’,‘<userName>’,‘<passWord>’);
hwobj = drive(‘<IpAddress>’,‘<userName>’,‘<passWord>’);
Get the compute capability of the board as follows:
computeCapability = num2str(hwobj.GPUInfo.ComputeCapability);
computeCapability = num2str(hwobj.GPUInfo(<GPU ID>).ComputeCapability);
In Simulink
To set the compute capability of the model to that of the board programmatically, enter the following command in the MATLAB Command Window:
set_param(‘<modelName>’,‘GPUComputeCapability’,computeCapability);
In MATLAB
For GPU code generation from MATLAB, set the compute capability in the code configuration object.
cfg.GpuConfig.ComputeCapability = computeCapability;
More Answers (0)
Я получаю эту действительно странную (с моей точки зрения) ошибку в VS2012 при попытке скомпилировать некоторый код, который ранее работал. Я использую CUDA для создания 2D-массива данных, и моя цель — записать его в текстовый файл… но когда я добавляю этот фрагмент кода из примера в конце моей основной функции
// basic file operations
#include <iostream>
#include <fstream>
using namespace std;
int main () {
ofstream myfile;
myfile.open ("example.txt");
myfile << "Writing this to a file.n";
myfile.close();
return 0;
}
я получил
1> C:UsersKarsten ChuNew Google DriveResearchVisual Studio 2012ProjectsDynamic Parallelism TestDynamic Parallelism Test>"C:Program FilesNVIDIA GPU Computing ToolkitCUDAv5.5binnvcc.exe" -dlink -o "x64DebugDynamic Parallelism Test.device-link.obj" -Xcompiler "/EHsc /W3 /nologo /Od /Zi /RTC1 /MDd " -L"C:Program FilesNVIDIA GPU Computing ToolkitCUDAv5.5libx64" cuda.lib cudart.lib cudadevrt.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib -gencode=arch=compute_35,code=sm_35 -G --machine 64 "x64DebugCUDA Test 2.cu.obj" "x64DebugCUDA Test.cu.obj" "x64DebugRKF5 Prototype 2.cu.obj" x64Debugversion.cu.obj
1>nvlink : error : Undefined reference to '_ZTVSo__St14basic_ofstreamIcSt11char_traitsIcEE' in 'x64/Debug/RKF5 Prototype 2.cu.obj'
1>nvlink : error : Undefined reference to '_ZTVSt9basic_iosIcSt11char_traitsIcEE__So__St14basic_ofstreamIcS1_E' in 'x64/Debug/RKF5 Prototype 2.cu.obj'
1>C:Program Files (x86)MSBuildMicrosoft.Cppv4.0V110BuildCustomizationsCUDA 5.5.targets(668,9): error MSB3721: The command ""C:Program FilesNVIDIA GPU Computing ToolkitCUDAv5.5binnvcc.exe" -dlink -o "x64DebugDynamic Parallelism Test.device-link.obj" -Xcompiler "/EHsc /W3 /nologo /Od /Zi /RTC1 /MDd " -L"C:Program FilesNVIDIA GPU Computing ToolkitCUDAv5.5libx64" cuda.lib cudart.lib cudadevrt.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib -gencode=arch=compute_35,code=sm_35 -G --machine 64 "x64DebugCUDA Test 2.cu.obj" "x64DebugCUDA Test.cu.obj" "x64DebugRKF5 Prototype 2.cu.obj" x64Debugversion.cu.obj" exited with code -1.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Теперь я понимаю, что nvlink имеет отношение к связыванию CUDA для этой части моего кода… почему эти два аспекта моего кода мешают? Я думал, что эти ошибки означают, что нужно добавить библиотеку, которой нет в настройках моего проекта, или параметры определения функции и прототипа не совпадают.
РЕДАКТИРОВАТЬ
Вот #includes и main() моего кода… все материалы CUDA опубликованы в моем предыдущем вопросе. Мои параметры компилятора Я не уверен, как получить, кроме кода ошибки. Проект представляет собой просто консольное приложение Win32, и у меня есть только один исходный файл, этот файл RKF5 Prototype 2.cu. Я попробовал отдельный новый проект, и код, скомпилированный для меня, тоже удался.
#include <cuda.h>
#include <cuda_runtime.h>
#include <device_launch_parameters.h>
//#include <stdio.h>
#include <iostream>
#include <fstream>
//#include <iomanip> //display 2 decimal places
#include <math.h>
using namespace std;
__global__ void rkf5(double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, int*, int*, size_t, double*, double*, double*);
__global__ void calcK(double*, double*, double*);
__global__ void k1(double*, double*, double*);
__global__ void k2(double*, double*, double*);
__global__ void k3(double*, double*, double*);
__global__ void k4(double*, double*, double*);
__global__ void k5(double*, double*, double*);
__global__ void k6(double*, double*, double*);
__global__ void arrAdd(double*, double*, double*);
__global__ void arrSub(double*, double*, double*);
__global__ void arrMult(double*, double*, double*);
__global__ void arrInit(double*, double);
__global__ void arrCopy(double*, double*);
__device__ void setup(double , double*, double*, double*, double*, int*);
__device__ double flux(int, double*) ;
__device__ double knowles_flux(int, double*);
__device__ void calcStepSize(double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, int*);
__global__ void storeConcs(double*, size_t, double*, int);
__global__ void takeFourthOrderStep(double*, double*, double*, double*, double*, double*, double*);
__global__ void takeFifthOrderStep(double*, double*, double*, double*, double*, double*, double*, double*);
//Error checking that I don't understand yet.
#define gpuErrchk(ans) { gpuAssert((ans), __FILE__, __LINE__); }
inline void gpuAssert(cudaError_t code, char *file, int line, bool abort=true)
{
if (code != cudaSuccess)
{
fprintf(stderr,"GPUassert: %s %s %dn", cudaGetErrorString(code), file, line);
if (abort) exit(code);
}
}
//Main program.
int main(int argc, char** argv)
{
//std::cout << std::fixed; //display 2 decimal places
//std::cout << std::setprecision(12); //display 2 decimal places
const int maxlength = 1; //Number of discrete concentrations we are tracking.
double concs[maxlength]; //Meant to store the current concentrations
double temp1[maxlength]; //Used as a bin to store products of Butcher's tableau and k values.
double temp2[maxlength]; //Used as a bin to store products of Butcher's tableau and k values.
double tempsum[maxlength]; //Used as a bin to store cumulative sum of tableau and k values
double k1s[maxlength];
double k2s[maxlength];
double k3s[maxlength];
double k4s[maxlength];
double k5s[maxlength];
double k6s[maxlength];
const int numpoints = 40;
double to = 0;
double tf = 1;
//double dt = static_cast<double>(.5)/static_cast<double>(64);
double dt = (tf-to)/static_cast<double>(numpoints);
double mo = 1;
double concStorage[maxlength][numpoints]; //Stores concs vs. time
//Initialize all the arrays on the host to ensure arrays of 0's are sent to the device.
//Also, here is where we can seed the system.
std::cout<<dt;
std::cout<<"n";
concs[0]=mo;
std::cout<<concs[0];
std::cout<<" ";
for (int i=0; i<maxlength; i++)
{
for (int j=0; j<numpoints; j++)
concStorage[i][j]=0;
concs[i]=0;
temp1[i]=0;
temp2[i]=0;
tempsum[i]=0;
k1s[i]=0;
k2s[i]=0;
k3s[i]=0;
k4s[i]=0;
k5s[i]=0;
k6s[i]=0;
std::cout<<concs[i];
std::cout<<" ";
}
concs[0]=mo;
std::cout<<"n";
//Define all the pointers to device array memory addresses. These contain the on-GPU
//addresses of all the data we're generating/using.
double *d_concs;
double *d_temp1;
double *d_temp2;
double *d_tempsum;
double *d_k1s;
double *d_k2s;
double *d_k3s;
double *d_k4s;
double *d_k5s;
double *d_k6s;
double *d_dt;
int *d_maxlength;
int *d_numpoints;
double *d_to;
double *d_tf;
double *d_concStorage;
//Calculate all the sizes of the arrays in order to allocate the proper amount of memory on the GPU.
size_t size_concs = sizeof(concs);
size_t size_temp1 = sizeof(temp1);
size_t size_temp2 = sizeof(temp2);
size_t size_tempsum = sizeof(tempsum);
size_t size_ks = sizeof(k1s);
size_t size_maxlength = sizeof(maxlength);
size_t size_numpoints = sizeof(numpoints);
size_t size_dt = sizeof(dt);
size_t size_to = sizeof(to);
size_t size_tf = sizeof(tf);
size_t h_pitch = numpoints*sizeof(double);
size_t d_pitch;
//Calculate the "pitch" of the 2D array. The pitch is basically the length of a 2D array's row. IT's larger
//than the actual row full of data due to hadware issues. We thusly will use the pitch instead of the data
//size to traverse the array.
gpuErrchk(cudaMallocPitch( (void**)&d_concStorage, &d_pitch, numpoints * sizeof(double), maxlength));
//Allocate memory on the GPU for all the arrrays we're going to use in the integrator.
gpuErrchk(cudaMalloc((void**)&d_concs, size_concs));
gpuErrchk(cudaMalloc((void**)&d_temp1, size_temp1));
gpuErrchk(cudaMalloc((void**)&d_temp2, size_temp1));
gpuErrchk(cudaMalloc((void**)&d_tempsum, size_tempsum));
gpuErrchk(cudaMalloc((void**)&d_k1s, size_ks));
gpuErrchk(cudaMalloc((void**)&d_k2s, size_ks));
gpuErrchk(cudaMalloc((void**)&d_k3s, size_ks));
gpuErrchk(cudaMalloc((void**)&d_k4s, size_ks));
gpuErrchk(cudaMalloc((void**)&d_k5s, size_ks));
gpuErrchk(cudaMalloc((void**)&d_k6s, size_ks));
gpuErrchk(cudaMalloc((void**)&d_maxlength, size_maxlength));
gpuErrchk(cudaMalloc((void**)&d_numpoints, size_numpoints));
gpuErrchk(cudaMalloc((void**)&d_dt, size_dt));
gpuErrchk(cudaMalloc((void**)&d_to, size_to));
gpuErrchk(cudaMalloc((void**)&d_tf, size_tf));
//Copy all initial values of arrays to GPU.
gpuErrchk(cudaMemcpy2D(d_concStorage, d_pitch, concStorage, h_pitch, numpoints*sizeof(double), maxlength, cudaMemcpyHostToDevice));
gpuErrchk(cudaMemcpy(d_concs, &concs, size_concs, cudaMemcpyHostToDevice));
gpuErrchk(cudaMemcpy(d_temp1, &temp1, size_temp1, cudaMemcpyHostToDevice));
gpuErrchk(cudaMemcpy(d_temp2, &temp2, size_temp2, cudaMemcpyHostToDevice));
gpuErrchk(cudaMemcpy(d_tempsum, &tempsum, size_tempsum, cudaMemcpyHostToDevice));
gpuErrchk(cudaMemcpy(d_k1s, &k1s, size_ks, cudaMemcpyHostToDevice));
gpuErrchk(cudaMemcpy(d_k2s, &k2s, size_ks, cudaMemcpyHostToDevice));
gpuErrchk(cudaMemcpy(d_k3s, &k3s, size_ks, cudaMemcpyHostToDevice));
gpuErrchk(cudaMemcpy(d_k4s, &k4s, size_ks, cudaMemcpyHostToDevice));
gpuErrchk(cudaMemcpy(d_k5s, &k5s, size_ks, cudaMemcpyHostToDevice));
gpuErrchk(cudaMemcpy(d_k6s, &k6s, size_ks, cudaMemcpyHostToDevice));
gpuErrchk(cudaMemcpy(d_maxlength, &maxlength, size_maxlength, cudaMemcpyHostToDevice));
gpuErrchk(cudaMemcpy(d_numpoints, &numpoints, size_numpoints, cudaMemcpyHostToDevice));
gpuErrchk(cudaMemcpy(d_dt, &dt, size_dt, cudaMemcpyHostToDevice));
gpuErrchk(cudaMemcpy(d_to, &to, size_to, cudaMemcpyHostToDevice));
gpuErrchk(cudaMemcpy(d_tf, &tf, size_tf, cudaMemcpyHostToDevice));
//Run the integrator.
rkf5<<<1,1>>>(d_concs, d_concStorage, d_temp1, d_temp2, d_tempsum, d_k1s, d_k2s, d_k3s, d_k4s, d_k5s, d_k6s, d_maxlength, d_numpoints, d_pitch, d_dt, d_to, d_tf);
gpuErrchk( cudaPeekAtLastError() );
gpuErrchk( cudaDeviceSynchronize() );
cudaDeviceSynchronize();
/*
//Sets all of concStorage to 1 after the kernel runs. Used to make sure that 2D array copied over the array.
std::cout << "n";
for (int i=0; i<maxlength; i++)
for(int j=0; j<numpoints; j++)
concStorage[i][j]=1;
*/
//Copy concentrations from GPU to Host. Almost defunct now that transferring the 2D array works.
cudaMemcpy(concs, d_concs, size_concs, cudaMemcpyDeviceToHost);
//Copy 2D array of concentrations vs. time from GPU to Host.
gpuErrchk( cudaMemcpy2D(concStorage, h_pitch, d_concStorage, d_pitch, numpoints*sizeof(double), maxlength, cudaMemcpyDeviceToHost) );
//Print concentrations after the integrator kernel runs. Used to test that data was transferring to and from GPU correctly.
std::cout << "n";
for (int i=0; i<maxlength; i++)
{
std::cout<<concs[i];
std::cout<<" ";
}
double a[10];
double b[10];
double c[10];
for(int i = 0; i< 10; i++)
{
a[i]=0;
b[i]=0;
c[i]=0;
}
//Print out the concStorage array after the kernel runs. Used to test that the 2D array transferred correctly from host to GPU and back.
std::cout << "nn";
std::cout << "Calculated Array";
std::cout << "nn";
for (int i=0; i<maxlength; i++)
{
for(int j=0; j<numpoints; j++)
{
if (j%(numpoints/10)==0)
{
a[j/(numpoints/10)]=concStorage[i][j];
std::cout<<concStorage[i][j];
std::cout<<" ";
}
}
std::cout << "n";
}
std::cout << "n";
std::cout << "Exponential";
std::cout << "nn";
for (int i=0; i<10; i++)
{
b[i]=exp(-i*(tf-to)/10);
std::cout<<exp(-i*(tf-to)/10);
std::cout<<" ";
}
std::cout << "nn";
std::cout << "Error Array";
std::cout << "nn";
for (int i=0; i<10; i++)
{
c[i]=a[i]-b[i];
std::cout<<c[i];
std::cout<<" ";
}
std::cout << "nn";
cudaDeviceReset(); //Clean up all memory.
///*
ofstream myfile;
myfile.open ("example.txt");
myfile << "Writing.";
myfile.close();
//*/
return 0;
}
При запуске make
для моего приложения CUDA (v7.5) возникает следующая ошибка:
nvlink error : Undefined reference to '_ZN8Strategy8backtestEPddd'
Я не знаю, почему. Кажется, что-то, вероятно, не так с моим Makefile. Здесь это – любые идеи, которые могут вызывать ошибку? Заранее спасибо!
CC = nvcc
CFLAGS = -std=c++11 -m64 -arch=compute_35 -code=sm_35 --compiler-options=-Wall,-Wno-unused-function,-Wno-unused-local-typedef,-Wno-unused-private-field
LFLAGS = -L/usr/local/lib -Llib $(shell pkg-config --libs libmongoc-1.0 libbson-1.0)
INCLUDES = -I/usr/include -I/usr/local/include -Iinclude $(shell pkg-config --cflags libmongoc-1.0 libbson-1.0)
LIBS = -lgsl -lcblas
BIN = ./bin
OBJDIR = ./obj
OBJ = factories/optimizationStrategyFactory.o positions/callPosition.o positions/putPosition.o
positions/position.o strategies/reversalsOptimizationStrategy.o strategies/optimizationStrategy.o
strategies/strategy.o factories/optimizerFactory.o optimizers/reversalsOptimizer.o optimizers/optimizer.o
factories/dataParserFactory.o dataParsers/oandaDataParser.o dataParsers/dataParser.o
studies/study.o studies/smaStudy.o studies/emaStudy.o studies/rsiStudy.o
studies/stochasticOscillatorStudy.o studies/polynomialRegressionChannelStudy.o
all: prepareData optimize
prepareData: src/prepareData.cu $(addprefix lib/,$(OBJ))
@mkdir -p $(BIN)
$(CC) $(CFLAGS) $(INCLUDES) -o $(BIN)/$@ src/prepareData.cu $(addprefix $(OBJDIR)/,$(addprefix lib/,$(OBJ))) $(LFLAGS) $(LIBS)
optimize: src/optimize.cu $(addprefix lib/,$(OBJ))
@mkdir -p $(BIN)
$(CC) $(CFLAGS) $(INCLUDES) -o $(BIN)/$@ src/optimize.cu $(addprefix $(OBJDIR)/,$(addprefix lib/,$(OBJ))) $(LFLAGS) $(LIBS)
%.o: %.cu
@mkdir -p $(OBJDIR)/lib/strategies $(OBJDIR)/lib/positions $(OBJDIR)/lib/factories $(OBJDIR)/lib/optimizers $(OBJDIR)/lib/dataParsers $(OBJDIR)/lib/studies
$(CC) $(CFLAGS) $(INCLUDES) -o $(OBJDIR)/$@ --device-c $<
clean:
rm -rf $(BIN) $(OBJDIR)
И вот полный вывод компилятора:
rm -rf ./bin ./obj
nvcc -std=c++11 -m64 -arch=compute_35 -code=sm_35 --compiler-options=-Wall,-Wno-unused-function,-Wno-unused-local-typedef,-Wno-unused-private-field -I/usr/include -I/usr/local/include -Iinclude -I/usr/local/include/libmongoc-1.0 -I/usr/local/include/libbson-1.0 -o ./obj/lib/factories/optimizationStrategyFactory.o --device-c lib/factories/optimizationStrategyFactory.cu
nvcc -std=c++11 -m64 -arch=compute_35 -code=sm_35 --compiler-options=-Wall,-Wno-unused-function,-Wno-unused-local-typedef,-Wno-unused-private-field -I/usr/include -I/usr/local/include -Iinclude -I/usr/local/include/libmongoc-1.0 -I/usr/local/include/libbson-1.0 -o ./obj/lib/positions/callPosition.o --device-c lib/positions/callPosition.cu
nvcc -std=c++11 -m64 -arch=compute_35 -code=sm_35 --compiler-options=-Wall,-Wno-unused-function,-Wno-unused-local-typedef,-Wno-unused-private-field -I/usr/include -I/usr/local/include -Iinclude -I/usr/local/include/libmongoc-1.0 -I/usr/local/include/libbson-1.0 -o ./obj/lib/positions/putPosition.o --device-c lib/positions/putPosition.cu
nvcc -std=c++11 -m64 -arch=compute_35 -code=sm_35 --compiler-options=-Wall,-Wno-unused-function,-Wno-unused-local-typedef,-Wno-unused-private-field -I/usr/include -I/usr/local/include -Iinclude -I/usr/local/include/libmongoc-1.0 -I/usr/local/include/libbson-1.0 -o ./obj/lib/positions/position.o --device-c lib/positions/position.cu
nvcc -std=c++11 -m64 -arch=compute_35 -code=sm_35 --compiler-options=-Wall,-Wno-unused-function,-Wno-unused-local-typedef,-Wno-unused-private-field -I/usr/include -I/usr/local/include -Iinclude -I/usr/local/include/libmongoc-1.0 -I/usr/local/include/libbson-1.0 -o ./obj/lib/strategies/reversalsOptimizationStrategy.o --device-c lib/strategies/reversalsOptimizationStrategy.cu
nvcc -std=c++11 -m64 -arch=compute_35 -code=sm_35 --compiler-options=-Wall,-Wno-unused-function,-Wno-unused-local-typedef,-Wno-unused-private-field -I/usr/include -I/usr/local/include -Iinclude -I/usr/local/include/libmongoc-1.0 -I/usr/local/include/libbson-1.0 -o ./obj/lib/strategies/optimizationStrategy.o --device-c lib/strategies/optimizationStrategy.cu
nvcc -std=c++11 -m64 -arch=compute_35 -code=sm_35 --compiler-options=-Wall,-Wno-unused-function,-Wno-unused-local-typedef,-Wno-unused-private-field -I/usr/include -I/usr/local/include -Iinclude -I/usr/local/include/libmongoc-1.0 -I/usr/local/include/libbson-1.0 -o ./obj/lib/strategies/strategy.o --device-c lib/strategies/strategy.cu
nvcc -std=c++11 -m64 -arch=compute_35 -code=sm_35 --compiler-options=-Wall,-Wno-unused-function,-Wno-unused-local-typedef,-Wno-unused-private-field -I/usr/include -I/usr/local/include -Iinclude -I/usr/local/include/libmongoc-1.0 -I/usr/local/include/libbson-1.0 -o ./obj/lib/factories/optimizerFactory.o --device-c lib/factories/optimizerFactory.cu
nvcc -std=c++11 -m64 -arch=compute_35 -code=sm_35 --compiler-options=-Wall,-Wno-unused-function,-Wno-unused-local-typedef,-Wno-unused-private-field -I/usr/include -I/usr/local/include -Iinclude -I/usr/local/include/libmongoc-1.0 -I/usr/local/include/libbson-1.0 -o ./obj/lib/optimizers/reversalsOptimizer.o --device-c lib/optimizers/reversalsOptimizer.cu
nvcc -std=c++11 -m64 -arch=compute_35 -code=sm_35 --compiler-options=-Wall,-Wno-unused-function,-Wno-unused-local-typedef,-Wno-unused-private-field -I/usr/include -I/usr/local/include -Iinclude -I/usr/local/include/libmongoc-1.0 -I/usr/local/include/libbson-1.0 -o ./obj/lib/optimizers/optimizer.o --device-c lib/optimizers/optimizer.cu
nvcc -std=c++11 -m64 -arch=compute_35 -code=sm_35 --compiler-options=-Wall,-Wno-unused-function,-Wno-unused-local-typedef,-Wno-unused-private-field -I/usr/include -I/usr/local/include -Iinclude -I/usr/local/include/libmongoc-1.0 -I/usr/local/include/libbson-1.0 -o ./obj/lib/factories/dataParserFactory.o --device-c lib/factories/dataParserFactory.cu
nvcc -std=c++11 -m64 -arch=compute_35 -code=sm_35 --compiler-options=-Wall,-Wno-unused-function,-Wno-unused-local-typedef,-Wno-unused-private-field -I/usr/include -I/usr/local/include -Iinclude -I/usr/local/include/libmongoc-1.0 -I/usr/local/include/libbson-1.0 -o ./obj/lib/dataParsers/oandaDataParser.o --device-c lib/dataParsers/oandaDataParser.cu
nvcc -std=c++11 -m64 -arch=compute_35 -code=sm_35 --compiler-options=-Wall,-Wno-unused-function,-Wno-unused-local-typedef,-Wno-unused-private-field -I/usr/include -I/usr/local/include -Iinclude -I/usr/local/include/libmongoc-1.0 -I/usr/local/include/libbson-1.0 -o ./obj/lib/dataParsers/dataParser.o --device-c lib/dataParsers/dataParser.cu
nvcc -std=c++11 -m64 -arch=compute_35 -code=sm_35 --compiler-options=-Wall,-Wno-unused-function,-Wno-unused-local-typedef,-Wno-unused-private-field -I/usr/include -I/usr/local/include -Iinclude -I/usr/local/include/libmongoc-1.0 -I/usr/local/include/libbson-1.0 -o ./obj/lib/studies/study.o --device-c lib/studies/study.cu
nvcc -std=c++11 -m64 -arch=compute_35 -code=sm_35 --compiler-options=-Wall,-Wno-unused-function,-Wno-unused-local-typedef,-Wno-unused-private-field -I/usr/include -I/usr/local/include -Iinclude -I/usr/local/include/libmongoc-1.0 -I/usr/local/include/libbson-1.0 -o ./obj/lib/studies/smaStudy.o --device-c lib/studies/smaStudy.cu
nvcc -std=c++11 -m64 -arch=compute_35 -code=sm_35 --compiler-options=-Wall,-Wno-unused-function,-Wno-unused-local-typedef,-Wno-unused-private-field -I/usr/include -I/usr/local/include -Iinclude -I/usr/local/include/libmongoc-1.0 -I/usr/local/include/libbson-1.0 -o ./obj/lib/studies/emaStudy.o --device-c lib/studies/emaStudy.cu
nvcc -std=c++11 -m64 -arch=compute_35 -code=sm_35 --compiler-options=-Wall,-Wno-unused-function,-Wno-unused-local-typedef,-Wno-unused-private-field -I/usr/include -I/usr/local/include -Iinclude -I/usr/local/include/libmongoc-1.0 -I/usr/local/include/libbson-1.0 -o ./obj/lib/studies/rsiStudy.o --device-c lib/studies/rsiStudy.cu
nvcc -std=c++11 -m64 -arch=compute_35 -code=sm_35 --compiler-options=-Wall,-Wno-unused-function,-Wno-unused-local-typedef,-Wno-unused-private-field -I/usr/include -I/usr/local/include -Iinclude -I/usr/local/include/libmongoc-1.0 -I/usr/local/include/libbson-1.0 -o ./obj/lib/studies/stochasticOscillatorStudy.o --device-c lib/studies/stochasticOscillatorStudy.cu
nvcc -std=c++11 -m64 -arch=compute_35 -code=sm_35 --compiler-options=-Wall,-Wno-unused-function,-Wno-unused-local-typedef,-Wno-unused-private-field -I/usr/include -I/usr/local/include -Iinclude -I/usr/local/include/libmongoc-1.0 -I/usr/local/include/libbson-1.0 -o ./obj/lib/studies/polynomialRegressionChannelStudy.o --device-c lib/studies/polynomialRegressionChannelStudy.cu
nvcc -std=c++11 -m64 -arch=compute_35 -code=sm_35 --compiler-options=-Wall,-Wno-unused-function,-Wno-unused-local-typedef,-Wno-unused-private-field -I/usr/include -I/usr/local/include -Iinclude -I/usr/local/include/libmongoc-1.0 -I/usr/local/include/libbson-1.0 -o ./bin/prepareData src/prepareData.cu ./obj/lib/factories/optimizationStrategyFactory.o ./obj/lib/positions/callPosition.o ./obj/lib/positions/putPosition.o ./obj/lib/positions/position.o ./obj/lib/strategies/reversalsOptimizationStrategy.o ./obj/lib/strategies/optimizationStrategy.o ./obj/lib/strategies/strategy.o ./obj/lib/factories/optimizerFactory.o ./obj/lib/optimizers/reversalsOptimizer.o ./obj/lib/optimizers/optimizer.o ./obj/lib/factories/dataParserFactory.o ./obj/lib/dataParsers/oandaDataParser.o ./obj/lib/dataParsers/dataParser.o ./obj/lib/studies/study.o ./obj/lib/studies/smaStudy.o ./obj/lib/studies/emaStudy.o ./obj/lib/studies/rsiStudy.o ./obj/lib/studies/stochasticOscillatorStudy.o ./obj/lib/studies/polynomialRegressionChannelStudy.o -L/usr/local/lib -Llib -L/usr/local/lib -lsasl2 -lssl -lcrypto -lz -lmongoc-1.0 -lbson-1.0 -lgsl -lcblas
nvlink info : Function '_ZN12CallPosition13getProfitLossEv' has address taken but no possible call to it
nvlink info : Function '_ZN12CallPosition18getTransactionTypeEv' has address taken but no possible call to it
nvlink info : Function '_ZN11PutPosition13getProfitLossEv' has address taken but no possible call to it
nvlink info : Function '_ZN11PutPosition18getTransactionTypeEv' has address taken but no possible call to it
nvlink info : Function '_ZN8PositionD1Ev' has address taken but no possible call to it
nvlink info : Function '_ZN8PositionD0Ev' has address taken but no possible call to it
nvlink info : Function '_ZN12CallPositionD1Ev' has address taken but no possible call to it
nvlink info : Function '_ZN12CallPositionD0Ev' has address taken but no possible call to it
nvlink info : Function '_ZN11PutPositionD1Ev' has address taken but no possible call to it
nvlink info : Function '_ZN11PutPositionD0Ev' has address taken but no possible call to it
nvlink info : Function '_ZN29ReversalsOptimizationStrategy8backtestEPddd' has address taken but no possible call to it
nvlink info : Function '_ZN20OptimizationStrategy4tickEPd' has address taken but no possible call to it
nvlink info : Function '_ZN8Strategy8backtestEPddd' has address taken but no possible call to it
nvlink error : Undefined reference to '_ZN8Strategy8backtestEPddd' in './obj/lib/strategies/optimizationStrategy.o'
make: *** [prepareData] Error 255
Обратите внимание, что это началось с того момента, когда я добавил --device-c
(что требует некоторые изменения кода).