[mpich-discuss] Fedora 12 compiling issues

Pavan Balaji balaji at mcs.anl.gov
Sat Feb 20 10:32:13 CST 2010


On 02/20/2010 09:57 AM, rcx11 at yahoo.com wrote:
> $ ./configure --prefix=/usr/local/mcnpx \
>               --with-FC=f90 \
>               --with-CC=gcc \
>               --host=i686-pc-linux \
>               --with-FFLAGS="-DUNIX=1 -DLINUX=1 -DG95=1" \
>               --with-CFLAGS="-DUNIX=1 -DLINUX=1" \
>               --with-MPILIB="-L/usr/lib/mpich2/lib -lmpich"

MPICH2 provides a bunch of libraries other than libmpich.a, so directly
using gcc with -lmpich is not safe. You should use the mpicc/mpif90
wrappers instead: Try this:

$ ./configure --prefix=/usr/local/mcnpx \
	--with-FC=mpif90 \
	--with-CC=mpicc \
	--host=i686-pc-linux \
	--with-FFLAGS="-DUNIX=1 -DLINUX=1 -DG95=1" \
	--with-CFLAGS="-DUNIX=1 -DLINUX=1"

 -- Pavan

-- 
Pavan Balaji
http://www.mcs.anl.gov/~balaji


More information about the mpich-discuss mailing list