Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

Compilation fails because has undefined references to HDF5 related symbols.

This post was from a previous version of the WRF&MPAS-A Support Forum. New replies have been disabled and if you have follow up questions related to this post, then please start a new thread from the forum home page.


New member

I am working on installing WRF 4.2 on a Linux HPC. I am having trouble compiling because during the portion where diffwrf io_netcdf is being built, something is not linked correctly and I get the following error:
/project/ssmith_uksr/WRF_ARW/netcdf/lib/ undefined reference to `H5Pset_dxpl_mpio'
/project/ssmith_uksr/WRF_ARW/netcdf/lib/ undefined reference to `H5Pset_fapl_mpio'
/project/ssmith_uksr/WRF_ARW/netcdf/lib/ undefined reference to `H5Pset_all_coll_metadata_ops'
/project/ssmith_uksr/WRF_ARW/netcdf/lib/ undefined reference to `H5Pset_coll_metadata_write'
make[2]: [diffwrf] Error 1 (ignored)

I have NetCDF 4.6.3 and NetCDF-Fortran 4.4.5 together in one folder pointed to by $NETCDF, and I also have HDF5 1.10.5 and pnetcdf 1.11.1 installed and loaded. I have attached my configure.wrf and my script I wrote to set my environment variables before running.

To narrow things down, I went back to the compilation tutorial here ( and one of the commands triggers the same errors. If I run
mpiifort 02_fortran+c+netcdf+mpi_f.o 02_fortran+c+netcdf+mpi_c.o      -L${NETCDF}/lib -lnetcdff -lnetcdf
, I get the same errors as the code box up top. If I load PHDF5 instead of HDF5, this runs just fine.

I have HDF5 installed and pointed to by $HDF5. I tried to change this to point to my PHDF5 install, but when I did that my configure script failed:
************************** W A R N I N G ************************************
NETCDF4 IO features are requested, but this installation of NetCDF           
DOES NOT support these IO features.                                          

Please make sure NETCDF version is 4.1.3 or later and was built with         

I would appreciate any assistance in figuring out why this is happening and how to fix it.


  • configure.wrf
    23.3 KB · Views: 50
  • setenv.txt
    281 bytes · Views: 66
Seems like posting on this forum is a good rubber duck learning process for me. On my system, there were two versions of HDF5 with very similar names. One was compiled with the Intel toolchain (opt/ohpc/pub/libs/intel/hdf5/1.10.5) , and one was built with the intel compiler toolchain and the impi MPI stack (/opt/ohpc/pub/libs/intel/impi/hdf5/1.10.5). I was able to fix this problem by setting my $HDF5 environment variable to to the second one. The path to the PHDF5 directory (/opt/ohpc/pub/moduledeps/intel-impi/phdf5/1.10.5) was a total red herring.