I am working on some code that multiplies 2 matrices in parallel. I statically allocate memory for the matrices so that each matrix has the memory to be 2304x2304. When I compile and run I get a segmentation fault error and the program quits. However, when I switch the dimensions to 100x100 the program runs fine. Can anyone think of why this might happen?
I first thought maybe I should dynamically allocate memory but it seems that when I need to allocate memory for a 2304x2304 matrix I will still run into this problem.
Maybe I am looking at this from a wrong angle. Thanks in advance.