make file problem
-
- Posts: 135
- Joined: Mon Jun 22, 2009 3:46 pm
- Location: Indian Institute of Tropical Meteorology, Pune, INDIA
make file problem
when i running make second time it gives me following errors.........
cd Build; /usr/bin/gfortran -c -frepack-arrays -g -fbounds-check master.f90
/usr/bin/gfortran -frepack-arrays -g -fbounds-check Build/esmf_roms.o Build/master.o Build/ocean_control.o Build/ocean_coupler.o Build/propagator.o Build/roms_export.o Build/roms_import.o -o oceanG Build/libNLM.a Build/libANA.a Build/libUTIL.a Build/libMODS.a -L/usr/local/netcdf4/lib -lnetcdf -L/usr/local/hdf5/lib -lhdf5_hl -lhdf5 -lz
Build/libUTIL.a(close_io.o): In function `close_io':
/home/mashinde/ROMS/src/Build/close_io.f90:101: undefined reference to `__netcdf_MOD_nf90_strerror'
/home/mashinde/ROMS/src/Build/close_io.f90:103: undefined reference to `__netcdf_MOD_nf90_strerror'
Build/libUTIL.a(def_dim.o): In function `def_dim':
/home/mashinde/ROMS/src/Build/def_dim.f90:56: undefined reference to `__netcdf_MOD_nf90_def_dim'
Build/libUTIL.a(def_info.o): In function `def_info':
/home/mashinde/ROMS/src/Build/def_info.f90:153: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/mashinde/ROMS/src/Build/def_info.f90:165: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/mashinde/ROMS/src/Build/def_info.f90:179: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/mashinde/ROMS/src/Build/def_info.f90:228: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/mashinde/ROMS/src/Build/def_info.f90:240: undefined reference to `__netcdf_MOD_nf90_put_att_text'
Build/libUTIL.a(def_info.o):/home/mashinde/ROMS/src/Build/def_info.f90:249: more undefined references to `__netcdf_MOD_nf90_put_att_text' follow
Build/libUTIL.a(def_var.o): In function `def_var':
/home/mashinde/ROMS/src/Build/def_var.f90:113: undefined reference to `__netcdf_MOD_nf90_def_var_scalar'
/home/mashinde/ROMS/src/Build/def_var.f90:116: undefined reference to `__netcdf_MOD_nf90_def_var_manydims'
/home/mashinde/ROMS/src/Build/def_var.f90:133: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/mashinde/ROMS/src/Build/def_var.f90:150: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/mashinde/ROMS/src/Build/def_var.f90:168: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/mashinde/ROMS/src/Build/def_var.f90:186: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/mashinde/ROMS/src/Build/def_var.f90:204: undefined reference to `__netcdf_MOD_nf90_put_att_one_fourbyteint'
/home/mashinde/ROMS/src/Build/def_var.f90:207: undefined reference to `__netcdf_MOD_nf90_put_att_one_fourbytereal'
/home/mashinde/ROMS/src/Build/def_var.f90:210: undefined reference to `__netcdf_MOD_nf90_put_att_one_eightbytereal'
/home/mashinde/ROMS/src/Build/def_var.f90:230: undefined reference to `__netcdf_MOD_nf90_put_att_one_fourbyteint'
/home/mashinde/ROMS/src/Build/def_var.f90:233: undefined reference to `__netcdf_MOD_nf90_put_att_one_fourbytereal'
/home/mashinde/ROMS/src/Build/def_var.f90:236: undefined reference to `__netcdf_MOD_nf90_put_att_one_eightbytereal'
/home/mashinde/ROMS/src/Build/def_var.f90:258: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/mashinde/ROMS/src/Build/def_var.f90:263: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/mashinde/ROMS/src/Build/def_var.f90:289: undefined reference to `__netcdf_MOD_nf90_put_att_fourbyteint'
/home/mashinde/ROMS/src/Build/def_var.f90:292: undefined reference to `__netcdf_MOD_nf90_put_att_fourbytereal'
/home/mashinde/ROMS/src/Build/def_var.f90:295: undefined reference to `__netcdf_MOD_nf90_put_att_eightbytereal'
/home/mashinde/ROMS/src/Build/def_var.f90:301: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/mashinde/ROMS/src/Build/def_var.f90:325: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/mashinde/ROMS/src/Build/def_var.f90:342: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/mashinde/ROMS/src/Build/def_var.f90:359: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/mashinde/ROMS/src/Build/def_var.f90:376: undefined reference to `__netcdf_MOD_nf90_put_att_text'
Build/libUTIL.a(def_var.o):/home/mashinde/ROMS/src/Build/def_var.f90:393: more undefined references to `__netcdf_MOD_nf90_put_att_text' follow
Build/libUTIL.a(def_var.o): In function `def_var':
/home/mashinde/ROMS/src/Build/def_var.f90:428: undefined reference to `__netcdf_MOD_nf90_put_att_one_fourbyteint'
/home/mashinde/ROMS/src/Build/def_var.f90:431: undefined reference to `__netcdf_MOD_nf90_put_att_one_fourbytereal'
/home/mashinde/ROMS/src/Build/def_var.f90:434: undefined reference to `__netcdf_MOD_nf90_put_att_one_eightbytereal'
/home/mashinde/ROMS/src/Build/def_var.f90:454: undefined reference to `__netcdf_MOD_nf90_put_att_one_fourbyteint'
/home/mashinde/ROMS/src/Build/def_var.f90:457: undefined reference to `__netcdf_MOD_nf90_put_att_one_fourbytereal'
/home/mashinde/ROMS/src/Build/def_var.f90:460: undefined reference to `__netcdf_MOD_nf90_put_att_one_eightbytereal'
/home/mashinde/ROMS/src/Build/def_var.f90:480: undefined reference to `__netcdf_MOD_nf90_put_att_one_fourbyteint'
/home/mashinde/ROMS/src/Build/def_var.f90:483: undefined reference to `__netcdf_MOD_nf90_put_att_one_fourbytereal'
/home/mashinde/ROMS/src/Build/def_var.f90:486: undefined reference to `__netcdf_MOD_nf90_put_att_one_eightbytereal'
/home/mashinde/ROMS/src/Build/def_var.f90:505: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/mashinde/ROMS/src/Build/def_var.f90:522: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/mashinde/ROMS/src/Build/def_var.f90:589: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/mashinde/ROMS/src/Build/def_var.f90:607: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/mashinde/ROMS/src/Build/def_var.f90:624: undefined reference to `__netcdf_MOD_nf90_put_att_text'
Build/libUTIL.a(nf_fread2d.o): In function `nf_fread2d':
/home/mashinde/ROMS/src/Build/nf_fread2d.f90:185: undefined reference to `__netcdf_MOD_nf90_get_var_1d_eightbytereal'
Build/libUTIL.a(nf_fread3d.o): In function `nf_fread3d':
/home/mashinde/ROMS/src/Build/nf_fread3d.f90:157: undefined reference to `__netcdf_MOD_nf90_get_var_1d_eightbytereal'
Build/libUTIL.a(nf_fread4d.o): In function `nf_fread4d':
/home/mashinde/ROMS/src/Build/nf_fread4d.f90:160: undefined reference to `__netcdf_MOD_nf90_get_var_1d_eightbytereal'
Build/libUTIL.a(nf_fwrite2d.o): In function `nf_fwrite2d':
/home/mashinde/ROMS/src/Build/nf_fwrite2d.f90:143: undefined reference to `__netcdf_MOD_nf90_put_var_1d_eightbytereal'
Build/libUTIL.a(nf_fwrite3d.o): In function `nf_fwrite3d':
/home/mashinde/ROMS/src/Build/nf_fwrite3d.f90:155: undefined reference to `__netcdf_MOD_nf90_put_var_1d_eightbytereal'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_sync':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90:4067: undefined reference to `__netcdf_MOD_nf90_sync'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_redef':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90:4013: undefined reference to `__netcdf_MOD_nf90_redef'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_open':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_open'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_open'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_open'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_enddef':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_enddef'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_create':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_create'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_close':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_get_att_text'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_close'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_put_svar_1d':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_put_var_1d_text'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_put_svar_0d':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_put_var_text'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_put_lvar_2d':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_put_var_2d_fourbyteint'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_put_lvar_1d':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_put_var_1d_fourbyteint'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_put_lvar_0d':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_put_var_fourbyteint'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_put_var_1d_fourbyteint'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_put_ivar_2d':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_put_var_2d_fourbyteint'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_put_ivar_1d':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_put_var_1d_fourbyteint'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_put_ivar_0d':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_put_var_fourbyteint'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_put_var_1d_fourbyteint'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_put_fvar_4d':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_put_var_4d_eightbytereal'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_put_fvar_3d':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_put_var_3d_eightbytereal'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_put_fvar_2d':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_put_var_2d_eightbytereal'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_put_fvar_1d':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_put_var_1d_eightbytereal'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_put_fvar_0d':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_put_var_eightbytereal'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_put_var_1d_eightbytereal'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_get_svar_1d':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_get_var_1d_text'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_get_var_1d_text'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_get_svar_0d':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_get_var_text'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_get_var_text'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_get_ivar_2d':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_get_var_2d_fourbyteint'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_get_var_2d_fourbyteint'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_get_ivar_1d':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_get_var_1d_fourbyteint'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_get_var_1d_fourbyteint'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_get_ivar_0d':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_get_var_1d_fourbyteint'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_get_var_fourbyteint'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_get_fvar_4d':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_get_var_4d_eightbytereal'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_get_var_4d_eightbytereal'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_get_fvar_3d':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_get_var_3d_eightbytereal'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_get_var_3d_eightbytereal'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_get_fvar_2d':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_get_var_2d_eightbytereal'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_get_var_2d_eightbytereal'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_get_fvar_1d':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_get_var_1d_eightbytereal'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_get_var_1d_eightbytereal'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_get_fvar_0d':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_get_var_1d_eightbytereal'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_get_var_eightbytereal'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_get_fatt':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_inquire_variable'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_inq_attname'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_get_att_one_eightbytereal'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_inq_varid':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90:986: undefined reference to `__netcdf_MOD_nf90_inq_varid'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_inq_var':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90:712: undefined reference to `__netcdf_MOD_nf90_inquire'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90:724: undefined reference to `__netcdf_MOD_nf90_inquire_variable'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90:728: undefined reference to `__netcdf_MOD_nf90_inq_attname'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90:816: undefined reference to `__netcdf_MOD_nf90_inquire_dimension'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90:827: undefined reference to `__netcdf_MOD_nf90_inq_attname'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90:832: undefined reference to `__netcdf_MOD_nf90_inquire_attribute'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90:837: undefined reference to `__netcdf_MOD_nf90_get_att_one_fourbyteint'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90:852: undefined reference to `__netcdf_MOD_nf90_get_att_one_eightbytereal'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90:866: undefined reference to `__netcdf_MOD_nf90_get_att_text'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_get_dim':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90:218: undefined reference to `__netcdf_MOD_nf90_inquire'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90:228: undefined reference to `__netcdf_MOD_nf90_inquire_dimension'
collect2: ld returned 1 exit status
make: *** [oceanG] Error 1
*************************************************+++
please help how to solve this problem
cd Build; /usr/bin/gfortran -c -frepack-arrays -g -fbounds-check master.f90
/usr/bin/gfortran -frepack-arrays -g -fbounds-check Build/esmf_roms.o Build/master.o Build/ocean_control.o Build/ocean_coupler.o Build/propagator.o Build/roms_export.o Build/roms_import.o -o oceanG Build/libNLM.a Build/libANA.a Build/libUTIL.a Build/libMODS.a -L/usr/local/netcdf4/lib -lnetcdf -L/usr/local/hdf5/lib -lhdf5_hl -lhdf5 -lz
Build/libUTIL.a(close_io.o): In function `close_io':
/home/mashinde/ROMS/src/Build/close_io.f90:101: undefined reference to `__netcdf_MOD_nf90_strerror'
/home/mashinde/ROMS/src/Build/close_io.f90:103: undefined reference to `__netcdf_MOD_nf90_strerror'
Build/libUTIL.a(def_dim.o): In function `def_dim':
/home/mashinde/ROMS/src/Build/def_dim.f90:56: undefined reference to `__netcdf_MOD_nf90_def_dim'
Build/libUTIL.a(def_info.o): In function `def_info':
/home/mashinde/ROMS/src/Build/def_info.f90:153: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/mashinde/ROMS/src/Build/def_info.f90:165: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/mashinde/ROMS/src/Build/def_info.f90:179: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/mashinde/ROMS/src/Build/def_info.f90:228: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/mashinde/ROMS/src/Build/def_info.f90:240: undefined reference to `__netcdf_MOD_nf90_put_att_text'
Build/libUTIL.a(def_info.o):/home/mashinde/ROMS/src/Build/def_info.f90:249: more undefined references to `__netcdf_MOD_nf90_put_att_text' follow
Build/libUTIL.a(def_var.o): In function `def_var':
/home/mashinde/ROMS/src/Build/def_var.f90:113: undefined reference to `__netcdf_MOD_nf90_def_var_scalar'
/home/mashinde/ROMS/src/Build/def_var.f90:116: undefined reference to `__netcdf_MOD_nf90_def_var_manydims'
/home/mashinde/ROMS/src/Build/def_var.f90:133: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/mashinde/ROMS/src/Build/def_var.f90:150: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/mashinde/ROMS/src/Build/def_var.f90:168: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/mashinde/ROMS/src/Build/def_var.f90:186: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/mashinde/ROMS/src/Build/def_var.f90:204: undefined reference to `__netcdf_MOD_nf90_put_att_one_fourbyteint'
/home/mashinde/ROMS/src/Build/def_var.f90:207: undefined reference to `__netcdf_MOD_nf90_put_att_one_fourbytereal'
/home/mashinde/ROMS/src/Build/def_var.f90:210: undefined reference to `__netcdf_MOD_nf90_put_att_one_eightbytereal'
/home/mashinde/ROMS/src/Build/def_var.f90:230: undefined reference to `__netcdf_MOD_nf90_put_att_one_fourbyteint'
/home/mashinde/ROMS/src/Build/def_var.f90:233: undefined reference to `__netcdf_MOD_nf90_put_att_one_fourbytereal'
/home/mashinde/ROMS/src/Build/def_var.f90:236: undefined reference to `__netcdf_MOD_nf90_put_att_one_eightbytereal'
/home/mashinde/ROMS/src/Build/def_var.f90:258: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/mashinde/ROMS/src/Build/def_var.f90:263: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/mashinde/ROMS/src/Build/def_var.f90:289: undefined reference to `__netcdf_MOD_nf90_put_att_fourbyteint'
/home/mashinde/ROMS/src/Build/def_var.f90:292: undefined reference to `__netcdf_MOD_nf90_put_att_fourbytereal'
/home/mashinde/ROMS/src/Build/def_var.f90:295: undefined reference to `__netcdf_MOD_nf90_put_att_eightbytereal'
/home/mashinde/ROMS/src/Build/def_var.f90:301: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/mashinde/ROMS/src/Build/def_var.f90:325: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/mashinde/ROMS/src/Build/def_var.f90:342: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/mashinde/ROMS/src/Build/def_var.f90:359: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/mashinde/ROMS/src/Build/def_var.f90:376: undefined reference to `__netcdf_MOD_nf90_put_att_text'
Build/libUTIL.a(def_var.o):/home/mashinde/ROMS/src/Build/def_var.f90:393: more undefined references to `__netcdf_MOD_nf90_put_att_text' follow
Build/libUTIL.a(def_var.o): In function `def_var':
/home/mashinde/ROMS/src/Build/def_var.f90:428: undefined reference to `__netcdf_MOD_nf90_put_att_one_fourbyteint'
/home/mashinde/ROMS/src/Build/def_var.f90:431: undefined reference to `__netcdf_MOD_nf90_put_att_one_fourbytereal'
/home/mashinde/ROMS/src/Build/def_var.f90:434: undefined reference to `__netcdf_MOD_nf90_put_att_one_eightbytereal'
/home/mashinde/ROMS/src/Build/def_var.f90:454: undefined reference to `__netcdf_MOD_nf90_put_att_one_fourbyteint'
/home/mashinde/ROMS/src/Build/def_var.f90:457: undefined reference to `__netcdf_MOD_nf90_put_att_one_fourbytereal'
/home/mashinde/ROMS/src/Build/def_var.f90:460: undefined reference to `__netcdf_MOD_nf90_put_att_one_eightbytereal'
/home/mashinde/ROMS/src/Build/def_var.f90:480: undefined reference to `__netcdf_MOD_nf90_put_att_one_fourbyteint'
/home/mashinde/ROMS/src/Build/def_var.f90:483: undefined reference to `__netcdf_MOD_nf90_put_att_one_fourbytereal'
/home/mashinde/ROMS/src/Build/def_var.f90:486: undefined reference to `__netcdf_MOD_nf90_put_att_one_eightbytereal'
/home/mashinde/ROMS/src/Build/def_var.f90:505: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/mashinde/ROMS/src/Build/def_var.f90:522: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/mashinde/ROMS/src/Build/def_var.f90:589: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/mashinde/ROMS/src/Build/def_var.f90:607: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/mashinde/ROMS/src/Build/def_var.f90:624: undefined reference to `__netcdf_MOD_nf90_put_att_text'
Build/libUTIL.a(nf_fread2d.o): In function `nf_fread2d':
/home/mashinde/ROMS/src/Build/nf_fread2d.f90:185: undefined reference to `__netcdf_MOD_nf90_get_var_1d_eightbytereal'
Build/libUTIL.a(nf_fread3d.o): In function `nf_fread3d':
/home/mashinde/ROMS/src/Build/nf_fread3d.f90:157: undefined reference to `__netcdf_MOD_nf90_get_var_1d_eightbytereal'
Build/libUTIL.a(nf_fread4d.o): In function `nf_fread4d':
/home/mashinde/ROMS/src/Build/nf_fread4d.f90:160: undefined reference to `__netcdf_MOD_nf90_get_var_1d_eightbytereal'
Build/libUTIL.a(nf_fwrite2d.o): In function `nf_fwrite2d':
/home/mashinde/ROMS/src/Build/nf_fwrite2d.f90:143: undefined reference to `__netcdf_MOD_nf90_put_var_1d_eightbytereal'
Build/libUTIL.a(nf_fwrite3d.o): In function `nf_fwrite3d':
/home/mashinde/ROMS/src/Build/nf_fwrite3d.f90:155: undefined reference to `__netcdf_MOD_nf90_put_var_1d_eightbytereal'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_sync':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90:4067: undefined reference to `__netcdf_MOD_nf90_sync'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_redef':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90:4013: undefined reference to `__netcdf_MOD_nf90_redef'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_open':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_open'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_open'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_open'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_enddef':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_enddef'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_create':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_create'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_close':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_get_att_text'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_close'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_put_svar_1d':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_put_var_1d_text'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_put_svar_0d':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_put_var_text'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_put_lvar_2d':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_put_var_2d_fourbyteint'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_put_lvar_1d':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_put_var_1d_fourbyteint'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_put_lvar_0d':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_put_var_fourbyteint'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_put_var_1d_fourbyteint'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_put_ivar_2d':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_put_var_2d_fourbyteint'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_put_ivar_1d':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_put_var_1d_fourbyteint'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_put_ivar_0d':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_put_var_fourbyteint'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_put_var_1d_fourbyteint'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_put_fvar_4d':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_put_var_4d_eightbytereal'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_put_fvar_3d':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_put_var_3d_eightbytereal'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_put_fvar_2d':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_put_var_2d_eightbytereal'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_put_fvar_1d':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_put_var_1d_eightbytereal'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_put_fvar_0d':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_put_var_eightbytereal'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_put_var_1d_eightbytereal'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_get_svar_1d':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_get_var_1d_text'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_get_var_1d_text'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_get_svar_0d':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_get_var_text'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_get_var_text'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_get_ivar_2d':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_get_var_2d_fourbyteint'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_get_var_2d_fourbyteint'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_get_ivar_1d':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_get_var_1d_fourbyteint'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_get_var_1d_fourbyteint'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_get_ivar_0d':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_get_var_1d_fourbyteint'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_get_var_fourbyteint'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_get_fvar_4d':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_get_var_4d_eightbytereal'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_get_var_4d_eightbytereal'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_get_fvar_3d':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_get_var_3d_eightbytereal'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_get_var_3d_eightbytereal'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_get_fvar_2d':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_get_var_2d_eightbytereal'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_get_var_2d_eightbytereal'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_get_fvar_1d':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_get_var_1d_eightbytereal'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_get_var_1d_eightbytereal'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_get_fvar_0d':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_get_var_1d_eightbytereal'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_get_var_eightbytereal'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_get_fatt':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_inquire_variable'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_inq_attname'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90 undefined reference to `__netcdf_MOD_nf90_get_att_one_eightbytereal'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_inq_varid':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90:986: undefined reference to `__netcdf_MOD_nf90_inq_varid'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_inq_var':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90:712: undefined reference to `__netcdf_MOD_nf90_inquire'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90:724: undefined reference to `__netcdf_MOD_nf90_inquire_variable'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90:728: undefined reference to `__netcdf_MOD_nf90_inq_attname'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90:816: undefined reference to `__netcdf_MOD_nf90_inquire_dimension'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90:827: undefined reference to `__netcdf_MOD_nf90_inq_attname'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90:832: undefined reference to `__netcdf_MOD_nf90_inquire_attribute'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90:837: undefined reference to `__netcdf_MOD_nf90_get_att_one_fourbyteint'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90:852: undefined reference to `__netcdf_MOD_nf90_get_att_one_eightbytereal'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90:866: undefined reference to `__netcdf_MOD_nf90_get_att_text'
Build/libMODS.a(mod_netcdf.o): In function `netcdf_get_dim':
/home/mashinde/ROMS/src/Build/mod_netcdf.f90:218: undefined reference to `__netcdf_MOD_nf90_inquire'
/home/mashinde/ROMS/src/Build/mod_netcdf.f90:228: undefined reference to `__netcdf_MOD_nf90_inquire_dimension'
collect2: ld returned 1 exit status
make: *** [oceanG] Error 1
*************************************************+++
please help how to solve this problem
Re: make file problem
You've got a problem linking with your netcdf library. Run something like:
to see how the result compares with what the linker is looking for:
Is it missing entirely? Is it there with different underscores? Worst case is you'll have to recompile the netcdf library and ensure that it builds the f90 component.
Code: Select all
nm libnetcdf.a | grep nf90_strerror
Code: Select all
undefined reference to `__netcdf_MOD_nf90_strerror
-
- Posts: 45
- Joined: Fri Feb 06, 2009 5:20 pm
- Location: NNSTU, The Nizhniy Novgorod State Technical University named after R.E.Alekseev, Russia
Re: make file problem
If you build netcdf with shared libraries, configure-script will include --enable-separate-fortran option automatically. When all the fortran-functions will be in libnetcdff.a(.so). You must correct {Platform}-{compiler}.mk file with next:
...
LIBS := -L{NETCDF_LIBDIR} -lnetcdff
...
ie replace -lnetcdf -lnetcdff
But the netcdf must be configured with the following options:
FC=gfortran
F77=gfortran
--enable-shared
--enable-static
--enable-f77
--enable-fortran
--enable-f90
--enable-netcdf4
--enable-netcdf-4
PS This is for future similar issues))
...
LIBS := -L{NETCDF_LIBDIR} -lnetcdff
...
ie replace -lnetcdf -lnetcdff
But the netcdf must be configured with the following options:
FC=gfortran
F77=gfortran
--enable-shared
--enable-static
--enable-f77
--enable-fortran
--enable-f90
--enable-netcdf4
--enable-netcdf-4
PS This is for future similar issues))
-
- Posts: 9
- Joined: Tue Jul 05, 2011 2:47 pm
- Location: Prooceano
Re: make file problem
hello,
fancer, I'm having the same problem, and I've made your sugestion changing the -lnetcdf by -lnetcdff.
But I don't understand what do you mean by configuring the netcdf. How can I do this?
thanks in advance,
Gabriel Carvalho
fancer, I'm having the same problem, and I've made your sugestion changing the -lnetcdf by -lnetcdff.
But I don't understand what do you mean by configuring the netcdf. How can I do this?
thanks in advance,
Gabriel Carvalho
Re: make file problem
fancer was listing all the arguments to give to the configure script when building the NetCDF library. I expect the last two mean the same thing - i.e., you only need one.
- m.hadfield
- Posts: 521
- Joined: Tue Jul 01, 2003 4:12 am
- Location: NIWA
Re: make file problem
By the way, if you're using netCDF4 (USE_NETCDF4=on) with an up-to-date copy of Rutgers ROMS, then the makefile should be able to infer the options required to link with netCDF. It does this by invoking a utility called nc-config, via the following lines in the platform-specific make file:
For this to work, you need to ensure nc-config is on the PATH, or provide its location in an environment variable called NC_CONFIG. If you do it right, quietly muttering the correct magic spells, then you don't need to know the details of how netCDF was configured and built.
Code: Select all
ifdef USE_NETCDF4
NC_CONFIG ?= nc-config
NETCDF_INCDIR ?= $(shell $(NC_CONFIG) --prefix)/include
LIBS := $(shell $(NC_CONFIG) --flibs)
else
NETCDF_INCDIR ?= /usr/local/include
NETCDF_LIBDIR ?= /usr/local/lib
LIBS := -L$(NETCDF_LIBDIR) -lnetcdf
endif
-
- Posts: 23
- Joined: Fri May 24, 2013 3:05 am
- Location: UWA
Re: make file problem
I have installed
netCDF
and netCDF-Fortran
I'm using ubuntu and gfortran compiler, so I needed to edit the file:
~.~/Trunk/Compilers/Linux-gfortran.mk
and use nf-config instead of nc-config
This was really confusing to catch, and I do not know if ROMS developers may do something in their scripts to adapt for the usage of netCDF-Fortran, which I understand is the current way netCDF is installed. Am I right?
Cheers,
Alexis Espinosa-Gayosso
UWA
netCDF
Code: Select all
:)>>>nc-config --version
netCDF 4.2.1.1
Code: Select all
:)>>>nf-config --version
netCDF-Fortran 4.2
~.~/Trunk/Compilers/Linux-gfortran.mk
and use nf-config instead of nc-config
Code: Select all
###Doesn't work NC_CONFIG ?= nc-config
NC_CONFIG ?= nf-config
Cheers,
Alexis Espinosa-Gayosso
UWA
Re: make file problem
Properly installed, both "nc-config --flibs" and "nf-config --flibs" give the same response. A few here have found that not to be the case for their installation. One could check the first and if it fails, try the second. People with Netcdf versions before Netcdf-fortran forked off would only have the first. Hernan is still trying to support Netcdf 3 from before nc-config was created.
- m.hadfield
- Posts: 521
- Joined: Tue Jul 01, 2003 4:12 am
- Location: NIWA
Re: make file problem
You don't need to edit the makefile. You can override the NC_CONFIG make variable by setting an environment variable with the same name before running make, eg:
Perhaps the make variable should now be renamed NF_CONFIG and point to nf-config by default.
Code: Select all
export NC_CONFIG=nf-config