0

我正在尝试从依赖 hdf5的源trilinos进行编译。本指南中所述,如有必要,可以为 hdf5 配置并行支持,我通过传递HDF5_ENABLE_PARALLEL=ON给 cmake 来做到这一点。我在这里发现一些选项与并行支持不兼容(例如线程安全),所以我禁用了它们。这是cmake的输出:

-- The C compiler identification is AppleClang 11.0.0.11000033
-- The CXX compiler identification is AppleClang 11.0.0.11000033
-- Check for working C compiler: /Users/luca/lifev/lifev-env/libs/installs/openmpi-2.1.1_installRelease/bin/mpicc
-- Check for working C compiler: /Users/luca/lifev/lifev-env/libs/installs/openmpi-2.1.1_installRelease/bin/mpicc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Users/luca/lifev/lifev-env/libs/installs/openmpi-2.1.1_installRelease/bin/mpic++
-- Check for working CXX compiler: /Users/luca/lifev/lifev-env/libs/installs/openmpi-2.1.1_installRelease/bin/mpic++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- SOVERSION: 10.3.1
-- SOVERSION_TOOLS: 10.0.6
-- SOVERSION_CXX: 15.0.0
-- SOVERSION_F: 10.0.5
-- SOVERSION_HL: 10.2.1
-- SOVERSION_HL_CXX: 11.1.1
-- SOVERSION_HL_F: 10.0.4
-- Check for STD namespace
-- Check for STD namespace - found
-- Looking for ceil in m;
-- Looking for ceil in m; - found
-- Looking for dlopen in dl;m
-- Looking for dlopen in dl;m - found
-- Looking for WSAStartup in ws2_32;m;dl
-- Looking for WSAStartup in ws2_32;m;dl - not found
-- Looking for gethostbyname in wsock32;m;dl
-- Looking for gethostbyname in wsock32;m;dl - not found
-- Looking for gethostname in ucb;m;dl
-- Looking for gethostname in ucb;m;dl - not found
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- Performing Other Test STDC_HEADERS - Success
-- Looking for include file sys/file.h
-- Looking for include file sys/file.h - found
-- Looking for include files sys/file.h, sys/ioctl.h
-- Looking for include files sys/file.h, sys/ioctl.h - found
-- Looking for 3 include files sys/file.h, ..., sys/resource.h
-- Looking for 3 include files sys/file.h, ..., sys/resource.h - found
-- Looking for 4 include files sys/file.h, ..., sys/socket.h
-- Looking for 4 include files sys/file.h, ..., sys/socket.h - found
-- Looking for 5 include files sys/file.h, ..., sys/stat.h
-- Looking for 5 include files sys/file.h, ..., sys/stat.h - found
-- Looking for 6 include files sys/file.h, ..., sys/time.h
-- Looking for 6 include files sys/file.h, ..., sys/time.h - found
-- Looking for 7 include files sys/file.h, ..., sys/types.h
-- Looking for 7 include files sys/file.h, ..., sys/types.h - found
-- Looking for 8 include files sys/file.h, ..., features.h
-- Looking for 8 include files sys/file.h, ..., features.h - not found
-- Looking for 8 include files sys/file.h, ..., dirent.h
-- Looking for 8 include files sys/file.h, ..., dirent.h - found
-- Looking for 9 include files sys/file.h, ..., setjmp.h
-- Looking for 9 include files sys/file.h, ..., setjmp.h - found
-- Looking for 10 include files sys/file.h, ..., stddef.h
-- Looking for 10 include files sys/file.h, ..., stddef.h - found
-- Looking for 11 include files sys/file.h, ..., stdint.h
-- Looking for 11 include files sys/file.h, ..., stdint.h - found
-- Looking for 12 include files sys/file.h, ..., unistd.h
-- Looking for 12 include files sys/file.h, ..., unistd.h - found
-- Looking for C++ include stdint.h
-- Looking for C++ include stdint.h - found
-- Looking for 13 include files sys/file.h, ..., mach/mach_time.h
-- Looking for 13 include files sys/file.h, ..., mach/mach_time.h - found
-- Looking for 14 include files sys/file.h, ..., io.h
-- Looking for 14 include files sys/file.h, ..., io.h - not found
-- Looking for 14 include files sys/file.h, ..., winsock2.h
-- Looking for 14 include files sys/file.h, ..., winsock2.h - not found
-- Looking for 14 include files sys/file.h, ..., sys/timeb.h
-- Looking for 14 include files sys/file.h, ..., sys/timeb.h - found
-- Looking for 15 include files sys/file.h, ..., globus/common.h
-- Looking for 15 include files sys/file.h, ..., globus/common.h - not found
-- Looking for 15 include files sys/file.h, ..., pdb.h
-- Looking for 15 include files sys/file.h, ..., pdb.h - not found
-- Looking for 15 include files sys/file.h, ..., pthread.h
-- Looking for 15 include files sys/file.h, ..., pthread.h - found
-- Looking for 16 include files sys/file.h, ..., srbclient.h
-- Looking for 16 include files sys/file.h, ..., srbclient.h - not found
-- Looking for 16 include files sys/file.h, ..., string.h
-- Looking for 16 include files sys/file.h, ..., string.h - found
-- Looking for 17 include files sys/file.h, ..., strings.h
-- Looking for 17 include files sys/file.h, ..., strings.h - found
-- Looking for 18 include files sys/file.h, ..., stdlib.h
-- Looking for 18 include files sys/file.h, ..., stdlib.h - found
-- Looking for 19 include files sys/file.h, ..., memory.h
-- Looking for 19 include files sys/file.h, ..., memory.h - found
-- Looking for 20 include files sys/file.h, ..., dlfcn.h
-- Looking for 20 include files sys/file.h, ..., dlfcn.h - found
-- Looking for 21 include files sys/file.h, ..., inttypes.h
-- Looking for 21 include files sys/file.h, ..., inttypes.h - found
-- Looking for 22 include files sys/file.h, ..., netinet/in.h
-- Looking for 22 include files sys/file.h, ..., netinet/in.h - found
-- Performing Other Test HAVE_OFF64_T - Failed
-- Looking for fseeko
-- Looking for fseeko - found
-- Looking for ftello
-- Looking for ftello - found
-- Performing Other Test HAVE_STAT64_STRUCT - Success
-- Looking for fstat64
-- Looking for fstat64 - found
-- Looking for stat64
-- Looking for stat64 - found
-- Check size of char
-- Check size of char - done
-- Check size of short
-- Check size of short - done
-- Check size of int
-- Check size of int - done
-- Check size of unsigned
-- Check size of unsigned - done
-- Check size of long long
-- Check size of long long - done
-- Check size of __int64
-- Check size of __int64 - failed
-- Check size of float
-- Check size of float - done
-- Check size of double
-- Check size of double - done
-- Check size of long double
-- Check size of long double - done
-- Check size of int8_t
-- Check size of int8_t - done
-- Check size of uint8_t
-- Check size of uint8_t - done
-- Check size of int_least8_t
-- Check size of int_least8_t - done
-- Check size of uint_least8_t
-- Check size of uint_least8_t - done
-- Check size of int_fast8_t
-- Check size of int_fast8_t - done
-- Check size of uint_fast8_t
-- Check size of uint_fast8_t - done
-- Check size of int16_t
-- Check size of int16_t - done
-- Check size of uint16_t
-- Check size of uint16_t - done
-- Check size of int_least16_t
-- Check size of int_least16_t - done
-- Check size of uint_least16_t
-- Check size of uint_least16_t - done
-- Check size of int_fast16_t
-- Check size of int_fast16_t - done
-- Check size of uint_fast16_t
-- Check size of uint_fast16_t - done
-- Check size of int32_t
-- Check size of int32_t - done
-- Check size of uint32_t
-- Check size of uint32_t - done
-- Check size of int_least32_t
-- Check size of int_least32_t - done
-- Check size of uint_least32_t
-- Check size of uint_least32_t - done
-- Check size of int_fast32_t
-- Check size of int_fast32_t - done
-- Check size of uint_fast32_t
-- Check size of uint_fast32_t - done
-- Check size of int64_t
-- Check size of int64_t - done
-- Check size of uint64_t
-- Check size of uint64_t - done
-- Check size of int_least64_t
-- Check size of int_least64_t - done
-- Check size of uint_least64_t
-- Check size of uint_least64_t - done
-- Check size of int_fast64_t
-- Check size of int_fast64_t - done
-- Check size of uint_fast64_t
-- Check size of uint_fast64_t - done
-- Check size of off_t
-- Check size of off_t - done
-- Check size of off64_t
-- Check size of off64_t - failed
-- Looking for 23 include files sys/file.h, ..., stdbool.h
-- Looking for 23 include files sys/file.h, ..., stdbool.h - found
-- Check size of _Bool
-- Check size of _Bool - done
-- Performing Other Test DEV_T_IS_SCALAR - Success
-- Looking for CLOCK_MONOTONIC
-- Looking for CLOCK_MONOTONIC - not found
-- Looking for gettimeofday
-- Looking for gettimeofday - found
-- Performing Other Test HAVE_TM_GMTOFF - Success
-- Performing Other Test HAVE___TM_GMTOFF - Failed
-- Performing Other Test HAVE_STRUCT_TIMEZONE - Success
-- Performing Other Test GETTIMEOFDAY_GIVES_TZ - Success
-- Performing Other Test TIME_WITH_SYS_TIME - Success
-- Performing Other Test HAVE_TM_ZONE - Failed
-- Performing Other Test HAVE_STRUCT_TM_TM_ZONE - Failed
-- Performing Other Test HAVE_TIMEZONE - Success
-- Performing Other Test HAVE_STAT_ST_BLOCKS - Success
-- Looking for ioctl
-- Looking for ioctl - found
-- Performing Other Test HAVE_STRUCT_VIDEOCONFIG - Failed
-- Performing Other Test HAVE_STRUCT_TEXT_INFO - Failed
-- Looking for _getvideoconfig
-- Looking for _getvideoconfig - not found
-- Looking for gettextinfo
-- Looking for gettextinfo - not found
-- Looking for _scrsize
-- Looking for _scrsize - not found
-- Looking for GetConsoleScreenBufferInfo
-- Looking for GetConsoleScreenBufferInfo - not found
-- Looking for TIOCGWINSZ
-- Looking for TIOCGWINSZ - found
-- Looking for TIOCGETD
-- Looking for TIOCGETD - found
-- Looking for getpwuid
-- Looking for getpwuid - found
-- Looking for alarm
-- Looking for alarm - found
-- Looking for fcntl
-- Looking for fcntl - found
-- Looking for flock
-- Looking for flock - found
-- Looking for fork
-- Looking for fork - found
-- Looking for frexpf
-- Looking for frexpf - found
-- Looking for frexpl
-- Looking for frexpl - found
-- Looking for gethostname
-- Looking for gethostname - found
-- Looking for getrusage
-- Looking for getrusage - found
-- Looking for llround
-- Looking for llround - found
-- Looking for llroundf
-- Looking for llroundf - found
-- Looking for lround
-- Looking for lround - found
-- Looking for lroundf
-- Looking for lroundf - found
-- Looking for lstat
-- Looking for lstat - found
-- Looking for rand_r
-- Looking for rand_r - found
-- Looking for random
-- Looking for random - found
-- Looking for round
-- Looking for round - found
-- Looking for roundf
-- Looking for roundf - found
-- Looking for setsysinfo
-- Looking for setsysinfo - not found
-- Looking for signal
-- Looking for signal - found
-- Looking for longjmp
-- Looking for longjmp - found
-- Looking for setjmp
-- Looking for setjmp - found
-- Looking for siglongjmp
-- Looking for siglongjmp - found
-- Looking for sigsetjmp
-- Looking for sigsetjmp - found
-- Looking for sigprocmask
-- Looking for sigprocmask - found
-- Looking for snprintf
-- Looking for snprintf - found
-- Looking for srandom
-- Looking for srandom - found
-- Looking for strdup
-- Looking for strdup - found
-- Looking for strtoll
-- Looking for strtoll - found
-- Looking for strtoull
-- Looking for strtoull - found
-- Looking for symlink
-- Looking for symlink - found
-- Looking for system
-- Looking for system - found
-- Looking for tmpfile
-- Looking for tmpfile - found
-- Looking for asprintf
-- Looking for asprintf - found
-- Looking for vasprintf
-- Looking for vasprintf - found
-- Looking for waitpid
-- Looking for waitpid - found
-- Looking for vsnprintf
-- Looking for vsnprintf - found
-- Performing Other Test VSNPRINTF_WORKS - Success
-- Performing Other Test HAVE_ATTRIBUTE - Success
-- Performing Other Test HAVE_C99_FUNC - Success
-- Performing Other Test HAVE_FUNCTION - Success
-- Performing Other Test HAVE_C99_DESIGNATED_INITIALIZER - Success
-- Performing Other Test SYSTEM_SCOPE_THREADS - Success
-- Performing Other Test HAVE_SOCKLEN_T - Success
-- Performing CXX Test OLD_HEADER_FILENAME - Failed
-- Performing CXX Test H5_NO_NAMESPACE - Failed
-- Performing CXX Test H5_NO_STD - Failed
-- Performing CXX Test BOOL_NOTDEFINED - Failed
-- Performing CXX Test NO_STATIC_CAST - Failed
-- Performing CXX Test CXX_HAVE_OFFSETOF - Failed
-- Performing Other Test HAVE_INLINE - Success
-- Performing Other Test HAVE___INLINE__ - Success
-- Performing Other Test HAVE___INLINE - Success
-- Checking for appropriate format for 64 bit long:
-- Checking for appropriate format for 64 bit long: found "l"
-- Looking for difftime
-- Looking for difftime - found
-- Looking for clock_gettime
-- Looking for clock_gettime - found
-- Looking for clock_gettime in rt
-- Looking for clock_gettime in rt - not found
-- Looking for clock_gettime in posix4
-- Looking for clock_gettime in posix4 - not found
-- Checking IF your system converts long double to (unsigned) long values with special algorithm... no
-- Checking IF your system can convert (unsigned) long to long double values with special algorithm... no
-- Checking IF correctly converting long double to (unsigned) long long values... yes
-- Checking IF correctly converting (unsigned) long long to long double values... yes
-- Checking IF alignment restrictions are strictly enforced... yes
-- Found MPI_C: /Users/luca/lifev/lifev-env/libs/installs/openmpi-2.1.1_installRelease/bin/mpicc (found version "3.1") 
-- Found MPI_CXX: /Users/luca/lifev/lifev-env/libs/installs/openmpi-2.1.1_installRelease/bin/mpic++ (found version "3.1") 
-- Found MPI: TRUE (found version "3.1")  
-- Looking for MPI_Comm_c2f
-- Looking for MPI_Comm_c2f - not found
-- Looking for MPI_Info_c2f
-- Looking for MPI_Info_c2f - not found
-- Configuring done
-- Generating done

然而,当我编译 trilinos 时,我得到了类似的编译错误 error: use of undeclared identifier 'H5Pset_fapl_mpio'; did you mean 'H5Pset_fapl_core'?,这似乎表明 hdf5 没有正确配置并行支持。我的问题是:如何检查配置是否正常(即 hdf5 是否真的配置了并行支持)?如果是这种情况,那么问题是:我在使用 trilinos 时遇到的编译问题的实际原因是什么

4

1 回答 1

0

我解决了这个问题。我发布我的解决方案,希望它对其他人有用,即使错误应该很容易发现。

问题是 trilinos 实际上包含了另一个 hdf5 安装的头文件,该安装不是用并行支持构建的。就我而言,卸载 hdf5brew uninstall hdf5解决了这个问题。

于 2019-12-30T07:09:13.770 回答