Simple program calculating pi value using monte carlo method. Distributes work to free nodes accordingly