error message running pyroms examples(yellow sea)

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
LeaF_7
Posts: 21
Joined: Tue Aug 12, 2014 8:32 pm
Location: Institute of Marine Research

error message running pyroms examples(yellow sea)

#1 Unread post by LeaF_7 »

Hi,

I think I compiled pyroms correctly, as I import all three modules in ipython, no error messages come out. But when I trying to run the Yellow Sea examples(make_YELLOW_grd_v1.py), the error message showed and I am not quite sure what happened.

Can anyone give some advice?

Thanks a lot!

Code: Select all

Traceback (most recent call last):
  File "make_YELLOW_grd_v1.py", line 31, in <module>
    hgrd = pyroms.grid.Gridgen(lonp, latp, beta, (Mm+3, Lm+3), proj=map)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyroms/hgrid.py", line 1111, in __init__
    self._libgridgen.gridgen_generategrid2.restype = ctypes.POINTER(GRIDNODES)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 378, in __getattr__
    func = self.__getitem__(name)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 383, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: dlsym(0x7ff244190130, gridgen_generategrid2): symbol not found
Exception AttributeError: 'dlsym(0x7ff244190130, gridnodes_destroy): symbol not found' in <bound method Gridgen.__del__ of <pyroms.hgrid.Gridgen object at 0x10fbd9f90>> ignored

fagundesmo
Posts: 51
Joined: Wed Dec 03, 2014 1:46 am
Location: University of Georgia

Re: error message running pyroms examples(yellow sea)

#2 Unread post by fagundesmo »

Hi,

I have been struggling to install successfully pyroms, may you help how to install correctly under ubuntu 14.10 (64 bits)??

Thank you in advance,

Matheus

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: error message running pyroms examples(yellow sea)

#3 Unread post by kate »

Matheus - There was a discussion about this here.

LeaF - I can confirm your findings, plus:

Code: Select all

In [14]: import pyroms
scrip.so not found. Remapping function will not be available

In [15]: import pyroms_toolbox

In [16]: from bathy_smoother import *
lpsolve55.so not found.
Linear programming method will not be available.
Sigh. All these bits are compiled C/Fortran code we're trying to load in.

The libgridgen.so file that was built is missing the generategrid2 function. Going to the pyroms/external/gridgen directory, there's a warning in the configure script about not building that routine in some circumstances. I reran configure as run before (you can check the top of config.log to see how it was run) and did not get the warning. Doing "make clean", "make lib", "make shlib" produced files with that generategrid2 function. Doing "sudo make install" put libgridgen.so into /usr/local/lib. I then had to copy it into /usr/local/lib/python2.7/dist-packages/pyroms.

