从C链接到Fortran库失败

时间:2017-04-28 16:32:47

标签: c configuration fortran mpi

我正在尝试安装score-p来配置MPI程序。我按照INSTALL文件中的说明操作。到目前为止我所做的步骤:

mkdir _build
cd _build
../configure

最后一个命令出现以下错误:

configure: error: linking to Fortran libraries from C fails
See `config.log' for more details
configure: error: ../../build-mpi/configure failed for build-mpi

config.log中的相关行如下:

configure:8044: running /bin/bash ../../build-mpi/configure --disable-option-checking 'FCLIBS= ' 'SHMEMFC=oshfort' 'SHMEM_LIB_NAME=oshmem' 'FC=gfortran' 'SHMEMCC=oshcc' 'SHMEMF77=oshfort' 'F77=gfortran' 'MPIF77=mpif77' 'SHMEMCXX=oshcc' 'CC=gcc' 'CXX=g++' 'MPICXX=mpicxx' 'MPIFC=mpif90' 'SHMEM_NAME=OpenSHMEM' 'MPICC=mpicc' 'ac_scorep_platform=linux' 'ac_scorep_cross_compiling=no' 'afs_scorep_platform_name=Linux' 'afs_scorep_default_machine_name=Linux' --cache-file=/dev/null --srcdir=../../build-mpi
configure:8049: error: ../../build-mpi/configure failed for build-mpi

这让我觉得问题与MPI有关,因为错误消息提到了build-mpi。相关帖子建议在FCLIBS=" "之后添加../configure,但这没有帮助。我做错了什么?

编辑:在Zulan和Vladimir F的评论之后,我检查了/build-mpi/config.log。以下是错误声明:/usr/bin/gold: error: cannot find -lmpi_mpifh,在此声明后面包含以下代码。

configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "Score-P"
| #define PACKAGE_TARNAME "scorep"
| #define PACKAGE_VERSION "3.0"
| #define PACKAGE_STRING "Score-P 3.0"
| #define PACKAGE_BUGREPORT "support@score-p.org"
| #define PACKAGE_URL ""
| #define AFS_PACKAGE_BUILD "MPI backend"
| #define AFS_PACKAGE_SRCDIR "../../build-mpi/../"
| #define AFS_PACKAGE_BUILD_name mpi_backend
| #define AFS_PACKAGE_BUILD_NAME MPI_BACKEND
| #define AFS_PACKAGE_name scorep
| #define AFS_PACKAGE_NAME SCOREP
| #define PACKAGE "scorep"
| #define VERSION "3.0"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #define LT_OBJDIR ".libs/"
| /* end confdefs.h.  */
| #define F77_DUMMY_MAIN _MAIN
| #ifdef F77_DUMMY_MAIN
|
| #  ifdef __cplusplus
|      extern "C"
| #  endif
|    int F77_DUMMY_MAIN() { return 1; }
|
| #endif
| int
| main ()
| {
|
|   ;
|   return 0;
| }

编辑2: locate libmpi_mpifh收益

/usr/lib/libmpi_mpifh.so.12
/usr/lib/libmpi_mpifh.so.12.0.0
/usr/lib/openmpi/lib/libmpi_mpifh.so.12.0.0

已解决:符号链接解决了libmpi_mpifh的问题。

0 个答案:

没有答案