当我使用mpi安装fftw-3.3.8时(为了测试,我先安装了openmp
,然后又安装了mpich2
),我使用了configure命令和2种方法:
./configure --prefix=/root/local/fftw-3.3.8 --enable-mpi --disable-shared CC=mpicc F77=mpif90 MPICC=mpicc
./configure --prefix=/root/local/fftw-3.3.8 --enable-mpi --disable-shared CC=mpicc F77=mpif90 MPICC=mpicc CFLAGS=-O3 FFLAGS=-O3 LDFLAGS=-L/opt/mpich2_gfb CPPFLAGS=-I/opt/mpich2_gf/include LIB=-lmpi MPILIBS=-lmpi --enable-threads --with-g77-wrappers --with-combined-threads
但是我遇到如下相同的错误消息:
libtool: link: mpicc -O3 -o mpi-bench mpi_bench-mpi-bench.o mpi_bench-fftw-bench.o mpi_bench-hook.o -L/opt/mpich2_gf/lib ./.libs/libfftw3_mpi.a /root/ELMM/tmp-fftw-3.3.8/fftw-3.3.8/.libs/libfftw3.a -L/root/mpich-3.2.1/src/mpl ../.libs/libfftw3.a ../libbench2/libbench2.a /opt/mpich2_gf/lib/libmpi.so -lrt -lpthread -lm -Wl,-rpath -Wl,/opt/mpich2_gf/lib -Wl,-rpath -Wl,/opt/mpich2_gf/lib
./.libs/libfftw3_mpi.a(conf.o):(.rodata+0x30): undefined reference to 'fftw_mpi_transpose_pairwise_transposed_register'
./.libs/libfftw3_mpi.a(conf.o):(.rodata+0x40): undefined reference to 'fftw_mpi_transpose_alltoall_transposed_register'
collect2: ld returned 1 exit status
make[3]: *** [mpi-bench] Error 1
如何解决此错误?