I use OSU MVAPICH2 2.2b (MPI3.1.4) and ran simpleMPI of CUDA SDK. The graphic card is Titan X, SDK is 7.5. System is CentOS 6.7. It works well. However, after I changed the kernel arguments from int to dim3
void computeGPU(float *hostData, int blockSize, int gridSize)
{
int dataSize = blockSize * gridSize;
// Allocate data on GPU memory
float *deviceInputData = NULL;
CUDA_CHECK(cudaMalloc((void **)&deviceInputData, dataSize * sizeof(float)));
float *deviceOutputData = NULL;
CUDA_CHECK(cudaMalloc((void **)&deviceOutputData, dataSize * sizeof(float)));
// Copy to GPU memory
CUDA_CHECK(cudaMemcpy(deviceInputData, hostData, dataSize * sizeof(float), cudaMemcpyHostToDevice));
dim3 gridSize1 = dim3(gridSize, gridSize, gridSize);
dim3 blockSize1 = dim3(blockSize, blockSize, blockSize);
// Run kernel
//simpleMPIKernel<<<gridSize, blockSize>>>(deviceInputData, deviceOutputData);
simpleMPIKernel<<<gridSize1, blockSize1>>>(deviceInputData, deviceOutputData);
cudaCheckError()
// Copy data back to CPU memory
CUDA_CHECK(cudaMemcpy(hostData, deviceOutputData, dataSize *sizeof(float), cudaMemcpyDeviceToHost));
// Free GPU memory
CUDA_CHECK(cudaFree(deviceInputData));
CUDA_CHECK(cudaFree(deviceOutputData));
}
Then I use the same Makefile provided by SDK. The use the command
mpirun_rsh -hostfile mf -n 2 MV2_USE_GPUDIRECT_GDRCOPY=0 MV2_USE_CUDA=1 MV2_USE_GPUDIRECT=1 ./simpleMPI
I’ve got the wrong message:Cuda failure simpleMPI.cu:83: ‘invalid configuration argument’
Cuda failure simpleMPI.cu:83: ‘invalid configuration argument’
line 81 simpleMPIKernel<<<gridSize1, blockSize1>>>(deviceInputData, deviceOutputData);
line 82 cudaCheckError()