[mpich2-dev] No Gain For calculating maximum of an array

Aman Madaan madaan.amanmadaan at gmail.com
Fri Nov 9 01:47:14 CST 2012


Hello

I am pretty new to MPI programming and i was doing some research on
performance of dumped computers in our college.
Although my cluster is giving the expected gain for many embarrassingly
parallel problems,but the attached simple program for calculating maximum
number in an array is unexpectedly slow.

The file of numbers is first read at the root and the array is scattered to
all the supporting nodes. Then MPI_REDUCE is used to get the global maximum
.

The result of running the program are as follows :

*Using 2 nodes : *

axiom at node1:~/Programs/largest$ mpiexec -f f ./a.out numbers/num10000.txt
10000

Maximum = 3999213

wall clock time = 0.002819

*Using single node : *

axiom at node1:~/Programs/largest$ mpiexec  ./a.out numbers/num10000.txt 10000

Maximum = 3999213

wall clock time = 0.000168

..........

The situation remains same even after increasing the number of elements.

I request your suggestions.

Thanks a lot for your time.


With regards


-- 

Aman Madaan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/mpich2-dev/attachments/20121109/95f933a2/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DistributedLargest.c
Type: text/x-csrc
Size: 2268 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/mpich2-dev/attachments/20121109/95f933a2/attachment.c>


More information about the mpich2-dev mailing list