[MPICH] Response too slow! running "mpiexec -n 5 cpi"
Ralph Butler
rbutler at mtsu.edu
Mon Aug 14 14:11:39 CDT 2006
I have tried running this pgm on a couple of custers and could not
reproduce the problem, i.e. all stderr print appears instantly.
On MonAug 14, at Mon Aug 14 12:51PM, Rajeev Thakur wrote:
> Ralph,
> Is there any reason this should happen? He is printing
> something to stderr and doing an fflush before MPI is even
> initialized, then does a huge MPI_Bcast 50 times, and it looks like
> the appearance of the printf on the screen is delayed by the big
> broadcast.
>
> Rajeev
>
> -----Original Message-----
> From: owner-mpich-discuss at mcs.anl.gov [mailto:owner-mpich-
> discuss at mcs.anl.gov] On Behalf Of ???
> Sent: Monday, August 14, 2006 5:20 AM
> To: mpich-discuss at mcs.anl.gov
> Subject: Re: [MPICH] Response too slow! running "mpiexec -n 5 cpi"
>
> hello, Rusty
> Thanks for your comments.
> i do some tests as shown below:
>
> 1.
> The followings were the execution time for each command:
>
> mpdboot -n 8 -f myhosts -------> 2 seconds
> mpdtrace -l -------> instantaneous
> mpdringtest -------> less than a second
>
> The response to mpdringtest was
> "time for 1 loops = 0.00226........ seconds"
> 2.
> Another program was tested to estimate the network transmission
> speed. I "think" the speed was
> almost 450M Bits/second: 450000000 Bits per second=8(bits per byte)
> *4(bytes per
> double)*2000000(size in double)*50(rounds)*2(transmitting times per
> broadcast)/13.649424(seconds)
>
> The running results:
> [.....]$ mpiexec -n 4 mytestcodes
> w ----> 'w' was output 1 seconds after the command keyed in
> w
> w
> w
> 0
> 1
> 3
> 2
> wall clock time = 13.649424
> wall clock time = 13.814960
>
> [.....]$ mpiexec -n 8 mytestcodes
> w --------> response very slowly
> w
> w
> w
> w
> w
> w
> w
> 0
> 1
> 2
> 3
> 5
> 6
> 4
> 7
> wall clock time = 19.470830
> wall clock time = 20.812201
>
>
> The followings were the codes:
>
> #include <mpi.h>
> #include <math.h>
> #include <stdio.h>
> #include <stdlib.h>
> #include <string.h>
> int myid;
> #define LLL 2000000
> double lotus[LLL];
> char processor_name[32];
> int main(int argc, char *argv[])
> {
> int numprocs,merror;
> int namelen;
>
> //
> MPI===================================================================
> ==================
> fprintf(stderr,"w\n");
> fflush(stderr);
> merror=MPI_Init(&argc,&argv);
> if(merror!=0)
> {
> printf("Error intializing MPI program. Terminating.\n");
> MPI_Abort(MPI_COMM_WORLD,merror);
> MPI_Finalize();
> return -1;
> }
>
> MPI_Comm_size(MPI_COMM_WORLD,&numprocs);
> //nodemax=numprocs-1;///////////////////////////
> MPI_Comm_rank(MPI_COMM_WORLD,&myid);
> MPI_Get_processor_name(processor_name,&namelen);
> fprintf(stderr,"%d\n",myid);
> fflush(stderr);
>
> double startwtime;
> if(myid==0)
> startwtime= MPI_Wtime();
>
> for(int asd=0;asd<50;asd++)
> MPI_Bcast(lotus,LLL,MPI_DOUBLE,0,MPI_COMM_WORLD);
>
> double endwtime;
> if(myid==0)
> {
> endwtime = MPI_Wtime();
> printf("wall clock time = %f\n",endwtime-startwtime);
> }
>
> if(myid==0)
> startwtime= MPI_Wtime();
>
> for( asd=0;asd<50;asd++)
> MPI_Bcast(lotus,LLL,MPI_DOUBLE,numprocs-1,MPI_COMM_WORLD);
> if(myid==0)
> {
> endwtime = MPI_Wtime();
> printf("wall clock time = %f\n",endwtime-startwtime);
> }
>
> MPI_Finalize();
> return 0;
>
> }
>
> Thanks for your patience!
>
>
> --- Rusty Lusk <lusk at mcs.anl.gov> wrote:
>
>> That is unusually slow. I would expect it to take less than a
>> second.
>> How long does it take to do mpdtrace? You can time how long it takes
>> for a message to traverse the mpd ring with mpdringtest. Use the -
>> help
>> argument for each of these commands to find out more about them.
>>
>> Rusty Lusk
>>
>> From: 章少衡 <shc1515 at yahoo.com.tw>
>> Subject: [MPICH] Response too slow! running "mpiexec -n 5 cpi"
>> Date: Sun, 13 Aug 2006 18:53:41 +0800 (CST)
>>
>>> Is it a normal operation?
>>>
>>> After input the command
>>> mpiexec -n 5 cpi
>>>
>>> it took almost 22 seconds to show the response
>>> "
>>> Process 0 of 5 on server
>>> Process 1 of 5 on c2
>>> Process 2 of 5 on c4
>>> Process 3 of 5 on c3
>>> Process 4 of 5 on c1
>>> .....
>>> wall clock time = 0.005223
>>> "
>>>
>>> Is it normal?
>>>
>>> here is my system:
>>>
>>> 3Com Baseline 10/100/1000 Switch 8-Port #3C16477
>>> AMD Athlon 64 4000+
>>> NVIDIA GeForce™6100 GPU + nForce™430 MCP
>>>
>
>
>
>
>
>
>
> _________________________________________________________
> 捇誥轎煤G蚘眊ㄜ笢弊郔轎煤滅馮毀嶼僵閉湮蚘眊
> http://cn.mail.yahoo.com/?id=77072
>
>
>
More information about the mpich-discuss
mailing list