[MPICH] MPICH problem when using Windows API OpenFileMapping
Jayesh Krishna
jayesh at mcs.anl.gov
Mon Mar 26 16:16:04 CDT 2007
Hi,
Can you try running your program using the "-localonly" option of mpiexec
? (mpiexec -localonly 1 SharedFactory.exe)
Can you provide us with a test program (with source - so that we know the
permission/security attributes of each system call) which demonstrates the
problem ?
Regards,
Jayesh
----------------------------------
Jayesh Krishna
Argonne National Laboratory
Mathematics and Computer Science
Email: jayesh at mcs.anl.gov
----------------------------------
-----Original Message-----
From: owner-mpich-discuss at mcs.anl.gov
[mailto:owner-mpich-discuss at mcs.anl.gov] On Behalf Of ???
Sent: Monday, March 26, 2007 9:39 AM
To: mpich-discuss at mcs.anl.gov
Subject: [MPICH] MPICH problem when using Windows API OpenFileMapping
Hi,I've got a problem with MPICH2 1.0.3,when using the API OpenFileMapping.
the code is :
#include <mpi.h>
#include <iostream>
using namespace std;
#include <windows.h>
int main(int argc,char * argv[])
{
MPI_Init(&argc,&argv);
cout<<"here"<<endl;
TCHAR szName[]=TEXT("Global");
HANDLE h=OpenFileMapping(FILE_MAP_READ, false, szName);
cout<<h<<endl;
MPI_Finalize();
}
There is another process which creats the shared memory block whose name is
"Global". And I want to use this process to get large block of data from the
mpi process and plot it.
When i compile the code ,and run the exe file directly,there is no problem
the output is:
F:\>ShareFactory.exe
here
000006B0
But when i use the mpiexec.exe,the problem occurs,
F:\>mpiexec -n 1 ShareFactory.exe
here
00000000
Can anyone tell me where this problem is?
Thanks a lot.
More information about the mpich-discuss
mailing list