Re: [OMPI devel] Developing MPI program without mpirun

2016-11-18 Thread r...@open-mpi.org
The 2.0.1 NEWS states that the MPI dynamics operations (comm_spawn, connect, 
and accept) do not work on that release. They are being fixed for the 2.0.2 
release.

> On Nov 18, 2016, at 7:48 AM, Rui Liu  wrote:
> 
> Hi Howard,
> 
> 1. I am using a cluster which involves 20 ubuntu 14.04 servers, and each 
> sever is equipped with infiniBand RDMA for communication and data transfer.
> 2. Open MPI v2.0.1
> 3. I just use prefix option to indicate the install directory with 
> ./configure command, and use make all & sudo make install command further.
> 4. the test app program, which has client and server sides, is very simple. I 
> hope to run them by ./server and ./client command 
> 
> server side:
> 
> #include “mpi.h"
> #include 
> using namespace std;
> 
> int main(int argc,  char **argv) {
>   MPI_Comm client;
>   MPI_Status status;
>   MPI_Init(, );
>   int number = 0;
>   char myport[MPI_MAX_PORT_NAME];
>   MPI_Open_port(MPI_INFO_NULL, myport);
>   MPI_Comm_accept(myport, MPI_INFO_NULL, 0, MPI_COMM_WORLD, );
>   MPI_Recv(, 1, MPI_INT, MPI_ANY_SOURCE, MPI_ANY_TAG, client, 
> );
> }   
> 
> client side:
> 
> #include “mpi.h"
> #include 
> using namespace std;
> int main(int argc, char **argv) {
>   MPI_Comm server;
>   MPI_Init(NULL, NULL);
>   char name[] = "3808886785.0:2871653702”;
>   MPI_Comm_connect(name, MPI_INFO_NULL, 0, MPI_COMM_WORLD, );
>   int number = -1 ;
>   MPI_Send(, 1, MPI_INT, 0, 0, server);
> }
> 
> 
> On 18 November 2016 at 11:24:26 PM, Pritchard Jr., Howard (howa...@lanl.gov 
> ) wrote:
> 
>> Hello Rui,
>> 
>> Note there is no standard for the format of the port_name so don’t
>> read much what it looks like when printed out.
>> 
>> Could you provide some more information about your particular setup:
>> 
>> - characteristics of the system you are using, e.g. a Linux cluster,  laptop 
>> running os-x, etc.
>> - what version of Open MPI you are using
>> - if possible, the configure options used to build/install Open MPI 
>> - the client/server test app (if its concise)
>> 
>> Thanks,
>> 
>> Howard
>> 
>> -- 
>> Howard Pritchard
>> HPC-DES
>> Los Alamos National Laboratory
>> 
>> 
>> From: devel > > on behalf of Rui Liu 
>> >
>> Reply-To: Open MPI Developers > >
>> Date: Thursday, November 17, 2016 at 6:58 PM
>> To: "devel@lists.open-mpi.org " 
>> >
>> Subject: [OMPI devel] Developing MPI program without mpirun
>> 
>> Hi folks,
>> 
>> I am working on a simple client/server program but I don’t want to use 
>> mpirun to start the program (In nature, I just want to adopt MPI API into my 
>> own project but cannot start it using mpirun). I mostly followed the 
>> singleton mode of MPI, using APIs like MPI_Open_port, MPI_Comm_connect, and 
>> MPI_Comm_accept. But it doesn’t work, especially the port_name is something 
>> like 4034413554.0:228712872, which really confuse me.
>> 
>> Anyone knows how to achieve that? I attach my server and client key source 
>> code for your reference.
>> 
>> server side:
>> 
>> char myport[MPI_MAX_PORT_NAME];
>> MPI_Open_port(MPI_INFO_NULL, myport);
>> cout << myport << endl; (assume myport is 4034413554.0:228712872, it always 
>> return string like this)
>> MPI_Comm_accept(myport, MPI_INFO_NULL, 0, MPI_COMM_WORLD, );
>> MPI_Recv(, 1, MPI_INT, MPI_ANY_SOURCE, MPI_ANY_TAG, client, );
>> 
>> 
>> client side:
>> 
>> char name[] = "4034413554.0:228712872";
>> MPI_Comm_connect(name, MPI_INFO_NULL, 0, MPI_COMM_WORLD, );
>> int number = -1 ;
>> MPI_Send(, 1, MPI_INT, 0, 0, server);
>> 
>> Best,
>> Rui
>> ___ 
>> devel mailing list 
>> devel@lists.open-mpi.org 
>> https://rfd.newmexicoconsortium.org/mailman/listinfo/devel
> ___
> devel mailing list
> devel@lists.open-mpi.org 
> https://rfd.newmexicoconsortium.org/mailman/listinfo/devel 
> 
___
devel mailing list
devel@lists.open-mpi.org
https://rfd.newmexicoconsortium.org/mailman/listinfo/devel

