Linking MPICH2 with MKL

Linking MPICH2 with MKL


in addition to the thread available under, I have a problem linking MPICH2 and MKL with my Visual Studio 2008 project (Intel Fortran 11 compiler).
I link a number of
libraries to my project - if I do that without /assume:underscore, I get
a whole lot of linker errors about unresolved symbols, whose names all
start with an underscore (but don't end with one).

error LNK2001: unresolved symbol "_MPI_Allreduce". mkl_blacs_mpich2.lib(dgsum2d_.oo)

I use /assume:underscore, however, all the imported symbols are fine,
but I get linker errors in the object file of my program. The unresolved
symbols here start and end with an underscore.

error LNK2001: unresolved symbol "_MPI_NULL_COPY_FN_". test.obj

From what I understood there are two calling conventions here. Is there a way to fix this problem without using other libraries?


2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hi Martin,

Looks you have code compiled for different platforms.
If you compile your application for Intel64 architecture you need to link with mkl_blacs_mpich2_lp64.lib.
32-bit version of of the mkl_blacs_mpich2.lib contains names with underscore and that's OK.

BTW: mpich2 should be compiled for the same architecture.


Leave a Comment

Please sign in to add a comment. Not a member? Join today