Closed patel999jay closed 4 years ago
@patel999jay thanks for the detailed report. I'm unable to reproduce the error, as when I run the code you have in the notebook, I get correct results.
To debug further, I suggest we look at the Bellhop files you get. Run this:
import arlpy.uwapm as pm
env = pm.create_env2d()
rays = pm.compute_eigenrays(env, debug=True)
You should get an output like this (with different filenames):
[DEBUG] Model: bellhop
[DEBUG] Bellhop working files: /var/folders/d5/wwnqgqpj13s503lrdb4pp0680000gn/T/tmpvj7gmy3o.*
In the specified folder, you should see a few relevant files, e.g.,
tmpvj7gmy3o.env
tmpvj7gmy3o.prt
tmpvj7gmy3o.ray
Zip those files and upload here for me to take a look. Thanks.
Hi Dr Mandar, I would suspect that this is the debian related issue (I just upgrade to Ubuntu 20.04 LTS), something might not looks right to me. It still the same, I am not able to compute eigenrays with arlpy somehow. I had tested manually run munk tests with bellhop and it did worked, although i found unusual print files for them. MunkB_ray.zip
@patel999jay the files in the zip are your manually created ones. In fact if I try to run it, I get a fatal error "Unknown option for SSP approximation". I'm guessing we have a very different version of Bellhop? Are you on the latest one, compiled from sources?
I'm testing against the version here.
@mchitre I had tested again your version as well. If you look at the manual bellhop run in the zip file it has some extra errors generated by program itself. Here :
Tracing beam 41 20.00
*** WARNING ***
Generated by program or subroutine: TraceRay2D
Insufficient storage for ray trajectory
CPU Time = 21.3 s
I am using ubuntu 20.04 LTS (I had tested the same in virtual system LTS 18.04, it works fine. I mean bellhop without any errors.)
So do I understand correctly that this is a Bellhop problem on your system, and not an issue with arlpy?
Your version of bellhop compiled correctly on newer version of ubuntu. It should perfectly run the arlpy right as i can see bellhop in my path via arlpy. Does arlpy have any dependencies on any python 2 packages ?
No, Python 3 only.
Great, I'm marking this issue as resolved. If you encounter any further problems, re-open or create new issue. Thanks.
Hi, I'm trying to use Bellhop model and arlpy library and I get a similar problem. If I try to run
>>> import arlpy.uwapm as pm
>>> env = pm.create_env2d()
>>> rays = pm.compute_eigenrays(env, debug=True)
[DEBUG] Model: bellhop
[WARN] Bellhop did not generate expected output file
[DEBUG] Bellhop working files: /tmp/tmp6cp_l3tx.*
a Warning arise and only the *.env
file is generate in tmp
folder. I've just installed the Acoustics Toolbox on Ubuntu 20.04.6 and tested it on Matlab, but I would try to use it also in Python 3. I tried to follow your previous instruction, but the link about your tested version of at now dosen't work. Do you have some suggestion about this issue, or someone had the same problem? Thanks in advance!
No other files generated in the /tmp/
folder? If so, check if the bellhop.exe
is in path and can be run from Python.
Hi @mchitre, thanks for your reply! I created a lib
folder in at
directory and I copied there all the *.exe
files, included the bellhop.exe
file. Then I add this folder in my path by typing export PATH="~/...../at/lib:$PATH"
. Please, can you better explain to me how I can check if I'm able to run bellhop.exe
from Python on Ubuntu? Thanks for you support!
You should be able to run this:
>>> import arlpy.uwapm as pm
>>> pm.models()
['bellhop']
to check that the bellhop model executable is found and runnable.
Thank you @mchitre. So I already test it and it works, I have your same results: ['bellhop']
. But pm.compute_eigenrays
function don't generate other files in tmp
folder...
Then there should be at least a prt file telling you that there is an error, if you run with debug set to True
No *.prt
file is generated, only the *.env
file was generated when I execute the code posted in my first question (that as debug=True
). I just try to execute it now again.
I'm doing some tests more... Watching inside the uwapm.py
file a error occurs in _Bellhop.run()
function, more precisely adding some line of code in the try-except
statement at lines 606-609, I discovered that the error was a [Errno 2] No such file or directory: '/tmp/tmpoq4ejr80.ray'
. I don't if this information can be useful to you to helping me to understand what is the problem...
@update:
I followed the execution thread of the code and the problem seems to be the execution of the _load_rays
function in uwapm.py
file. Indeed fname_base+'.ray'
can't be loaded because is not present neither in /tmp
folder nor in the local folder of execution. Who has to create it?
@update2 [fixed]:
Continuing to investigate, I see the problem is in the call of function _proc.run(f'bellhop.exe {....}...)'
and, at the end I found that the problem was, as you said in the begining, in the environmental variable $PATH
which don't understand ~
as /home/user
path! So now I tested the compute_eigenray()
function and it properly generate an output.
I probably get ['bellhop']
as output of pm.models()
because at the end of uwapm.py
file there is the line _models.append(('bellhop', _Bellhop))
.
So, @mchitre, thank you for your support!
Glad it's resolved! And thanks for posting the details of what the issue was.
@mchitre i am having the same exact problem as @vinz-uts, but trying to run on windows 10. I've added the path variables (to point to the bellhop.exe, but [bellhop] is working from python, but only the *.env file is being created. My paths are here .
here is how they show up;
Any idea? Thank you so much for your time.
Make sure your PATH is set to point to bellhop for the environment in which you run Python. You should be able to check the environment variable from your Python REPL/notebook.
Newer version is failed to calculate ray tracing.
Here is the output of my
pip freeze
- pip_freeze.txtHere is the error while computing eigen rays. I had also attached copy of example notebook for reference.
bellhop-Copy1.pdf