Re: [OMPI users] need help installing mpi4py on openmpi

2018-06-05 Thread Konstantinos Konstantinidis
You should specify the MPI4py program file at the mpirun command. Since you
don't have a hostfile yet, you don't need to specify it in the command.

For example, in order to run a program named "test.py" with 4 MPI processes
you can use:

If using Python 2:
mpirun -np 4 python2 test.py

If using Python 3:
mpirun -np 4 python3 test.py

On Tue, Jun 5, 2018 at 4:01 PM, Neil k8it  wrote:

> Kostas
> I guess we made some progress,however I think I still have a syntax
> problem.
> Right now I am still configuring the master node ,so I do not have a
> hostfile made yet.so I am using the following command which returns a
> python message from an unknown python program.
>
> mpirun --allow-run-as-root -np 4 hostname
>
> the responds is :
>
> python2helloworld.py
> python2helloworld.py
> python2helloworld.py
> python2helloworld.py
>
> this tells me that the program ran 4 times, 1 oer core.
> this is good.
> however I do not know where this program file is located. I also do not
> know how this python 2 file gets invoked .
>
> my question is :how can I modifly this command line to specifly the proper
> python program?
>
> thanks neil
>
>
> *To:* Open MPI Users 
> *Subject:* Re: [OMPI users] need help installing mpi4py on openmpi
>
> Here are some instructions I have put together.
>
> I am using Python 2 and Open MPI 2.1.2 so I changed the commands to work
> for Python 3 and I tested them.
>
> Hope it helps.
>
> Regards,
> Kostas
>
> On Sun, Jun 3, 2018 at 1:56 PM, Neil k8it  wrote:
>
>> thanks, to all on this list for getting me this far.
>> my next step is to install mpi4py on the cluster master node.
>> I am looking for a suggested list of commands to do this.
>> notes
>> running openmpi 3.1.0
>> raspberry pi 3 b +
>> raspian stretch
>>
>> thanks neil
>>
>>
>> --
>> From: "Jeff Squyres (jsquyres)" 
>> Sent: Tuesday, May 29, 2018 8:03 PM
>> To: "Open MPI User's List" 
>> Subject: Re: [OMPI users] need help finding mpi for Raspberry pi Raspian
>> Streach
>>
>> If your Linux distro does not have an Open MPI package readily available,
>>> you can build Open MPI from source for an RPi fairly easily.  Something
>>> like this (not tested on an RPi / YMMV):
>>>
>>> wget https://download.open-mpi.org/release/open-mpi/v3.1/openmpi-
>>> 3.1.0.tar.bz2
>>> tar xf openmpi-3.1.0.tar.bz2
>>> cd openmpi-3.1.0
>>> ./configure |& tee config.out
>>> make -j |& tee make.out
>>> sudo make install |& tee install.out
>>>
>>> This will download, configure, build, and install Open MPI into the
>>> /usr/local tree.
>>>
>>> You can optionally specify a prefix to have it install elsewhere, e.g.:
>>>
>>> ./configure --prefix=/path/to/where/you/want/it/to/install |& tee
>>> config.out
>>>
>>> Then do the make/sudo make again.
>>>
>>>
>>> On May 29, 2018, at 6:43 PM, Neil k8it  wrote:

 I  am starting to build a Raspberry pi cluster with MPI and I want to
 use the latest Raspian Streach Lite version from the raspberrypi.org
 website. After a lot of trials of watching youtubes on how to do this, I
 have found that the new version of Raspian Streach LITE is not compatible .
 I am looking for details instructions on how to install MPIwith this latest
 version of Raspian Streach Lite. I am using the newset hardware,RPI 3 B+
 which requires this OS to use the features on the  -new chipset





 Thanks
 Neil
 ___
 users mailing list
 users@lists.open-mpi.org
 https://lists.open-mpi.org/mailman/listinfo/users

>>>
>>>
>>> --
>>> Jeff Squyres
>>> jsquy...@cisco.com
>>>
>>> ___
>>> users mailing list
>>> users@lists.open-mpi.org
>>> https://lists.open-mpi.org/mailman/listinfo/users
>>>
>>
>> ___
>> users mailing list
>> users@lists.open-mpi.org
>> https://lists.open-mpi.org/mailman/listinfo/users
>>
>
> --
>
> ___
> users mailing list
> users@lists.open-mpi.org
> https://lists.open-mpi.org/mailman/listinfo/users
>
>
___
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users

