I've been vaguely aware of this behavior for a long time but never looked into it. Consider this sample:

(* I know the proper definition is: *) 
(* test = Compile[{{a, _Complex}}, Sqrt@a]; *)
test = Compile[a, Sqrt@a];

(* You can split the cell here *)

Version 7 behavior:

enter image description here

Version 8 (and later) behavior:

enter image description here

As shown above, since version 8, after the CompiledFunction::cfn is generated for 3 times, it silently disappears (nothing like General::stop comes out) and no longer shows up.

So far, the only way I find that can make the warning appear again is to re-evaluate the definition of test.

Is this a bug or new-added feature? If the latter, is it possible to turn on the warning CompiledFunction::cfn without re-evaluating definition of test in and after version 8?

  • $\begingroup$ The same happens in versions 11.3 and 12.3 $\endgroup$
    – mattiav27
    Nov 13, 2022 at 9:27
  • $\begingroup$ @mattiav27 Just tested in older version. This behavior is introduced in version 8. See the new-added screenshot. $\endgroup$
    – xzczd
    Nov 13, 2022 at 11:43
  • $\begingroup$ Just blind guess, it feels like General::stop is (wrongly) suppressing CompiledFunction::cfn. $\endgroup$
    – Silvia
    Nov 13, 2022 at 19:09


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.