BLACS link error

Post here if you have a question about linking your program with LAPACK or ScaLAPACK library

BLACS link error

Postby Qsolver » Fri Apr 01, 2011 11:10 am

Hi,

I am working on a project (with Fortran 90) that uses MUMPS and Scalapack in Windows. I use Visual Studio 2005, Intel Fortran compiler 9.1 and HP-MPI, but I got some link errors (attached at the end of the message) in a small test program. The libs that the program links to are: libhpmpi32.lib BLASd.lib BLACS_Cinitd.lib BLACS_Finitd.lib BLACSd.lib LAPACKd.lib SCALAPACKd.lib dmumps_c_mp.lib dmumps_fortran_mp.lib mumps_common_c_mp.lib pord_c_mp.lib; where BLASd.lib BLACS_Cinitd.lib BLACS_Finitd.lib BLACSd.lib LAPACKd.lib SCALAPACKd.lib are prebuilt win32 libs provided by http://icl.cs.utk.edu/lapack-for-window ... librairies. It looks that BLACSd.lib could not find the MPI subroutines. But I did link to HP-MPI lib ( libhpmpi32.lib), and specified the pathes to the libs and header files in the Visual Studio project settings.

Thanks a lot for any hints,
Qin

==== Link errors =============
BLACSd.lib(blacs_gridexit_.obj) : error LNK2019: unresolved external symbol _MPI_Comm_free referenced in function _BLACS_GRIDEXIT
BLACSd.lib(blacs_gridmap_.obj) : error LNK2019: unresolved external symbol _MPI_Type_contiguous referenced in function _BLACS_GRIDMAP
BLACSd.lib(blacs_gridmap_.obj) : error LNK2019: unresolved external symbol _MPI_Type_commit referenced in function _BLACS_GRIDMAP
BLACSd.lib(igamn2d_.obj) : error LNK2001: unresolved external symbol _MPI_Type_commit
BLACSd.lib(Cdgamx2d_.obj) : error LNK2001: unresolved external symbol _MPI_Type_commit
BLACSd.lib(BI_GetMpiGeType.obj) : error LNK2001: unresolved external symbol _MPI_Type_commit
BLACSd.lib(blacs_gridmap_.obj) : error LNK2019: unresolved external symbol _MPI_Comm_dup referenced in function _BLACS_GRIDMAP
BLACSd.lib(blacs_gridmap_.obj) : error LNK2019: unresolved external symbol _MPI_Comm_rank referenced in function _BLACS_GRIDMAP
BLACS_Cinitd.lib(Cblacs_pinfo_.obj) : error LNK2001: unresolved external symbol _MPI_Comm_rank
BLACSd.lib(blacs_gridmap_.obj) : error LNK2019: unresolved external symbol _MPI_Comm_split referenced in function _BLACS_GRIDMAP
BLACSd.lib(BI_BlacsAbort.obj) : error LNK2019: unresolved external symbol _MPI_Abort referenced in function _BI_BlacsAbort
BLACSd.lib(BI_TransUserComm.obj) : error LNK2019: unresolved external symbol _MPI_Comm_group referenced in function _BI_TransUserComm
BLACSd.lib(BI_TransUserComm.obj) : error LNK2019: unresolved external symbol _MPI_Group_incl referenced in function _BI_TransUserComm
BLACSd.lib(BI_TransUserComm.obj) : error LNK2019: unresolved external symbol _MPI_Comm_create referenced in function _BI_TransUserComm
BLACSd.lib(BI_TransUserComm.obj) : error LNK2019: unresolved external symbol _MPI_Group_free referenced in function _BI_TransUserComm
BLACSd.lib(Cblacs_get_.obj) : error LNK2019: unresolved external symbol _MPI_Attr_get referenced in function _Cblacs_get
BLACS_Cinitd.lib(Cblacs_pinfo_.obj) : error LNK2019: unresolved external symbol _MPI_Initialized referenced in function _Cblacs_pinfo
BLACS_Cinitd.lib(Cblacs_pinfo_.obj) : error LNK2019: unresolved external symbol _MPI_Comm_size referenced in function _Cblacs_pinfo
BLACSd.lib(igamn2d_.obj) : error LNK2019: unresolved external symbol _MPI_Type_struct referenced in function _IGAMN2D
BLACSd.lib(Cdgamx2d_.obj) : error LNK2001: unresolved external symbol _MPI_Type_struct
BLACSd.lib(igamn2d_.obj) : error LNK2019: unresolved external symbol _MPI_Op_create referenced in function _IGAMN2D
BLACSd.lib(Cdgamx2d_.obj) : error LNK2001: unresolved external symbol _MPI_Op_create
BLACSd.lib(igamn2d_.obj) : error LNK2019: unresolved external symbol _MPI_Reduce referenced in function _IGAMN2D
BLACSd.lib(Cdgamx2d_.obj) : error LNK2001: unresolved external symbol _MPI_Reduce
BLACSd.lib(Cdgsum2d_.obj) : error LNK2001: unresolved external symbol _MPI_Reduce
BLACSd.lib(igamn2d_.obj) : error LNK2019: unresolved external symbol _MPI_Allreduce referenced in function _IGAMN2D
=============
Qsolver
 
