Repository navigation
Parallelization
Zihao Yang edited this page Aug 28, 2017
·
12 revisions
1 - 4 processors can be used to find the final solution. If parallelisation is desired, the -p N parameter can be used to determine the number of cores (N) to be used.
Parallel Task is the library that is used to implement parallelisation. Other libraries considered include Pjyamas and the standard Java concurrency library. After researching these techniques, it was determined that Parallel Task toolkit provided techniques that were the easiest to integrate into the sequential algorithm.
- The algorithm will start running sequentially until 1000 partial solutions have been collected in the priority queue.
- The queue is then split according to the number of cores specified, balanced by a round robin allocation
- Each thread will run until a pre-optimal solution is found for its child queue.
- Following the completion of all threads, the final optimal solution will be selected from the list of pre-optimal solutions.
Details
- After thread finds sub-optimal solution, help other threads find theirs.
- This can be done using the WorkStealingQueue Class - When a thread has finished, steal a PS from another thread
- Ignore sub-partial solution if end time > existing sub-optimal solution - move onto next in queue.
- Don't add sub-partial solution into queue if end time > existing sub-optimal solution.
- Decide how to distribute global processing (master thread) e.g. visualisation
Experimenting
- Find best time for sequential to parallel turning point
- Whether placing all promising partial solutions in one thread and worst in another is better with respect to last 2 points in Details