Unable to use gprMax to run cuda

203 views
Skip to first unread message

Leonard Koh

unread,
Oct 7, 2020, 1:10:44 AM10/7/20
to gprMax-users

Hi All

I have problems using my gpu for gprMax i am currently using a nvdia GTX 1050. I have downloaded cuda version 11 and pycuda. and set all the environmental variables for CUDA and the the C++ compiler. After which i get an error something like this.

I then downgraded cuda verison 10 and reinstall everything else the same and added the enviromnetal variables. I then got this issue

Below i have attahed my user enviromental variables

Do i need cudNN installed as well?

Antonis Giannopoulos

unread,
Oct 7, 2020, 6:37:38 AM10/7/20
to gprMax-users
From the error message it seems that pycuda is not installed or cannot be found and for using a GPU this will be needed. Check that either pycuda is not commented out in the conda_env.yml file or that is available in your python installation used by gprMax.

Best

Antonis

Leonard Koh

unread,
Oct 7, 2020, 11:43:09 AM10/7/20
to gprMax-users
Hi Antonis

Thank you for your prompt reply. I checked my conda_env.yml and it was indeed commented out. I uncommented it as show below. However i still get the same error. Any advice how to procced next? Does it have to do with the version of pycuda? I also show what version of pycuda i have installed.


 

Antonis Giannopoulos

unread,
Oct 7, 2020, 12:14:48 PM10/7/20
to gprMax-users
I am not sure if uncommenting this will work after the installation has been done. You either reinstall with the conda_env file correctly setup for using CUDA or try to install pycuda using pip. The error still says that it cannot find pycuda. 

I think the best option (which I have not tried!) is to update the conda environment after uncommenting the line for pycuda using information found at


(you need to use the correct environment file) 

If everything is emplace the pycuda should be come available. It is not ON by default as it requires libraries (CUDA) that people will not have install if they are not using the GPU options.

Best

Antonis


Antonis Giannopoulos

unread,
Oct 7, 2020, 3:54:02 PM10/7/20
to gprMax-users
I think this issue has cropped up before. If you search in the forum you will find some posts with similar error. In there the issues were the nvcc that is needed was not in the PATH and could not be executed.  There was another issue in using snapshots that do not work with the GPU kernel. It seems that the NVIDIA compiler mvcc is not compiling the GPU kernels for some reason.

Best

Antonis

Antonis Giannopoulos

unread,
Oct 8, 2020, 9:51:24 AM10/8/20
to gprMax-users
Having to run the vcvarsall.bat to setup environmental variables is I suppose  the way the Windows OS operates to setup specific aspects with regards to compilers and other software packages. I don't know how else this can be done but I am sure it can be somehow automated if needed. I do not use Windows at all so cannot help here.

Glad the problem was solved!

Best

Antonis
Reply all
Reply to author
Forward
0 new messages