Usenet comp.os.linux.alpha (1997-2013)
 help / color / mirror / Atom feed
* mpi performance consideration
@ 1998-11-16  5:00 Bernard Van Renterghem
  1998-11-16  5:00 ` Murx
  0 siblings, 1 reply; 2+ messages in thread
From: Bernard Van Renterghem @ 1998-11-16  5:00 UTC (permalink / raw)


Hello all,

We have a cluster of 16 LX164 533Mhz on a 100 Mb fd switch.
We have bad performance with mpich 1.0.9 or lam 6.1 with both 2.0.35 or
2.1.126
kernel with eth drivers de4x5.c:V0.542 100Mb/s full duplex or
tulip.c:v0.83
10/19/97

I include the small program latband.c, tested on two nodes, compiled
with
gcc version egcs-2.92.17 19981026 and glibc 2.0.7

with 2.0.35 lam6.1 -c2c, we have around 64 �sec.
without -c2c, it's 300 �sec or worse, with all the combinaisons of mpi
distr,
 kernel, eth ...

If someone have better performance or any idea in order to improve it,
please feel free to contact myself.
(With OSF 4.0, it's around 30 �sec so the users want to switch to OSF
:-| )

Regards,

Bernard Van Rent 


#include "mpi.h"
#include <math.h>
#include <stdio.h>

#define MAXSIZE 1000000
#define NITER_L 10000
#define NITER_B 5

int main(int argc, char *argv[]) {

        int myrank, numprocs, i, n=1;
        double start_time, l_time, b_time, a[MAXSIZE];
        double truc, sum;
        MPI_Status status;

        MPI_Init(&argc, &argv);
        MPI_Comm_size(MPI_COMM_WORLD, &numprocs);
        MPI_Comm_rank(MPI_COMM_WORLD, &myrank);

        if (myrank==0) {
                printf("Actual number of processors: %1d\n", numprocs);
                printf("MPI timing resolution %.5E s\n", MPI_Wtick()); 
        }

        printf("Hello, I am process #%4d\n", myrank);
        fflush(stdout);

        start_time = MPI_Wtime();

        if (myrank==0) {
                printf("Starting latency measurements ... ");
                fflush(stdout);
        }

        if (myrank == 0) {
                sum = 0.0; truc = MPI_Wtime();
                for (i=0; i<NITER_L; i++) {
                        truc = MPI_Wtime();
                        MPI_Send(&n, 1, MPI_INT, 1, 0, MPI_COMM_WORLD);
                        truc = MPI_Wtime() - truc;
                        sum += truc;
                }
        }
        else {
                for (i=0; i<NITER_L; i++)
                        MPI_Recv(&n, 1, MPI_INT, 0, 0, MPI_COMM_WORLD,
&status);
        }

        if (myrank == 0) {
                printf("done.\nStarting bandwith measurements ... ");
                fflush(stdout);
        }

        l_time = MPI_Wtime() - start_time;
        if (myrank == 0) {
                for (i=0; i<MAXSIZE; i++)
                        a[i] = i;
        }
        start_time = MPI_Wtime();
        if (myrank == 0) {
                for (i=0; i<NITER_B; i++)
                        MPI_Send(a, MAXSIZE, MPI_DOUBLE, 1, 0,
MPI_COMM_WORLD);
        } 
        else {
                for (i=0; i<NITER_B; i++)
                        MPI_Recv(a, MAXSIZE, MPI_DOUBLE, 0, 0,
MPI_COMM_WORLD, &
status);
        }
        b_time = MPI_Wtime() - start_time;
        if (myrank == 0) {
                printf("done.\n");
                fflush(stdout);
        }
        if (myrank == 0) {
                printf("Send_time (Latency measurement):        %.2f
sec.\n"
                       "Latency:                                %.6f
M-5sec\n"
                       "Send_time (Bandwidth measurement):      %.2f
sec.\n"
                       "Bandwidth:                              %.3f
MB/s\n",
                        l_time, 1E+06*l_time/((double) NITER_L),
                        b_time,
NITER_B*MAXSIZE*sizeof(double)/(1024*1024*b_time
));
        }

        MPI_Finalize();   

        return 0;

} /* END main */

-------------------------------------------------
Bernard Van Renterghem UCL/MAPR/PCPM 010/47 81 91
Bat Boltzmann Pl croix du Sud,1 1348 LLN 
-------------------------------------------------



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1998-11-16  5:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-11-16  5:00 mpi performance consideration Bernard Van Renterghem
1998-11-16  5:00 ` Murx

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox