Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #11180 > unrolled thread

Using Workbench to debug Compile[] ??

Started byAxel <axel.kowald@gmail.com>
First post2012-08-02 08:58 +0000
Last post2012-08-05 01:49 +0000
Articles 5 — 3 participants

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Using Workbench to debug Compile[] ?? Axel <axel.kowald@gmail.com> - 2012-08-02 08:58 +0000
    Re: Using Workbench to debug Compile[] ?? David Bailey <dave@removedbailey.co.uk> - 2012-08-03 08:20 +0000
      Re: Using Workbench to debug Compile[] ?? Axel <axel.kowald@gmail.com> - 2012-08-04 10:04 +0000
        Re: Using Workbench to debug Compile[] ?? David Bailey <dave@removedbailey.co.uk> - 2012-08-05 01:50 +0000
      Re: Using Workbench to debug Compile[] ?? W Craig Carter <ccarter@MIT.EDU> - 2012-08-05 01:49 +0000

#11180 — Using Workbench to debug Compile[] ??

FromAxel <axel.kowald@gmail.com>
Date2012-08-02 08:58 +0000
SubjectUsing Workbench to debug Compile[] ??
Message-ID<jvdffu$c5t$1@smc.vnet.net>
Hi everybody,

I wrote a function that I would like to speed up using Compile[].
I got compilation errors that I managed to solve. But when I now run the compiled function I also get runtime errors.

So is there a way to use Mathematica Workbench to debug functions that were compiled with the Compile[] command ??

Many thanks,
  Axel

[toc] | [next] | [standalone]


#11189

FromDavid Bailey <dave@removedbailey.co.uk>
Date2012-08-03 08:20 +0000
Message-ID<jvg1k4$rkl$1@smc.vnet.net>
In reply to#11180
On 02/08/2012 09:58, Axel wrote:
> Hi everybody,
>
> I wrote a function that I would like to speed up using Compile[].
> I got compilation errors that I managed to solve. But when I now run the compiled function I also get runtime errors.
>
> So is there a way to use Mathematica Workbench to debug functions that were compiled with the Compile[] command ??
>
> Many thanks,
>    Axel
>

I am not a great fan of Workbench, but I think the first step is to 
share your code with us.

David Bailey
http://www.dbaileyconsultancy.co.uk

[toc] | [prev] | [next] | [standalone]


#11201

FromAxel <axel.kowald@gmail.com>
Date2012-08-04 10:04 +0000
Message-ID<jvis3r$2uf$1@smc.vnet.net>
In reply to#11189
No, this is just a general question. 
I want to know if it is at all possible to debug a function that is returned by the Compile command with the Workbench. As I see it, this is NOT possible because I now have bytecode and not any more Mathematica source code. 
I just would like to confirm this.

If you know any other way to debug compiled functions please let me know.

Thanx
  Axel

[toc] | [prev] | [next] | [standalone]


#11208

FromDavid Bailey <dave@removedbailey.co.uk>
Date2012-08-05 01:50 +0000
Message-ID<jvkjge$5tm$1@smc.vnet.net>
In reply to#11201
On 04/08/2012 11:04, Axel wrote:
> No, this is just a general question.
> I want to know if it is at all possible to debug a function that is returned by the Compile command with the Workbench. As I see it, this is NOT possible because I now have bytecode and not any more Mathematica source code.
> I just would like to confirm this.
>
> If you know any other way to debug compiled functions please let me know.
>
> Thanx
>    Axel
>

Well I haven't used compiled code explicitly much, but as I understand 
it, the results should be the same as non-compiled code, except perhaps 
for rounding errors.

Therefore, if I had code that worked in interpreted mode, but not in 
compiled mode, I would try to thin the code down to the smallest 
fragment that showed a problem, and then perhaps report it as a bug to 
Wolfram.

I would also test code before trying to compile it - so if you are 
talking about bugs that are there anyway, get them out before you use 
the compiler! To do this, you may need to scale the problem down a bit 
so that it can execute without the compiler in a reasonable amount of 
time. Usually this is fairly easy.

David Bailey
http://www.dbaileyconsultancy.co.uk

[toc] | [prev] | [next] | [standalone]


#11207

FromW Craig Carter <ccarter@MIT.EDU>
Date2012-08-05 01:49 +0000
Message-ID<jvkjff$5td$1@smc.vnet.net>
In reply to#11189
Hello,
Sometimes, I've found this useful: (from the CompilePrint man page)

Needs["CompiledFunctionTools`"]
c = Compile[{{x}}, x^2 + Sin[x^2]];
CompilePrint[c]

W Craig Carter
Professor of Materials Science, MIT



On Aug 4, , at Sat Aug 4, 12 @6:01 AM, Axel wrote:

> No, this is just a general question.
> I want to know if it is at all possible to debug a function that is 
returned by the Compile command with the Workbench. As I see it, this is 
NOT possible because I now have bytecode and not any more Mathematica 
source code.
> I just would like to confirm this.
>
> If you know any other way to debug compiled functions please let me 
know.
>
> Thanx
>  Axel
>

[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web