How to profile code in julia? - julia

I have a program in julia and I know it took a lot of memory. I want to know where it is happening.
How can I monitor the code or profiling for finding the problem?

Please read the manual: https://docs.julialang.org/en/v1/manual/profile/index.html
Profiling for memory use discussed at the bottom. The Juno IDE has some nice tools for interacting with the profiler: http://docs.junolab.org/latest/man/juno_frontend/#Profiler-1

Related

R does not engage my computer's GPU when running complex code

I am running R Studio 64bit on a Windows10 laptop with a Nvidia GPU in it, however, when I am running code, specifically Rshiny apps, they take a long time. This laptop has a GPU but my task manager shows that the GPU is not being utilized. Would the GPU make my program run faster? I do not know much about hardware so forgive my ignorance regarding this.
In answer to your question getting a new GPU would have no impact on the speed of your code.
By default most R code is single threaded meaning that it will only use 1 CPU core. There are various ways to do parallel processing (using more than 1 core) in R. And there are also packages that can make use of GPUs. However it sounds like you are not using either of these.
There are various different ways that you could code your application that would make it more efficient. However how you would go about this would be specific to your code. I would suggest you ask a different question regarding.
Also Hadley's excellent book, Advance R, has techniques for profiling and benchmarking your code to increase performance: http://adv-r.had.co.nz/Profiling.html

Arduino, Particle, Teensy debugging?

I'm starting to use Visual Studio Code for my IoT work, including microprocessor coding. I've used Arduino and Teensy, my current project is using a Particle Electron.
I need a head start finding the correct add-ins and/or approach to debug an Electron. I believe my 2 unknowns are:
What VSCode extension should I use, does one exist, do I need one?
Do I require a piece of hardware, like the Particle debug shield, ST-Link J-Link, etc.?
Is there a common interface/protocol I should be looking for, to
measure VSCode compatibility for debuggers, etc.?
Any input would be appreciated.
Thanks
-John
You can find answer to your query here :
Spend some time reading its documentation.
compiling details can be found here.

Crash around pthreads while integrating SQLite into RTP application on VxWorks

I am trying to integrate SQLite library into RTP application on VxWorks. I built SQlite and link against it statically. I run simple test that works well on other systems. The test is realy primitive one: sqlite_open(), sqlite_exec(), sqlite_close(). Parameters are correct (works on other systems).
I experience SIGSEGV (signal code 11). I traced down to the point of crash with "printf()s" and discovered that it crashes after pthread_mutex_lock() call. What is interesting - it returns from the function call and then crashes. I checked the stack size (having a taskDelay() afore actual crash). Stack is big enough and far from its limit.
I try to build SQlite with SQLITE_HOMEGROWN_RECURSIVE_MUTEX and without. And I build all the time with SQLITE_THREADSAFE 1.
If someone has experienced something like that and managed to fix it - please let me know.
Here are few details, jut to outline them.
VxWorks wersion: 6.8
SQlite sources: 3.7.16.1
Development environment: Windriever
CPU Architecture: PowerPC
Thanks in advance
I have found it. I had no pthreads in my VxWorks OS. Now it works.
The strange thing is that there is no way to verify that while building an application against pthreads library.
There is no easy way to do that, but at least some kind of "stub" function, rhater than SIGSEGV. Or am I asking too much for that kind of money?

What could be a good disk intensive program

I am looking to run some experiments which are hard disk RW intensive on my unix box.
Could you suggest me some programs which I can use for this purpose ?
Do you mean testing tools as described here?

Cross compile Qt source the Angstrom toolchain(any linux supported embedded toolchain would do)

I am new to cross compiling and willing to get started with cross compiling Qt for beagleboard. Can some one give me specific instructions for this or recently tried tutorial. Please do not assume any knowledge on my part so can not handle instructions like "you may have to edit this to your architecture". I have a few important questions.
how to build Angstrom tool chain and how to prepare it for cross compiling. (I have tried the anstrom web site and never found such random instrutions in my life).
How to cross compile Qt after installing.
The process is a little daunting for the first time developer. I used this blog to give me a start,
http://treyweaver.blogspot.com/2010/10/setting-up-qt-development-environment.html
but like all of the other instructions, sometimes there will be deviations. It took me a while to sort it all out. You are going to have to read and study to to this. It is a worthy thing to do however. As far as Angstom, there are ready made images available. I started with that. You should use Ubuntu to do all of your work. Linux makes it a lot easier.

Resources