NOAA-GFDL / MOM6-examples

Example configurations for MOM6 and SIS2
Other
87 stars 148 forks source link

netcdf-fortran problem (libnetcdfd.so) problem #379

Closed Parag0206 closed 1 year ago

Parag0206 commented 1 year ago

I am having problem while compiling MOM6 and SIS2. When giving the make command, it returns the following error:

/home/mom6/spack/opt/spack/linux-centos7-cascadelake/gcc-9.1.0/netcdf-fortran-4.6.0-s5xysbzq4hhly5ddfqoghs7l232bfxmw/lib/libnetcdff.so: undefined reference to `nc_def_var_zstandard'
/home/mom6/spack/opt/spack/linux-centos7-cascadelake/gcc-9.1.0/netcdf-fortran-4.6.0-s5xysbzq4hhly5ddfqoghs7l232bfxmw/lib/libnetcdff.so: undefined reference to `nc_def_var_quantize'
/home/mom6/spack/opt/spack/linux-centos7-cascadelake/gcc-9.1.0/netcdf-fortran-4.6.0-s5xysbzq4hhly5ddfqoghs7l232bfxmw/lib/libnetcdff.so: undefined reference to `nc_inq_var_quantize'
/home/mom6/spack/opt/spack/linux-centos7-cascadelake/gcc-9.1.0/netcdf-fortran-4.6.0-s5xysbzq4hhly5ddfqoghs7l232bfxmw/lib/libnetcdff.so: undefined reference to `nc_inq_var_zstandard'
collect2: error: ld returned 1 exit status

I have tried different gcc versions but still the problem persists. Has any one any idea about this

I am using CentOs 7

marshallward commented 1 year ago

This is a linking issue, you may need to include the netCDF C library (-lnetcdf).

I will close this issue since it's not related to development, but please follow up on the MOM6 forums if you are having any other issues.

https://bb.cgd.ucar.edu/cesm/forums/mom6.148/