Open feng-spinning opened 1 year ago
Your error points to the presence of negative entries (-2147095045) in the variable idx
(line 130). I suspect the issue is connected to the compilation of the Cython code on Windows, as idx
is derived from the function get_finite_idx_and_cost
, which is defined in raytracing_ot.pyx. Note that a negative entry in idx
should never occur.
I also suspect that there is no issue with the definition of the velocity model; however, please double-check. If you downloaded vp.bin from https://www.geoazur.fr/WIND/bin/view/Main/Data/Marmousi, your velocity
(lines 229-230) should be an array with the shape (376, 1151).
Unfortunately, I cannot reproduce your error on my machine (Linux, Ubuntu). If you are unable to switch to either Linux or Mac (e.g., through a virtual machine), the only suggestion I can offer is that you rewrite the function get_finite_idx_and_cost
in Python. This should be fairly straightforward; the only "major" change in this conversion involves switching from the use of cpp_vectors to traditional Python lists (and translating cpp_vector.push_back
into list.append
). Another change, of course, is that the function will run much slower.
For reference, I successfully tested the code on two different Linux machines with Cython versions 0.29.33 and 3.0.0.
Thanks a lot! This issue does not occur on my remote server with linux operation system. I've pip
installed seislib and docplex, but now there shows docplex.mp.utils.DOcplexException: Cannot solve model: no CPLEX runtime found.
. I think this might occur because i haven't got the IBM optimization software. Is this the key problem? Or i installed seislib and docplex in a wrong way. Please forgive my stupidity QAQ
No worries! Glad you solved your initial issue.
I suspect you will need to install the IBM optimisation software. In doing so, make sure to register and get a CPLEX license (if you are an academic, you can get one for free). The license will be needed to solve relatively large linear programming problems, such as that concerning Fig. 4.
After compiling the setup.py
python setup.py build_ext --inplace
, I've got an raytracing_ot.cp39-win_amd64.pyd. Then after running thefig_4.py
, I've faced with this issue: