Problem with test case Upwelling - build.bash (solved)

Discussion on computers, ROMS installation and compiling

Moderators: arango, robertson

Post Reply
Message
Author
chaos4u2

Problem with test case Upwelling - build.bash (solved)

#1 Unread post by chaos4u2 »

Hello, I'm I new user of Linux and ROMS. I'm trying to install ROMS and run the test case Upwelling.

I've downloaded ROMS and installed the netcdf-4.1.3. The installation of netcdf was successful.

I've modified the build.bash archive as it says in the tutorial. The only thing that I doubt is using gfortran or ifort. I've tried both things and it doesn't work none. I've downloaded and installed ifort from intel page.

When executing build.bash, I think that it says that the file lnetcdf is missing in -L/home/sergi/local/lib where I installed the netcdf-4.1.3.

Here I leave what it says the terminal where the mistake starts, thank you for your help:

/usr/bin/gfortran -frepack-arrays -g -fbounds-check /home/sergi/Projects/upwelling/Build/esmf_roms.o /home/sergi/Projects/upwelling/Build/master.o /home/sergi/Projects/upwelling/Build/ocean_control.o /home/sergi/Projects/upwelling/Build/ocean_coupler.o /home/sergi/Projects/upwelling/Build/propagator.o /home/sergi/Projects/upwelling/Build/roms_export.o /home/sergi/Projects/upwelling/Build/roms_import.o -o /home/sergi/Projects/upwelling/oceanG /home/sergi/Projects/upwelling/Build/libUTIL.a /home/sergi/Projects/upwelling/Build/libNLM.a /home/sergi/Projects/upwelling/Build/libNLM_bio.a /home/sergi/Projects/upwelling/Build/libNLM_sed.a /home/sergi/Projects/upwelling/Build/libANA.a /home/sergi/Projects/upwelling/Build/libUTIL.a /home/sergi/Projects/upwelling/Build/libMODS.a -L/home/sergi/local/lib -lnetcdf
/home/sergi/Projects/upwelling/Build/libUTIL.a(close_io.o): In function `close_out_':
/home/sergi/Projects/upwelling/Build/close_io.f90:170: undefined reference to `__netcdf_MOD_nf90_strerror'
/home/sergi/Projects/upwelling/Build/close_io.f90:172: undefined reference to `__netcdf_MOD_nf90_strerror'
/home/sergi/Projects/upwelling/Build/libUTIL.a(lbc.o): In function `lbc_getatt_':
/home/sergi/Projects/upwelling/Build/lbc.f90:85: undefined reference to `__netcdf_MOD_nf90_get_att_text'
/home/sergi/Projects/upwelling/Build/libUTIL.a(lbc.o): In function `lbc_putatt_':
/home/sergi/Projects/upwelling/Build/lbc.f90:424: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/sergi/Projects/upwelling/Build/libUTIL.a(nf_fwrite2d.o): In function `__nf_fwrite2d_mod_MOD_nf_fwrite2d':
/home/sergi/Projects/upwelling/Build/nf_fwrite2d.f90:143: undefined reference to `__netcdf_MOD_nf90_put_var_1d_eightbytereal'
/home/sergi/Projects/upwelling/Build/libUTIL.a(nf_fwrite3d.o): In function `__nf_fwrite3d_mod_MOD_nf_fwrite3d':
/home/sergi/Projects/upwelling/Build/nf_fwrite3d.f90:155: undefined reference to `__netcdf_MOD_nf90_put_var_1d_eightbytereal'
/home/sergi/Projects/upwelling/Build/libUTIL.a(def_dim.o): In function `def_dim_':
/home/sergi/Projects/upwelling/Build/def_dim.f90:56: undefined reference to `__netcdf_MOD_nf90_def_dim'
/home/sergi/Projects/upwelling/Build/libUTIL.a(def_info.o): In function `def_info_':
/home/sergi/Projects/upwelling/Build/def_info.f90:157: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/sergi/Projects/upwelling/Build/def_info.f90:169: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/sergi/Projects/upwelling/Build/def_info.f90:183: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/sergi/Projects/upwelling/Build/def_info.f90:232: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/sergi/Projects/upwelling/Build/def_info.f90:244: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/sergi/Projects/upwelling/Build/libUTIL.a(def_info.o):/home/sergi/Projects/upwelling/Build/def_info.f90:253: more undefined references to `__netcdf_MOD_nf90_put_att_text' follow
/home/sergi/Projects/upwelling/Build/libUTIL.a(def_var.o): In function `__def_var_mod_MOD_def_var':
/home/sergi/Projects/upwelling/Build/def_var.f90:113: undefined reference to `__netcdf_MOD_nf90_def_var_scalar'
/home/sergi/Projects/upwelling/Build/def_var.f90:116: undefined reference to `__netcdf_MOD_nf90_def_var_manydims'
/home/sergi/Projects/upwelling/Build/def_var.f90:133: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/sergi/Projects/upwelling/Build/def_var.f90:150: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/sergi/Projects/upwelling/Build/def_var.f90:168: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/sergi/Projects/upwelling/Build/def_var.f90:186: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/sergi/Projects/upwelling/Build/def_var.f90:204: undefined reference to `__netcdf_MOD_nf90_put_att_one_fourbyteint'
/home/sergi/Projects/upwelling/Build/def_var.f90:207: undefined reference to `__netcdf_MOD_nf90_put_att_one_fourbytereal'
/home/sergi/Projects/upwelling/Build/def_var.f90:210: undefined reference to `__netcdf_MOD_nf90_put_att_one_eightbytereal'
/home/sergi/Projects/upwelling/Build/def_var.f90:230: undefined reference to `__netcdf_MOD_nf90_put_att_one_fourbyteint'
/home/sergi/Projects/upwelling/Build/def_var.f90:233: undefined reference to `__netcdf_MOD_nf90_put_att_one_fourbytereal'
/home/sergi/Projects/upwelling/Build/def_var.f90:236: undefined reference to `__netcdf_MOD_nf90_put_att_one_eightbytereal'
/home/sergi/Projects/upwelling/Build/def_var.f90:258: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/sergi/Projects/upwelling/Build/def_var.f90:263: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/sergi/Projects/upwelling/Build/def_var.f90:289: undefined reference to `__netcdf_MOD_nf90_put_att_fourbyteint'
/home/sergi/Projects/upwelling/Build/def_var.f90:292: undefined reference to `__netcdf_MOD_nf90_put_att_fourbytereal'
/home/sergi/Projects/upwelling/Build/def_var.f90:295: undefined reference to `__netcdf_MOD_nf90_put_att_eightbytereal'
/home/sergi/Projects/upwelling/Build/def_var.f90:301: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/sergi/Projects/upwelling/Build/def_var.f90:325: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/sergi/Projects/upwelling/Build/def_var.f90:342: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/sergi/Projects/upwelling/Build/def_var.f90:359: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/sergi/Projects/upwelling/Build/def_var.f90:376: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/sergi/Projects/upwelling/Build/libUTIL.a(def_var.o):/home/sergi/Projects/upwelling/Build/def_var.f90:393: more undefined references to `__netcdf_MOD_nf90_put_att_text' follow
/home/sergi/Projects/upwelling/Build/libUTIL.a(def_var.o): In function `__def_var_mod_MOD_def_var':
/home/sergi/Projects/upwelling/Build/def_var.f90:428: undefined reference to `__netcdf_MOD_nf90_put_att_one_fourbyteint'
/home/sergi/Projects/upwelling/Build/def_var.f90:431: undefined reference to `__netcdf_MOD_nf90_put_att_one_fourbytereal'
/home/sergi/Projects/upwelling/Build/def_var.f90:434: undefined reference to `__netcdf_MOD_nf90_put_att_one_eightbytereal'
/home/sergi/Projects/upwelling/Build/def_var.f90:454: undefined reference to `__netcdf_MOD_nf90_put_att_one_fourbyteint'
/home/sergi/Projects/upwelling/Build/def_var.f90:457: undefined reference to `__netcdf_MOD_nf90_put_att_one_fourbytereal'
/home/sergi/Projects/upwelling/Build/def_var.f90:460: undefined reference to `__netcdf_MOD_nf90_put_att_one_eightbytereal'
/home/sergi/Projects/upwelling/Build/def_var.f90:480: undefined reference to `__netcdf_MOD_nf90_put_att_one_fourbyteint'
/home/sergi/Projects/upwelling/Build/def_var.f90:483: undefined reference to `__netcdf_MOD_nf90_put_att_one_fourbytereal'
/home/sergi/Projects/upwelling/Build/def_var.f90:486: undefined reference to `__netcdf_MOD_nf90_put_att_one_eightbytereal'
/home/sergi/Projects/upwelling/Build/def_var.f90:505: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/sergi/Projects/upwelling/Build/def_var.f90:522: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/sergi/Projects/upwelling/Build/def_var.f90:597: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/sergi/Projects/upwelling/Build/def_var.f90:615: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/sergi/Projects/upwelling/Build/def_var.f90:632: undefined reference to `__netcdf_MOD_nf90_put_att_text'
/home/sergi/Projects/upwelling/Build/libUTIL.a(nf_fread2d.o): In function `__nf_fread2d_mod_MOD_nf_fread2d':
/home/sergi/Projects/upwelling/Build/nf_fread2d.f90:213: undefined reference to `__netcdf_MOD_nf90_get_var_1d_eightbytereal'
/home/sergi/Projects/upwelling/Build/libUTIL.a(nf_fread3d.o): In function `__nf_fread3d_mod_MOD_nf_fread3d':
/home/sergi/Projects/upwelling/Build/nf_fread3d.f90:200: undefined reference to `__netcdf_MOD_nf90_get_var_1d_eightbytereal'
/home/sergi/Projects/upwelling/Build/libUTIL.a(nf_fread4d.o): In function `__nf_fread4d_mod_MOD_nf_fread4d':
/home/sergi/Projects/upwelling/Build/nf_fread4d.f90:203: undefined reference to `__netcdf_MOD_nf90_get_var_1d_eightbytereal'
/home/sergi/Projects/upwelling/Build/libMODS.a(mod_netcdf.o): In function `__mod_netcdf_MOD_netcdf_sync':
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:4502: undefined reference to `__netcdf_MOD_nf90_sync'
/home/sergi/Projects/upwelling/Build/libMODS.a(mod_netcdf.o): In function `__mod_netcdf_MOD_netcdf_redef':
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:4448: undefined reference to `__netcdf_MOD_nf90_redef'
/home/sergi/Projects/upwelling/Build/libMODS.a(mod_netcdf.o): In function `__mod_netcdf_MOD_netcdf_open':
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:4392: undefined reference to `__netcdf_MOD_nf90_open'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:4394: undefined reference to `__netcdf_MOD_nf90_open'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:4396: undefined reference to `__netcdf_MOD_nf90_open'
/home/sergi/Projects/upwelling/Build/libMODS.a(mod_netcdf.o): In function `__mod_netcdf_MOD_netcdf_enddef':
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:4335: undefined reference to `__netcdf_MOD_nf90_enddef'
/home/sergi/Projects/upwelling/Build/libMODS.a(mod_netcdf.o): In function `__mod_netcdf_MOD_netcdf_create':
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:4283: undefined reference to `__netcdf_MOD_nf90_create'
/home/sergi/Projects/upwelling/Build/libMODS.a(mod_netcdf.o): In function `__mod_netcdf_MOD_netcdf_close':
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:4217: undefined reference to `__netcdf_MOD_nf90_get_att_text'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:4225: undefined reference to `__netcdf_MOD_nf90_close'
/home/sergi/Projects/upwelling/Build/libMODS.a(mod_netcdf.o): In function `__mod_netcdf_MOD_netcdf_put_svar_1d':
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:4126: undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:4144: undefined reference to `__netcdf_MOD_nf90_put_var_1d_text'
/home/sergi/Projects/upwelling/Build/libMODS.a(mod_netcdf.o): In function `__mod_netcdf_MOD_netcdf_put_svar_0d':
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:4019: undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:4035: undefined reference to `__netcdf_MOD_nf90_put_var_text'
/home/sergi/Projects/upwelling/Build/libMODS.a(mod_netcdf.o): In function `__mod_netcdf_MOD_netcdf_put_lvar_2d':
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:3901: undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:3928: undefined reference to `__netcdf_MOD_nf90_put_var_2d_fourbyteint'
/home/sergi/Projects/upwelling/Build/libMODS.a(mod_netcdf.o): In function `__mod_netcdf_MOD_netcdf_put_lvar_1d':
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:3782: undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:3807: undefined reference to `__netcdf_MOD_nf90_put_var_1d_fourbyteint'
/home/sergi/Projects/upwelling/Build/libMODS.a(mod_netcdf.o): In function `__mod_netcdf_MOD_netcdf_put_lvar_0d':
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:3660: undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:3684: undefined reference to `__netcdf_MOD_nf90_put_var_fourbyteint'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:3687: undefined reference to `__netcdf_MOD_nf90_put_var_1d_fourbyteint'
/home/sergi/Projects/upwelling/Build/libMODS.a(mod_netcdf.o): In function `__mod_netcdf_MOD_netcdf_put_ivar_2d':
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:3551: undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:3565: undefined reference to `__netcdf_MOD_nf90_put_var_2d_fourbyteint'
/home/sergi/Projects/upwelling/Build/libMODS.a(mod_netcdf.o): In function `__mod_netcdf_MOD_netcdf_put_ivar_1d':
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:3447: undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:3461: undefined reference to `__netcdf_MOD_nf90_put_var_1d_fourbyteint'
/home/sergi/Projects/upwelling/Build/libMODS.a(mod_netcdf.o): In function `__mod_netcdf_MOD_netcdf_put_ivar_0d':
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:3338: undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:3353: undefined reference to `__netcdf_MOD_nf90_put_var_fourbyteint'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:3356: undefined reference to `__netcdf_MOD_nf90_put_var_1d_fourbyteint'
/home/sergi/Projects/upwelling/Build/libMODS.a(mod_netcdf.o): In function `__mod_netcdf_MOD_netcdf_put_fvar_4d':
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:3233: undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:3247: undefined reference to `__netcdf_MOD_nf90_put_var_4d_eightbytereal'
/home/sergi/Projects/upwelling/Build/libMODS.a(mod_netcdf.o): In function `__mod_netcdf_MOD_netcdf_put_fvar_3d':
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:3129: undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:3143: undefined reference to `__netcdf_MOD_nf90_put_var_3d_eightbytereal'
/home/sergi/Projects/upwelling/Build/libMODS.a(mod_netcdf.o): In function `__mod_netcdf_MOD_netcdf_put_fvar_2d':
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:3025: undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:3039: undefined reference to `__netcdf_MOD_nf90_put_var_2d_eightbytereal'
/home/sergi/Projects/upwelling/Build/libMODS.a(mod_netcdf.o): In function `__mod_netcdf_MOD_netcdf_put_fvar_1d':
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:2921: undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:2935: undefined reference to `__netcdf_MOD_nf90_put_var_1d_eightbytereal'
/home/sergi/Projects/upwelling/Build/libMODS.a(mod_netcdf.o): In function `__mod_netcdf_MOD_netcdf_put_fvar_0d':
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:2812: undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:2827: undefined reference to `__netcdf_MOD_nf90_put_var_eightbytereal'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:2830: undefined reference to `__netcdf_MOD_nf90_put_var_1d_eightbytereal'
/home/sergi/Projects/upwelling/Build/libMODS.a(mod_netcdf.o): In function `__mod_netcdf_MOD_netcdf_get_svar_1d':
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:2710: undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:2713: undefined reference to `__netcdf_MOD_nf90_get_var_1d_text'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:2715: undefined reference to `__netcdf_MOD_nf90_get_var_1d_text'
/home/sergi/Projects/upwelling/Build/libMODS.a(mod_netcdf.o): In function `__mod_netcdf_MOD_netcdf_get_svar_0d':
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:2608: undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:2611: undefined reference to `__netcdf_MOD_nf90_get_var_text'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:2613: undefined reference to `__netcdf_MOD_nf90_get_var_text'
/home/sergi/Projects/upwelling/Build/libMODS.a(mod_netcdf.o): In function `__mod_netcdf_MOD_netcdf_get_ivar_2d':
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:2507: undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:2510: undefined reference to `__netcdf_MOD_nf90_get_var_2d_fourbyteint'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:2512: undefined reference to `__netcdf_MOD_nf90_get_var_2d_fourbyteint'
/home/sergi/Projects/upwelling/Build/libMODS.a(mod_netcdf.o): In function `__mod_netcdf_MOD_netcdf_get_ivar_1d':
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:2404: undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:2407: undefined reference to `__netcdf_MOD_nf90_get_var_1d_fourbyteint'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:2409: undefined reference to `__netcdf_MOD_nf90_get_var_1d_fourbyteint'
/home/sergi/Projects/upwelling/Build/libMODS.a(mod_netcdf.o): In function `__mod_netcdf_MOD_netcdf_get_ivar_0d':
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:2301: undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:2304: undefined reference to `__netcdf_MOD_nf90_get_var_1d_fourbyteint'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:2307: undefined reference to `__netcdf_MOD_nf90_get_var_fourbyteint'
/home/sergi/Projects/upwelling/Build/libMODS.a(mod_netcdf.o): In function `__mod_netcdf_MOD_netcdf_get_lvar_1d':
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:2162: undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:2165: undefined reference to `__netcdf_MOD_nf90_inquire_variable'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:2169: undefined reference to `__netcdf_MOD_nf90_get_var_1d_fourbyteint'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:2171: undefined reference to `__netcdf_MOD_nf90_get_var_1d_fourbyteint'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:2184: undefined reference to `__netcdf_MOD_nf90_get_var_1d_text'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:2186: undefined reference to `__netcdf_MOD_nf90_get_var_1d_text'
/home/sergi/Projects/upwelling/Build/libMODS.a(mod_netcdf.o): In function `__mod_netcdf_MOD_netcdf_get_lvar_0d':
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:2022: undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:2025: undefined reference to `__netcdf_MOD_nf90_inquire_variable'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:2029: undefined reference to `__netcdf_MOD_nf90_get_var_1d_fourbyteint'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:2032: undefined reference to `__netcdf_MOD_nf90_get_var_fourbyteint'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:2043: undefined reference to `__netcdf_MOD_nf90_get_var_text'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:2045: undefined reference to `__netcdf_MOD_nf90_get_var_text'
/home/sergi/Projects/upwelling/Build/libMODS.a(mod_netcdf.o): In function `__mod_netcdf_MOD_netcdf_get_fvar_4d':
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:1857: undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:1860: undefined reference to `__netcdf_MOD_nf90_get_var_4d_eightbytereal'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:1862: undefined reference to `__netcdf_MOD_nf90_get_var_4d_eightbytereal'
/home/sergi/Projects/upwelling/Build/libMODS.a(mod_netcdf.o): In function `__mod_netcdf_MOD_netcdf_get_fvar_3d':
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:1678: undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:1681: undefined reference to `__netcdf_MOD_nf90_get_var_3d_eightbytereal'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:1683: undefined reference to `__netcdf_MOD_nf90_get_var_3d_eightbytereal'
/home/sergi/Projects/upwelling/Build/libMODS.a(mod_netcdf.o): In function `__mod_netcdf_MOD_netcdf_get_fvar_2d':
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:1504: undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:1507: undefined reference to `__netcdf_MOD_nf90_get_var_2d_eightbytereal'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:1509: undefined reference to `__netcdf_MOD_nf90_get_var_2d_eightbytereal'
/home/sergi/Projects/upwelling/Build/libMODS.a(mod_netcdf.o): In function `__mod_netcdf_MOD_netcdf_get_fvar_1d':
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:1330: undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:1333: undefined reference to `__netcdf_MOD_nf90_get_var_1d_eightbytereal'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:1335: undefined reference to `__netcdf_MOD_nf90_get_var_1d_eightbytereal'
/home/sergi/Projects/upwelling/Build/libMODS.a(mod_netcdf.o): In function `__mod_netcdf_MOD_netcdf_get_fvar_0d':
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:1197: undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:1200: undefined reference to `__netcdf_MOD_nf90_get_var_1d_eightbytereal'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:1203: undefined reference to `__netcdf_MOD_nf90_get_var_eightbytereal'
/home/sergi/Projects/upwelling/Build/libMODS.a(mod_netcdf.o): In function `__mod_netcdf_MOD_netcdf_get_fatt':
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:1067: undefined reference to `__netcdf_MOD_nf90_inquire_variable'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:1070: undefined reference to `__netcdf_MOD_nf90_inq_attname'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:1075: undefined reference to `__netcdf_MOD_nf90_get_att_one_eightbytereal'
/home/sergi/Projects/upwelling/Build/libMODS.a(mod_netcdf.o): In function `__mod_netcdf_MOD_netcdf_inq_varid':
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:982: undefined reference to `__netcdf_MOD_nf90_inq_varid'
/home/sergi/Projects/upwelling/Build/libMODS.a(mod_netcdf.o): In function `__mod_netcdf_MOD_netcdf_inq_var':
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:706: undefined reference to `__netcdf_MOD_nf90_inquire'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:718: undefined reference to `__netcdf_MOD_nf90_inquire_variable'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:722: undefined reference to `__netcdf_MOD_nf90_inq_attname'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:810: undefined reference to `__netcdf_MOD_nf90_inquire_dimension'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:821: undefined reference to `__netcdf_MOD_nf90_inq_attname'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:826: undefined reference to `__netcdf_MOD_nf90_inquire_attribute'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:832: undefined reference to `__netcdf_MOD_nf90_get_att_one_fourbyteint'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:848: undefined reference to `__netcdf_MOD_nf90_get_att_one_eightbytereal'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:862: undefined reference to `__netcdf_MOD_nf90_get_att_text'
/home/sergi/Projects/upwelling/Build/libMODS.a(mod_netcdf.o): In function `__mod_netcdf_MOD_netcdf_get_dim':
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:212: undefined reference to `__netcdf_MOD_nf90_inquire'
/home/sergi/Projects/upwelling/Build/mod_netcdf.f90:222: undefined reference to `__netcdf_MOD_nf90_inquire_dimension'
collect2: ld devolvió el estado de salida 1
make: *** [/home/sergi/Projects/upwelling/oceanG] Error 1
Last edited by chaos4u2 on Sat Nov 12, 2011 12:05 pm, edited 1 time in total.

linzhenhua
Posts: 64
Joined: Mon Oct 17, 2005 2:02 am
Location: Institute of Oceanology,Chinese Academy of Sciences

Re: Problem with test case Upwelling - build.bash

#2 Unread post by linzhenhua »

The compiler you use to compile ROMS should be the same one you use to compile netcdf.

chaos4u2

Re: Problem with test case Upwelling - build.bash

#3 Unread post by chaos4u2 »

Thanks for your help. I've tried to make sure I use the same compiler but I have the same problem. For some reason, it says that it's missing the file lnetcdf inside -L/home/sergi/local/lib as I understand from the log above.

Suppose I use gfortran instead of ifort (I've tried with ifort but I have more problems, so I think it would be easy with gfortran).

I've installed netcdf-4.1.3 with the commands:
CC=gcc FC=gfortran F77=gfortran ./configure --prefix=/home/sergi/local --disable-netcdf-4
make check install

And it said it has been installed with success.

Then I create Projects/Upwelling and I inserted the 4 files as it says the tutorials.

I've modified the build.bash file:

export MY_ROOT_DIR=/home/sergi
export MY_PROJECT_DIR=${HOME}/Projects/upwelling

export MY_ROMS_SRC=${MY_ROOT_DIR}/src
export COMPILERS=${MY_ROMS_SRC}/Compilers

#export USE_MPI=on # distributed-memory parallelism
#export USE_MPIF90=on # compile with mpif90 script
#export which_MPI=mpich # compile with MPICH library
#export which_MPI=mpich2 # compile with MPICH2 library
export which_MPI=openmpi # compile with OpenMPI library

#export FORT=ifort
export FORT=gfortran
#export FORT=pgi

export USE_MY_LIBS=on # use my library paths below

gfortran )
export NETCDF_INCDIR=/home/sergi/local/include
export NETCDF_LIBDIR=/home/sergi/local/lib

I don't know what else to do. Thanks again for your help.

linzhenhua
Posts: 64
Joined: Mon Oct 17, 2005 2:02 am
Location: Institute of Oceanology,Chinese Academy of Sciences

Re: Problem with test case Upwelling - build.bash

#4 Unread post by linzhenhua »

I'm not sure whether the following way can solve your problem.

1. if you still want to use netcdf4. edit the file Compilers/Linux-gfortran.mk

change the following line:
LIBS := -L$(NETCDF_LIBDIR) -lnetcdf
to
LIBS := -L$(NETCDF_LIBDIR) -lnetcdf -lnetcdff

then delete the Build directory and recompile ROMS.

2. use netcdf3 instead of netcdf4.

chaos4u2

Re: Problem with test case Upwelling - build.bash

#5 Unread post by chaos4u2 »

Thank you very much, I don't know how but that solved the problem. I've finally got the OceanG file.

My new problem is when I execute it I get:

./oceanG: error while loading shared libraries: libnetcdff.so.5: cannot open shared object file: No such file or directory

I've read other posts. This one: viewtopic.php?f=31&t=2336 says what to do.

To add: LD_LIBRARY_PATH=/home/sergi/local/lib
export LD_LIBRARY_PATH

This to lines to the file bashrc. My problem is that I cannot find the file. Where I need to add this 2 lines??

I'm sorry for this basic questions. Thanks again in advance.

linzhenhua
Posts: 64
Joined: Mon Oct 17, 2005 2:02 am
Location: Institute of Oceanology,Chinese Academy of Sciences

Re: Problem with test case Upwelling - build.bash

#6 Unread post by linzhenhua »

The file location is /home/sergi/.bashrc, after you edit this file, run "source /home/sergi/.bashrc" or open a new terminal window.

chaos4u2

Re: Problem with test case Upwelling - build.bash

#7 Unread post by chaos4u2 »

Thank you very much ... it worked! The thing is that I couldn't find the file bashrc because it was hidden. To modify the file I used the command mc. Then I had the mistake in the my_upwelling.log: Unable to open variable information file: ROMS/External/varinfo.dat. To solve this I modified the file ocean_upwelling.in and wrote the right folder where the file varinfo.dat was located.

dbergondo
Posts: 5
Joined: Mon May 05, 2003 6:34 pm
Location: URI - GSO

Re: Problem with test case Upwelling - build.bash (solved)

#8 Unread post by dbergondo »

This post was so helpful! I had the same problems and now the upwelling example is running.

Post Reply