Pakistan all out at 341 against Sri Lanka