def run_job(job):
    """Prepare, Preprocess, Run and Close a BPSJob
    This function is called by the multiprocessing.pool.map method

    This function can be overridden by giving a new function to the
    self.runjob_func variable. However, the argument should always be "job"
    and the function should include methods from the BPSJob class.

    """

    print("Running simulation job %s ..." % job.jobID)
    job.prepare()
    job.preprocess()
    job.run()
    job.close()

    return job.runsumdict