Lube oil is used in diesel engines:

To cool the engine

2 and 3 both

To ignite

To reduce friction