inital commit, naive version works, if the result matrix is plotted as an image, the user will definitely know if it is the right solution.  initial shared memory version is not working