CAT D11R was pushing material towards wall. Operator noticed smoke coming from engine compartment. EE shut down engine, exited cab, observed source of smoke and noticed flames. EE attempted to extinguish with a hand held extinguisher and was unsuccessful. EE safely dismounted equipment to a safe location and notified EE's supervisor.