segmentation fault in OpenMM 5.0
Posted: Tue Feb 26, 2013 8:32 am
Dear Peter,
I found something that looks like a bug in OpenMM 5.0. This was produced on intel 64 bit systems with gcc 4.6.3 or 4.3.4 using either a GeForce GTX 580 or a Tesla S2050 GPU and
the CUDA platform.
In the first example, I get a segmentation fault when I try to minimize the energy after
creating two instances of the simulation class. This error was repoduced with two completely
different pdb files and should not depend on the atom positions.
In this example I get a segmentation fault after calling reinitialize and subsequetly calling step.
This is just a minimal example. In my original project I call reinitialize after altering some
nonbonded force parameters. (I assume that this is neccessary when I use the CUDA platform?)
Best wishes,
Fabian
I found something that looks like a bug in OpenMM 5.0. This was produced on intel 64 bit systems with gcc 4.6.3 or 4.3.4 using either a GeForce GTX 580 or a Tesla S2050 GPU and
the CUDA platform.
In the first example, I get a segmentation fault when I try to minimize the energy after
creating two instances of the simulation class. This error was repoduced with two completely
different pdb files and should not depend on the atom positions.
Code: Select all
from simtk.openmm.app import *
from simtk.openmm import *
from simtk.unit import *
def sim(i):
collision_rate = 1.0 / picoseconds
timestep = 2.0 * femtoseconds
forcefield = ForceField('amber99sb.xml', 'tip3p.xml')
pdb = PDBFile('Alanine_solvated.pdb')
system = forcefield.createSystem(pdb.topology, nonbondedCutoff=1*nanometer, nonbondedMethod=PME)
integrator=LangevinIntegrator(300.0*kelvin, collision_rate, timestep)
device = i
platform = Platform.getPlatformByName("CUDA")
properties = {'CudaDeviceIndex':str(device), 'CudaPrecision':'mixed'}
simulation=Simulation(pdb.topology, system, integrator, platform, properties)
simulation.context.setPositions(pdb.positions)
return simulation
sim0 = sim(0)
sim1 = sim(0) # or sim(1)
sim0.minimizeEnergy() # crashes here
This is just a minimal example. In my original project I call reinitialize after altering some
nonbonded force parameters. (I assume that this is neccessary when I use the CUDA platform?)
Code: Select all
from simtk.openmm.app import *
from simtk.openmm import *
from simtk.unit import *
collision_rate = 1.0 / picoseconds
timestep = 2.0 * femtoseconds
forcefield = ForceField('amber99sb.xml', 'tip3p.xml')
pdb = PDBFile('Alanine_solvated.pdb')
system = forcefield.createSystem(pdb.topology, nonbondedCutoff=1*nanometer, nonbondedMethod=PME)
integrator=LangevinIntegrator(300.0*kelvin, collision_rate, timestep)
platform = Platform.getPlatformByName('CUDA')
properties = {'CudaDeviceIndex':'0', 'CudaPrecision':'mixed'}
simulation=Simulation(pdb.topology, system, integrator, platform, properties)
simulation.context.setPositions(pdb.positions)
simulation.context.reinitialize()
simulation.step(10) # crashes here
Fabian