[mpich-discuss] Problem to run MPICH2 on Windows 7 with user interface
Rosa Brancaccio
rossella_brancaccio at yahoo.it
Wed Apr 6 08:22:59 CDT 2011
Hallo all,
I just downloaded and installed MPICH2 on my pc with 4 cores and Windows7.
No problem for installation. I use Labwindows/CVI as compiler.
I write the "hello word" test program. The MPICH2 library is linked
and there is no problem to run the program (without call mpiexec)
from my compiler, obviously it starts with only 1 process and it
prints "Hello word from node 0" on stdout.
If I try to start the program from command line (MS-DOS shell) with
the following command
mpiexec -n 4 Test.exe
4 processes of test.exe start (I can see them in the Windows Task
Manager) but the output does not appear, the command prompt is
indefinitely locked until I press CTRL-C to stop processes.
Then I tried to write the "Hallo word from node %d" to 4 files
instead of stdout and in this case I have the 4 correct sentences
in the 4 files but again no command prompt appears until the
program stops.
Why cannot I interact with my program?
I cannot give it any input and it cannot display any results on stdout.
Have you any suggest for me?
I tried also to write a bit more complicated program to launch a GUI
but the problem is the same.
I write here the code.
Thank you to all.
Rossella
#include <ansi_c.h>
#include <userint.h>
#include <cvirte.h>
#include "mpi.h"
#include <stdio.h>
#include <math.h>
int main (int argc, char *argv[])
{
FILE* f=NULL;
char path[9999]={'\0'},name[99]={'\0'};
int node;
sprintf(path,"c:\\test\\file");
MPI_Init(&argc,&argv);
MPI_Comm_rank(MPI_COMM_WORLD, &node);
/* the next 5 rows to replace the
printf("Hello World from Node %d\n",node);*/
sprintf(name,"_node%d.txt",node);
strcat(path,name);
f=fopen(path,"a");
fprintf(f,"Hello World from Node %d\n",node);
fclose(f);
MPI_Finalize();
return 0;
}
More information about the mpich-discuss
mailing list