Re: [OMPI users] need help installing mpi4py on openmpi

2018-06-05 Thread Neil k8it
Kostas
I guess we made some progress,however I think I still have a syntax problem.
Right now I am still configuring the master node ,so I do not have a hostfile 
made yet.so I am using the following command which returns a python message 
from an unknown python program. 

mpirun --allow-run-as-root -np 4 hostname

the responds is :

python2helloworld.py
python2helloworld.py
python2helloworld.py
python2helloworld.py

this tells me that the program ran 4 times, 1 oer core.
this is good.
however I do not know where this program file is located. I also do not know 
how this python 2 file gets invoked .

my question is :how can I modifly this command line to specifly the proper 
python program?

thanks neil


To: Open MPI Users 
Subject: Re: [OMPI users] need help installing mpi4py on openmpi


Here are some instructions I have put together.  


I am using Python 2 and Open MPI 2.1.2 so I changed the commands to work for 
Python 3 and I tested them.


Hope it helps.


Regards,
Kostas


On Sun, Jun 3, 2018 at 1:56 PM, Neil k8it  wrote:

  thanks, to all on this list for getting me this far.
  my next step is to install mpi4py on the cluster master node.
  I am looking for a suggested list of commands to do this.
  notes
  running openmpi 3.1.0
  raspberry pi 3 b +
  raspian stretch

  thanks neil


  --
  From: "Jeff Squyres (jsquyres)" 
  Sent: Tuesday, May 29, 2018 8:03 PM
  To: "Open MPI User's List" 
  Subject: Re: [OMPI users] need help finding mpi for Raspberry pi Raspian 
Streach


If your Linux distro does not have an Open MPI package readily available, 
you can build Open MPI from source for an RPi fairly easily.  Something like 
this (not tested on an RPi / YMMV):

wget 
https://download.open-mpi.org/release/open-mpi/v3.1/openmpi-3.1.0.tar.bz2
tar xf openmpi-3.1.0.tar.bz2
cd openmpi-3.1.0
./configure |& tee config.out
make -j |& tee make.out
sudo make install |& tee install.out

This will download, configure, build, and install Open MPI into the 
/usr/local tree.

You can optionally specify a prefix to have it install elsewhere, e.g.:

./configure --prefix=/path/to/where/you/want/it/to/install |& tee config.out

Then do the make/sudo make again.



  On May 29, 2018, at 6:43 PM, Neil k8it  wrote:

  I  am starting to build a Raspberry pi cluster with MPI and I want to use 
the latest Raspian Streach Lite version from the raspberrypi.org website. After 
a lot of trials of watching youtubes on how to do this, I have found that the 
new version of Raspian Streach LITE is not compatible . I am looking for 
details instructions on how to install MPIwith this latest version of Raspian 
Streach Lite. I am using the newset hardware,RPI 3 B+ which requires this OS to 
use the features on the  -new chipset





  Thanks
  Neil
  ___
  users mailing list
  users@lists.open-mpi.org
  https://lists.open-mpi.org/mailman/listinfo/users



-- 
Jeff Squyres
jsquy...@cisco.com

___
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users 


  ___
  users mailing list
  users@lists.open-mpi.org
  https://lists.open-mpi.org/mailman/listinfo/users








___
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users___
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users

Re: [OMPI users] A hang in Rmpi at PMIx_Disconnect

2018-06-05 Thread marcin.krotkiewski
Well, I tried with 3.0.1, and it also hangs. I guess we will try to 
write to the R community about this.


m


On 06/04/2018 11:42 PM, Ben Menadue wrote:

Hi All,

This looks very much like what I reported a couple of weeks ago with 
Rmpi and doMPI — the trace looks the same.  But as far as I could see, 
doMPI does exactly what simple_spawn.c does — use MPI_Comm_spawn to 
create the workers and then MPI_Comm_disconnect them when you call 
closeCluster, and it’s here that it hung.


Ralph suggested trying master, but I haven’t had a chance to try this 
yet. I’ll try it today and see if it works for me now.


Cheers,
Ben


