Meeting the Error"No GPU device found" after recompliling the mcx.sln.

77 views
Skip to first unread message

wangbi...@tju.edu.cn

unread,
Feb 22, 2017, 3:01:05 AM2/22/17
to mcx-users
Dear Professor Fang:
                Thanks for your previous response. I have readed the link you mentioned, but the error mentioned is different from mine. I am sorry to interrupt you again. Because I want to increase the maximum number of media types that MCX can handle, I have to modify the source code and rebuild the mcx.exe.
                I have installed the window 7(64), Visual studio(2013), cuda 7.5,  and my GPU is NIVIDIA GeForce GT 740. Now, I can rebuild solution successfully. But when I run the code "mcx -A -n 1e7 -f validation.inp -G 1", I get the  error" No GPU device found" depicted in the following picture. When debuging the code, the code "cudaGetDeviceCount(&deviceCount);" can find the GPU and the deviceCount =1. However, the Device Query can list the detailed information of the GPU, indicating that the Visual studio can detect the GPU.  I am very confused on this contradiction. Could you give me some suggestions?
 Hoping for your responses.
Best wishes for you!

"

Ali S.

unread,
May 26, 2017, 3:31:35 PM5/26/17
to mcx-users
I have the same issue. I am trying to run MCX on windows 10 (64 bit), visual studio 2013, CUDA 8.0 and GPU - Nvidia GTX 1070. How did you solve this problem? Thanks 

Qianqian Fang

unread,
May 26, 2017, 3:50:23 PM5/26/17
to mcx-...@googlegroups.com, Ali S.
On 05/26/2017 12:21 PM, Ali S. wrote:
I have the same issue. I am trying to run MCX on windows 10 (64 bit), visual studio 2013, CUDA 8.0 and GPU - Nvidia GTX 1070. How did you solve this problem? Thanks

hi Ali and Bingyuan

I apologize for missing the original post back in Feb.

Typically, if MCX fails to list your installed GPU (mcx -L) is because your
driver was not properly installed. In that case, very often, DeviceQuery
output is also empty.

if DeviceQuery can list the device, but mcx fails, one possibility is that
your self-built mcx is linked with another version of CUDA library
which does not support the card.

you said when you debug the code in VS, it can see the device, I am wondering
if you can run this simulation inside VS? will it launch the simulation?

you may also download the nightly-build version and try it on your machine.
it has cuda 7.5 statically linked, I am curious if it is more reliable to find
libraries.

http://mcx.space/nightly/mcx/win/

Qianqian



On Wednesday, February 22, 2017 at 11:01:05 AM UTC+3, wangbi...@tju.edu.cn wrote:
Dear Professor Fang:
                Thanks for your previous response. I have readed the link you mentioned, but the error mentioned is different from mine. I am sorry to interrupt you again. Because I want to increase the maximum number of media types that MCX can handle, I have to modify the source code and rebuild the mcx.exe.
                I have installed the window 7(64), Visual studio(2013), cuda 7.5,  and my GPU is NIVIDIA GeForce GT 740. Now, I can rebuild solution successfully. But when I run the code "mcx -A -n 1e7 -f validation.inp -G 1", I get the  error" No GPU device found" depicted in the following picture. When debuging the code, the code "cudaGetDeviceCount(&deviceCount);" can find the GPU and the deviceCount =1. However, the Device Query can list the detailed information of the GPU, indicating that the Visual studio can detect the GPU.  I am very confused on this contradiction. Could you give me some suggestions?
 Hoping for your responses.
Best wishes for you!

"
--
You received this message because you are subscribed to the Google Groups "mcx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mcx-users+...@googlegroups.com.
To post to this group, send email to mcx-...@googlegroups.com.
Visit this group at https://groups.google.com/group/mcx-users.
For more options, visit https://groups.google.com/d/optout.


Ali S.

unread,
May 26, 2017, 6:55:30 PM5/26/17
to mcx-users, ali.shua...@gmail.com
Dr. Fang, 

I tried the nightly-build version and it runs only when I remove the -D P (progress bar stalling). 

Thank you - Ali

Qianqian Fang

unread,
May 28, 2017, 5:19:34 PM5/28/17
to mcx-...@googlegroups.com, Ali S.
hi Ali and Bingyuan

I debugged mcx on windows, and was able to reproduce the problem,
however, I still don't have a solution yet.

basically, I found the handling of character literals (constants) in VS
is very strange. What happened was that the below two lines failed
to run as expected in visual studio (VS 2013 Professional, Win10, 64bit)

cfg->deviceid[0]='1'; /*use the first GPU device by default*/
https://github.com/fangq/mcx/blob/master/src/mcx_core.cu#L970

and

        else if(cfg->deviceid[dev]=='1'){
https://github.com/fangq/mcx/blob/master/src/mcx_utils.c#L142

after the first line, the first character in the deviceid[] array is supposed
to set to character '1'  (ASCII value=49). However, VS executes this line
but nothing was changed (deviceid[0] remains 0). If I change '1' to 49,
deviceid[0] was set properly, but the second line fails, even VS evaluates
the condition inside if() as "true" in the tooltip hint.

I don't have much experience with VS, but I am surprised that it can not
handle simple char constant like this properly. Must be something weird
going on.

I am still looking into this, but if anyone knows what happens,
please let me know.

Qianqian
Reply all
Reply to author
Forward
0 new messages