hetland / octant

Ocean C-grid model setup and analysis tools, for the numerical mariner.
Other
33 stars 25 forks source link

Octant alongside pygridgen? #6

Open jason-tilley opened 8 years ago

jason-tilley commented 8 years ago

I'm been having trouble getting octant installed on my system, but I did manage to get pygridgen installed. I was hoping a simple cp -r ~/src/pygridgen/external ~/src/octant might be all I need to install Octant after getting pygridgen installed. Unfortunately, this does not work. I can get octant to build, install, and import, but when I call octant.grid.Gridgen I get the following message:

/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/octant
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-    packages/octant/grid.py", line 900, in __init__
    self._libgridgen = np.ctypeslib.load_library('_gridgen', '/opt/local/lib')
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-    packages/numpy/ctypeslib.py", line 128, in load_library
    raise OSError("no file with expected extension")
OSError: no file with expected extension

This is precisely the message I had when I had problems installing pygridgen. This was fixed when I realized that building gridgen within the external directory was required. It would not work if I installed gridgen from within my source directory. But the previous fix is not working with Octant. Are the two libraries compatible? I'm tempted to uninstall pygridgen and just try Octant, but I'd hate to mess up my pygridgen installation.

jason-tilley commented 8 years ago

Got it! Had to edit grid.py as mentioned on this page...

http://stackoverflow.com/questions/31446050/python-sigsegv-when-using-ctypes-on-cygwin