Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: debugging code that contains compile

  • To: mathgroup at smc.vnet.net
  • Subject: [mg91303] Re: debugging code that contains compile
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
  • Date: Thu, 14 Aug 2008 07:00:34 -0400 (EDT)
  • Organization: The Open University, Milton Keynes, UK
  • References: <g7untp$5s1$1@smc.vnet.net>

Benjamin Hell wrote:

> I have some code where I define some functions using compile to speed them up. Code runs fine without compile, but when using compile I get some errors. So what I wanna do now is of course analyze where these errors come from. Unfortunately Mathematica Frontend just tells me the kind of error and what variables are involved. Due to my code being pretty large, it's no easy task to figure out where these errors in deed appear.

<snip>

By "errors", do you mean you get any error messages of the form

   CompiledFunction::error_code:error_text

For instance,

   CompiledFunction::cfsa: Argument 1+u at position 1 should be a \
   machine-size real number.

   CompiledFunction::cfn: Numerical error encountered at instruction 2; \
   proceeding with uncompiled evaluation.

 From my experience, the most current kinds of error that people 
encounter when compiling some working-as-expected-before-compilation 
code are:

. wrong expectations about Compile: not every function is compilable and 
successfully compiled code does not systematically translate as speed 
improvement

. wrong format for input variables and/or output results returned by 
intermediate calls

Regards,
-- Jean-Marc


  • Prev by Date: Re: Move frame labels closer to frame?
  • Next by Date: Re: Feynman slash notation
  • Previous by thread: debugging code that contains compile
  • Next by thread: Re: debugging code that contains compile