I am following the tutorial at Compiling WRF step-by-step.
However, WRF still fails to install, with the error below:
There doesn't seem to be any other errors on the steps prior to installing WRF itself.
From a web search, it seems that this is a problem with HDF5 (Cannot find nc_set_var_chunk_cache_ints & nc_def_var_chunking_ints · Issue #2096 · Unidata/netcdf-c), which is supported by
but I am unsure about how to proceed.
I have written a couple scripts to take care of all the dependencies automatically.
The script I used to install the dependencies is install-wrf-deps-debian.sh, and its execution log is install-wrf-deps-debian.log
The script I used to test the installed libraries is test-libraries-wrf-debian.sh, and its execution log is test-libraries-wrf-debian.log
The script I used to configure and install WRF itself is install-wrf-debian.sh, and its execution log is install-wrf-debian.log
Some details about my system:
root@localhost:/# uname -a
Linux localhost 6.1.0-17-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.69-1 (2023-12-30) x86_64 GNU/Linux
root@localhost:/# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 9.3.0-22' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-qDpJlL/gcc-9-9.3.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-mutex
Thread model: posix
gcc version 9.3.0 (Debian 9.3.0-22)
root@localhost:/# gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 9.3.0-22' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-qDpJlL/gcc-9-9.3.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-mutex
Thread model: posix
gcc version 9.3.0 (Debian 9.3.0-22)
However, WRF still fails to install, with the error below:
Code:
/usr/bin/ld: /wrf/Build_WRF/LIBRARIES/netcdf/lib/libnetcdff.a(nf_nc4.o): in function `nf_def_var_chunking_':
nf_nc4.f90:(.text+0x5fee): undefined reference to `nc_def_var_chunking_ints'
/usr/bin/ld: /wrf/Build_WRF/LIBRARIES/netcdf/lib/libnetcdff.a(nf_nc4.o): in function `nf_inq_var_chunking_':
nf_nc4.f90:(.text+0x6325): undefined reference to `nc_inq_var_chunking_ints'
/usr/bin/ld: /wrf/Build_WRF/LIBRARIES/netcdf/lib/libnetcdff.a(nf_nc4.o): in function `nf_set_chunk_cache_':
nf_nc4.f90:(.text+0x6d8f): undefined reference to `nc_set_chunk_cache_ints'
/usr/bin/ld: /wrf/Build_WRF/LIBRARIES/netcdf/lib/libnetcdff.a(nf_nc4.o): in function `nf_get_chunk_cache_':
nf_nc4.f90:(.text+0x6dc8): undefined reference to `nc_get_chunk_cache_ints'
/usr/bin/ld: /wrf/Build_WRF/LIBRARIES/netcdf/lib/libnetcdff.a(nf_nc4.o): in function `nf_set_var_chunk_cache_':
nf_nc4.f90:(.text+0x6e5c): undefined reference to `nc_set_var_chunk_cache_ints'
/usr/bin/ld: /wrf/Build_WRF/LIBRARIES/netcdf/lib/libnetcdff.a(nf_nc4.o): in function `nf_get_var_chunk_cache_':
nf_nc4.f90:(.text+0x6eb7): undefined reference to `nc_get_var_chunk_cache_ints'
collect2: error: ld returned 1 exit status
make[1]: [Makefile:29: em_ideal] Error 1 (ignored)
There doesn't seem to be any other errors on the steps prior to installing WRF itself.
From a web search, it seems that this is a problem with HDF5 (Cannot find nc_set_var_chunk_cache_ints & nc_def_var_chunking_ints · Issue #2096 · Unidata/netcdf-c), which is supported by
Code:
Will use NETCDF in dir: /wrf/Build_WRF/LIBRARIES/netcdf
HDF5 not set in environment. Will configure WRF for use without.
PHDF5 not set in environment. Will configure WRF for use without.
but I am unsure about how to proceed.
I have written a couple scripts to take care of all the dependencies automatically.
The script I used to install the dependencies is install-wrf-deps-debian.sh, and its execution log is install-wrf-deps-debian.log
The script I used to test the installed libraries is test-libraries-wrf-debian.sh, and its execution log is test-libraries-wrf-debian.log
The script I used to configure and install WRF itself is install-wrf-debian.sh, and its execution log is install-wrf-debian.log
Some details about my system:
root@localhost:/# uname -a
Linux localhost 6.1.0-17-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.69-1 (2023-12-30) x86_64 GNU/Linux
root@localhost:/# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 9.3.0-22' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-qDpJlL/gcc-9-9.3.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-mutex
Thread model: posix
gcc version 9.3.0 (Debian 9.3.0-22)
root@localhost:/# gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 9.3.0-22' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-qDpJlL/gcc-9-9.3.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-mutex
Thread model: posix
gcc version 9.3.0 (Debian 9.3.0-22)