Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |  

This web mail archive is frozen.

This page is part of a frozen web archive of this mailing list.

You can still navigate around this archive, but know that no new mails have been added to it since July of 2016.

Click here to be taken to the new web archives of this list; it includes all the mails that are in this frozen archive plus all new mails that have been sent to the list since it was migrated to the new archives.

Subject: Re: [OMPI users] Running Open MPI on Ethernet
From: Gus Correa (gus_at_[hidden])
Date: 2008-08-08 11:25:35

Hello Rayne Lancer and list

Rayne, if you tell the command you use to launch the job, you may get a
faster answer from the list.

I agree with others who guessed that your program may running on your
local machine only,
i.e. wherever you launch the job (through mpirun or similar).
It can run in the local machine, even if the number of CPUs/cores
is less than the number of processes you launched (4 it looks like).

You may need to take a look the runtime setup and requirements,
(mpiexec, hostfile/machinefile, etc).
A good place to start is the OpenMPI FAQ on the subject:

The information there worked for me.

I hope it helps,
Gus Correa

Gustavo J. Ponce Correa, PhD - Email: gus_at_[hidden]
Lamont-Doherty Earth Observatory - Columbia University
P.O. Box 1000 [61 Route 9W] - Palisades, NY, 10964-8000 - USA
Rayne wrote:
>Hi all,
>I'm running openmpi-1.2.6, and my computer is connected to a Ethernet network. I have no experience in setting up a network that supports parallel computing using MPI before, nor do I know much about networking. So please excuse me if my questions seem too simple or silly.
>What I simply did was install the Open MPI package on my computer, and executed the following simple code to test if I can successfully run MPI programs:
>#include <stdio.h>
>#include <mpi.h>
>int main(int argc, char** argv)
>    int rank, size, i = 1, j, total = 1, total2;
>    MPI_Status status;
>    MPI_Init(&argc, &argv);
>    MPI_Comm_rank(MPI_COMM_WORLD, &rank);
>    MPI_Comm_size(MPI_COMM_WORLD, &size);
>    printf("Hello... %d of %d processors\n", rank, size);
>    if (rank != 0)
>        MPI_Send(&i, 1, MPI_INT, 0, 1, MPI_COMM_WORLD);
>    else
>    {
>        for (j = 1 ; j < size ; j++)
>        {
>            MPI_Recv(&i, 1, MPI_INT, j, 1, MPI_COMM_WORLD, &status);
>            total += i;
>        }
>        printf("%d Calculated total: %d\n", rank, total);
>    }
>    MPI_Reduce(&i, &total2, 1, MPI_INT, MPI_SUM, 0, MPI_COMM_WORLD);
>    if (!rank)
>        printf("%d Reduced total: %d\n", rank, total2);
>    MPI_Finalize();
>    return 0;
>I got the correct output, i.e.
>Hello... 0 of 3 processors
>Hello... 1 of 3 processors
>Hello... 2 of 3 processors
>0 Calculated total: 3
>0 Reduced total: 3
>together with the warning message about OpenIB and UDAPL, which after some Googling, I was able to resolve using "-mca btl ^openib,udapl".
>I was trying to see if my MPI program is really running on the Ethernet network, so I deactivated the network, but the program still works. Then I unplugged the network cable and still the program works. Then I ran Wireshark, which is a kind of packet sniffer program, and ran the MPI program again to see if the Send/Receive functions work right, as I thought if the program is sending/receiving the variable i, something should show up in Wireshark. However, no packets are captured by Wireshark.
>Can someone help me understand what is going on here, as it seems like the program is working when it shouldn't?
>Thank you.
>      New Email addresses available on Yahoo!
>Get the Email name you&#39;ve always wanted on the new @ymail and @rocketmail. 
>Hurry before someone else does!
>users mailing list