Posts: 6
Joined: Fri Apr 01, 2011 10:50 am

Re: BLACS link error

Postby admin » Sat Apr 02, 2011 6:14 am

Hi Qin,
I never tried to link with HP-MPI under Windows but nonetheless it should be possible!
Maybe I would try to reorder the libraries (I know this works under Linux)
So to put
dmumps_c_mp.lib dmumps_fortran_mp.lib mumps_common_c_mp.lib pord_c_mp.lib SCALAPACKd.lib BLACS_Cinitd.lib BLACS_Finitd.lib BLACSd.lib LAPACKd.lib BLASd.lib libhpmpi32.lib


Best would be go slowly.
First just run a simple MPI application. SOme examples are here: http://docs.hp.com/en/B6060-96022/ch02s02.html
Then try to run a BLACS example.
You can find some examples for BLACS here: http://www.netlib.org/blacs/BLACS/Examples.html
once it works move to ScaLAPACK example, you can find some here : http://www.netlib.org/scalapack/examples/

Let me know how it goes.
Julie
admin
Site Admin
 
Posts: 501
Joined: Wed Dec 08, 2004 7:07 pm

Re: BLACS link error

Postby Qsolver » Mon Apr 04, 2011 6:37 pm

Hi Julie,

I tried reordering the libs but got the same errors. Then as you suggested, I tested the Hello_world program for HP-MPI, it worked (I have to modify the program a bit from C format to C++ format); but I got the same link errors when I was testing the Hello_world program for BLACS (using the prebuilt BLACS win32 lib).

So it seems that the prebuilt BLACS for Windows may have problem, or at least I did not set the settings correctly in Vistual Studio.

Do you know if there is any Vistual Studio project file for BLACS? I hope I can build it by myself to see what will happen if I have the correct project file. I suspect it may be related to the C vs. C++ format inconsistent, since I believe that some of the BLACS code was written in C, but Visual Studio 2005 use C++ comipler.

Thanks a lot for your work on Scalapack and your help for my problem.

Qin
Qsolver
 
Posts: 6
Joined: Fri Apr 01, 2011 10:50 am

Re: BLACS link error

Postby admin » Tue Apr 05, 2011 5:06 am

Qin,
Take a look here: http://icl.cs.utk.edu/lapack-for-window ... ml#install
You will find the VS Solution for ScaLAPACK.
Good Luck!
Julie
admin
Site Admin
 
Posts: 501
Joined: Wed Dec 08, 2004 7:07 pm

Re: BLACS link error

Postby Qsolver » Wed Apr 06, 2011 3:53 pm

Hi Julie,

I built BLACS libs by myself sucessfully, then I tried to build the BLACS_F_TEST test program (in Fortran) linking with libhpmpi32.lib blacs_f.lib blacs_cinit.lib blacs_c.lib. By setting proper preprocessors, it finally got only one link error. Do you have any idea where "MPI_CONVERSION_FN_NULL" is? Did I misses any library?

Thanks a lot for your help,
Qin

========== Link errors of BLACS_F_TEST ==========
blacs_f.lib(bi_f77_get_constants.obj) : error LNK2001: unresolved external symbol _MPI_CONVERSION_FN_NULL
Debug/blacs_f_test.exe : fatal error LNK1120: 1 unresolved externals
==========
Qsolver
 
Posts: 6
Joined: Fri Apr 01, 2011 10:50 am

Re: BLACS link error

Postby admin » Wed Apr 06, 2011 11:44 pm

Did you include the mpi.h?
It is defined in the mpi.h
Julie
admin
Site Admin
 
Posts: 501
Joined: Wed Dec 08, 2004 7:07 pm


Return to Linking Problem

Who is online

Users browsing this forum: No registered users and 1 guest

cron