Re: [OMPI devel] Developing MPI program without mpirun

2016-11-18 Thread Rui Liu
Hi Howard,

1. I am using a cluster which involves 20 ubuntu 14.04 servers, and each sever 
is equipped with infiniBand RDMA for communication and data transfer.
2. Open MPI v2.0.1
3. I just use prefix option to indicate the install directory with ./configure 
command, and use make all & sudo make install command further.
4. the test app program, which has client and server sides, is very simple. I 
hope to run them by ./server and ./client command 

server side:

#include “mpi.h"
#include 
using namespace std;

int main(int argc,  char **argv) {
MPI_Comm client;
MPI_Status status;
MPI_Init(, );
    int number = 0;
char myport[MPI_MAX_PORT_NAME];
MPI_Open_port(MPI_INFO_NULL, myport);
MPI_Comm_accept(myport, MPI_INFO_NULL, 0, MPI_COMM_WORLD, );
MPI_Recv(, 1, MPI_INT, MPI_ANY_SOURCE, MPI_ANY_TAG, client, 
);
}   

client side:

#include “mpi.h"
#include 
using namespace std;
int main(int argc, char **argv) {    
MPI_Comm server;
MPI_Init(NULL, NULL);
char name[] = "3808886785.0:2871653702”;
MPI_Comm_connect(name, MPI_INFO_NULL, 0, MPI_COMM_WORLD, );
int number = -1 ;
MPI_Send(, 1, MPI_INT, 0, 0, server);
}


On 18 November 2016 at 11:24:26 PM, Pritchard Jr., Howard (howa...@lanl.gov) 
wrote:

Hello Rui,

Note there is no standard for the format of the port_name so don’t
read much what it looks like when printed out.

Could you provide some more information about your particular setup:

- characteristics of the system you are using, e.g. a Linux cluster,  laptop 
running os-x, etc.
- what version of Open MPI you are using
- if possible, the configure options used to build/install Open MPI 
- the client/server test app (if its concise)

Thanks,

Howard

-- 
Howard Pritchard
HPC-DES
Los Alamos National Laboratory


From: devel  on behalf of Rui Liu 

Reply-To: Open MPI Developers 
Date: Thursday, November 17, 2016 at 6:58 PM
To: "devel@lists.open-mpi.org" 
Subject: [OMPI devel] Developing MPI program without mpirun

Hi folks,

I am working on a simple client/server program but I don’t want to use mpirun 
to start the program (In nature, I just want to adopt MPI API into my own 
project but cannot start it using mpirun). I mostly followed the singleton mode 
of MPI, using APIs like MPI_Open_port, MPI_Comm_connect, and MPI_Comm_accept. 
But it doesn’t work, especially the port_name is something like 
4034413554.0:228712872, which really confuse me.

Anyone knows how to achieve that? I attach my server and client key source code 
for your reference.

server side:

char myport[MPI_MAX_PORT_NAME];
MPI_Open_port(MPI_INFO_NULL, myport);
cout << myport << endl; (assume myport is 4034413554.0:228712872, it always 
return string like this)
MPI_Comm_accept(myport, MPI_INFO_NULL, 0, MPI_COMM_WORLD, );
MPI_Recv(, 1, MPI_INT, MPI_ANY_SOURCE, MPI_ANY_TAG, client, );


client side:

char name[] = "4034413554.0:228712872";
MPI_Comm_connect(name, MPI_INFO_NULL, 0, MPI_COMM_WORLD, );
int number = -1 ;
MPI_Send(, 1, MPI_INT, 0, 0, server);

