How to Write a Custom Parallel Program