Hi Leonardo

It depends on how many "slots" (a.k.a. CPUs/cores) you have per node.

You can add the flag "-bynode" to the mpiexec command line
to force it to run on different nodes.

"man mpiexec" is a helpful source of information about these things.

I hope this helps.
Gus Correa
---------------------------------------------------------------------
Gustavo Correa
Lamont-Doherty Earth Observatory - Columbia University
Palisades, NY, 10964-8000 - USA
---------------------------------------------------------------------


Leonardo Machado Moreira wrote:
Sorry If I misunderstood but, Should the mpirun -np4 hostname command return all the machines no the openmpi-default-hostfile?

My host file has just two ips, the first is the server and the second a node.

192.168.0.1
192.168.0.3

It just return the name of my server 4 times.

The same happens with other commands like "ls" or just "dir".

I didn't understood yet why does the mpi run the process 4 times or x times. It must be just one but spreading it on the other machines. Must not it??





On Tue, Jan 5, 2010 at 6:14 PM, Jeff Squyres <jsquy...@cisco.com <mailto:jsquy...@cisco.com>> wrote:

    You might want to try something simpler than java to start with.
     For example:

    mpirun -np 4 hostname

    (where hostname is the POSIX command line app, not an MPI app)

    You should see the hostnames from the first 4 hosts in your hostfile
    (assuming each one of them has 1 process slot).  Then try running
    the samples that are in the examples/ directory in the Open MPI
    tarball (make sure that the example executables are available in the
    same location on every node).  For example:

    cd examples
    make
    mpirun -np 4 hello_c

    That's a trivial C MPI application that is the MPI equivalent of
    "hello world".


    On Jan 5, 2010, at 11:18 AM, Leonardo Machado Moreira wrote:

     > Hi, I have created a cluster with openmpi this way.
     >
     > 1 - Configured SSH with authorized_keys from the server to the nodes.
     > 2 - In /etc/openmpi-default-hostfile\ I have typed the IP of
    every nodes and the server.
     > 3 - Afterward I have created a Java application of two threads
    just to type a text on the console and runned it by
     > mpirun -1 java javaprogram
     > or
     > mpirun -2 java javaprogram
     > It is on the ps -aux of the server but the nodes are still stoped.
     >
     > How can I know that my mpi is working
     >
     > Thanks a lot
     > _______________________________________________
     > users mailing list
     > us...@open-mpi.org <mailto:us...@open-mpi.org>
     > http://www.open-mpi.org/mailman/listinfo.cgi/users


    --
    Jeff Squyres
    jsquy...@cisco.com <mailto:jsquy...@cisco.com>


    _______________________________________________
    users mailing list
    us...@open-mpi.org <mailto:us...@open-mpi.org>
    http://www.open-mpi.org/mailman/listinfo.cgi/users



------------------------------------------------------------------------

_______________________________________________
users mailing list
us...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/users

Reply via email to