def __init__(self, max_processes, functions = {}): """ Creates the scheduler. @param max_processes: Indeed is the total number of processes that will be used for the scheduling parallelization plus one (which is representing the current process). @param functions: @see SerialScheduler """ SerialScheduler.__init__(self,functions) self.number_of_processes = max_processes - 1 self.running = []
def __init__(self, share_results_with_all_processes=False, functions={}): """ Creates an instance of this scheduler. @param share_results_with_all_processes: If true, it will broadcast the final results array so that all the processes have a copy of it. @param functions: @see SerialScheduler """ SerialScheduler.__init__(self, functions) self.comm = MPI.COMM_WORLD self.rank = self.comm.Get_rank() self.share_results_with_all_processes = share_results_with_all_processes self.number_of_processes = self.comm.Get_size() self.running = []
def __init__(self, share_results_with_all_processes = False, functions = {}): """ Creates an instance of this scheduler. @param share_results_with_all_processes: If true, it will broadcast the final results array so that all the processes have a copy of it. @param functions: @see SerialScheduler """ SerialScheduler.__init__(self,functions) self.comm = MPI.COMM_WORLD self.rank = self.comm.Get_rank() self.share_results_with_all_processes = share_results_with_all_processes self.number_of_processes = self.comm.Get_size() self.running = []