[MPICH] LoadLibrary("mpich2d.dll") fails, how can I link statically on Windows?
David Ashton
ashton at mcs.anl.gov
Thu Aug 18 12:30:10 CDT 2005
Robin Boerdijk,
1) This is a problem with the MPI wrapper dll. We've fixed this and it will
be available in the next release. The changes are all in one file,
mpich2/src/util/multichannel/mpi.c. You can grab the new version from CVS
if you want to recompile the source.
http://www-unix.mcs.anl.gov/mpi/mpich2/cvsweb.cgi
2) If your application is in C, you can link to any individual MPICH2
channel instead of the wrapper dll. mpich2.lib is for sockets,
mpich2shm.lib is for shared memory only, mpich2ssm.lib is for sockets +
shared memory, etc.
3) You can try to link with the library from the static mpich2s project.
I've never done this but it might work.
Option #1 will solve your problems if you re-compile the mpich2mpi.dll but
you can try #2 or #3 if you prefer.
-David Ashton
-----Original Message-----
From: owner-mpich-discuss at mcs.anl.gov
[mailto:owner-mpich-discuss at mcs.anl.gov] On Behalf Of Robin Boerdijk
Sent: Thursday, August 18, 2005 2:31 AM
To: mpich-discuss at mcs.anl.gov
Subject: [MPICH] LoadLibrary("mpich2d.dll") fails, how can I link statically
on Windows?
Hi all,
I have a weird problem on Windows. When I link a big static library
(3MB) into my MPI program, my MPI program does not start anymore.
Instead, Windows pops up a message box saying "The application failed
to initialize properly (0xc0000142)". When I catch this exception in
the debugger, it breaks at the LoadLibrary(dll_name) line in the
LoadFunctions() function in mpi.c. When I don't link in the big static
library, this doesn't happen and my MPI program runs normally.
Question #1: What could cause this and is there an easy solution?
As a workaround I want to avoid using the dynamic library loading done
by mpi.c and link the MPI library statically into my MPI program.
Question #2: How can I statically link the MPI library into my MPI
program?
I'm building MPI myself from source so I am able to tweak the build
process if needed. I just need to know what to tweak.
Thanks,
Robin Boerdijk
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the mpich-discuss
mailing list