PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

mpi_ is prepended to symbol name--link to MPI lib fails

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
BillR



Joined: 19 May 2006
Posts: 9

PostPosted: Fri Jun 09, 2006 1:43 pm    Post subject: mpi_ is prepended to symbol name--link to MPI lib fails Reply with quote

I have a problem linking a specific MPI code. The symbol names for the MPI routines are having "mpi_" prepended to them so they're not being found in the MPI libs. Other MPI codes and simple examples link OK.

E.g.

Code:
mpif90 -O3 -o ns dfd_bound.o dfd_ns.o dfd_data.o dfd_disc.o dfd_fv.o dfd_geom.o dfd_input.o dfd_jacob.o dfd_library.o dfd_linear.o dfd_main.o dfd_output.o dfd_precon.o dfd_state.o dfd_type.o dfd_turb.o dfd_reaction.o dfd_source.o dfd_rptbdb.o
dfd_bound.o(.text+0xc7): In function `dfd_bound_set_boundary_':
: undefined reference to `mpi_mpi_comm_rank_'


I find the symbol mpi_comm_rank_ in several libs in /opt/hpmpi/lib/linux_amd64, but I'm getting an error because mpi_ is being prepended to the name.

Code:
libdmpi.so:000000000006e940 W mpi_comm_rank_
libhpmpi.so:00000000000b9e00 W mpi_comm_rank_
libmpi_hmp.so:00000000000b9e00 W mpi_comm_rank_
libmpi.so:00000000000b9e00 W mpi_comm_rank_
libmtmpi_hmp.so:000000000008b540 W mpi_comm_rank_
libmtmpi.so:000000000008b540 W mpi_comm_rank_
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6211
Location: The Portland Group Inc.

PostPosted: Fri Jun 09, 2006 3:54 pm    Post subject: Reply with quote

Hi Bill,

Prepending your function names with "mpi_" is not something the pgf90 compiler would do. So I suspect that your code or your mpif90 script has a macro which defines "MPI_COMM_RANK" to be "MPI_MPI_COMM_RANK".

In the function "dfd_bound_set_boundary", is MPI_COMM_RANK actually used, or is there a macro used instead? Is MPI_COMM_RANK re-defined as a macro in any of your header files? (try 'grep -Hi MPI_COMM_RANK *.h')

Thanks,
Mat
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group