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:
http://www.open-mpi.org/faq/?category=running
The information there worked for me.
I hope it helps,
Gus Correa
--
---------------------------------------------------------------------
Gustavo J. Ponce Correa, PhD - Email: g...@ldeo.columbia.edu
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.
Regards,
Rayne
New Email addresses available on Yahoo!
Get the Email name you've always wanted on the new @ymail and @rocketmail.
Hurry before someone else does!
http://mail.promotions.yahoo.com/newdomains/sg/
_______________________________________________
users mailing list
us...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/users