Mcore_handler

class nrv.backend.Mcore_handler(*args, **kwargs)[source]

Class to handle parallel processing (cores, no threads) in NRV2

Methods

Mcore_handler.__init__(Flag)

Instantiation of Mcore

Mcore_handler.do_master_only_work()

Check if the process is alone or it is the master to perform non splitable job

Mcore_handler.gather_jobs(partial_result)

Gather the jobs performed by all instances to the master

Mcore_handler.gather_jobs_as_array(...)

Gather the jobs performed by all instances to the master

Mcore_handler.is_alone()

Check if the process is runing alone or if other instances have been launched.

Mcore_handler.is_master()

Check if the process is master or not whe parallel computing

Mcore_handler.master_broadcasts_array_to_all(var)

Broadcast an array to all instances of the process (share jobs performed by the master only)

Mcore_handler.master_broadcasts_to_all(var)

Broadcast an array to all instances of the process (share jobs performed by the master only)

Mcore_handler.recieve_data_from_slave()

Recieve data from anay source

Mcore_handler.recieve_potential_array_from_master()

Recieve potenatial data from the master as a numpy array

Mcore_handler.say_hello()

Display a sentence from each process on prompt.

Mcore_handler.send_back_array_to_dest(data, ...)

Send a numpy array to a slave

Mcore_handler.send_data_to_master(data)

Send a dictionary of data directly to the master.

Mcore_handler.send_synchronization_flag()

Blocking collective communication to force all process to synchronize to a specific line of code

Mcore_handler.split_job_from_arrays(len_arrays)

Split an array for parallel independant computing, by sharing independant sub-spaces of array index

Mcore_handler.split_job_from_arrays_to_slaves(...)

Split an array for parallel independant computing, by sharing independant sub-spaces of array index, the master gets a table of all jobs to do initialized to False

Mcore_handler.sum_jobs(partial_result)

Gather, sum and broadcast array for conservative results.