[mpich-discuss] Fwd: The bug in handling 2D arrays
Lu, Huiwei
huiweilu at mcs.anl.gov
Thu Feb 27 14:15:10 CST 2014
Forward to the mailing list.
—
Huiwei
Begin forwarded message:
From: Soheil Hooshdaran <shooshdaran577 at gmail.com<mailto:shooshdaran577 at gmail.com>>
Subject: Re: The bug in handling 2D arrays
Date: February 27, 2014 at 2:12:21 PM CST
To: "Lu, Huiwei" <huiweilu at mcs.anl.gov<mailto:huiweilu at mcs.anl.gov>>
Oh, ha!ha!.
sorry.Attached
On Thu, Feb 27, 2014 at 10:18 PM, Lu, Huiwei <huiweilu at mcs.anl.gov<mailto:huiweilu at mcs.anl.gov>> wrote:
Hi, Soheil, you may have forgot to attach the source file.
—
Huiwei Lu
On Feb 27, 2014, at 12:31 PM, Soheil Hooshdaran <shooshdaran577 at gmail.com<mailto:shooshdaran577 at gmail.com>> wrote:
>
> Hello.
> Please note the instruction at line 105 (the MPI_Alltoall call) and the comment on the line 108.
> You only need to run the program once.
> The program takes 3 arguments from the command line:
> 1-How many numbers does each processor produce locally
> 2-The range bounds of numbers to produces randomly(like , say, 2 to 20, entered as 2 20)
>
> so to run, e.g, type mpirun -n 4 ./a.out 4 0 15
>
> Note that the number of processors should be a power of 2
>
> I personally think that maybe the reason for this bug is that the index and the size of each dimension are ignored and that only the base address and the displacement is assumed.
>
> I read in Intel developer's manual that you need 4 parameters to access an element of a multi-dimensional array. I wonder if you can apply this.
--
قال المصطفی علیه السلام: «إرحموا ثلاثا عزیزاً، قوم الذل و غنی قوم افتقر و عالماً یلعب به الجُهّال»
---------
به سما و به بروجش به هبوط و به عروجش نفسی همتک بادم نفسی من هلپندم
نفسی آتش سوزان نفسی سیل گریزان ز چه اصلم ز چه فصلم به چه بازار خرندم
نفسی فوق طباقم نفسی شام و عراقم نفسی غرق فراقم نفسی راز تو رندم
نفسی همره ماهم نفسی مست الهم نفسی یوسف چاهم نفسی جمله گزندم
نفسی رهزن و غولم نفسی تند و ملولم نفسی زین دو برونم که بر آن بام بلندم
------------------------------------------------------------------------------------------------
Being nice to someone you hate doesn't mean you're fake. It means you're mature enough to tolerate your hate towards them.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpich.org/pipermail/discuss/attachments/20140227/7631ea1f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Hooshdaran_p2.cpp
Type: text/x-c++src
Size: 4146 bytes
Desc: Hooshdaran_p2.cpp
URL: <http://lists.mpich.org/pipermail/discuss/attachments/20140227/7631ea1f/attachment.bin>
More information about the discuss
mailing list