Opened 5 years ago

Closed 5 years ago

#849 closed defect (fixed)

CUDA -arch=sm_20

Reported by: monismi@… Owned by: skylar
Priority: major Milestone: 3.3.2
Component: Both Version:
Keywords: Cc:
Blocked By: Blocking:
Estimated Hours: 1 Total Hours: 0.33

Description

There seems to be an issue with using CUDA on LittleFe? with the -arch=sm_20 flag and likely higher architecture versions, as well.

Details follow to recreate and remove the issue.

-David

There needs to be a symbolic link from libnvvm.so.2.0.0 to libnvvm.so.2 in the following directory:

/bccd/software/cuda/5.5.22/Linux/BCCD/x86_64/nvvm/lib64

Compilation command follows:

nvcc simple-cuda.cu -arch=sm_20 -o simple-cuda.exe

Code follows for simple-cuda.cu:

/*

  • Modified CUDA Hello World Program

*

  • Usage: simple-cuda <number thread blocks> <number threads per block>

*

  • monismi 11-April-2014 Removed large portions of code to test printf in kernel function
  • charliep 09-April-2011 First pass, based on the example by Alan Kaminsky
  • charliep 01-July-2011 Improved error handling.

*/

#include <stdlib.h>

#include <stdio.h>

global void hello() {

printf("Hello from thread %d, block %d\n", blockIdx.x, threadIdx.x);

}

void usage() {

fprintf(stderr, "Usage: simple-cuda <number thread blocks> <number threads per block>\n");

exit(1);

}

int main(int argc, char argv) {

int numThreadBlocks, numThreadsPerBlock;

if (argc != 3)

usage();

if (sscanf(argv[1], "%d", &numThreadBlocks) != 1)

usage();

if (sscanf(argv[2], "%d", &numThreadsPerBlock) != 1)

usage();

/* Call the kernel function to run on the GPGPU chip. */

hello <<<numThreadBlocks, numThreadsPerBlock>>> ();

cudaDeviceSynchronize();

exit(0);

}

Change History (9)

comment:1 Changed 5 years ago by skylar

  • Milestone set to 3.3.2
  • Owner set to skylar
  • Status changed from new to assigned

comment:2 Changed 5 years ago by skylar

In 4716:

adding symlinks for proper linking in nvvm (#849)

comment:3 Changed 5 years ago by skylar

In 4719:

merging in #849

comment:4 Changed 5 years ago by skylar

  • Status changed from assigned to qa

comment:5 Changed 5 years ago by skylar

In 4723:

merging in more #849

comment:6 Changed 5 years ago by skylar

CUDA test will pick this up, no test case necessary

comment:7 Changed 5 years ago by skylar

In 4751:

wrong architecture path for nvvm (#849)

comment:8 Changed 5 years ago by skylar

In 4753:

merging in #549, #849, #853, #854

comment:9 Changed 5 years ago by skylar

  • Resolution set to fixed
  • Status changed from qa to closed
Note: See TracTickets for help on using tickets.