流场可视化工程dlb-dynamicdr部署日志:阶段二: 工程本地编译
2022-02-25
阶段一
首先进入根目录,创建自己的build文件夹,先尝试进行一次cmake,如下:
$ mkdir build
$ cd build
$ cmake ..
有报错信息如下:
-- Could NOT find MPI_C (missing: MPI_C_WORKS)
-- Could NOT find MPI_CXX (missing: MPI_CXX_WORKS)
CMake Error at /home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/CMake/installed/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find MPI (missing: MPI_C_FOUND MPI_CXX_FOUND)
Call Stack (most recent call first):
/home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/CMake/installed/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
/home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/CMake/installed/share/cmake-3.22/Modules/FindMPI.cmake:1830 (find_package_handle_standard_args)
CMakeLists.txt:64 (find_package)
很明显,这个错误我们在MPI的测试阶段见过,应该是find_package()执行FindMPI.cmake后没有找到对应的库。这显然与之前配置过程中的不符合,因为我们进行过工程测试,不可能出错。
1、env命令检查环境变量:没问题
2、再次测试工程find_package():通过
3、再次测试工程使用mpirun跑并行程序:成功运行
怀疑是上一次运行CMake时,保存到CMakeCache中的文件没有清除,导致上次运行的错误信息直接显现,故清除build文件夹下的所有文件,再次运行cmake指令,如下:
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
--
-- Found MPI_C: /home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/MPI/OpenMPI/installed/lib/libmpi.so (found version "3.1")
-- Found MPI_CXX: /home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/MPI/OpenMPI/installed/lib/libmpi.so (found version "3.1")
-- Found MPI: TRUE (found version "3.1")
成功通过,找到了MPI。
另有报错如下:
CMake Error at cmake-modules/FindNetCDF.cmake:29 (MESSAGE):
Could not find NETCDF
Call Stack (most recent call first):
CMakeLists.txt:69 (find_package)
依照之前的配置,修改FindNetCDF.cmake文件:
//FindNetCDF.cmake
FIND_PATH(NetCDF_INCLUDE_DIR
NAMES netcdf.h
PATHS "$ENV{NetCDF_INCLUDE_DIR}"#/home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/NetCDF/installed_C/include
NO_CACHE
)
FIND_LIBRARY(NetCDF_LIBRARY
NAMES netcdf
PATHS "$ENV{NetCDF_LIBRARY}" #/home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/NetCDF/installed_C/lib
NO_CACHE
)
Message(STATUS "${NetCDF_LIBRARY}")
Message(STATUS "${NetCDF_INCLUDE_DIR}")
IF(NetCDF_INCLUDE_DIR)
MESSAGE(STATUS "NetCDF Header Found")
ELSE()
MESSAGE(STATUS "NetCDF Header Not Found")
ENDIF()
IF(NetCDF_LIBRARY)
MESSAGE(STATUS "NetCDF Lib Found")
ELSE()
MESSAGE(STATUS "NetCDF Lib Not Found")
ENDIF()
IF (NetCDF_INCLUDE_DIR AND NetCDF_LIBRARY)
SET(NetCDF_FOUND TRUE)
ENDIF (NetCDF_INCLUDE_DIR AND NetCDF_LIBRARY)
IF (NetCDF_FOUND)
IF (NOT NetCDF_FIND_QUIETLY)
MESSAGE(STATUS "Found NETCDF: ${NetCDF_LIBRARY}")
ENDIF (NOT NetCDF_FIND_QUIETLY)
ELSE (NetCDF_FOUND)
IF (NetCDF_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find NETCDF")
ENDIF (NetCDF_FIND_REQUIRED)
ENDIF (NetCDF_FOUND)
继续编译,发现找到NetCDF,输出信息如下:
-- /home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/NetCDF/installed_C/lib/libnetcdf.so
-- /home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/NetCDF/installed_C/include/
-- NetCDF Header Found
-- NetCDF Lib Found
-- Found NETCDF: /home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/NetCDF/installed_C/lib/libnetcdf.so
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
更新报错情况:
报错如下,并且在我们的测试文档中仍然如此:
CMake Error at /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake:117 (find_package):
Could not find a package configuration file provided by "boost_thread"
(requested version 1.71.0) with any of the following names:
boost_threadConfig.cmake
boost_thread-config.cmake
Add the installation prefix of "boost_thread" to CMAKE_PREFIX_PATH or set
"boost_thread_DIR" to a directory containing one of the above files. If
"boost_thread" provides a separate development package or SDK, be sure it
has been installed.
Call Stack (most recent call first):
/usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake:182 (boost_find_component)
/home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/CMake/installed/share/cmake-3.22/Modules/FindBoost.cmake:594 (find_package)
CMakeLists.txt:74 (find_package)
-- Configuring incomplete, errors occurred!
这次是Boost没有找到,查看CMakeLists.txt中关于Boost的情况
set (Boost_USE_STATIC_LIBS ON)
set (Boost_USE_MULTITHREADED ON)
set (Boost_USE_STATIC_RUNTIME OFF)
find_package (Boost REQUIRED COMPONENTS thread system atomic program_options)
当我们去掉COMPONENTS关键字以及之后的语句块后,编译直接通过。注意这里是让我们去找Boost安装的一些下属库(组件),包括 thread system atomic program_options,但注意我们当时对Boost安装时选择的是全部安装,故不应该出现没有这些库的问题。这里的COMPONENTS关键字只是一个测试,检测我们是否安装了这些库,对于我们当前这种安装了所有库文件的,可以直接跳过这步,取消后面的关键字,改成如下即可:
set (Boost_USE_STATIC_LIBS ON)
set (Boost_USE_MULTITHREADED ON)
set (Boost_USE_STATIC_RUNTIME OFF)
find_package (Boost REQUIRED)
更新报错情况如下:
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
PROTOBUF_INCLUDE_DIR (ADVANCED)
used as include directory in directory /home/ctrtemp/Documents/PkuVisLab/dlb-dynamicdr-refined
......
PROTOBUF_LIBRARY (ADVANCED)
linked by target "appcommon" in directory /home/ctrtemp/Documents/PkuVisLab/dlb-dynamicdr-refined/common
linked by target "dlb" in directory /home/ctrtemp/Documents/PkuVisLab/dlb-dynamicdr-refined/src
CMake Error in common/CMakeLists.txt:
Found relative path while evaluating include directories of "appcommon":
"PROTOBUF_INCLUDE_DIR-NOTFOUND"
CMake Error in tinyxml/CMakeLists.txt:
Found relative path while evaluating include directories of "tinyxml":
"PROTOBUF_INCLUDE_DIR-NOTFOUND"
......
以上的报错说明一些变量未被设置,或未正确设置,导致在指定的路径下找不到库文件或头文件。于是再次检查我们的CMakeLists.txt文件:
set (PNETCDF_DIR "/WORK/app/pnetcdf/1.6.0/00")
set (PNETCDF_INCLUDE_DIR ${PNETCDF_DIR}/include)
set (PNETCDF_LIBRARY ${PNETCDF_DIR}/lib/libpnetcdf.a)
include_directories (${PNETCDF_INCLUDE_DIR})
set (METIS_DIR "/WORK/pp376/opt/parmetis-4.0.3")
set (METIS_INCLUDE_DIR ${METIS_DIR}/include)
set (METIS_LIBRARY ${METIS_DIR}/lib/libmetis.a)
include_directories (${METIS_INCLUDE_DIR})
set (PARMETIS_DIR "/WORK/pp376/opt/parmetis-4.0.3")
set (PARMETIS_INCLUDE_DIR ${PARMETIS_DIR}/include)
set (PARMETIS_LIBRARY ${PARMETIS_DIR}/lib/libparmetis.a)
include_directories (${PARMETIS_INCLUDE_DIR})
set (ZOLTAN_DIR "/WORK/pp376/opt/zoltan-3.83")
set (ZOLTAN_INCLUDE_DIR ${ZOLTAN_DIR}/include)
set (ZOLTAN_LIBRARY ${ZOLTAN_DIR}/lib/libzoltan.a)
include_directories (${ZOLTAN_INCLUDE_DIR})
set (BOOST_DIR "/WORK/app/boost/1_54_0")
set (BOOST_INCLUDE_DIR ${BOOST_DIR}/include)
set (BOOST_LIBRARY ${BOOST_DIR}/lib)
发现这里的路径/根目录设置是在服务器上的地址位置,故我们需要依据我们库安装的位置,对其进行重新修改,如下:
set (PNETCDF_DIR "/home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/Parallel_NetCDF/installed")
set (PNETCDF_INCLUDE_DIR ${PNETCDF_DIR}/include)
set (PNETCDF_LIBRARY ${PNETCDF_DIR}/lib/libpnetcdf.a)
include_directories (${PNETCDF_INCLUDE_DIR})
set (METIS_DIR "/home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/METIS/installed")
set (METIS_INCLUDE_DIR ${METIS_DIR}/include)
set (METIS_LIBRARY ${METIS_DIR}/lib/libmetis.a)
include_directories (${METIS_INCLUDE_DIR})
set (PARMETIS_DIR "/home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/ParMETIS/installed")
set (PARMETIS_INCLUDE_DIR ${PARMETIS_DIR}/include)
set (PARMETIS_LIBRARY ${PARMETIS_DIR}/lib/libparmetis.a)
include_directories (${PARMETIS_INCLUDE_DIR})
set (ZOLTAN_DIR "/home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/Zoltan/installed")
set (ZOLTAN_INCLUDE_DIR ${ZOLTAN_DIR}/include)
set (ZOLTAN_LIBRARY ${ZOLTAN_DIR}/lib/libzoltan.a)
include_directories (${ZOLTAN_INCLUDE_DIR})
set (BOOST_DIR "/home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/Boost/installed")
set (BOOST_INCLUDE_DIR ${BOOST_DIR}/include)
set (BOOST_LIBRARY ${BOOST_DIR}/lib)
并且发现以下include_directories句段中的变量没有在环境变量中被设置:
include_directories (
${PROTOBUF_INCLUDE_DIR}
${MPI_INCLUDE_PATH}
${NetCDF_INCLUDE_DIR}
${PROJECT_BINARY_DIR}
${PROJECT_SOURCE_DIR}
)
在其前方加上如下语句,直接在CMake中进行设置:
set(PROTOBUF_INCLUDE_DIR "/home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/Protobuf/installed/include")
set(MPI_INCLUDE_PATH "/home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/MPI/OpenMPI/installed/include")
set(NetCDF_INCLUDE_DIR "/home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/NetCDF/installed_CXX/include")
编译之后仍有报错信息如下:
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
PROTOBUF_LIBRARY (ADVANCED)
linked by target "appcommon" in directory /home/ctrtemp/Documents/PkuVisLab/dlb-dynamicdr-refined/common
linked by target "dlb" in directory /home/ctrtemp/Documents/PkuVisLab/dlb-dynamicdr-refined/src
继续设置PROTOBUF_LIBRARY,如下:
set(PROTOBUF_LIBRARY "/home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/Protobuf/installed/lib")
发现无效,还是报同样的错误,因为上面说明的PROTOBUF_LIBRARY是在subdirectory中报错的,你在主目录下进行修改没什么效果。
于是尝试在环境变量中进行修改,修改.bashrc如下:
export PROTOBUF_LIBRARY=/home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/Protobuf/installed/lib/# Protobuf
发现还是无效,考虑我们使用的引用方法有问题,应该使用$ENV{PROTOBUF_LIBRARY}进行调用,于是修改以上报错的两个subdirectory位置:当前目录下的字目录common、src进行修改其目录下的CMakeLists。奏效。
但是又出现以下的Warning信息,不过cmake通过了。
WARNING: Target "dlb" requests linking to directory "/home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/NetCDF/installed_C/lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "pnek" requests linking to directory "/home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/NetCDF/installed_C/lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "pisabel3d" requests linking to directory "/home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/NetCDF/installed_C/lib". Targets may link only to libraries. CMake is dropping the item.
这个Warning表示你使用target_link_libraries命令应该给一个确切的库文件,但是你实际给定的却是一个库目录,所以出现了这个Warning报错。我们考虑使用link_directories()命令进行修改。对各个文件的修改如下:
参考链接:
参考链接一
参考链接二
暂时不进行修改
阶段二:勘误
以上配置存在问题,对Protobuf和NetCDF重新设置。
关键问题是,你在主目录下的CMakeLists.txt中没有对Protobuf和NetCDF进行相关变量的设置,但是在subdirectory中却用到了,所以出现之前的报错,仿照之前的工程配置,现在重新对其增加设置,如下:
//NetCDF
set (NETCDF_DIR "/home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/NetCDF/installed_C")
set (NETCDF_INCLUDE_DIR ${NETCDF_DIR}/include)
set (NETCDF_LIBRARY ${NETCDF_DIR}/lib/libpnetcdf.a)
include_directories (${NETCDF_INCLUDE_DIR})
//Protobuf
set (PROTOBUF_DIR "/home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/Protobuf/installed_C")
set (PROTOBUF_INCLUDE_DIR ${PROTOBUF_DIR}/include)
set (PROTOBUF_LIBRARY ${PROTOBUF_DIR}/lib/libprotobuf.a)
include_directories (${PROTOBUF_INCLUDE_DIR})
再次进行cmake,通过configure阶段以及generate阶段。输出信息如下(整体):
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found MPI_C: /home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/MPI/OpenMPI/installed/lib/libmpi.so (found version "3.1")
-- Found MPI_CXX: /home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/MPI/OpenMPI/installed/lib/libmpi.so (found version "3.1")
-- Found MPI: TRUE (found version "3.1")
-- /home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/NetCDF/installed_C/lib/libnetcdf.so
-- /home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/NetCDF/installed_C/include/
-- NetCDF Header Found
-- NetCDF Lib Found
-- Found NETCDF: /home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/NetCDF/installed_C/lib/libnetcdf.so
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found version "1.71.0")
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ctrtemp/Documents/PkuVisLab/dlb-dynamicdr-refined/build
整体的CMakeLists.txt文件如下:
project (dlb_ddr)
cmake_minimum_required (VERSION 2.8.12)
option (WITH_PROTOBUF ON)
option (WITH_NETCDF "Build with NetCDF" OFF)
option (WITH_PNETCDF "Build with parallel-netcdf" ON)
option (WITH_QT "Build with Qt" OFF)
option (WITH_CXX11 "Build with C++11" ON)
set (CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake-modules)
if (APPLE)
set (CMAKE_MACOSX_RPATH ON)
set (CMAKE_SKIP_BUILD_RPATH FALSE)
set (CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
set (CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
set (CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
list (FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
"${CMAKE_INSTALL_PREFIX}/lib" isSystemDir)
if ("${isSystemDir}" STREQUAL "-1")
set (CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
endif ()
endif ()
if (WITH_CXX11)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
endif ()
else ()
find_package (Boost REQUIRED)
include_directories (${Boost_INCLUDE_DIR})
endif ()
set (CMAKE_INCLUDE_CURRENT_DIR ON)
set (EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR})
set (LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR})
set (CMAKE_CXX_COMPILER ${MPI_CXX_COMPILER})
set (NETCDF_DIR "/home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/NetCDF/installed_C")
set (NETCDF_INCLUDE_DIR ${NETCDF_DIR}/include)
set (NETCDF_LIBRARY ${NETCDF_DIR}/lib/libpnetcdf.a)
include_directories (${NETCDF_INCLUDE_DIR})
set (PROTOBUF_DIR "/home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/Protobuf/installed_C")
set (PROTOBUF_INCLUDE_DIR ${PROTOBUF_DIR}/include)
set (PROTOBUF_LIBRARY ${PROTOBUF_DIR}/lib/libprotobuf.a)
include_directories (${PROTOBUF_INCLUDE_DIR})
set (PNETCDF_DIR "/home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/Parallel_NetCDF/installed")
set (PNETCDF_INCLUDE_DIR ${PNETCDF_DIR}/include)
set (PNETCDF_LIBRARY ${PNETCDF_DIR}/lib/libpnetcdf.a)
include_directories (${PNETCDF_INCLUDE_DIR})
set (METIS_DIR "/home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/METIS/installed")
set (METIS_INCLUDE_DIR ${METIS_DIR}/include)
set (METIS_LIBRARY ${METIS_DIR}/lib/libmetis.a)
include_directories (${METIS_INCLUDE_DIR})
set (PARMETIS_DIR "/home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/ParMETIS/installed")
set (PARMETIS_INCLUDE_DIR ${PARMETIS_DIR}/include)
set (PARMETIS_LIBRARY ${PARMETIS_DIR}/lib/libparmetis.a)
include_directories (${PARMETIS_INCLUDE_DIR})
set (ZOLTAN_DIR "/home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/Zoltan/installed")
set (ZOLTAN_INCLUDE_DIR ${ZOLTAN_DIR}/include)
set (ZOLTAN_LIBRARY ${ZOLTAN_DIR}/lib/libzoltan.a)
include_directories (${ZOLTAN_INCLUDE_DIR})
find_package (MPI REQUIRED)
find_package (NetCDF REQUIRED)
find_package (Protobuf REQUIRED)
set (Boost_USE_STATIC_LIBS ON)
set (Boost_USE_MULTITHREADED ON)
set (Boost_USE_STATIC_RUNTIME OFF)
find_package (Boost REQUIRED)
include_directories (${Boost_INCLUDE_DIR})
set (BOOST_DIR "/home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/Boost/installed")
set (BOOST_INCLUDE_DIR ${BOOST_DIR}/include)
set (BOOST_LIBRARY ${BOOST_DIR}/lib)
set(PROTOBUF_INCLUDE_DIR "/home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/Protobuf/installed/include")
set(MPI_INCLUDE_PATH "/home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/MPI/OpenMPI/installed/include")
set(NetCDF_INCLUDE_DIR "/home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/NetCDF/installed_CXX/include")
include_directories (
${PROTOBUF_INCLUDE_DIR}
${MPI_INCLUDE_PATH}
${NetCDF_INCLUDE_DIR}
${PROJECT_BINARY_DIR}
${PROJECT_SOURCE_DIR}
)
add_subdirectory (common)
add_subdirectory (tinyxml)
add_subdirectory (partition)
add_subdirectory (src)
add_subdirectory (bil)
add_subdirectory (apps)
接下来执行make操作:
$ make
出现报错,报错信息如下
......
[ 76%] Building CXX object src/CMakeFiles/dlb.dir/app.cpp.o
......
/home/ctrtemp/Documents/PkuVisLab/dlb-dynamicdr-refined/src/app.cpp: In member function ‘bool CApp::probe_jobs(int, int, PBJobArray&) const’:
/home/ctrtemp/Documents/PkuVisLab/dlb-dynamicdr-refined/src/app.cpp:3841:51: error: no matching function for call to ‘google::protobuf::io::CodedInputStream::SetTotalBytesLimit(int, int)’
3841 | stream.SetTotalBytesLimit(INT_MAX, INT_MAX / 2);
| ^
In file included from /home/ctrtemp/Documents/PkuVisLab/dlb-dynamicdr-refined/src/app.cpp:7:
/home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/Protobuf/installed/include/google/protobuf/io/coded_stream.h:406:8: note: candidate: ‘void google::protobuf::io::CodedInputStream::SetTotalBytesLimit(int)’
406 | void SetTotalBytesLimit(int total_bytes_limit);
| ^~~~~~~~~~~~~~~~~~
/home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/Protobuf/installed/include/google/protobuf/io/coded_stream.h:406:8: note: candidate expects 1 argument, 2 provided
make[2]: *** [src/CMakeFiles/dlb.dir/build.make:132:src/CMakeFiles/dlb.dir/app.cpp.o] 错误 1
make[1]: *** [CMakeFiles/Makefile2:331:src/CMakeFiles/dlb.dir/all] 错误 2
make: *** [Makefile:91:all] 错误 2
简单来说有个函数,要求一个参数你给了两个。函数是Protobuf中的函数,由于使用了新的版本,怀疑是新老版本函数更新的问题。查验出问题的函数如下:
void SetTotalBytesLimit(int total_bytes_limit);
对函数进行查验,找到说明如下:
// Total Bytes Limit -----------------------------------------------
// To prevent malicious users from sending excessively large messages
// and causing memory exhaustion, CodedInputStream imposes a hard limit on
// the total number of bytes it will read.
// Sets the maximum number of bytes that this CodedInputStream will read
// before refusing to continue. To prevent servers from allocating enormous
// amounts of memory to hold parsed messages, the maximum message length
// should be limited to the shortest length that will not harm usability.
// The default limit is INT_MAX (~2GB) and apps should set shorter limits
// if possible. An error will always be printed to stderr if the limit is
// reached.
//
// Note: setting a limit less than the current read position is interpreted
// as a limit on the current position.
//
// This is unrelated to PushLimit()/PopLimit().
之前的版本接收两个参数,第一个参数与当前版本相同,就是最大发送字符串容量限制,而第二个参数代表发出警告的threshold。这里的修改方式是:直接为其削减第二个参数即可。
再次进行编译,更新报错情况:
......
[ 89%] Building CXX object apps/nek/CMakeFiles/pnek.dir/main.cpp.o
make[2]: *** 没有规则可制作目标“/home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/ParMETIS/installed/lib/libparmetis.a”,由“pnek” 需求。 停止。
make[1]: *** [CMakeFiles/Makefile2:387:apps/nek/CMakeFiles/pnek.dir/all] 错误 2
make: *** [Makefile:91:all] 错误 2
......
根据报错信息理解:应该是pnek需要文件libparmetis.a,但是在给定路径下找不到。
我们到给定路径下搜索,发现只有libparmetis.so文件,果然所需文件缺失,这也说明了我们在编译Par_METIS库的时候只编译了动态链接库(.so),而没有编译输出静态链接库(.a)。
问题找到了,回去解决:
阶段三:为之前的库编译生成静态链接库 .a文件
由于之前的疏忽,一些库只编译生成了动态链接库(.so),没有静态链接库(.a),而现在的工程需要这些库,故必须要进行改进。为这些库重新编译生成静态链接库。
Par_METIS重新生成
关键步骤是这个步骤:这里我们将-DSHARED=1改成-DSHARED=0
$ sudo cmake /home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/ParMETIS/parmetis-4.0.3 -DCMAKE_VERBOSE_MAKEFILE=1 -DGKLIB_PATH=/home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/ParMETIS/parmetis-4.0.3/metis/GKlib -DMETIS_PATH=/home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/ParMETIS/parmetis-4.0.3/metis -DCMAKE_INSTALL_PREFIX=../../../installed -DSHARED=0 -DCMAKE_C_COMPILER=/home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/MPI/OpenMPI/installed/bin/mpicc -DCMAKE_CXX_COMPILER=/home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/MPI/OpenMPI/installed/bin/mpicxx
之后我们发现其编译生成的就不是动态链接库而是静态链接库,输出信息如下:
......
Install the project...
/home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/CMake/installed/bin/cmake -P cmake_install.cmake
-- Install configuration: ""
-- Up-to-date: /home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/ParMETIS/installed/include/parmetis.h
-- Installing: /home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/ParMETIS/installed/lib/libparmetis.a #注意这里
-- Installing: /home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/ParMETIS/installed/bin/ptest
-- Installing: /home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/ParMETIS/installed/bin/mtest
-- Installing: /home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/ParMETIS/installed/bin/parmetis
-- Installing: /home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/ParMETIS/installed/bin/pometis
最后我们在lib文件夹下缺失找到了该静态链接库文件libparmetis.a。
METIS重新生成
继续工程的编译环节。发现仍然报错,这次是METIS库,问题基本相同如下:
......
[ 84%] Built target dlb
Consolidate compiler generated dependencies of target pnek
make[2]: *** 没有规则可制作目标“/home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/METIS/installed/lib/libmetis.a”,由“pnek” 需求。 停止。
make[1]: *** [CMakeFiles/Makefile2:387:apps/nek/CMakeFiles/pnek.dir/all] 错误 2
make: *** [Makefile:91:all] 错误 2
如下展示解决的关键步骤(详细步骤看上一个日志)
sudo make config shared=0 cc=gcc prefix=../../../installed
同样是将shared=1变成shared=0进行编译。
很奇怪的是这次还是安装的动态链接库,查看CMakeLists后发现写的很明确,如果SHARED=False就编译静态链接库。我们使用分离的命令再编译一次,这次直接设置SHARED=0,关键命令如下:
$ sudo cmake /home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/METIS/metis-5.1.0 -DCMAKE_VERBOSE_MAKEFILE=1 -DGKLIB_PATH=/home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/METIS/metis-5.1.0/GKlib -DCMAKE_INSTALL_PREFIX=../../../installed -DSHARED=0 -DCMAKE_C_COMPILER=gcc
$ sudo make
$ sudo make install
出现以下:正确在lib文件夹下找到静态链接库libmetis.a,成功
Install the project...
/home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/CMake/installed/bin/cmake -P cmake_install.cmake
-- Install configuration: ""
-- Up-to-date: /home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/METIS/installed/include/metis.h
-- Installing: /home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/METIS/installed/lib/libmetis.a
-- Installing: /home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/METIS/installed/bin/gpmetis
-- Set runtime path of "/home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/METIS/installed/bin/gpmetis" to ""
-- Installing: /home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/METIS/installed/bin/ndmetis
-- Set runtime path of "/home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/METIS/installed/bin/ndmetis" to ""
-- Installing: /home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/METIS/installed/bin/mpmetis
-- Set runtime path of "/home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/METIS/installed/bin/mpmetis" to ""
-- Installing: /home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/METIS/installed/bin/m2gmetis
-- Set runtime path of "/home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/METIS/installed/bin/m2gmetis" to ""
-- Installing: /home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/METIS/installed/bin/graphchk
-- Set runtime path of "/home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/METIS/installed/bin/graphchk" to ""
-- Installing: /home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/METIS/installed/bin/cmpfillin
-- Set runtime path of "/home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/METIS/installed/bin/cmpfillin" to ""
阶段四
$ make
完整信息如下信息:
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found MPI_C: /home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/MPI/OpenMPI/installed/lib/libmpi.so (found version "3.1")
-- Found MPI_CXX: /home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/MPI/OpenMPI/installed/lib/libmpi.so (found version "3.1")
-- Found MPI: TRUE (found version "3.1")
-- /home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/NetCDF/installed_C/lib/libnetcdf.so
-- /home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/NetCDF/installed_C/include/
-- NetCDF Header Found
-- NetCDF Lib Found
-- Found NETCDF: /home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/NetCDF/installed_C/lib/libnetcdf.so
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found version "1.71.0")
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ctrtemp/Documents/PkuVisLab/dlb-dynamicdr-refined/build
ctrtemp@ctrtemp-HP-Spectre-x360-Convertible-14-ea0xxx:~/Documents/PkuVisLab/dlb-dynamicdr-refined/build$ make
[ 2%] Running C++ protocol buffer compiler on streamline.proto
[libprotobuf WARNING ../../src/google/protobuf/compiler/parser.cc:649] No syntax specified for the proto file: streamline.proto. Please use 'syntax = "proto2";' or 'syntax = "proto3";' to specify a syntax version. (Defaulted to proto2 syntax.)
[ 5%] Running C++ protocol buffer compiler on pathline.proto
[libprotobuf WARNING ../../src/google/protobuf/compiler/parser.cc:649] No syntax specified for the proto file: pathline.proto. Please use 'syntax = "proto2";' or 'syntax = "proto3";' to specify a syntax version. (Defaulted to proto2 syntax.)
[ 7%] Building CXX object common/CMakeFiles/appcommon.dir/lerp.cpp.o
[ 10%] Building CXX object common/CMakeFiles/appcommon.dir/utils.cpp.o
[ 13%] Building CXX object common/CMakeFiles/appcommon.dir/streamline.pb.cc.o
[ 15%] Building CXX object common/CMakeFiles/appcommon.dir/pathline.pb.cc.o
[ 18%] Linking CXX static library ../libappcommon.a
[ 18%] Built target appcommon
[ 21%] Building CXX object tinyxml/CMakeFiles/tinyxml.dir/tinystr.cpp.o
[ 23%] Building CXX object tinyxml/CMakeFiles/tinyxml.dir/tinyxml.cpp.o
[ 26%] Building CXX object tinyxml/CMakeFiles/tinyxml.dir/tinyxmlerror.cpp.o
[ 28%] Building CXX object tinyxml/CMakeFiles/tinyxml.dir/tinyxmlparser.cpp.o
[ 31%] Linking CXX static library ../libtinyxml.a
[ 31%] Built target tinyxml
[ 34%] Building C object bil/CMakeFiles/bil.dir/bil.c.o
[ 36%] Building C object bil/CMakeFiles/bil.dir/bil_block.c.o
[ 39%] Building C object bil/CMakeFiles/bil.dir/bil_misc.c.o
[ 42%] Building C object bil/CMakeFiles/bil.dir/bil_pio.c.o
[ 44%] Building C object bil/CMakeFiles/bil.dir/bil_sched.c.o
[ 47%] Building C object bil/CMakeFiles/bil.dir/bil_timing.c.o
/home/ctrtemp/Documents/PkuVisLab/dlb-dynamicdr-refined/bil/bil_timing.c: In function ‘BIL_Timing_print’:
/home/ctrtemp/Documents/PkuVisLab/dlb-dynamicdr-refined/bil/bil_timing.c:146:15: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 8 has type ‘int64_t’ {aka ‘long int’} [-Wformat=]
146 | "BIL_STATS:%d:MaxOpen:%lf:AvgOpen:%lf:MaxRead:%lf:AvgRead:%lf:"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
......
150 | avg_io_time, total_bytes_read,
| ~~~~~~~~~~~~~~~~
| |
| int64_t {aka long int}
/home/ctrtemp/Documents/PkuVisLab/dlb-dynamicdr-refined/bil/bil_timing.c:147:25: note: format string is defined here
147 | "Bytes:%lld:Bandwidth:%lf:MaxComm:%lf:AvgComm:%lf:MaxComp:%lf:"
| ~~~^
| |
| long long int
| %ld
[ 50%] Linking C static library ../libbil.a
[ 50%] Built target bil
[ 52%] Building CXX object partition/CMakeFiles/partition.dir/partition.cpp.o
[ 55%] Linking CXX static library ../libpartition.a
[ 55%] Built target partition
[ 57%] Building CXX object partition/CMakeFiles/testpartition.dir/testpartition.cpp.o
[ 60%] Linking CXX executable ../testpartition
[ 60%] Built target testpartition
[ 63%] Running C++ protocol buffer compiler on job.proto
[libprotobuf WARNING ../../src/google/protobuf/compiler/parser.cc:649] No syntax specified for the proto file: job.proto. Please use 'syntax = "proto2";' or 'syntax = "proto3";' to specify a syntax version. (Defaulted to proto2 syntax.)
[ 65%] Running C++ protocol buffer compiler on config.proto
[libprotobuf WARNING ../../src/google/protobuf/compiler/parser.cc:649] No syntax specified for the proto file: config.proto. Please use 'syntax = "proto2";' or 'syntax = "proto3";' to specify a syntax version. (Defaulted to proto2 syntax.)
[ 68%] Building CXX object src/CMakeFiles/dlb.dir/dlb.cc.o
[ 71%] Building CXX object src/CMakeFiles/dlb.dir/geoparti.cc.o
[ 73%] Building CXX object src/CMakeFiles/dlb.dir/graphparti.cc.o
[ 76%] Building CXX object src/CMakeFiles/dlb.dir/app.cpp.o
/home/ctrtemp/Documents/PkuVisLab/dlb-dynamicdr-refined/src/app.cpp: In member function ‘void CApp::stat()’:
/home/ctrtemp/Documents/PkuVisLab/dlb-dynamicdr-refined/src/app.cpp:918:47: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘int’ [-Wformat=]
918 | fprintf(stderr, "max_summary_workload=\t%ld\n", _max_workload);
| ~~^ ~~~~~~~~~~~~~
| | |
| | int
| long int
| %d
/home/ctrtemp/Documents/PkuVisLab/dlb-dynamicdr-refined/src/app.cpp: In member function ‘bool CApp::probe_jobs(int, int, PBJobArray&) const’:
/home/ctrtemp/Documents/PkuVisLab/dlb-dynamicdr-refined/src/app.cpp:3841:51: error: no matching function for call to ‘google::protobuf::io::CodedInputStream::SetTotalBytesLimit(int, int)’
3841 | stream.SetTotalBytesLimit(INT_MAX, INT_MAX / 2);
| ^
In file included from /home/ctrtemp/Documents/PkuVisLab/dlb-dynamicdr-refined/src/app.cpp:7:
/home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/Protobuf/installed/include/google/protobuf/io/coded_stream.h:406:8: note: candidate: ‘void google::protobuf::io::CodedInputStream::SetTotalBytesLimit(int)’
406 | void SetTotalBytesLimit(int total_bytes_limit);
| ^~~~~~~~~~~~~~~~~~
/home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/Protobuf/installed/include/google/protobuf/io/coded_stream.h:406:8: note: candidate expects 1 argument, 2 provided
make[2]: *** [src/CMakeFiles/dlb.dir/build.make:132:src/CMakeFiles/dlb.dir/app.cpp.o] 错误 1
make[1]: *** [CMakeFiles/Makefile2:331:src/CMakeFiles/dlb.dir/all] 错误 2
make: *** [Makefile:91:all] 错误 2
ctrtemp@ctrtemp-HP-Spectre-x360-Convertible-14-ea0xxx:~/Documents/PkuVisLab/dlb-dynamicdr-refined/build$ make
Consolidate compiler generated dependencies of target appcommon
[ 18%] Built target appcommon
Consolidate compiler generated dependencies of target tinyxml
[ 31%] Built target tinyxml
Consolidate compiler generated dependencies of target bil
[ 50%] Built target bil
Consolidate compiler generated dependencies of target partition
[ 55%] Built target partition
Consolidate compiler generated dependencies of target testpartition
[ 60%] Built target testpartition
Consolidate compiler generated dependencies of target dlb
[ 63%] Building CXX object src/CMakeFiles/dlb.dir/app.cpp.o
/home/ctrtemp/Documents/PkuVisLab/dlb-dynamicdr-refined/src/app.cpp: In member function ‘void CApp::stat()’:
/home/ctrtemp/Documents/PkuVisLab/dlb-dynamicdr-refined/src/app.cpp:918:47: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘int’ [-Wformat=]
918 | fprintf(stderr, "max_summary_workload=\t%ld\n", _max_workload);
| ~~^ ~~~~~~~~~~~~~
| | |
| | int
| long int
| %d
[ 65%] Building CXX object src/CMakeFiles/dlb.dir/job.pb.cc.o
[ 68%] Building CXX object src/CMakeFiles/dlb.dir/config.pb.cc.o
[ 71%] Linking CXX static library ../libdlb.a
[ 84%] Built target dlb
[ 86%] Building CXX object apps/nek/CMakeFiles/pnek.dir/tracer.cpp.o
[ 89%] Building CXX object apps/nek/CMakeFiles/pnek.dir/main.cpp.o
make[2]: *** 没有规则可制作目标“/home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/ParMETIS/installed/lib/libparmetis.a”,由“pnek” 需求。 停止。
make[1]: *** [CMakeFiles/Makefile2:387:apps/nek/CMakeFiles/pnek.dir/all] 错误 2
make: *** [Makefile:91:all] 错误 2
ctrtemp@ctrtemp-HP-Spectre-x360-Convertible-14-ea0xxx:~/Documents/PkuVisLab/dlb-dynamicdr-refined/build$ make
[ 18%] Built target appcommon
[ 31%] Built target tinyxml
[ 50%] Built target bil
[ 55%] Built target partition
[ 60%] Built target testpartition
Consolidate compiler generated dependencies of target dlb
[ 84%] Built target dlb
Consolidate compiler generated dependencies of target pnek
make[2]: *** 没有规则可制作目标“/home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/METIS/installed/lib/libmetis.a”,由“pnek” 需求。 停止。
make[1]: *** [CMakeFiles/Makefile2:387:apps/nek/CMakeFiles/pnek.dir/all] 错误 2
make: *** [Makefile:91:all] 错误 2
ctrtemp@ctrtemp-HP-Spectre-x360-Convertible-14-ea0xxx:~/Documents/PkuVisLab/dlb-dynamicdr-refined/build$ make
[ 18%] Built target appcommon
[ 31%] Built target tinyxml
[ 50%] Built target bil
[ 55%] Built target partition
[ 60%] Built target testpartition
[ 84%] Built target dlb
make[2]: *** 没有规则可制作目标“/home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/Protobuf/installed_C/lib/libprotobuf.a”,由“pnek” 需求。 停止。
make[1]: *** [CMakeFiles/Makefile2:387:apps/nek/CMakeFiles/pnek.dir/all] 错误 2
make: *** [Makefile:91:all] 错误 2
ctrtemp@ctrtemp-HP-Spectre-x360-Convertible-14-ea0xxx:~/Documents/PkuVisLab/dlb-dynamicdr-refined/build$ make
-- Found MPI_CXX: /home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/MPI/OpenMPI/installed/bin/mpicxx (found version "3.1")
-- /home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/NetCDF/installed_C/lib/libnetcdf.so
-- /home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/NetCDF/installed_C/include/
-- NetCDF Header Found
-- NetCDF Lib Found
-- Found NETCDF: /home/ctrtemp/Downloads/Lib/CppLib/dlb-lib/NetCDF/installed_C/lib/libnetcdf.so
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ctrtemp/Documents/PkuVisLab/dlb-dynamicdr-refined/build
Consolidate compiler generated dependencies of target appcommon
[ 2%] Building CXX object common/CMakeFiles/appcommon.dir/lerp.cpp.o
[ 5%] Building CXX object common/CMakeFiles/appcommon.dir/utils.cpp.o
[ 7%] Building CXX object common/CMakeFiles/appcommon.dir/streamline.pb.cc.o
[ 10%] Building CXX object common/CMakeFiles/appcommon.dir/pathline.pb.cc.o
[ 13%] Linking CXX static library ../libappcommon.a
[ 18%] Built target appcommon
Consolidate compiler generated dependencies of target tinyxml
[ 21%] Building CXX object tinyxml/CMakeFiles/tinyxml.dir/tinystr.cpp.o
[ 23%] Building CXX object tinyxml/CMakeFiles/tinyxml.dir/tinyxml.cpp.o
[ 26%] Building CXX object tinyxml/CMakeFiles/tinyxml.dir/tinyxmlerror.cpp.o
[ 28%] Building CXX object tinyxml/CMakeFiles/tinyxml.dir/tinyxmlparser.cpp.o
[ 31%] Linking CXX static library ../libtinyxml.a
[ 31%] Built target tinyxml
Consolidate compiler generated dependencies of target bil
[ 34%] Building C object bil/CMakeFiles/bil.dir/bil.c.o
[ 36%] Building C object bil/CMakeFiles/bil.dir/bil_block.c.o
[ 39%] Building C object bil/CMakeFiles/bil.dir/bil_misc.c.o
[ 42%] Building C object bil/CMakeFiles/bil.dir/bil_pio.c.o
[ 44%] Building C object bil/CMakeFiles/bil.dir/bil_sched.c.o
[ 47%] Building C object bil/CMakeFiles/bil.dir/bil_timing.c.o
/home/ctrtemp/Documents/PkuVisLab/dlb-dynamicdr-refined/bil/bil_timing.c: In function ‘BIL_Timing_print’:
/home/ctrtemp/Documents/PkuVisLab/dlb-dynamicdr-refined/bil/bil_timing.c:146:15: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 8 has type ‘int64_t’ {aka ‘long int’} [-Wformat=]
146 | "BIL_STATS:%d:MaxOpen:%lf:AvgOpen:%lf:MaxRead:%lf:AvgRead:%lf:"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
......
150 | avg_io_time, total_bytes_read,
| ~~~~~~~~~~~~~~~~
| |
| int64_t {aka long int}
/home/ctrtemp/Documents/PkuVisLab/dlb-dynamicdr-refined/bil/bil_timing.c:147:25: note: format string is defined here
147 | "Bytes:%lld:Bandwidth:%lf:MaxComm:%lf:AvgComm:%lf:MaxComp:%lf:"
| ~~~^
| |
| long long int
| %ld
[ 50%] Linking C static library ../libbil.a
[ 50%] Built target bil
Consolidate compiler generated dependencies of target partition
[ 52%] Building CXX object partition/CMakeFiles/partition.dir/partition.cpp.o
[ 55%] Linking CXX static library ../libpartition.a
[ 55%] Built target partition
Consolidate compiler generated dependencies of target testpartition
[ 57%] Building CXX object partition/CMakeFiles/testpartition.dir/testpartition.cpp.o
[ 60%] Linking CXX executable ../testpartition
[ 60%] Built target testpartition
Consolidate compiler generated dependencies of target dlb
[ 63%] Building CXX object src/CMakeFiles/dlb.dir/dlb.cc.o
[ 65%] Building CXX object src/CMakeFiles/dlb.dir/geoparti.cc.o
[ 68%] Building CXX object src/CMakeFiles/dlb.dir/graphparti.cc.o
[ 71%] Building CXX object src/CMakeFiles/dlb.dir/app.cpp.o
/home/ctrtemp/Documents/PkuVisLab/dlb-dynamicdr-refined/src/app.cpp: In member function ‘void CApp::stat()’:
/home/ctrtemp/Documents/PkuVisLab/dlb-dynamicdr-refined/src/app.cpp:918:47: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘int’ [-Wformat=]
918 | fprintf(stderr, "max_summary_workload=\t%ld\n", _max_workload);
| ~~^ ~~~~~~~~~~~~~
| | |
| | int
| long int
| %d
[ 73%] Building CXX object src/CMakeFiles/dlb.dir/job.pb.cc.o
[ 76%] Building CXX object src/CMakeFiles/dlb.dir/config.pb.cc.o
[ 78%] Linking CXX static library ../libdlb.a
[ 84%] Built target dlb
Consolidate compiler generated dependencies of target pnek
[ 86%] Building CXX object apps/nek/CMakeFiles/pnek.dir/tracer.cpp.o
[ 89%] Building CXX object apps/nek/CMakeFiles/pnek.dir/main.cpp.o
[ 92%] Linking CXX executable ../../pnek
[ 92%] Built target pnek
[ 94%] Building CXX object apps/isabel3d/CMakeFiles/pisabel3d.dir/tracer.cpp.o
[ 97%] Building CXX object apps/isabel3d/CMakeFiles/pisabel3d.dir/main.cpp.o
[100%] Linking CXX executable ../../pisabel3d
[100%] Built target pisabel3d
成功编译!!!!!!
完结撒花!!!!