① 问题如下:
[ 65%] Linking C executable ../bin/grib_to_netcdf
CMakeFiles/grib_to_netcdf.dir/grib_to_netcdf.c.o:在函数‘define_netcdf_dimensions’中:
/public2/users/lwang1/MetOffice/build/eccodes-2.26.0-Source/tools/grib_to_netcdf.c:3074:对‘nc_def_var_chunking’未定义的引用
/public2/users/lwang1/MetOffice/build/eccodes-2.26.0-Source/tools/grib_to_netcdf.c:3078:对‘nc_def_var_deflate’未定义的引用
make[2]: *** [bin/grib_to_netcdf] 错误 1
make[1]: *** [tools/CMakeFiles/grib_to_netcdf.dir/all] 错误 2
make: *** [all] 错误 2
problem with ecCodes make
是在intel服务器上运行的
本人非计算机类学生,不理解是什么意思。查了类似的问题,但是不懂怎么改Cmakelists.txt文件
② 这是我的环境变量设置:
export HDF5=/public2/software/hdf5/hdf5-1.8.11-intel
export NETCDF=/public2/software/netcdf/netcdf-intel
export PATH=$NETCDF/bin:$HDF5/bin:$PATH
export LD_LIBRARY_PATH=$NETCDF/lib:$HDF5/lib:$LD_LIBRARY_PATHexport LDFLAGS=-L$/public2/software/zlib/zlib-1.2.7-intel/lib
export CPPFLAGS=-I$/public2/software/zlib/zlib-1.2.7-intel/includeexport JASPERLIB=/public2/software/jasper/jasper-1.900.1-intel/lib
export JASPERINC=/public2/software/jasper/jasper-1.900.1-intel/include/jasperexport PATH=/public2/software/png/libpng-1.6.37-intel/bin:$PATH
export LD_LIBRARY_PATH=/public2/software/png/libpng-1.6.37-intel/lib:$LD_LIBRARY_PATH
export png_REQUIRES="libpng"
export LD_LIBRARY_PATH=/public2/users/wenxh/download/pixman-0.40.0:$LD_LIBRARY_PATH
③ 这是代码运行后它自己显示的内容:hecking cmake3 ...
Building ecCodes ...
-- ecbuild 3.6.5 /public2/users/lwang1/MetOffice/build/eccodes-2.26.0-Source/cmake
-- cmake 3.17.5 /usr/bin/cmake3
-- ---------------------------------------------------------
-- ---------------------------------------------------------
-- ---------------------------------------------------------
-- [eccodes] (2.26.0)
-- Feature TESTS enabled
-- Operating system=Linux-3.10.0-1160.62.1.el7.x86_64 (64 bits)
-- Feature PRODUCT_GRIB enabled
-- Feature PRODUCT_BUFR enabled
-- Feature EXAMPLES enabled
-- Feature BUILD_TOOLS enabled
-- Feature JPG enabled
-- Feature JPG_LIBJASPER enabled
-- Feature JPG_LIBOPENJPEG enabled
-- FindNetCDF defines targets:
-- - NetCDF::NetCDF_C [/public2/software/netcdf/netcdf-intel/lib/libnetcdf.a]
-- eccodes FOUND NetCDF (found version "4.4.1.1")
-- Found package NetCDF required for feature NETCDF
-- Feature NETCDF enabled
-- Feature AEC enabled
-- Feature FORTRAN enabled
-- Feature INSTALL_ECCODES_DEFINITIONS enabled
-- Feature INSTALL_ECCODES_SAMPLES enabled
-- Could NOT find OpenJPEG (missing: OPENJPEG_LIBRARY OPENJPEG_INCLUDE_DIR)
-- HAVE_JPEG=1
-- HAVE_LIBJASPER=1
-- HAVE_LIBOPENJPEG=0
-- CMAKE_THREAD_LIBS_INIT=-lpthread
-- CMAKE_USE_PTHREADS_INIT=1
-- HAVE_ECCODES_THREADS=0
-- POSIX THREADS = 0
-- OpenMP THREADS= 0
-- pkg-config file to be created during build: eccodes.pc
-- pkg-config file to be created during build: eccodes_f90.pc
-- ---------------------------------------------------------
-- Project eccodes summary
-- ---------------------------------------------------------
-- CMath
-- libs : [/usr/lib64/libm.so]
-- Jasper 1.900.1
-- libs : [/usr/lib64/libjasper.so;/usr/lib64/libjpeg.so]
-- ---------------------------------------------------------
-- Build summary
-- ---------------------------------------------------------
-- system : [wxh_server] [Linux-3.10.0-1160.62.1.el7.x86_64] [linux.64]
-- processor : [x86_64]
-- endiness : Little Endian -- IEEE [1]
-- build type : [RelWithDebInfo]
-- timestamp : [20230920222505]
-- install prefix : [/public2/users/lwang1/MetOffice/install/eccodes]
-- bin dir : [/public2/users/lwang1/MetOffice/install/eccodes/bin]
-- lib dir : [/public2/users/lwang1/MetOffice/install/eccodes/lib64]
-- include dir : [/public2/users/lwang1/MetOffice/install/eccodes/include]
-- data dir : [/public2/users/lwang1/MetOffice/install/eccodes/share/eccodes]
-- cmake dir : [/public2/users/lwang1/MetOffice/install/eccodes/lib64/cmake/eccodes]
-- ---------------------------------------------------------
-- C -- Intel 20.2.1.20201112
-- compiler : /public2/software/oneapi/compiler/2021.1.1/linux/bin/intel64/icc
-- flags : -O2 -g -DNDEBUG
-- link flags :
-- Fortran -- Intel 20.2.1.20201112
-- compiler : /public2/software/oneapi/compiler/2021.1.1/linux/bin/intel64/ifort
-- flags : -O2 -g -DNDEBUG -heap-arrays 32
-- link flags :
-- linker : /opt/rh/devtoolset-8/root/usr/bin/ld
-- ar : /opt/rh/devtoolset-8/root/usr/bin/ar
-- ranlib : /opt/rh/devtoolset-8/root/usr/bin/ranlib
-- link flags
-- executable [-L$/public2/software/zlib/zlib-1.2.7-intel/lib -Wl,--disable-new-dtags ]
-- shared lib [-L$/public2/software/zlib/zlib-1.2.7-intel/lib -Wl,--disable-new-dtags ]
-- static lib [-L$/public2/software/zlib/zlib-1.2.7-intel/lib -Wl,--disable-new-dtags ]
-- install rpath : $ORIGIN/../lib64
-- common definitions: HAVE_ECCODES_CONFIG_H
-- ---------------------------------------------------------
-- Feature summary
-- ---------------------------------------------------------
-- The following features have been enabled:* TESTS, eccodes: Enable the unit tests
* PRODUCT_GRIB, eccodes: Support for the product GRIB
* PRODUCT_BUFR, eccodes: Support for the product BUFR
* EXAMPLES, eccodes: Build the examples
* BUILD_TOOLS, eccodes: Build the command line tools
* JPG, eccodes: Support for JPG decoding/encoding
* JPG_LIBJASPER, eccodes: Support for JPG decoding/encoding with the Jasper library
* JPG_LIBOPENJPEG, eccodes: Support for JPG decoding/encoding with the OpenJPEG library
* NETCDF, eccodes: Support for GRIB to NetCDF conversion
* AEC, eccodes: Support for Adaptive Entropy Coding
* FORTRAN, eccodes: Build the ecCodes Fortran interface
* INSTALL_ECCODES_DEFINITIONS, eccodes: Install the ecCodes definitions
* INSTALL_ECCODES_SAMPLES, eccodes: Install the ecCodes samples, including IFS samples-- The following OPTIONAL packages have been found:
* Git
* NetCDF
* AEC, eccodes: Support for Adaptive Entropy Coding
* PythonInterp, Python interpreter, <http://python.org>
* CMath
* JPEG
* Jasper
* Perl-- The following REQUIRED packages have been found:
* ecbuild (required version >= 3.4)
* Threads-- The following features have been disabled:
* PNG, eccodes: Support for PNG decoding/encoding
* PYTHON2, eccodes: Build the ecCodes Python2 interface (deprecated)
* MEMFS, eccodes: Memory based access to definitions/samples
* MEMORY_MANAGEMENT, eccodes: Enable memory management
* ALIGN_MEMORY, eccodes: Enable memory alignment
* TIMER, eccodes: Enable timer
* ECCODES_THREADS, eccodes: Enable POSIX threads
* ECCODES_OMP_THREADS, eccodes: Enable OpenMP threads
* EXTRA_TESTS, eccodes: Enable extended regression testing-- The following OPTIONAL packages have not been found:
* NumPy
* OpenJPEG--
-- +--------------------------+
-- | ecCodes version 2.26.0 |
-- +--------------------------+
--
-- +--------------------------------------+
-- | Please note: |
-- | For Python3 support, first install |
-- | ecCodes and then install the Python |
-- | bindings from PyPI with: |
-- | $ pip3 install eccodes |
-- +--------------------------------------+