Implementing SPMD (contd.....)
Decomposition is done manually
- Implement to run on any number of threads
- Query for number of threads
- Find thread number
- Each thread calculates its portion (sub-domain) of work
- Different for each thread <=> PRIVATE variable
Program is replicated on each thread, but with different extents for the sub-domain
- all sub-domain specific data are PRIVATE