The functionality of OpenMM will (eventually) include everything that one would need to run modern molecular simulation.
-
Jonathan Saboury
- Posts: 22
- Joined: Fri Feb 24, 2012 11:48 am
Post
by Jonathan Saboury » Fri Feb 15, 2013 2:58 am
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!
-
Peter Eastman
- Posts: 2592
- Joined: Thu Aug 09, 2007 1:25 pm
Post
by Peter Eastman » Fri Feb 15, 2013 11:41 am
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
-
Jonathan Saboury
- Posts: 22
- Joined: Fri Feb 24, 2012 11:48 am
Post
by Jonathan Saboury » Fri Feb 15, 2013 12:59 pm
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.
-
Peter Eastman
- Posts: 2592
- Joined: Thu Aug 09, 2007 1:25 pm
Post
by Peter Eastman » Fri Feb 15, 2013 1:49 pm
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
-
Jonathan Saboury
- Posts: 22
- Joined: Fri Feb 24, 2012 11:48 am
Post
by Jonathan Saboury » Fri Feb 15, 2013 2:27 pm
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.
-
Fabian Paul
- Posts: 6
- Joined: Wed Apr 11, 2012 10:41 am
Post
by Fabian Paul » Mon Feb 18, 2013 3:32 am
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