Hi Rosa,<div><br></div><div>I think you need to have smpd running in a interactive console session as opposed to a standard windows service. As Jayesh told me in a older thread, smpd cannot run as a interactive windows service yet.</div>
<div>My particular issue was fixed by running smpd in debug mode as a user process. For this, try stopping the smpd service on all nodes, then start it manually from command line using "smpd -d 0". Run your regular mpiexec command on the master node after that.</div>
<div><br></div><div>Hope this helps,</div><div>Florin Ciubotaru<br><br><div class="gmail_quote">On Tue, Apr 19, 2011 at 4:27 PM, Rosa Brancaccio <span dir="ltr"><<a href="mailto:rossella_brancaccio@yahoo.it">rossella_brancaccio@yahoo.it</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi all,<br>
first of all, thank you for your kind responses.<br>
I realize that I have explained myself very badly.<br>
I'm sorry, now I'll try to do it better :)<br>
I can run the "hello world" program (I copy the code below)<br>
without problems, both as traditional executable and as parallel<br>
program with n processes.<br>
<div class="im"><br>
#include "mpi.h"<br>
#include <stdio.h><br>
</div>#include <cstdio><br>
#include <cstring><br>
<div class="im"><br>
int main (int argc, char *argv[])<br>
{<br>
<br>
</div> char txt={'\0'};<br>
int node;<br>
<br>
MPI_Init(&argc,&argv);<br>
MPI_Comm_rank(MPI_COMM_WORLD, &node);<br>
<div class="im"> printf("Hello World from Node %d\n",node);<br>
</div> fflush(stdout);<br>
printf("press any key to exit ");<br>
fflush(stdout);<br>
scanf(" ",&txt);<br>
fflush(stdout);<br>
<br>
MPI_Finalize();<br>
<br>
return 0;<br>
}<br>
<br>
I compiled this code both with Labwindows/CVI and Visual Studio 2010<br>
compiler, and I started the program by the command prompt (MSDOS windows).<br>
Of course, running the program as traditional executable the output<br>
is "Hello World from Node 0".<br>
Running the program as parallel executable (mpiexec -n 4 myapp.exe)<br>
the output is:<br>
"Hello World from Node 3"<br>
"Hello World from Node 0"<br>
"Hello World from Node 1"<br>
"Hello World from Node 2"<br>
in different order any time I run it.<br>
<br>
I tried to write the output on several files without problems.<br>
The program works fine both when compiled by Labwindows/CVI and<br>
by Visual Studio 2010. The program works fine both starting it as<br>
traditional executable and as parallel program (mpiexec -n 4 myapp.exe).<br>
The code is:<br>
<div class="im"><br>
int main (int argc, char *argv[])<br>
{<br>
</div><div class="im"> FILE* f=NULL;<br>
char path[9999]={'\0'},name[99]={'\0'};<br>
int node;<br>
<br>
sprintf(path,"c:\\test\\file");<br>
<br>
MPI_Init(&argc,&argv);<br>
</div> MPI_Comm_rank(MPI_COMM_WORLD, &node);<br>
<div class="im"> sprintf(name,"_node%d.txt",node);<br>
strcat(path,name);<br>
f=fopen(path,"a");<br>
fprintf(f,"Hello World from Node %d\n",node);<br>
fclose(f);<br>
<br>
</div> fflush(NULL);<br>
MPI_Finalize();<br>
<br>
return 0;<br>
}<br>
The output with n processes is n files with the correct written<br>
"Hello World from Node X" with X from 0 to n.<br>
<br>
The problem arises when I try to insert in my code the following line:<br>
<br>
MessagePopup("MPICH2 TEST","Test Successfully Completed \nOK");<br>
<br>
This line should start a small window with title "MPICH2 TEST" and<br>
the written "Test Successfully Completed OK" and a botton "OK" and<br>
the window should wait until I press the "OK" button and then it<br>
should expire.<br>
The "MessagePopup" command comes from LabWindows/CVI GUI Library and<br>
it works fine both when compiled by CVI and by Visual Studio.<br>
When I start this code as traditional executable the program write<br>
"Hello World from Node 0" and the window appears correctly.<br>
When I run the code with mpi (calling mpiexec -n 4 myapp.exe)<br>
unfortunately no writtens appear, no windows starts, and the<br>
command prompt is locked undefinitely until I press CTRL-C to<br>
kill the jobs. Moreover during this test the 4 myapp exist and I<br>
can see them in the list of windows task manager.<br>
I tried to use the -localroot options but nothing has changed:<br>
the program is locked and I must press CTRL-C to kill the processes.<br>
Anyway this is the messages (after the CTRL_C command):<br>
>mpiexec -n 2 -localroot MPI_test_VS.exe<br>
<br>
mpiexec aborting job...<br>
The thread to be suspended is no longer active, exit_code = 123<br>
unable terminate process safely. exit_code = 123<br>
unable to read the cmd header on the pmi context, Error = -1.<br>
Error posting readv, Connessione in corso interrotta forzatamente dall'host remoto.(10054)<br>
unable to read the cmd header on the pmi context, Error = -1.<br>
Error posting readv, Connessione in corso interrotta forzatamente dall'host remoto.(10054)<br>
job aborted:<br>
rank: node: exit code[: error message]<br>
0: PC-ROSSELLA: 123: mpiexec aborting job<br>
1: PC-ROSSELLA: 255<br>
<br>
At the end my question is:<br>
is there a way to use the CVI GUI library and MPI?<br>
<br>
Thank you all and best regards<br>
<br>
Rosa<br>
<br>
<br>
--- Lun 18/4/11, Jayesh Krishna <<a href="mailto:jayesh@mcs.anl.gov">jayesh@mcs.anl.gov</a>> ha scritto:<br>
<div class="im"><br>
> Da: Jayesh Krishna <<a href="mailto:jayesh@mcs.anl.gov">jayesh@mcs.anl.gov</a>><br>
</div>> Oggetto: Re: [mpich-discuss] I: Re: Problem to run MPICH2 on Windows 7 with user interface<br>
<div class="im">> A: <a href="mailto:mpich-discuss@mcs.anl.gov">mpich-discuss@mcs.anl.gov</a><br>
> Cc: "rossella brancaccio" <<a href="mailto:rossella_brancaccio@yahoo.it">rossella_brancaccio@yahoo.it</a>><br>
</div>> Data: Lunedì 18 Aprile 2011, 19:55<br>
<div><div></div><div class="h5">> Hi,<br>
> Did you try the "-localroot" option (mpiexec -n 2<br>
> -localroot myguiapp.exe)?<br>
> Also try running your program with mpiexec (myguiapp.exe)<br>
> . This might reveal error messages like missing dlls etc.<br>
><br>
> Regards,<br>
> Jayesh<br>
><br>
> ----- Original Message -----<br>
> From: "Nicolas Rosner" <<a href="mailto:nrosner@gmail.com">nrosner@gmail.com</a>><br>
> To: <a href="mailto:mpich-discuss@mcs.anl.gov">mpich-discuss@mcs.anl.gov</a><br>
> Cc: "rossella brancaccio" <<a href="mailto:rossella_brancaccio@yahoo.it">rossella_brancaccio@yahoo.it</a>><br>
> Sent: Monday, April 18, 2011 11:41:36 AM<br>
> Subject: Re: [mpich-discuss] I: Re: Problem to run MPICH2<br>
> on Windows 7 with user interface<br>
><br>
> Ciao Rosa,<br>
><br>
> > Unfortuntely my problem is not with I/O on files, but<br>
> with<br>
> > standard output and with user interface.<br>
><br>
> If you're running into problems when trying to run the<br>
> simplest case<br>
> you've described (a basic "hello world" program that only<br>
> uses<br>
> stdout), may I suggest it could be a good idea to focus<br>
> exclusively on<br>
> that before mixing in additional issues?<br>
><br>
> Although it is possible for an MPI-enhanced program to use<br>
> a GUI<br>
> library, it may not be trivial to get that right initially.<br>
> And, while<br>
> creating and writing to files is usually easier than GUI<br>
> stuff, it's<br>
> still not as trivial as simply writing to standard output.<br>
><br>
> The latter is indeed trivial, and should be handled<br>
> automagically for<br>
> you, including the multiplexing of each rank's stdout (i.e.<br>
> output<br>
> should look as if your main mpiexec process had carried out<br>
> each<br>
> printf locally).<br>
><br>
> If your simplest example still fails to work properly when<br>
> run under<br>
> mpiexec, could you please retry with a copy of the standard<br>
> "hellow.c"<br>
> code (see below) to see whether any problems persist?<br>
><br>
> Regards,<br>
> Nicolás<br>
><br>
><br>
> #include <stdio.h><br>
> #include "mpi.h"<br>
><br>
> int main( int argc, char *argv[] )<br>
> {<br>
> int rank, size;<br>
> MPI_Init( 0, 0 );<br>
> MPI_Comm_rank(MPI_COMM_WORLD, &rank);<br>
> MPI_Comm_size(MPI_COMM_WORLD, &size);<br>
> printf( "Hello world from process %d of<br>
> %d\n", rank, size );<br>
> MPI_Finalize();<br>
> return 0;<br>
> }<br>
><br>
><br>
> >> I write the "hello word" test program. The MPICH2<br>
> library is linked<br>
> >> and there is no problem to run the program<br>
> (without call mpiexec)<br>
> >> from my compiler, obviously it starts with only 1<br>
> process and it<br>
> >> prints "Hello word from node 0" on stdout.<br>
> >> If I try to start the program from command line<br>
> (MS-DOS shell) with<br>
> >> the following command<br>
> >> mpiexec -n 4 Test.exe<br>
> >> 4 processes of test.exe start (I can see them in<br>
> the Windows Task<br>
> >> Manager) but the output does not appear, the<br>
> command prompt is<br>
> >> indefinitely locked until I press CTRL-C to stop<br>
> processes.<br>
> _______________________________________________<br>
> mpich-discuss mailing list<br>
> <a href="mailto:mpich-discuss@mcs.anl.gov">mpich-discuss@mcs.anl.gov</a><br>
> <a href="https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss" target="_blank">https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss</a><br>
><br>
_______________________________________________<br>
mpich-discuss mailing list<br>
<a href="mailto:mpich-discuss@mcs.anl.gov">mpich-discuss@mcs.anl.gov</a><br>
<a href="https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss" target="_blank">https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss</a><br>
</div></div></blockquote></div><br></div>