Compiling error with netCDF-Fortran@4.4.5

make all-recursive
make[1]: Entering directory ‘/opt/netCDF-F_4.4.5/netcdf-fortran-4.4.5’
Making all in fortran
make[2]: Entering directory ‘/opt/netCDF-F_4.4.5/netcdf-fortran-4.4.5/fortran’
gfortran -DHAVE_CONFIG_H -I. -I… -I…/libsrc -I/opt/netCDF-C_4.7.3/netcdf-c-4.7.3/include -g -O2 -c -o module_netcdf_nc_data.o module_netcdf_nc_data.F90
gfortran -g -O2 -c -o module_netcdf_nc_interfaces.o module_netcdf_nc_interfaces.f90
gfortran -DHAVE_CONFIG_H -I. -I… -I…/libsrc -I/opt/netCDF-C_4.7.3/netcdf-c-4.7.3/include -g -O2 -c -o module_netcdf_nf_data.o module_netcdf_nf_data.F90
gfortran -DHAVE_CONFIG_H -I. -I… -I…/libsrc -I/opt/netCDF-C_4.7.3/netcdf-c-4.7.3/include -g -O2 -c -o module_netcdf_nf_interfaces.o module_netcdf_nf_interfaces.F90
gfortran -g -O2 -c -o module_netcdf_f03.o module_netcdf_f03.f90
gfortran -g -O2 -c -o module_netcdf_fortv2_c_interfaces.o module_netcdf_fortv2_c_interfaces.f90
gfortran -g -O2 -c -o module_netcdf4_nc_interfaces.o module_netcdf4_nc_interfaces.f90
gfortran -DHAVE_CONFIG_H -I. -I… -I…/libsrc -I/opt/netCDF-C_4.7.3/netcdf-c-4.7.3/include -g -O2 -c -o module_netcdf4_nf_interfaces.o module_netcdf4_nf_interfaces.F90
gfortran -g -O2 -c -o module_netcdf4_f03.o module_netcdf4_f03.f90
gfortran -g -O2 -c -o typeSizes.o typeSizes.f90
gfortran -g -O2 -c -o netcdf4.o netcdf4.f90
netcdf4_func.f90:730:75:

730 | nf90_inq_var_fill_FourByteReal = nf_inq_var_fill(ncid, varid, no_fill, fill)
| 1

740 | nf90_inq_var_fill_EightByteReal = nf_inq_var_fill(ncid, varid, no_fill, fill)
| 2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(4)/REAL(8)).

=======================================================

執行make 之後底下跳出許多類似的錯誤訊息
但不知道哪邊出了問題

======================================

附圖

同學好,

這個錯誤來自編譯器對於型別的大小的定義不一致,可以嘗試添加以下參數給 gfortran 來 ignore 這個錯誤。

-fallow-argument-mismatch

或是換用其他編譯器可能也可以避免這個問題