diff --git a/prod_mat_vec/bin/Debug/prod_mat_vec.exe b/prod_mat_vec/bin/Debug/prod_mat_vec.exe index 0fc649b2facbdb4ac4f75dbd553b4e0b23b2aa8c..ccfa740a4336388ac036d8fea97e660049678f26 100644 Binary files a/prod_mat_vec/bin/Debug/prod_mat_vec.exe and b/prod_mat_vec/bin/Debug/prod_mat_vec.exe differ diff --git a/prod_mat_vec/main.c b/prod_mat_vec/main.c index d7c5b4f48092ac1fe63af3695f494b5907779264..875df0c24e46e7d501ecf6cf585d1475efadd2f8 100644 --- a/prod_mat_vec/main.c +++ b/prod_mat_vec/main.c @@ -80,16 +80,10 @@ int main (int argc, char *argv[]) { } /* Define the size of the problem */ - h_base=(size_prob/size)+1; // h_base is the default height given to all the processus except the last one - if(size_prob%size==0){ - h_prob=size_prob/size; // h_prob is the processus' problem height - h_base=h_prob; - }else{ - h_prob=(size_prob/size); - if(rank<size_prob%h_base-1){ - h_prob+=1; - } - } + h_prob=(size_prob/size); + if(rank<size_prob%h_prob) + h_prob+=1; + w_prob=size_prob; // w_prob is not dependent of the number of processus. if(DEBUG) printf("height %d : %d\n",rank,h_prob); diff --git a/prod_mat_vec/obj/Debug/main.o b/prod_mat_vec/obj/Debug/main.o index d3967fc14ef24db17b80da84c7183a5847cbcf01..1a18eb6809ff8a1858df250065d3b6f76403f60d 100644 Binary files a/prod_mat_vec/obj/Debug/main.o and b/prod_mat_vec/obj/Debug/main.o differ