nepluno / lbfgsb-gpu

An open source library for the GPU-implementation of L-BFGS-B algorithm
http://dx.doi.org/10.1016/j.cag.2014.01.002
Mozilla Public License 2.0
113 stars 17 forks source link

blocked in some kernel function #3

Closed xiyubao closed 3 years ago

xiyubao commented 4 years ago

Hi, I have some issues. I followed your install instruction and changed the CUDA Toolkit version to 10.1. The program didn't report any errors. However, sometimes it only displayed the voronoi diagram of init sites(not CVT), which means the lbfgsb part didn't work and returned immediately. But other times, it just blocked in some "Copy" or "Multiple" function( such as cudaMemcpy and lbfgsbcuda::minimize::vdot_vv). QQ截图20191212111816

I found that the kernel functions upon these "Copy" or "Multiple" function have some issues, because the program couldn't print some variables on "device" after it called the kernel function "lbfgsbcuda::cmprlb::prog1" in "lbfgsbcmprlb"

QQ截图20191212112442

QQ截图20191212112357

It was ok if col=1, but seems the kernel function can not stop if col>1, then it couldn't print x,g,d I had tried to change these "2" in line 143 to "1", then it was ok. But I'm not sure that will influence the result.

Seems these kernel function[prog2 in subsm.cu and prog1 in cmprlb] all have the same issue. QQ截图20191212113321

I'm not very familiar with CUDA program and kernel function. Would you give me some ideas or solutions plz?

nepluno commented 4 years ago

Unfortunately this piece of code has never been tested on CUDA toolkits ver. > 5.5, so there must be some compatibility issue. I hope that I would have more time on refactoring it towards the latest CUDA Toolkit, maybe recently.

xiyubao commented 4 years ago

Thanks for your reply. I will try to find another way to solve this issue.

xiyubao commented 4 years ago

Today, I rewrite those two parts serially. It works. Seems those two parts do have issuss on CUDA toolkits ver. 10.1. QQ截图20191213132006

nepluno commented 4 years ago

Fantastic! Would you like to submit a pull request so that the modification can be integrated into the code repository? Thanks!

xiyubao commented 4 years ago

Sure, I'd like to. But these two parts are "serial" rather than "parallel" and I have modified a lot of code in other parts. Maybe I can send these two parts to your e-mail separately. Now I am working on other research. I'll re-download the code later, and try to rewrite these two parts to "parallel" with as few changes as possible