Lube oil is used in diesel engines:

2 and 3 both

To reduce friction

To ignite

To cool the engine