[OMPI users] Yet another stdin problem
Dear all, I'm trying to lunch an MPI program using the command mpirun -np 64 my_exe < inputs.txt inputs.txt actually contains the entries that are read by all processes however it seems that openmpi redirect the stdin only to the processes with rank 0. with leads to a segmentation fault on the other processes. The option "-stdin rank" doesn't help since i need all processes read the inputs.txt file. I'v tested with openmpi 1.3 and 1.2 whitout success. Thanks in advance for you help. Zellabia. S
Re: [OMPI users] Yet another stdin problem
Why not modify your program to read inputs.txt instead of stdin? 2009/10/7 Kilou Zelabia : > Dear all, > > I'm trying to lunch an MPI program using the command > > mpirun -np 64 my_exe < inputs.txt > > inputs.txt actually contains the entries that are read by all processes > however it seems that openmpi redirect the stdin only to the processes with > rank 0. with leads to a segmentation fault on the other processes. > The option "-stdin rank" doesn't help since i need all processes read the > inputs.txt file. > > I'v tested with openmpi 1.3 and 1.2 whitout success. > > Thanks in advance for you help. > > Zellabia. S > > > > > ___ > users mailing list > us...@open-mpi.org > http://www.open-mpi.org/mailman/listinfo.cgi/users > -- Roman I. Cheplyaka
[OMPI users] Re : Yet another stdin problem
Ok thanks! That's a solution but i was wondering if there could exist a more elegant one ? means without any modification at the source level De : Roman Cheplyaka À : Open MPI Users Envoyé le : Mer 7 Octobre 2009, 17 h 06 min 55 s Objet : Re: [OMPI users] Yet another stdin problem Why not modify your program to read inputs.txt instead of stdin? 2009/10/7 Kilou Zelabia : > Dear all, > > I'm trying to lunch an MPI program using the command > > mpirun -np 64 my_exe < inputs.txt > > inputs.txt actually contains the entries that are read by all processes > however it seems that openmpi redirect the stdin only to the processes with > rank 0. with leads to a segmentation fault on the other processes. > The option "-stdin rank" doesn't help since i need all processes read the > inputs.txt file. > > I'v tested with openmpi 1.3 and 1.2 whitout success. > > Thanks in advance for you help. > > Zellabia. S > > > > > ___ > users mailing list > us...@open-mpi.org > http://www.open-mpi.org/mailman/listinfo.cgi/users > -- Roman I. Cheplyaka ___ users mailing list us...@open-mpi.org http://www.open-mpi.org/mailman/listinfo.cgi/users
Re: [OMPI users] Re : Yet another stdin problem
As a slight modification, you can write a wrapper script #!/bin/sh my_exe < inputs.txt and pass it to mpirun. 2009/10/7 Kilou Zelabia : > Ok thanks! > That's a solution but i was wondering if there could exist a more elegant > one ? means without any modification at the source level > > > De : Roman Cheplyaka > À : Open MPI Users > Envoyé le : Mer 7 Octobre 2009, 17 h 06 min 55 s > Objet : Re: [OMPI users] Yet another stdin problem > > Why not modify your program to read inputs.txt instead of stdin? > > 2009/10/7 Kilou Zelabia : >> Dear all, >> >> I'm trying to lunch an MPI program using the command >> >> mpirun -np 64 my_exe < inputs.txt >> >> inputs.txt actually contains the entries that are read by all processes >> however it seems that openmpi redirect the stdin only to the processes >> with >> rank 0. with leads to a segmentation fault on the other processes. >> The option "-stdin rank" doesn't help since i need all processes read the >> inputs.txt file. >> >> I'v tested with openmpi 1.3 and 1.2 whitout success. >> >> Thanks in advance for you help. >> >> Zellabia. S >> >> >> >> >> ___ >> users mailing list >> us...@open-mpi.org >> http://www.open-mpi.org/mailman/listinfo.cgi/users >> > > > > -- > Roman I. Cheplyaka > > ___ > users mailing list > 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 > -- Roman I. Cheplyaka
Re: [OMPI users] Re : Yet another stdin problem
Or better still if you want to be able to pass the filename and args on the mpirun command line use the following and then run it as mpirun -np 64 ./input_wrapper inputs.txt my_exe #!/bin/bash FILE=$1 shift "$@" < $FILE In general though using stdin on parallel applications is rarely a good solution. Ashley. On Wed, 2009-10-07 at 18:42 +0300, Roman Cheplyaka wrote: > As a slight modification, you can write a wrapper script > > #!/bin/sh > my_exe < inputs.txt > > and pass it to mpirun. -- Ashley Pittman, Bath, UK. Padb - A parallel job inspection tool for cluster computing http://padb.pittman.org.uk
Re: [OMPI users] Re : Yet another stdin problem
FWIW: an upcoming version will have the ability for you to specify all ranks to receive stdin...but that's a little ways off. For now, only rank=0 does. On Oct 7, 2009, at 9:42 AM, Roman Cheplyaka wrote: As a slight modification, you can write a wrapper script #!/bin/sh my_exe < inputs.txt and pass it to mpirun. 2009/10/7 Kilou Zelabia : Ok thanks! That's a solution but i was wondering if there could exist a more elegant one ? means without any modification at the source level De : Roman Cheplyaka À : Open MPI Users Envoyé le : Mer 7 Octobre 2009, 17 h 06 min 55 s Objet : Re: [OMPI users] Yet another stdin problem Why not modify your program to read inputs.txt instead of stdin? 2009/10/7 Kilou Zelabia : Dear all, I'm trying to lunch an MPI program using the command mpirun -np 64 my_exe < inputs.txt inputs.txt actually contains the entries that are read by all processes however it seems that openmpi redirect the stdin only to the processes with rank 0. with leads to a segmentation fault on the other processes. The option "-stdin rank" doesn't help since i need all processes read the inputs.txt file. I'v tested with openmpi 1.3 and 1.2 whitout success. Thanks in advance for you help. Zellabia. S ___ users mailing list us...@open-mpi.org http://www.open-mpi.org/mailman/listinfo.cgi/users -- Roman I. Cheplyaka ___ users mailing list 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 -- Roman I. Cheplyaka ___ users mailing list us...@open-mpi.org http://www.open-mpi.org/mailman/listinfo.cgi/users
Re: [OMPI users] Making RPM from source that respects --prefix
Hello Jeff and Kiril, Thank you for your responses. Based on the information you both provided, I was able to get buildrpm to make the OMPI RPM the way I wanted. I ended up having to define _prefix , _mandir , and _infodir . Additionally, I found I had to use --define "shell_scripts_basename mpivars" because without that, when I tried to use mpi-selector, mpi-selector did not find the installation since it specifically seems to look for the shell scripts as mpivars.{sh,csh} rather than mpivars-1.3.3.{sh,csh} as the .spec file builds. I think the .spec file should be changed to match what mpi-selector expects. Jeff, it might also be really useful to have a .spec build option to allow the RPM to register itself as the system default. I hand-modified the .spec file to do this. Please let me know if I should register a feature request somewhere more formally. Thanks again to you both, and sorry for taking so long to reply.