xlong@ncsu_edu
Member
Hi,I have some NETCDF issue when porting CESM1_2_2_1 to new machine.The new machine use module to manage the software.The NETCDF-C and NETCDF-FORTRAN are installed on different locations.The admin told me I only need to load the fortran module because the fortran one depends on the C one.This is netcdf-fortran module:
- Homepage: http://www.unidata.ucar.edu/software/netcdf/]])whatis("Description: NetCDF (network Common Data Form) is a set of software libraries and machine-independent data formats that support the creation, access, and sharing of array-oriented scientific data.")whatis("Homepage: http://www.unidata.ucar.edu/software/netcdf/")conflict("data/netCDF-Fortran")load("data/netCDF/4.6.2-intel-2018.5.274")prepend_path("CPATH","/opt/apps/software/data/netCDF-Fortran/4.4.5-intel-2018.5.274/include")prepend_path("LD_LIBRARY_PATH","/opt/apps/software/data/netCDF-Fortran/4.4.5-intel-2018.5.274/lib")prepend_path("LIBRARY_PATH","/opt/apps/software/data/netCDF-Fortran/4.4.5-intel-2018.5.274/lib")prepend_path("MANPATH","/opt/apps/software/data/netCDF-Fortran/4.4.5-intel-2018.5.274/share/man")prepend_path("PATH","/opt/apps/software/data/netCDF-Fortran/4.4.5-intel-2018.5.274/bin")prepend_path("PKG_CONFIG_PATH","/opt/apps/software/data/netCDF-Fortran/4.4.5-intel-2018.5.274/lib/pkgconfig")setenv("EBROOTNETCDFMINFORTRAN","/opt/apps/software/data/netCDF-Fortran/4.4.5-intel-2018.5.274")setenv("EBVERSIONNETCDFMINFORTRAN","4.4.5") setenv("EBDEVELNETCDFMINFORTRAN","/opt/apps/software/data/netCDF-Fortran/4.4.5-intel-2018.5.274/easybuild/data-netCDF-Fortran-4.4.5-intel-2018.5.274-easybuild-devel")
I built the model after loading the modules,I got error when compiling pio,WARNING: did not find netcdf fortran library
So I add one line in the env_mach_specific:setenv NETCDF /opt/apps/software/data/netCDF-Fortran/4.4.5-intel-2018.5.274 but it still has another error:-- Could NOT find NETCDF (missing: NETCDF_INCLUDE_DIR) Even with this warning, the pio build is completed, but it is stuck at building the csm_share. home/xlong/cesm1_2_2_1/models/drv/shr/seq_io_mod.F90(1170): error #6404: This name does not have a type, and must have an explicit type. [PIO_UNLIMITED] rcode = pio_def_dim(cpl_io_file,'time',PIO_UNLIMITED,dimid(1)) I guess all the errors are due to that the netcdf lib is not set correctly? Could anyone give some suggestion how to link the netcdf C and fortran library, and also let the model know the location of include files?
- Homepage: http://www.unidata.ucar.edu/software/netcdf/]])whatis("Description: NetCDF (network Common Data Form) is a set of software libraries and machine-independent data formats that support the creation, access, and sharing of array-oriented scientific data.")whatis("Homepage: http://www.unidata.ucar.edu/software/netcdf/")conflict("data/netCDF-Fortran")load("data/netCDF/4.6.2-intel-2018.5.274")prepend_path("CPATH","/opt/apps/software/data/netCDF-Fortran/4.4.5-intel-2018.5.274/include")prepend_path("LD_LIBRARY_PATH","/opt/apps/software/data/netCDF-Fortran/4.4.5-intel-2018.5.274/lib")prepend_path("LIBRARY_PATH","/opt/apps/software/data/netCDF-Fortran/4.4.5-intel-2018.5.274/lib")prepend_path("MANPATH","/opt/apps/software/data/netCDF-Fortran/4.4.5-intel-2018.5.274/share/man")prepend_path("PATH","/opt/apps/software/data/netCDF-Fortran/4.4.5-intel-2018.5.274/bin")prepend_path("PKG_CONFIG_PATH","/opt/apps/software/data/netCDF-Fortran/4.4.5-intel-2018.5.274/lib/pkgconfig")setenv("EBROOTNETCDFMINFORTRAN","/opt/apps/software/data/netCDF-Fortran/4.4.5-intel-2018.5.274")setenv("EBVERSIONNETCDFMINFORTRAN","4.4.5") setenv("EBDEVELNETCDFMINFORTRAN","/opt/apps/software/data/netCDF-Fortran/4.4.5-intel-2018.5.274/easybuild/data-netCDF-Fortran-4.4.5-intel-2018.5.274-easybuild-devel")
I built the model after loading the modules,I got error when compiling pio,WARNING: did not find netcdf fortran library
So I add one line in the env_mach_specific:setenv NETCDF /opt/apps/software/data/netCDF-Fortran/4.4.5-intel-2018.5.274 but it still has another error:-- Could NOT find NETCDF (missing: NETCDF_INCLUDE_DIR) Even with this warning, the pio build is completed, but it is stuck at building the csm_share. home/xlong/cesm1_2_2_1/models/drv/shr/seq_io_mod.F90(1170): error #6404: This name does not have a type, and must have an explicit type. [PIO_UNLIMITED] rcode = pio_def_dim(cpl_io_file,'time',PIO_UNLIMITED,dimid(1)) I guess all the errors are due to that the netcdf lib is not set correctly? Could anyone give some suggestion how to link the netcdf C and fortran library, and also let the model know the location of include files?