Hi Hui 

I cannot run mpiexec directly on my hosts because both rsh and ssh connections are disabled. I have to use qsub -P bnormal -pe dp 4 mpiexec ./my_exe to run my binary on remote hosts. 

Thanks 
Shuwei

On Wed, Nov 28, 2018 at 16:59 Zhou, Hui <zhouh@anl.gov> wrote:
Hi Shuwei,

Were you able to run over multiple hosts directly, e.g.:

```
$ mpiexec -n 2 -hosts “hostname_1,hostname_2” ./cpi
```
?

— 
Hui Zhou








On Nov 28, 2018, at 3:33 PM, Shuwei Zhao <shuweizhao1991@gmail.com> wrote:

Hi hui 

I tried your suggestion but looks like the newly spawned jobs are using ssh to distribute on the new hosts. Howver In my machine farm, ssh & rsh connections are disabled. have to submit through qsub network interface. Is using qsub  possible in mpi_comm_spawn? 

Thanks a lot
Shuwei

On Mon, Nov 19, 2018 at 09:21 Zhou, Hui <zhouh@anl.gov> wrote:
On Sun, Nov 18, 2018 at 10:33:48PM -0600, Shuwei Zhao wrote:
>2. About the MPI_Info object, I tried to use mpi_comm_spawn on the same
>machine, it can work. But I don't know how to spawn processes cross
>machines. For example, if I have 4 processes on machine 1, and I want to
>spawn 4 more processes on other machines (resource managed by qsub), how do
>I need to declare in the MPI_Info object?

Did you try setting the host parameter in the info object? For
example:

    MPI_Info info;
    MPI_Info_create(&info, "host", "A,B,C");

    MPI_Comm_spawn("worker", MPI_ARGV_NULL, n_hosts, info, 0,
MPI_COMM_SELF, &comm_workers, MPI_ERRCODES_IGNORE)?

    MPI_Info_free(&info);

Replace "A,B,C" with host name list that you want to spawn process on.

--
Hui Zhou