What is "JIT must be enabled" error while using MATLAB? - windows

I am trying to execute a piece of code which takes fast curvelet transform using 32-bit MATLAB and toolbox in this website. When I execute the line reconstructing signal from its curvelet coefficients, it shows an error:
the line making this error has a break point in the image above. Any of the three choices in this error message results in termination of whole MATLAB program.
Does anyone know how to fix this?

Related

Tensorflow debugger breakpoint (tfdbg)

I am new in tensorflow and I am trying to run a basic program but I am getting the error while feeding the data into the model. I would like to debug it to pin point what is causing the error. I want to track the data in a node of the graph. When I am starting the tfdbg it throws the error "OutOfRangeError RandomShuffleQueue".
Is there any way to debug it from the start ? or can we put the breakpoint in the program ? I understand that the tensorflow program has a graph structure and it might not excecute like a normal python script.
Any help is appreciated.
To make it short,
can we put a breakpoint in a tensorflow program at the desired location to see the tensor values?

How to run PATCHMATCH source code

I would like to inpaint one image with a corrupted part using the patches of another image. in the link below, the authors of PATCHMATCH algorithm has provided the users with the source code. PATCHMATCH algorithm tries to find the nearest patch in the second image to fill the corrupted patches in the first image.
main page of the paper with source code:
http://gfx.cs.princeton.edu/pubs/Barnes_2009_PAR/index.php
and the link of source code:
http://www.cs.princeton.edu/gfx/pubs/Barnes_2009_PAR/patchmatch-2.1.zip
My problem is that I followed the instruction in the readme.txt file and ran build_unix.sh in terminal of Ubuntu 14.04 LTS,but got an error which says:
Unknown MEX argument '-inline'.
Unknown MEX argument '-inline'.
I removed -inline and execute the bash file in terminal and fortunately it worked and got this message:
MEX completed successfully.
MEX completed successfully.
Now my question is how to use this code to inpaint one image corrupted partially by using another image which comes from the same class (e.g.class)
For example:
I do really appreciate it if you could help me out of this problem. I am really in the need of help and have to make this source code run.
I will provide you with more information if needed.
Update: I have come up with an inpainting algorithm using Convolutional Neural Networks, which you can see the result below, I'd like to implement patchmatch algorithm to compare my result with this algorithm. CNN only gets corrupted image as input.

Difficulties compiling fortran .f95 file, how to debug?

I am trying to learn fortran. I wanted to replicate a certain step in a paper but I ran into trouble.
I compiled the file AERsimulation.f95 (I turned on all debugging functions in gfortran I am aware of) I could generate an .out file without any errors (a lot of warnings, however...)
When I tried to run the .out file I got the error message
Fortran runtime error: Index '0' of dimension 1 of array 'k' below lower bound of 1
Now, it is quite difficult for me to understand why exactly this happens. I guess, my question is, whether there is a better way of debugging, so that I can see and click through the code 'live' and see why the error occurs. (I am thinking of the matlab-debugger for instance...)
Any suggestion/hint is very welcome
The files I use are
AERsimulation.f95
AERDATANB.TXT
Thank you very much
Best
Derrick
The meaning of your error message is that you try to access an array element at the position 0 of the array. Arrays in Fortran start at 1 by default.
If you are looking for a better way to debug, try gdb (command line) or if you prefer a graphical interface you can try the Netbeans IDE. It has (limited) support for Fortran an a debugging mode where you can click line by line through the code and see the values of all variables and so on.
On command line try:
gdb name_of_executable
run
the debugger will stop at the line which causes the error.

Real time image processing timing

I am using Arduino controller with MATLAB to build a system that reads in sensor data, which triggers a live feed camera to capture an image for real time image processing. Based on these results further processing is done "after some required delay" through controller. Now the problem I am facing is I cannot read sensor data until the last step of previous stage is completed. I want to be able to read sensor data continuosly and process images even while the last processing stage based on previous image is still executing (because of the delay provided). Thank you for any advice/help. Sorry if my english is bad I hope I'm clear.
You are asking about executing a Matlab code in asynchronous mode. As this maybe hard to control using parallel processes generated by matlabpool (e.g. parfor), you may consider writing your code as MPI. Through MPI you can assign the code lines to be run on each slave process while merging/timing the results can be controlled by the master process.

(Re)starting Matlab after error from error location

I'm debugging a matlab script that takes ~10 minutes to run. Towards the end of the script I do some i/o and simple calculations with my results, and I keep running into errors. Is there a way to start matlab from a certain sport in a script after it exits with an error--the data is still in the workspace so I could just comment out all of the code up until the error point, but I'm wondering if anyone knows a better way to go about doing this without rerunning the entire script (the ultra-lazy/inefficient way)?
Thanks,
Colorado
Yes, use dbstop. Type dbstop if error and then run your script. The minute it hits an error, it will create a breakpoint there and you're in the workspace of the script --- which means you can debug the error, save data ; anything you want! Here's a snippet from the documentation for dbstop if error --- there are other ways to do dbstop, so do check it out:
dbstop if error
Stops execution when any MATLAB program file you subsequently run produces a run-time error, putting MATLAB in debug mode, paused at the line that generated the error. The errors that stop execution do not include run-time errors that are detected within a try...catch block. You cannot resume execution after an uncaught run-time error. Use dbquit to exit from debug mode.
Double percent signs will enable 'cell mode' which lets you run little blocks of code in steps. Sounds like just what youre looking for.

Resources