[MPICH2-dev] MPIEXEC, MPICH2 and getchar
Ilkka Karasalo
ilkkak at kth.se
Fri Feb 1 02:31:42 CST 2008
I recently switched to MPICH2 after using MPICH
for more than a decade. When running in interactive
mode, my programs use the C functions getchar and
putchar for character-per-character reading of
keystrokes and writing characters to the display (standard
output). This functionality is quite useful, enabling control
of the interpretation of keystrokes, in particular keys
generating escape sequences (such as e.g. the arrow keys).
In programs started with MPIEXEC, however, the functionality
of getchar is lost. Under MPIEXEC characters and character sequences
generated keystrokes are read, written one-by-one to the display, and
put into
a buffer. The buffer is sent to the input stream of my programs getchar
calls
only at a keystroke (like the enter key) generating an end-of-line
character.
Thus, e.g., an arrow key results in the chacters of the generated
escape sequence being written to the display, instead of being
sent to the input stream of 'getchar'. This is, of course, quite annoying
and destroys the intended interpretation of keystrokes.
Any help with a work-around for this feature of MPIEXEC would be most
welcome.
Sincerely,
Ilkka Karasalo
--
Ilkka Karasalo
FOI, Systems Technology KTH, MWL
Gullfossgatan 6 Teknikringen 8
SE-164 90 Stockholm SE-100 44 Stockholm
Phone: +46-8-55503627 Phone: +46-8-7908017
Fax: +46-8-55503869 Fax: +46-8-7906122
Email: ilkka.karasalo at foi.se Email: ilkkak at kth.se
More information about the mpich2-dev
mailing list