MathGroup Archive 2008

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

Search the Archive

Re: debugging code that contains compile

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

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.


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


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 

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

-- 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