On 5 Jun 2018, at 6:28 am, r...@open-mpi.org  
wrote:


Yes, that does sound like a bug - the #connects must equal the 
#disconnects.



On Jun 4, 2018, at 1:17 PM, marcin.krotkiewski 
mailto:marcin.krotkiew...@gmail.com>> 
wrote:


huh. This code also runs, but it also only displays 4 connect / 
disconnect messages. I should add that the test R script shows 4 
connect, but 8 disconnect messages. Looks like a bug to me, but 
where? I guess we will try to contact R forums and ask there.


Bennet: I tried to use doMPI + startMPIcluster / closeCluster. In 
this case I get a warning about fork being used:


--
A process has executed an operation involving a call to the
"fork()" system call to create a child process.  Open MPI is currently
operating in a condition that could result in memory corruption or
other system errors; your job may hang, crash, or produce silent
data corruption.  The use of fork() (or system() or other calls that
create child processes) is strongly discouraged.

The process that invoked fork was:

  Local host:  [[36000,2],1] (PID 23617)

If you are *absolutely sure* that your application will successfully
and correctly survive a call to fork(), you may disable this warning
by setting the mpi_warn_on_fork MCA parameter to 0.
--

And the process hangs as well - no change.

Marcin



On 06/04/2018 05:27 PM, r...@open-mpi.org wrote:

It might call disconnect more than once if it creates multiple communicators. 
Here’s another test case for that behavior:




On Jun 4, 2018, at 7:08 AM, Bennet Fauber  wrote:

Just out of curiosity, but would using Rmpi and/or doMPI help in any way?

-- bennet


On Mon, Jun 4, 2018 at 10:00 AM, marcin.krotkiewski
  wrote:

Thanks, Ralph!

Your code finishes normally, I guess then the reason might be lying in R.
Running the R code with -mca pmix_base_verbose 1 i see that each rank calls
ext2x:client disconnect twice (each PID prints the line twice)

[...]
3 slaves are spawned successfully. 0 failed.
[localhost.localdomain:11659] ext2x:client disconnect
[localhost.localdomain:11661] ext2x:client disconnect
[localhost.localdomain:11658] ext2x:client disconnect
[localhost.localdomain:11646] ext2x:client disconnect
[localhost.localdomain:11658] ext2x:client disconnect
[localhost.localdomain:11659] ext2x:client disconnect
[localhost.localdomain:11661] ext2x:client disconnect
[localhost.localdomain:11646] ext2x:client disconnect

In your example it's only called once per process.

Do you have any suspicion where the second call comes from? Might this be
the reason for the hang?

Thanks!

Marcin


On 06/04/2018 03:16 PM,r...@open-mpi.org  wrote:

Try running the attached example dynamic code - if that works, then it
likely is something to do with how R operates.





On Jun 4, 2018, at 3:43 AM, marcin.krotkiewski
  wrote:

Hi,

I have some problems running R + Rmpi with OpenMPI 3.1.0 + PMIx 2.1.1. A
simple R script, which starts a few tasks, hangs at the end on diconnect.
Here is the script:

library(parallel)
numWorkers <- as.numeric(Sys.getenv("SLURM_NTASKS")) - 1
myCluster <- makeCluster(numWorkers, type = "MPI")
stopCluster(myCluster)

And here is how I run it:

SLURM_NTASKS=5 mpirun -np 1 -mca pml ^yalla -mca mtl ^mxm -mca coll ^hcoll R
--slave < mk.R

Notice -np 1 - this is apparently how you start Rmpi jobs: ranks are spawned
by R dynamically inside the script. So I ran into a number of issues here:

1. with HPCX it seems that dynamic starting of ranks is not supported, hence
I had to turn off all of yalla/mxm/hcoll

--
Your application has invoked an MPI function that is not supported in
this environment.

  MPI function: MPI_Comm_spawn
  Reason:   the Yalla (MXM) PML does not support MPI dynamic process
functionality
--

2. when I do that, the program does create a 'cluster' and starts the ranks,
but hangs in PMIx at MPI Disconnect. Here is the top of the trace from gdb:

#0  0x7f66b1e1e995 inpthread_cond_wait@@GLIBC_2.3.2  () from
/lib64/libpthread.so.0
#1  0x7f669eaeba5b in PMIx_Disconnect