Page 1 of 1
OpenMM 5.0 does not calculate
Posted: Fri Feb 15, 2013 2:58 am
by jonathans
I tested my newly installed OpenMM 5.0 by running testInstallation.py.
I have a CUDA and OpenCl gpu, the OpenCl runs fine but CUDA gives an error.
This is also a problem because when I run simulations it automatically runs the CUDA code, I do have CUDA installed.
Code: Select all
C:\sim>python 2cBenzene.py
Traceback (most recent call last):
File "2cBenzene.py", line 15, in <module>
simulation = Simulation(prmtop.topology, system, integrator)
File "C:\Python27-32Bit\lib\site-packages\simtk\openmm\app\simulation.py", lin
e 75, in __init__
self.context = mm.Context(system, integrator)
File "C:\Python27-32Bit\lib\site-packages\simtk\openmm\openmm.py", line 4630,
in __init__
this = _openmm.new_Context(*args)
Exception: Error launching CUDA compiler: -1
nvcc : fatal error : Cannot find compiler 'cl.exe' in PATH
C:\sim>cd C:\Program Files (x86)\OpenMM\examples
C:\Program Files (x86)\OpenMM\examples>python testInstallation.py
There are 3 Platforms available:
1 Reference - Successfully computed forces
2 CUDA - Error computing forces with CUDA platform
3 OpenCL - Successfully computed forces
Median difference in forces between platforms:
Reference vs. OpenCL: 2.18563e-05
Thanks!
Re: OpenMM 5.0 does not calculate
Posted: Fri Feb 15, 2013 11:41 am
by peastman
Hi Jonathan,
This is the problem:
Code: Select all
nvcc : fatal error : Cannot find compiler 'cl.exe' in PATH
The CUDA kernel compiler (nvcc) requires that you already have a C compiler installed. On Windows, that means cl.exe, which is part of Visual Studio. The free "express" version should be fine.
Peter
Re: OpenMM 5.0 does not calculate
Posted: Fri Feb 15, 2013 12:59 pm
by jonathans
Hi Peter,
I have VS 2010 and 2012 installed already.
Based on the error I thought maybe if i put the folder location of cl.exe in PATH it would work so i did "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin" but it still doesn't work.
Thanks.
Re: OpenMM 5.0 does not calculate
Posted: Fri Feb 15, 2013 1:49 pm
by peastman
That ought to work then. Can you make sure cl.exe really is in that directory? Also echo the PATH to the console to be sure it's really set correctly.
What happens if you just run nvcc directly from the console?
Peter
Re: OpenMM 5.0 does not calculate
Posted: Fri Feb 15, 2013 2:27 pm
by jonathans
There are 4 cl.exe's. I put all of their locations in PATH.
I still get the same problem. Here is the error with echoed PATH and nvcc from console, everything seems to be recognized:
Code: Select all
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Unknown>cd C:\Program Files (x86)\OpenMM\examples
C:\Program Files (x86)\OpenMM\examples>python testInstallation.py
There are 3 Platforms available:
1 Reference - Successfully computed forces
2 CUDA - Error computing forces with CUDA platform
3 OpenCL - Successfully computed forces
Median difference in forces between platforms:
Reference vs. OpenCL: 2.18563e-05
C:\Program Files (x86)\OpenMM\examples>echo %path%
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.0\bin\;C:\Program Files\NV
IDIA GPU Computing Toolkit\CUDA\v5.0\libnvvp\;C:\Program Files (x86)\NVIDIA GPU
Computing Toolkit\CUDA\v5.0\bin\;C:\Program Files (x86)\NVIDIA GPU Computing Too
lkit\CUDA\v5.0\libnvvp\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C
:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\Windo
wsPowerShell\v1.0\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program
Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files (x86)\Wi
ndows Kits\8.0\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Serve
r\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:
\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft S
QL Server\100\DTS\Binn\;C:\Program Files (x86)\GTK2-Runtime\bin;C:\Program Files
(x86)\FAHClient;C:\Program Files (x86)\OpenMM\lib;C:\Program Files (x86)\OpenMM
\lib\plugins;C:\Python27-32Bit;C:\Program Files (x86)\Microsoft Visual Studio 11
.0\VC\bin;C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\x86_amd64\;
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\x86_arm\;C:\Program F
iles (x86)\Microsoft Visual Studio 11.0\VC\bin\amd64\;C:\Program Files (x86)\Mic
rosoft Visual Studio 11.0\VC\bin\
C:\Program Files (x86)\OpenMM\examples>nvcc
nvcc : fatal error : No input files specified; use option --help for more inform
ation
Thanks!
EDIT: I thought maybe if i put the cl.exe paths separately it would work but all 4 cl.exe paths did not work.
Re: OpenMM 5.0 does not calculate
Posted: Mon Feb 18, 2013 3:32 am
by fabian
Hi Jonathan,
From my experimentation with OpenMM 5.0 I found that there are several things that can go wrong
here. Have you cheked that
* cicc (executable part of CUDA) is in the executable PATH?
* CUDA headers are in the include path (CPATH)?
It might be useful to look at the error strings that are generated by OpenMM.
testInstallation.py helped me a lot in figuring out where the problems were. However to get at the full error messages, you have to replace in testInstallation.py
except:
print "- Error computing forces with", platform.getName(), "platform"
by
except Exception as e:
print "- Error computing forces with", platform.getName(), "platform", e
Hope that helps,
Fabian