From: panxing@my-dejanews.com Newsgroups: comp.parallel.mpi Subject: Re: Why my MPICH/LAM under linux give low float point performance Date: Thu, 27 Aug 1998 20:12:57 GMT Organization: Deja News - The Leader in Internet Discussion Message-Id: <6s4ek9$74b$1@nnrp1.dejanews.com> References: <6s3nt4$8kd$1@nnrp1.dejanews.com> In article <6s3nt4$8kd$1@nnrp1.dejanews.com>, panxing@my-dejanews.com wrote: Sorry, there are a little bug in the program, the printf should not be timed. But I test again, even the printf is not timed, it is slow too. almost 2seconds .vs. 0.85 seconds, (MPI .vs. normal C) > > The program is : > #include "mpi.h" > #include > #include > > void main(argc,argv) > int argc; > char *argv[]; > { > int myid, numprocs,n; > register double mye, x, y, e; > register long i,j; > double startwtime, endwtime; > > MPI_Init(&argc,&argv); > MPI_Comm_size(MPI_COMM_WORLD,&numprocs); > MPI_Comm_rank(MPI_COMM_WORLD,&myid); > > x=1.0; y=1.00000001; > if (myid == 0) > { > startwtime = MPI_Wtime(); > } > for (i =0;i<100000000;i++ ) > { > x =x*y; > } > mye = x; > if (myid == 0) > { > printf("The my final e is %lf\n", mye); > endwtime = MPI_Wtime(); > printf("wall clock time = %f\n", > endwtime-startwtime); > } > > MPI_Finalize(); > } > > -----== Posted via Deja News, The Leader in Internet Discussion ==----- > http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum > -----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum