GPU Computing

cancel
Showing results for 
Search instead for 
Did you mean: 

My Problems on Adopting GPU in Labview

Hi everyone,

I met some problem when I tried to adopt GPU in labview. I try to copy the example of BlackScholes and build a dll, and called it from the Labview. However, when I run it in Labview, it shut down itself autometically.

I have attached my program, and I use the VS 2005 and Labview 8.6.

Hope someone could help me...

Download All
0 Kudos
Message 1 of 10
(10,112 Views)

Gaisi,

I was able to get the Black Scholes to work, but I had to use some more current tools and OS.  I used VS 2008 and LabView 2009 plus I had to stick with Windows XP 32-bit SP3.  MathGuy says that his LabVIEW VI CUDA calls are only good with 32-bit Windows, so I'm starting on the process of researching which calls to use for 64-bit and I'll be testing it on Windows 7.  Sounds like you need to upgrade for the example to work.  Good Luck and keep trying.

SDR Kid

0 Kudos
Message 2 of 10
(5,709 Views)

Thank you for replying.

My CUDA code works now. But when I call it from Labview, the labview will shut down itself...

Have you met similar problems?

0 Kudos
Message 3 of 10
(5,709 Views)

From the project file, I can only see what source files you were using to build the project. It would help to have the header which contains the function called from LV and the CPP file that contains the interface function.

I did notice that you did not wire a preallocated array to Copy CUDA Memory to 1D Array (SGL).vi. This is required as the data reference does not contain size information as is the case with pointers that are malloc'd. I wouldn't have expected a crash but it is possible the interface assumes currently assumes a valid handle.

0 Kudos
Message 4 of 10
(5,709 Views)

Thank u for replying.

However, the problem is still there after I wire a preallocated array to Copy CUDA Memory to 1D Array (SGL).vi. I also corrected my program and it functions well when I tested it with a given array from my main() function. But, same problem occurs when I call it from labview. And I just wondering maybe it is because I did not manage the allocation of memory well. Is this possible?

Besides, when I entered two arrays and tried to sum them up by calling my GPU function, it turns out that only the first element was summed up. I am sure that I strictly followed the steps in the example of BlackScholes.vi, and use the pointer to fulfill the tasks of transferring data between functions.

0 Kudos
Message 5 of 10
(5,709 Views)

It would have surprised me if the array input were the problem. Debugging such a problem requires access to more of your code that you've posted. Without it, I have no more suggestions I can offer than the basic checklist:

  • Are you using CUDA v2.x?
  • Are you using VC 2005 or 2008?
  • Are you developing on Windows 32-bit?
  • Do the examples shipped w/ the module work?
0 Kudos
Message 6 of 10
(5,709 Views)

Hi

I am new to labview and I've labview v8.5. Can you pleae provide me with CUDA library file compatible with v8.5 and also the way to add the library in the Labview. I am using 32 bit Windows 7. Please help me out.

0 Kudos
Message 7 of 10
(5,709 Views)

Sorry but the existing LV API was developed in v8.6. I do not have a version that will work in your LV version and have not attempted to use the 'Save for Previous' on any of the VIs in this module.  Doing so may work. I'm not aware of anything I did in the VIs that is specific to v8.6.

As for Windows 7 support, the NILabs module does work on the 32-bit version. There is not 64-bit support at this time.

0 Kudos
Message 8 of 10
(5,709 Views)

Thank you for your reply. So now I am getting a LabView 8.6. Once i get 8.6 version, can you send me the CUDA library  or is it inbuilt in the 8.6 version??

0 Kudos
Message 9 of 10
(5,709 Views)

GPU support is provided via a module on NILabs : LabVIEW GPU Computing. I don't know if you're familiar w/ NILabs. These projects are not officially part of any product and come w/ special licensing.

From this page, you'll be able to find the installer download for the package as well as documentation to help get started. The existing module is compiled against CUDA 2.x so it is not compatible with newer versions.

Much of the math functionality between the versions is the same (e.g. CUBLAS and CUFFT) but later versions incorporate more efficient implementations on the GPU hardware.

0 Kudos
Message 10 of 10
(5,709 Views)