If you are rendering a scene with final gather and the lighting flickers, follow these steps:
See Final Gathering Modes in the mental ray for Maya reference guide for more information.
setAttr mentalrayGlobals.renderMode 3;
setAttr mentalrayGlobals.renderMode 0;