Spontaneous ignition and engine knock under rapid compression