For proper measurement of an opamp's open-loop gain, you need to provide DC feedback to stabilize the operating point, as I show in my simulation, otherwise it will be at one of the rails and likely give an incorrect gain value.To measure the open loop gain at 1MHz just open the loop and apply some voltage at 1MHz and measure the output voltage AC.