My husband moved my scrip.so from that pyroms directory to the one above and now it gets found too. You may or may not need to put that dist-packages or site-packages directory into your PYTHONPATH (I didn't, but if you install it somewhere else, you will).

fagundesmo
Posts: 51
Joined: Wed Dec 03, 2014 1:46 am
Location: University of Georgia

Re: error message running pyroms examples(yellow sea)

#4 Unread post by fagundesmo »

Hi Kate,

I have been trying to use Octant and pygridgen unsuccessfully, though. Since, I am newer regarding ROMS and making grid to ROMS I am looking for something that I could start with using python. Considering, I have seen many posts related to pyroms and you have helped a lot everybody with pyroms (specially newer users) I decided to try it again (Pyroms was the first I tried to install and run).
As a result, following the link you gave to me I have tried to install it again but it seems scrip is not installing correctly.

This is the error I got:


/usr/local/lib/python2.7/dist-packages/pyroms/io.py:87: UserWarning: netCDF[3/4] not found -- using pupynere.
warnings.warn('netCDF[3/4] not found -- using pupynere.')
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/pyroms/__init__.py", line 15, in <module>
import grid
File "/usr/local/lib/python2.7/dist-packages/pyroms/grid.py", line 11, in <module>
import netCDF3 as netCDF
ImportError: No module named netCDF3
installing scrip...
make: nc-config: Command not found
make: nc-config: Command not found
gfortran -g -fdefault-real-8 -ffixed-form -O2 -fPIC kinds_mod.o constants.o iounits.o netcdf.o grids.o remap_vars.o remap_distwgt.o remap_conserv.o remap_bilinear.o remap_bicubic.o timers.o remap_write.o scrip.o -I/include -o ./scrip
netcdf.o: In function `__netcdf_mod_MOD_netcdf_error_handler':
/home/fagundes/pyroms/pyroms/external/scrip/source/./netcdf.f:67: undefined reference to `nf_strerror_'
grids.o: In function `__grids_MOD_grid_init':
/home/fagundes/pyroms/pyroms/external/scrip/source/./grids.f:213: undefined reference to `nf_open_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./grids.f:216: undefined reference to `nf_open_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./grids.f:219: undefined reference to `nf_inq_dimid_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./grids.f:221: undefined reference to `nf_inq_dimlen_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./grids.f:224: undefined reference to `nf_inq_dimid_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./grids.f:226: undefined reference to `nf_inq_dimlen_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./grids.f:229: undefined reference to `nf_inq_dimid_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./grids.f:231: undefined reference to `nf_inq_dimlen_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./grids.f:234: undefined reference to `nf_inq_dimid_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./grids.f:236: undefined reference to `nf_inq_dimlen_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./grids.f:239: undefined reference to `nf_inq_dimid_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./grids.f:241: undefined reference to `nf_inq_dimlen_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./grids.f:244: undefined reference to `nf_inq_dimid_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./grids.f:246: undefined reference to `nf_inq_dimlen_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./grids.f:253: undefined reference to `nf_get_att_text_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./grids.f:257: undefined reference to `nf_get_att_text_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./grids.f:285: undefined reference to `nf_inq_varid_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./grids.f:287: undefined reference to `nf_inq_varid_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./grids.f:290: undefined reference to `nf_inq_varid_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./grids.f:293: undefined reference to `nf_inq_varid_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./grids.f:296: undefined reference to `nf_inq_varid_'
grids.o:/home/fagundes/pyroms/pyroms/external/scrip/source/./grids.f:299: more undefined references to `nf_inq_varid_' follow
grids.o: In function `__grids_MOD_grid_init':
/home/fagundes/pyroms/pyroms/external/scrip/source/./grids.f:302: undefined reference to `nf_get_var_int_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./grids.f:305: undefined reference to `nf_get_var_int_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./grids.f:309: undefined reference to `nf_get_var_double_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./grids.f:313: undefined reference to `nf_get_var_double_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./grids.f:317: undefined reference to `nf_get_var_double_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./grids.f:321: undefined reference to `nf_get_var_double_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./grids.f:326: undefined reference to `nf_inq_varid_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./grids.f:329: undefined reference to `nf_get_var_double_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./grids.f:351: undefined reference to `nf_get_att_text_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./grids.f:373: undefined reference to `nf_get_att_text_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./grids.f:393: undefined reference to `nf_close_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./grids.f:404: undefined reference to `nf_inq_varid_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./grids.f:406: undefined reference to `nf_inq_varid_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./grids.f:409: undefined reference to `nf_inq_varid_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./grids.f:412: undefined reference to `nf_inq_varid_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./grids.f:415: undefined reference to `nf_inq_varid_'
grids.o:/home/fagundes/pyroms/pyroms/external/scrip/source/./grids.f:418: more undefined references to `nf_inq_varid_' follow
grids.o: In function `__grids_MOD_grid_init':
/home/fagundes/pyroms/pyroms/external/scrip/source/./grids.f:421: undefined reference to `nf_get_var_int_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./grids.f:424: undefined reference to `nf_get_var_int_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./grids.f:428: undefined reference to `nf_get_var_double_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./grids.f:432: undefined reference to `nf_get_var_double_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./grids.f:436: undefined reference to `nf_get_var_double_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./grids.f:440: undefined reference to `nf_get_var_double_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./grids.f:445: undefined reference to `nf_inq_varid_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./grids.f:448: undefined reference to `nf_get_var_double_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./grids.f:470: undefined reference to `nf_get_att_text_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./grids.f:492: undefined reference to `nf_get_att_text_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./grids.f:512: undefined reference to `nf_close_'
remap_write.o: In function `__remap_write_MOD_write_remap_csm':
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:882: undefined reference to `nf_create_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:889: undefined reference to `nf_put_att_text_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:896: undefined reference to `nf_put_att_text_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:903: undefined reference to `nf_put_att_text_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:910: undefined reference to `nf_put_att_text_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:918: undefined reference to `nf_put_att_text_'
remap_write.o:/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:934: more undefined references to `nf_put_att_text_' follow
remap_write.o: In function `__remap_write_MOD_write_remap_csm':
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:959: undefined reference to `nf_def_dim_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:962: undefined reference to `nf_def_dim_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:977: undefined reference to `nf_def_dim_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:980: undefined reference to `nf_def_dim_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:996: undefined reference to `nf_def_dim_'
remap_write.o:/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:1000: more undefined references to `nf_def_dim_' follow
remap_write.o: In function `__remap_write_MOD_write_remap_csm':
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:1075: undefined reference to `nf_def_var_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:1079: undefined reference to `nf_def_var_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:1094: undefined reference to `nf_def_var_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:1099: undefined reference to `nf_def_var_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:1108: undefined reference to `nf_def_var_'
remap_write.o:/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:1113: more undefined references to `nf_def_var_' follow
remap_write.o: In function `__remap_write_MOD_write_remap_csm':
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:1162: undefined reference to `nf_put_att_text_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:1166: undefined reference to `nf_put_att_text_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:1170: undefined reference to `nf_put_att_text_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:1174: undefined reference to `nf_put_att_text_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:1178: undefined reference to `nf_put_att_text_'
remap_write.o:/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:1182: more undefined references to `nf_put_att_text_' follow
remap_write.o: In function `__remap_write_MOD_write_remap_csm':
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:1198: undefined reference to `nf_def_var_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:1202: undefined reference to `nf_put_att_text_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:1206: undefined reference to `nf_def_var_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:1210: undefined reference to `nf_put_att_text_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:1219: undefined reference to `nf_def_var_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:1223: undefined reference to `nf_put_att_text_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:1228: undefined reference to `nf_def_var_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:1232: undefined reference to `nf_put_att_text_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:1241: undefined reference to `nf_def_var_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:1245: undefined reference to `nf_put_att_text_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:1250: undefined reference to `nf_def_var_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:1254: undefined reference to `nf_put_att_text_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:1263: undefined reference to `nf_def_var_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:1268: undefined reference to `nf_def_var_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:1273: undefined reference to `nf_def_var_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:1282: undefined reference to `nf_def_var_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:1290: undefined reference to `nf_enddef_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:1367: undefined reference to `nf_put_var_int_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:1370: undefined reference to `nf_put_var_int_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:1374: undefined reference to `nf_put_var_int_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:1378: undefined reference to `nf_put_var_int_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:1395: undefined reference to `nf_put_var_double_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:1398: undefined reference to `nf_put_var_double_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:1401: undefined reference to `nf_put_var_double_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:1404: undefined reference to `nf_put_var_double_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:1419: undefined reference to `nf_put_var_double_'
remap_write.o:/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:1422: more undefined references to `nf_put_var_double_' follow
remap_write.o: In function `__remap_write_MOD_write_remap_csm':
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:1492: undefined reference to `nf_put_var_int_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:1496: undefined reference to `nf_put_var_int_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:1510: undefined reference to `nf_put_var_double_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:1513: undefined reference to `nf_put_var_double_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:1519: undefined reference to `nf_close_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:1465: undefined reference to `nf_put_var_int_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:1469: undefined reference to `nf_put_var_int_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:1483: undefined reference to `nf_put_var_double_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:1486: undefined reference to `nf_put_var_double_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:1501: undefined reference to `nf_put_var_double_'
remap_write.o: In function `__remap_write_MOD_write_remap_scrip':
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:266: undefined reference to `nf_create_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:273: undefined reference to `nf_put_att_text_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:280: undefined reference to `nf_put_att_text_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:287: undefined reference to `nf_put_att_text_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:294: undefined reference to `nf_put_att_text_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:302: undefined reference to `nf_put_att_text_'
remap_write.o:/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:318: more undefined references to `nf_put_att_text_' follow
remap_write.o: In function `__remap_write_MOD_write_remap_scrip':
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:344: undefined reference to `nf_def_dim_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:348: undefined reference to `nf_def_dim_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:364: undefined reference to `nf_def_dim_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:368: undefined reference to `nf_def_dim_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:384: undefined reference to `nf_def_dim_'
remap_write.o:/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:388: more undefined references to `nf_def_dim_' follow
remap_write.o: In function `__remap_write_MOD_write_remap_scrip':
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:414: undefined reference to `nf_def_var_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:418: undefined reference to `nf_def_var_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:433: undefined reference to `nf_def_var_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:438: undefined reference to `nf_def_var_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:447: undefined reference to `nf_def_var_'
remap_write.o:/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:452: more undefined references to `nf_def_var_' follow
remap_write.o: In function `__remap_write_MOD_write_remap_scrip':
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:498: undefined reference to `nf_put_att_text_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:502: undefined reference to `nf_put_att_text_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:506: undefined reference to `nf_put_att_text_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:510: undefined reference to `nf_put_att_text_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:514: undefined reference to `nf_put_att_text_'
remap_write.o:/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:518: more undefined references to `nf_put_att_text_' follow
remap_write.o: In function `__remap_write_MOD_write_remap_scrip':
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:534: undefined reference to `nf_def_var_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:538: undefined reference to `nf_put_att_text_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:542: undefined reference to `nf_def_var_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:546: undefined reference to `nf_put_att_text_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:555: undefined reference to `nf_def_var_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:559: undefined reference to `nf_put_att_text_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:564: undefined reference to `nf_def_var_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:568: undefined reference to `nf_put_att_text_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:577: undefined reference to `nf_def_var_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:581: undefined reference to `nf_put_att_text_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:586: undefined reference to `nf_def_var_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:590: undefined reference to `nf_put_att_text_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:599: undefined reference to `nf_def_var_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:604: undefined reference to `nf_def_var_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:612: undefined reference to `nf_def_var_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:619: undefined reference to `nf_enddef_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:695: undefined reference to `nf_put_var_int_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:698: undefined reference to `nf_put_var_int_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:702: undefined reference to `nf_put_var_int_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:706: undefined reference to `nf_put_var_int_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:723: undefined reference to `nf_put_var_double_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:726: undefined reference to `nf_put_var_double_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:729: undefined reference to `nf_put_var_double_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:732: undefined reference to `nf_put_var_double_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:747: undefined reference to `nf_put_var_double_'
remap_write.o:/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:750: more undefined references to `nf_put_var_double_' follow
remap_write.o: In function `__remap_write_MOD_write_remap_scrip':
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:805: undefined reference to `nf_put_var_int_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:809: undefined reference to `nf_put_var_int_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:813: undefined reference to `nf_put_var_double_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:817: undefined reference to `nf_close_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:793: undefined reference to `nf_put_var_int_'
/home/fagundes/pyroms/pyroms/external/scrip/source/./remap_write.f:797: undefined reference to `nf_put_var_int_'
collect2: error: ld returned 1 exit status
makefile:73: recipe for target 'scrip' failed
make: *** [scrip] Error 1
make: Nothing to be done for 'f2py'.
/bin/cp ./scrip /usr/local/bin
/bin/cp: cannot stat ‘./scrip’: No such file or directory
makefile:153: recipe for target 'install' failed
make: *** [install] Error 1
cp: missing destination file operand after ‘scrip.so’
Try 'cp --help' for more information.


Do you have any idea what it is going on?

Thanks a lot,

Matheus


p.s: It seems this same problem showed up to the link you attached to me but I could not figure it out by myself the error even though I followed through all the steps.

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: error message running pyroms examples(yellow sea)

#5 Unread post by kate »

It looks like you are missing netcdf. Did you install it? nc-config is not on your path - it is looking for that. You should also check to see if "nc-config --flibs" gives a reasonable reply. If not, edit the makefile to use nf-config instead.

fagundesmo
Posts: 51
Joined: Wed Dec 03, 2014 1:46 am
Location: University of Georgia

Re: error message running pyroms examples(yellow sea)

#6 Unread post by fagundesmo »

kate wrote:It looks like you are missing netcdf. Did you install it? nc-config is not on your path - it is looking for that. You should also check to see if "nc-config --flibs" gives a reasonable reply. If not, edit the makefile to use nf-config instead.

It is strange because I did install all libs needed to run ROMS such as, HDF5, netCDF4, Jasper and so on. When I typed nc-config --flibs my terminal showed me nothing but when I typed nc-config --libs it showed me:

-L/home/fagundes/libsmodels/lib -lnetcdf


"nc-config --flibs" and "nc-config --libs" are the same, aren't they? Besides, nc-config is in my .bashrc I exported a path to my libs' bin after I installed them. Also, Is there any problem if I built szip,zlib,HDF5, and netCDF4 using Intel Compiler?


I have just added this into LIB:

COMP = f90
FLAGS = -O3 -64 -r10000 -I/usr/local/include
#FLAGS = -g
LIB = -lnetcdf nc-config --libs
INCL =
SRCDIR = ../source
EXEDIR = .
OBJ = \
kinds_mod.o \
constants.o \
iounits.o \
netcdf.o

However, it still not working. Am I missing something?

Thank you

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: error message running pyroms examples(yellow sea)

#7 Unread post by kate »

Did you also install the netcdf-fortran package? --flibs refers to the fortran libraries while --libs refers to the C libraries. They are different.

What you added into LIBS has the wrong syntax, sorry.

fagundesmo
Posts: 51
Joined: Wed Dec 03, 2014 1:46 am
Location: University of Georgia

Re: error message running pyroms examples(yellow sea)

#8 Unread post by fagundesmo »

kate wrote:Did you also install the netcdf-fortran package? --flibs refers to the fortran libraries while --libs refers to the C libraries. They are different.

What you added into LIBS has the wrong syntax, sorry.


Hi Kate again,

I have set my NC_CONFIG (now at this time I think correctly):


NC_CONFIG= "/home/fagundes/libsmodels/bin/nc-config"

COMP = f90
FLAGS = -O3 -64 -r10000 -I/usr/local/include
#FLAGS = -g
LIB = -lnetcdff -lnetcdf

But, it showed me the same error:


/usr/local/lib/python2.7/dist-packages/pyroms/io.py:87: UserWarning: netCDF[3/4] not found -- using pupynere.
warnings.warn('netCDF[3/4] not found -- using pupynere.')
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/pyroms/__init__.py", line 15, in <module>
import grid
File "/usr/local/lib/python2.7/dist-packages/pyroms/grid.py", line 11, in <module>
import netCDF3 as netCDF
ImportError: No module named netCDF3
installing scrip...
make: nc-config: Command not found
make: nc-config: Command not found
gfortran -g -fdefault-real-8 -ffixed-form -O2 -fPIC kinds_mod.o constants.o iounits.o netcdf.o grids.o remap_vars.o remap_distwgt.o remap_conserv.o remap_bilinear.o remap_bicubic.o timers.o remap_write.o scrip.o -I/include -o ./scrip
netcdf.o: In function `__netcdf_mod_MOD_netcdf_error_handler':

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: error message running pyroms examples(yellow sea)

#9 Unread post by kate »

In addition to netcdf and netcdf-fortran from Unidata, there is also a Python interface to it called Netcdf4. I think that's what it's looking for there.

katsutou
Posts: 1
Joined: Sat Mar 20, 2010 2:09 am
Location: RIAM, Kyushu University

Re: error message running pyroms examples(yellow sea)

#10 Unread post by katsutou »

fagundesmo wrote:
kate wrote:It looks like you are missing netcdf. Did you install it? nc-config is not on your path - it is looking for that. You should also check to see if "nc-config --flibs" gives a reasonable reply. If not, edit the makefile to use nf-config instead.

It is strange because I did install all libs needed to run ROMS such as, HDF5, netCDF4, Jasper and so on. When I typed nc-config --flibs my terminal showed me nothing but when I typed nc-config --libs it showed me:

-L/home/fagundes/libsmodels/lib -lnetcdf


"nc-config --flibs" and "nc-config --libs" are the same, aren't they? Besides, nc-config is in my .bashrc I exported a path to my libs' bin after I installed them. Also, Is there any problem if I built szip,zlib,HDF5, and netCDF4 using Intel Compiler?


I have just added this into LIB:

COMP = f90
FLAGS = -O3 -64 -r10000 -I/usr/local/include
#FLAGS = -g
LIB = -lnetcdf nc-config --libs
INCL =
SRCDIR = ../source
EXEDIR = .
OBJ = \
kinds_mod.o \
constants.o \
iounits.o \
netcdf.o

However, it still not working. Am I missing something?

Thank you
Hi,

I've encountered the same problem when compiling under ubuntu but discussions here helped me a lot to resolve the issue.

I had to modify NC_CONFIG=nc-config into NC_CONFIG=nf-config in pyroms/pyroms/external/scrip/source/makefile because the setting of NC_CONFIG in pyroms/install_pyroms.sh, specified as nf-config by default, is not reflected to the makefile.

For the case of ubuntu environment, "nc-config --flibs" does not seem to work properly and matches with the situation that Kate has mentioned.

Post Reply