Best,
Rui
___  
devel mailing list  
devel@lists.open-mpi.org  
https://rfd.newmexicoconsortium.org/mailman/listinfo/devel___
devel mailing list
devel@lists.open-mpi.org
https://rfd.newmexicoconsortium.org/mailman/listinfo/devel

Re: [OMPI devel] Developing MPI program without mpirun

2016-11-18 Thread Pritchard Jr., Howard
Hello Rui,

Note there is no standard for the format of the port_name so don’t
read much what it looks like when printed out.

Could you provide some more information about your particular setup:

- characteristics of the system you are using, e.g. a Linux cluster,  laptop 
running os-x, etc.
- what version of Open MPI you are using
- if possible, the configure options used to build/install Open MPI
- the client/server test app (if its concise)

Thanks,

Howard

--
Howard Pritchard
HPC-DES
Los Alamos National Laboratory


From: devel 
> on 
behalf of Rui Liu >
Reply-To: Open MPI Developers 
>
Date: Thursday, November 17, 2016 at 6:58 PM
To: "devel@lists.open-mpi.org" 
>
Subject: [OMPI devel] Developing MPI program without mpirun

Hi folks,

I am working on a simple client/server program but I don’t want to use mpirun 
to start the program (In nature, I just want to adopt MPI API into my own 
project but cannot start it using mpirun). I mostly followed the singleton mode 
of MPI, using APIs like MPI_Open_port, MPI_Comm_connect, and MPI_Comm_accept. 
But it doesn’t work, especially the port_name is something like 
4034413554.0:228712872, which really confuse me.

Anyone knows how to achieve that? I attach my server and client key source code 
for your reference.

server side:

char myport[MPI_MAX_PORT_NAME];
MPI_Open_port(MPI_INFO_NULL, myport);
cout << myport << endl; (assume myport is 4034413554.0:228712872, it always 
return string like this)
MPI_Comm_accept(myport, MPI_INFO_NULL, 0, MPI_COMM_WORLD, );
MPI_Recv(, 1, MPI_INT, MPI_ANY_SOURCE, MPI_ANY_TAG, client, );


client side:

char name[] = "4034413554.0:228712872";
MPI_Comm_connect(name, MPI_INFO_NULL, 0, MPI_COMM_WORLD, );
int number = -1 ;
MPI_Send(, 1, MPI_INT, 0, 0, server);

Best,
Rui
___
devel mailing list
devel@lists.open-mpi.org
https://rfd.newmexicoconsortium.org/mailman/listinfo/devel

Re: [OMPI devel] Removing from opal_hashtable while iterating over the elements

2016-11-18 Thread George Bosilca
Absolutely, if you keep the pointer to the previous or next element, it is
safe to remove an element. If you are in the process of completely emptying
the hashtable you can just keep removing the head element.

George

On Nov 18, 2016 6:51 AM, "Clement FOYER"  wrote:

> Hi everyone,
>
> I was wondering if it was possible to remove an element while iterating
> over the elements of a hashtable. As saw that it wasn't while using the
> OPAL_HASHTABLE_FOREACH macro, and I suppose it's because of the possible
> loss of the current next element. But how about if the element have already
> been iterated over? If I save a pointer to the previous element, it is safe
> to remove it from the hashtable?
>
> Thank you,
>
> Clément FOYER
>
> ___
> devel mailing list
> devel@lists.open-mpi.org
> https://rfd.newmexicoconsortium.org/mailman/listinfo/devel
___
devel mailing list
devel@lists.open-mpi.org
https://rfd.newmexicoconsortium.org/mailman/listinfo/devel

[OMPI devel] Removing from opal_hashtable while iterating over the elements

2016-11-18 Thread Clement FOYER

Hi everyone,

I was wondering if it was possible to remove an element while iterating 
over the elements of a hashtable. As saw that it wasn't while using the 
OPAL_HASHTABLE_FOREACH macro, and I suppose it's because of the possible 
loss of the current next element. But how about if the element have 
already been iterated over? If I save a pointer to the previous element, 
it is safe to remove it from the hashtable?


Thank you,

Clément FOYER

___
devel mailing list
devel@lists.open-mpi.org
https://rfd.newmexicoconsortium.org/mailman/listinfo/devel