Just remove the -L and -l arguments -- OMPI's "mpif90" (and other wrapper compilers) will do all that magic for you.

Many -L/-l arguments in MPI application Makefiles are throwbacks to older versions of MPICH wrapper compilers that didn't always work properly. Those days are long gone; most (all?) MPI wrapper compilers do not need you to specify -L/-l these days.



On Jun 10, 2007, at 3:08 PM, Jeff Pummill wrote:

Maybe the "dumb question" of the week, but here goes...

I am trying to compile a piece of code (NPB) under OpenMPI and I am having a problem with specifying the right library. Possibly something I need to define in a LD_LIBRARY_PATH statement?

Using Gnu mpich, the line looked like this...

FMPI_LIB  = -L/opt/mpich/gnu/lib/ -lmpich

I tried to replace this with...

FMPI_LIB  = -L/usr/lib/openmpi/ -llibmpi

to which the make responded...
mpif90 -O -o ../bin/cg.A.2 cg.o ../common/print_results.o ../common/ randdp.o ../common/timers.o -L/usr/lib/openmpi/ -llibmpi
/usr/bin/ld: cannot find -llibmpi
collect2: ld returned 1 exit status

Wrong library file? Setup or path issue?

--
Jeff F. Pummill
Senior Linux Cluster Administrator
University of Arkansas

_______________________________________________
users mailing list
us...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/users


--
Jeff Squyres
Cisco Systems

Reply via email to