How to speed up this problem by MPI

前端 未结 4 1208
时光取名叫无心
时光取名叫无心 2020-12-11 09:06

(1). I am wondering how I can speed up the time-consuming computation in the loop of my code below using MPI?

 int main(int argc, char ** argv)   
 {   
 //          


        
4条回答
  •  星月不相逢
    2020-12-11 10:03

    If all the values in the array are independent, then it should be trivially parallelizable. Split the array into chunks of roughly equal size, give each chunk to a node, and then compile the results back together.

提交回复
热议问题