-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
library for Gridgen not found. #26
Comments
I get something similar on Linux:
Hence the need for a test suite... As for libgridgen, it took some fussing, including turning off strict channels to get it to install. Maybe having a warning about it not being available was better than failing to load it. |
Hmm, interesting. I have not yet attempted to run that function so cannot verify whether this works on my Linux or Windows systems. I can merely make the following observations: Line 1045 of pyroms/pyroms/pyroms/hgrid.py is
For me the path in question is this one It's looking for libgridgen. There is no such library in this directory on my system. The only files with a name containing "gridgen" on my system are these:
There's a gridgen by the same author on GitHub and a corresponding package on Conda-Forge. So please try installing that and if it works we'll add it to the list of dependencies. Hi Kate. Your comment came through as I was typing. Test suite? Absolutely! |
Actually, Pavel Sakov recommended pygridgen to me instead. Good idea. |
There are several such substitutions that could simplify and improve PyROMS. I think we should get a test suite going before we try them. |
Hi, Thank you for all. The discussion has helped me to understand and identify the problem. I have solved it in following way as my efforts yesterday did not give any positive results. Apart from other usual steps suggested by developers, I followed following steps to reinstall the package. Step 1: (out of disappointment) Step2 step3 step 4: step 5: This solved the problem. I tested with YellowSea test that generated grid. Now I am looking into creating grid using GUI. any advise on how to invoke GUI to select domain will be useful. Cheers and thank you again for looking into this issue. Vihang Bhatt |
I'm glad you've found a solution that works for you. I think that in the long term a Conda-installed gridgen will be simpler and more robust. If gridgen is installed via Conda there's a libgridgen.so installed in the usual place, eg on my system:
This can be loaded if you supply the appropriate path:
I will try check this solution out more thoroughly and, if successful, make some changes to the code and the documentation. |
I had similar issue with grid generation. Balaji |
I have recently installed PyRoms in my computer with python 3.7 from anaconda. I am running the software on MAC OS X Kernel Version 19.0.0. I created proms environment and all libraries (libcsa, libgridgen, libgd etc) are installed in /opt/anaconda3/envs/pyroms/lib/
import proms, import bath_smoother or import proms_toolbox does not create any error. however, when I try to generate grid I get following error.
In [10]: hgrd =pyroms.grid.Gridgen(lonp,latp,beta,(Mp+3,Lp+3),proj=map)
OSError Traceback (most recent call last)
in
----> 1 hgrd =pyroms.grid.Gridgen(lonp,latp,beta,(Mp+3,Lp+3),proj=map)
~/pyroms/pyroms/pyroms/hgrid.py in init(self, xbry, ybry, beta, shape, ul_idx, focus, proj, nnodes, precision, nppe, newton, thin, checksimplepoly, verbose)
1044
1045 #self._libgridgen = np.ctypeslib.load_library('libgridgen',file)
-> 1046 self._libgridgen = np.ctypeslib.load_library('libgridgen', pyroms.path[0])
1047
1048 # In MacOSX, use of c_void_p does not return proper structure.
~/opt/anaconda3/envs/pyroms/lib/python3.7/site-packages/numpy/ctypeslib.py in load_library(libname, loader_path)
155 raise
156 ## if no successful return in the libname_ext loop:
--> 157 raise OSError("no file with expected extension")
158
159 ctypes_load_library = deprecate(load_library, 'ctypes_load_library',
OSError: no file with expected extension
can anyone suggest what need to do in order to resolve the issue?
Thanks in advance.
Vihang Bhatt
The text was updated successfully, but these errors were encountered: