Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ptp-user] Reading user input

Hi Natalie,

Correct me if I'm wrong, but I suspect that it is working using mpirun because all your processes are running on the local machine. The problem is that in a cluster environment there is no guarantee that the rank 0 processĀ  will be on the same machine as the mpirun command. If the process is remote, then somehow the mpirun command needs to forward I/O between the process and your local terminal. I believe this has not been implemented for standard input in OpenMPI. If the rank 0 process is running on the local machine then it is reading directly from your terminal, which is why it works in this case. OpenMPI does forward standard out, so you will see output regardless of whether the program is running locally or remotely.

Let me know if this helps,

Greg

On Mar 31, 2007, at 7:59 PM, Natalie Freed wrote:

Thanks for answering. :) Yes, it works under OpenMPI using mpirun. I ended up using command line arguments instead, but I'm still wondering why the other way isn't possible. Unless I don't understand what input redirection is, that wasn't what I was looking for. I just want to be able to use, say, the scanf function. When I run an MPI job from the command line, I see all the output from my program from any task as the program runs. If I ask the node with rank 0 to prompt for and then read user input, the program stops and waits for me to enter a character. I'm sorry if I misunderstood your explanation or failed to explain this properly, but I'm still puzzled.

Natalie

On 3/31/07, Greg Watson <g.watson@xxxxxxxxxxxx> wrote:
Hi Natalie,

Have you tried running the program under OpenMPI using the mpirun command? Does it work? OpenMPI doesn't (or at least didn't) support input redirection so we haven't implemented it yet. Is there some other way you can get around this, such as placing the input into a file and reading from that instead?

Greg


On Mar 30, 2007, at 12:05 PM, Natalie Freed wrote:

Very very basic question, but I can't find it anywhere in the documentation. My MPI program asks for user input from node 0 (using scanf), and while I can see the prompt under process details -> program output and in the shell where I started eclipse, I don't know where I'm supposed to enter the requested value. I'm used to a console appearing in eclipse when a program is run, but here I can't figure out what I'm missing.
Thanks,
-Natalie
_______________________________________________
ptp-user mailing list


_______________________________________________
ptp-user mailing list
ptp-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-user


_______________________________________________
ptp-user mailing list


Back to the top